feat: add data_date to project summary response

Include the schedule data date (last_recalc_date from XER) in the
get_project_summary tool response. This shows when the schedule
was last calculated in P6.

Changes:
- Add last_recalc_date column to projects table schema
- Parse last_recalc_date in PROJECT table handler
- Include last_recalc_date in db loader
- Return data_date field in get_project_summary query
- Update contract test to verify data_date presence
This commit is contained in:
2026-01-06 22:42:10 -05:00
parent 8fc2a87607
commit 2255b65ef6
6 changed files with 11 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ As an AI assistant user, I want to get a high-level summary of the project sched
**Acceptance Scenarios**:
1. **Given** an XER file is loaded, **When** I request the project summary, **Then** I receive project name, start date, finish date, and total activity count
1. **Given** an XER file is loaded, **When** I request the project summary, **Then** I receive project name, data date, start date, finish date, and total activity count
2. **Given** an XER file with milestones, **When** I request milestones, **Then** I receive a list of milestone activities with their target dates
3. **Given** an XER file is loaded, **When** I request the critical path, **Then** I receive the sequence of activities that determine the project end date
4. **Given** no XER file is loaded, **When** I request project summary, milestones, or critical path, **Then** I receive a clear error message indicating no file is loaded
@@ -98,7 +98,7 @@ As an AI assistant user, I want to get a high-level summary of the project sched
- **FR-003**: System MUST expose an MCP tool to list all activities with filtering options (by date range, by WBS, by activity type)
- **FR-004**: System MUST expose an MCP tool to retrieve detailed information for a specific activity by ID
- **FR-005**: System MUST expose an MCP tool to query predecessor and successor relationships for any activity
- **FR-006**: System MUST expose an MCP tool to retrieve project summary information (name, dates, activity count)
- **FR-006**: System MUST expose an MCP tool to retrieve project summary information (name, data date, plan dates, activity count)
- **FR-007**: System MUST expose an MCP tool to list milestone activities
- **FR-008**: System MUST expose an MCP tool to identify the critical path
- **FR-009**: System MUST return structured data that AI assistants can process and present to users
@@ -139,6 +139,7 @@ As an AI assistant user, I want to get a high-level summary of the project sched
- Q: How should multi-project XER files be handled? → A: Require explicit project selection if multiple exist
- Q: Should calendar data be exposed as queryable? → A: Internal use only (not exposed as queryable)
- Q: What happens when any query tool is called without a file loaded? → A: Return informative error indicating no XER file is loaded; applies to all tools except load_xer
- Q: Should project summary include the data date? → A: Yes, include the data date (schedule "as-of" date) in project summary response
## Assumptions