82 lines
4.1 KiB
Markdown
82 lines
4.1 KiB
Markdown
|
|
# Agent Handoff - 2026-03-08 - Cross-Project Target Grounding (GR-027)
|
||
|
|
|
||
|
|
## Scope
|
||
|
|
This handoff captures work completed on the open gap `GR-027` (cross-project task targeting mismatch) in Whetstone taskitem generation/validation.
|
||
|
|
|
||
|
|
## Problem Addressed
|
||
|
|
Cross-repo orchestration specs were producing Whetstone-internal `targetFiles` (`editor/src/...`, `tools/mcp/...`) even when the workspace was set to `/home/bill/Documents` and the spec explicitly targeted external repos.
|
||
|
|
|
||
|
|
## What Was Implemented
|
||
|
|
|
||
|
|
### 1) Generator/Queue cross-project mismatch detection
|
||
|
|
File: `editor/src/mcp/RegisterArchitectIntakeTools.h`
|
||
|
|
|
||
|
|
- Added cross-project repo signal detection from normalized requirements.
|
||
|
|
- Added cross-project fallback target grounding when strict execution contract is enabled and `targetFiles` are otherwise missing.
|
||
|
|
- Added queue blocker `cross_project_target_mismatch` when cross-project intent is detected but generated targets are internal-only.
|
||
|
|
- Added blocker metadata mapping for `cross_project_target_mismatch` to gap class `cross_project_targeting_gap` and remediation hints.
|
||
|
|
|
||
|
|
### 2) Validator mismatch classification
|
||
|
|
File: `editor/src/mcp/RegisterValidationTools.h`
|
||
|
|
|
||
|
|
- Extended `whetstone_validate_taskitem` schema with optional `expected_project_roots`.
|
||
|
|
- Added cross-project mismatch detection in validation results.
|
||
|
|
- Added gap class mapping `cross_project_targeting_gap` and recommended tool routing for that class.
|
||
|
|
|
||
|
|
### 3) Semantic artifact-file injection into pipeline
|
||
|
|
File: `tools/mcp/run_sprint_taskitem_pipeline.sh`
|
||
|
|
|
||
|
|
- Extended semantic requirement injection to derive `requirement` entries from contract `required_artifacts` backtick paths.
|
||
|
|
- Injected normalized requirements like `explicit target file: cad_orchestrator/models.py`.
|
||
|
|
|
||
|
|
### 4) Path extraction/normalization hardening
|
||
|
|
File: `editor/src/mcp/RegisterArchitectIntakeTools.h`
|
||
|
|
|
||
|
|
- Added normalization helpers for path-like tokens (including absolute `/home/bill/Documents/...` inputs).
|
||
|
|
- Added extraction of inline path tokens beyond code-fenced/backticked fragments.
|
||
|
|
|
||
|
|
### 5) Per-task target scoping for requirement-slice tasks
|
||
|
|
File: `editor/src/mcp/RegisterArchitectIntakeTools.h`
|
||
|
|
|
||
|
|
- Added task-level scoping so tasks titled `Requirement Slice semantic-artifact-file-*` receive only their corresponding single target file.
|
||
|
|
- Non-slice tasks currently keep the broader target set.
|
||
|
|
|
||
|
|
### 6) Tests updated
|
||
|
|
Files:
|
||
|
|
- `editor/tests/step615_test.cpp`
|
||
|
|
- `editor/tests/step682_test.cpp`
|
||
|
|
|
||
|
|
- Added focused checks for cross-project target grounding and validation mismatch classification.
|
||
|
|
|
||
|
|
## Key Validation Runs
|
||
|
|
|
||
|
|
### A) Cross-project roadmap run
|
||
|
|
- Run: `logs/taskitem_runs/constcad_ecosystem_roadmap_20260308_093527`
|
||
|
|
- Result: no internal default fallback; `targetFiles` grounded to cross-project targets.
|
||
|
|
|
||
|
|
### B) SPRINT-005 run (pre file-level injection)
|
||
|
|
- Run: `logs/taskitem_runs/sprint_005_execution_spec_whetstone_20260308_093527`
|
||
|
|
- Result: repo-level targets (README-level grounding).
|
||
|
|
|
||
|
|
### C) SPRINT-005 run (after file-level semantic injection)
|
||
|
|
- Run: `logs/taskitem_runs/sprint_005_execution_spec_whetstone_20260308_101705`
|
||
|
|
- Result: concrete cross-project files propagated into `targetFiles`.
|
||
|
|
|
||
|
|
### D) SPRINT-005 run (after per-task scoping)
|
||
|
|
- Run: `logs/taskitem_runs/sprint_005_execution_spec_whetstone_20260308_103102`
|
||
|
|
- Result:
|
||
|
|
- `Requirement Slice semantic-artifact-file-*` tasks have single-file `targetFiles`.
|
||
|
|
- Composite/review tasks still carry broader file lists.
|
||
|
|
|
||
|
|
## Current Status
|
||
|
|
- `GR-027` core mismatch is addressed in generation, queue gating, and validation classification.
|
||
|
|
- Cross-project explicit file grounding is now present for hard specs that include artifact paths.
|
||
|
|
- Requirement-slice tasks are now narrowly scoped.
|
||
|
|
|
||
|
|
## Suggested Next Steps
|
||
|
|
1. Scope non-slice tasks (`Intake Foundation`, `Execution Readiness`, `Architect Review`) into smaller deterministic file groups.
|
||
|
|
2. Add/refresh dedicated regression tests for:
|
||
|
|
- queue blocker `cross_project_target_mismatch`
|
||
|
|
- per-task single-file scoping behavior for semantic artifact slices.
|
||
|
|
3. Update `docs/generator_readiness_gap_registry_2026-02-26.md` to set `GR-027` from `open` to `partial` or `done` after final acceptance criteria decision.
|