fix: ground Intent Capture claims (2.5.10) - #647
Conversation
leandrodamascena
left a comment
There was a problem hiding this comment.
The grounding contract remains bypassable, and the PR leaves the unit tier failing.
aidlc-sensor-claim-sources.ts:112-145: Source IDs and answered questions inside comments or code fences are accepted. The sensor passed artifacts citing entirely fabricated sources. Parse real Markdown entries and verify[desc],[scope], and memory references against their authoritative inputs.aidlc-product-lead-agent.md:31-34: This rule affects four other stages using this reviewer, but those stages do not produce source registers or inline citations. Scope the rule tointent-capture.aidlc-sensor-claim-sources.ts:305-308: Substring matching allows a broader assumption than the human accepted. Compare normalized assumption entries exactly.- Adding the reviewer to
intent-capture.md:10breakst232-phase-progress-flip.test.ts, which lacks the newly required review receipt. - The unit tier also fails because
t247-claim-sources-sensor.test.tsis absent fromEXPECTED_NONE_TO_CLI, and the new sensor documentation triggers the legacy-path gate.
Validation: focused tests, packaging, typecheck, and smoke passed; unit finished with 3 failed files and 5 failed assertions.
|
Addressed the requested changes in
Validation completed:
|
leandrodamascena
left a comment
There was a problem hiding this comment.
The previous findings are fixed, but two provenance bypasses remain:
- Restrict memory sources to active files (
core/tools/aidlc-sensor-claim-sources.ts:282)
memoryRuleMatches() accepts any file beneath the active space memory directory. Intent Capture only loads memory/{org,team,project}.md, so a fabricated file such as memory/fabricated.md can introduce an arbitrary rule that the sensor accepts as authoritative.
Please restrict accepted sources to the memory files actually loaded by this stage and add a negative test.
- Require an exact assumption-acceptance answer (
core/tools/aidlc-sensor-claim-sources.ts:486)
The prefix regex accepts answers such as [Answer]: Accept assumptions? No as confirmation. With a matching assumption list, the sensor returns pass: true, despite the human explicitly declining acceptance.
Please parse the exact positive option, such as A. Accept assumptions, and add negative coverage for contradictory or extended answers.
The PR is also currently conflicting with v2, and its 2.5.7 version collides with the current base.
Verification: the official smoke/unit suite, packaging check, typecheck, and all 16 t247 tests pass.
32c1ea8 to
1152f0a
Compare
|
Pushed the post-rebase hardening in Final validation on
PR metadata is updated to |
362fd77 to
d775b3c
Compare
… t247 collision v2's tip landed awslabs#647 (Intent Capture claim-grounding) while this branch was rebasing, colliding on two fronts: it also claimed the 2.5.11 CHANGELOG slot, and its new test file took t247 (which this branch had just renamed t245 to, per the earlier apackeer-review response). Per the AGENTS.md conflict-trap convention, this branch (second to merge) rebases and re-bumps. - CHANGELOG heading renamed 2.5.11 -> 2.5.12, placed above awslabs#647's 2.5.11 entry. - aidlc-version.ts / README badge bumped to 2.5.12. - t247-source-freshness-receipts.test.ts -> t244-source-freshness-receipts.test.ts (t244 is the next free slot; t247 is now awslabs#647's t247-claim-sources-sensor.test.ts). - dist/ regenerated and coverage registry regenerated to match.
… t247 collision v2's tip landed awslabs#647 (Intent Capture claim-grounding) while this branch was rebasing, colliding on two fronts: it also claimed the 2.5.11 CHANGELOG slot, and its new test file took t247 (which this branch had just renamed t245 to, per the earlier apackeer-review response). Per the AGENTS.md conflict-trap convention, this branch (second to merge) rebases and re-bumps. - CHANGELOG heading renamed 2.5.11 -> 2.5.12, placed above awslabs#647's 2.5.11 entry. - aidlc-version.ts / README badge bumped to 2.5.12. - t247-source-freshness-receipts.test.ts -> t244-source-freshness-receipts.test.ts (t244 is the next free slot; t247 is now awslabs#647's t247-claim-sources-sensor.test.ts). - dist/ regenerated and coverage registry regenerated to match.
Summary
Closes #622.
Intent Capture could previously add unsupported scope, stakeholder, metric, or communication claims beyond the initial description and confirmed answers. This change makes claim provenance explicit and gives deterministic, reviewer, and human checks separate responsibilities.
Changes
## Sourcesregister tointent-capture-questions.md.## Assumptions & Open Questionsin both produced artifacts.claim-sourcessensor, wired through the dispatcher, unified CLI, binary build, all five harness distributions, and documentation.stakeholder-mapa required Approval & Handoff consume.2.5.10.The sensor validates citation shape and source resolution. It deliberately does not claim semantic entailment; the Product Lead reviewer judges whether a cited source actually supports the claim, and the human owns assumption acceptance.
Verification
t43,t92,t93): 80 tests, 270 assertions, 0 failures.bun run check: all harness distributions in sync; all TypeScript configurations and repository-wide Biome pass.git diff --check: pass.Live Claude/Kiro TUI journeys remain opt-in and were not rerun after the rebase.
Related Work
PR #526 also edits Intent Capture for discovery-material intake. It does not implement claim-level grounding or this sensor, but it overlaps
intent-capture.mdand may require a conflict resolution if it lands first.Checklist