feat(harness): compile role-neutral focused briefs - #807
Conversation
Refs: SAP-3150
Refs: SAP-3150
Refs: SAP-3150
Refs: SAP-3150
Refs: SAP-3150
Refs: SAP-3150
Refs: SAP-3150 # Conflicts: # packages/harness/src/server/agent-map-mcp.test.ts
Refs: SAP-3150
Refs: SAP-3150
Refs: SAP-3150
Review — PR #807 (round 1)1. Compiled brief content can violate the persistence codec's bounds, and the failure is reported as retryable
The compiler seals briefs whose
Failure path: Separately, 2. Ad-hoc delegation scope is unbounded — a nested brief can own another workstream's nodes
For Reachable from 3. The doc contradicts itself, and the changeset omits the apply/rebase behavior change
4. Every plan apply now re-hashes the project's entire map and plan history
5. The focused-context overlay is public API with no producer
Related footgun: Nits
Verdict: Request changes — finding 1 makes canonical refresh permanently unrecoverable for |
Refs: SAP-3150
Review — PR #807 (round 2, delta since
|
Refs: SAP-3150
|
/review |
Review — PR #807 (round 3, delta since
|
Refs: SAP-3150
|
Superseded by the maintainer-authorized 15-part Agent Map review stack. This PR is closed without merging; its branch and review history remain preserved. Replacement increments:
The complete testing branch remains |
Primary change type
Problem and motivation
Project agents need bounded task context without creating a separate builder identity or turning brief freshness into implementation authority. SAP-3150 adds deterministic focused briefs over the exact role-neutral Agent Map and project-plan versions introduced by SAP-3149.
Summary and scope
Session creation and delegation are intentionally out of scope for SAP-3151. This change does not alter tools or authority for sessions without a brief.
Related work
Related issue or discussion: SAP-3150
Stacked on #806 /
conductor/sap-3149-neutral-plan-versions-v1at90eb569eb6b90b917c49128b6a23c7215a0843d6.Validation
Tests and documentation
Added deterministic compiler golden/tamper/lineage tests; canonical and nested focus tests; targeted impact tests; retirement/reactivation and refresh-replay tests; malformed graph, boundary, prompt-injection, redaction, truncation, no-brief compatibility, common-prompt overlay, MCP, and public-export tests. Updated
packages/harness/docs/shared-build-plan.md.Compatibility and release impact
build_plan_brief_refreshMCP tool. Existing no-brief sessions preserve their prompt and tool authority.@sapiom/harnesschangeset.Security
will follow the
Security Policy for
private reporting.
AI assistance
OpenAI Codex implemented the focused-brief compiler, lifecycle, projection, service/MCP integration, documentation, and tests. I verified the exact stacked ancestry, reviewed the complete diff and forbidden legacy terminology, and ran the build, typecheck, lint, focused, full Harness, and root test commands reported above.
Checklist
CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.any N/A checks above.