graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Merge #799: Require explicit project scope for constraints (ADR renumbered to 0090)
Rach Pradhan113495d22ee7
diff --cc TUI/root.zigindex eb655d4e,8e4869a5..6a3930dc--- a/TUI/root.zig+++ b/TUI/root.zig@@@ -87,7 -88,7 +88,8 @@@ test_ = @import("issue_537_reviewer_tests.zig");_ = @import("issue_524_tests.zig");_ = @import("issue_737_tests.zig");+ _ = @import("issue_792_tests.zig");+ _ = @import("issue_789_tests.zig");_ = @import("input.zig");_ = @import("keys.zig");_ = @import("nav.zig");diff --cc docs/adr/0090-project-constraints-require-explicit-scope.mdindex 00000000,c527c63e..724367ffmode 000000,100644..100644--- a/docs/adr/0090-project-constraints-require-explicit-scope.md+++ b/docs/adr/0090-project-constraints-require-explicit-scope.md@@@ -1,0 -1,51 +1,51 @@@-# 0088. Project constraints require explicit scope++# 0090. Project constraints require explicit scope++ Status: accepted 2026-09-08++ ## Context++ The constraint capture prompt treated every rejection as a standing project+ rule. `note_constraint` accepted a model-authored imperative with no scope and+ stored it in the project ledger, so wording such as “right now” or “for this+ task” could survive compaction and reach unrelated future sessions. Legacy+ records carry no scope metadata, and the fullscreen TUI did not expose the+ existing `/never` review and retirement path.++ Graff has no single reliable boundary for an inferred “task” or “session” across+ follow-up questions, goals, resume, branch and frontend-specific `/new`+ semantics. Substring classification would also widen quoted, negated or+ qualified language.++ ## Decision++ Temporary, task-limited, session-limited and ambiguous steering remains local+ conversation context. It is followed as written and is not copied into the+ project ledger. Durable capture is allowed only when the user clearly states a+ standing project rule. The root then calls `note_constraint` with the explicit+ `project` scope and exact text copied from the current user message. Missing or+ non-project scope, paraphrased text and overlong text fail before any write.++ New durable records carry `scope: project`. Existing records without scope stay+ active for compatibility but parse as `legacy_unscoped`; prompt authority and+ review output identify them as needing user review rather than silently+ confirming project scope. Recorded-state JSON includes scope, provenance and+ creation time.++ Constraint capture is visible in normal transcripts and reports the exact text,+ scope, origin and text-based undo command. The fullscreen TUI exposes `/never`+ (`/constraint`) through the existing user-owned command implementation. It+ refuses constraint mutation while a model turn, compaction, bash command or file+ operation is active rather than racing prompt refresh or cancelling the work.++ ## Consequences++ A plain correction no longer becomes cross-session policy. Explicit project+ rules still refresh all prompt variants in the same turn and retain the+ append-only, user-only retirement guarantees from ADRs 0033, 0066 and 0067.++ Legacy constraints require review but are not silently dropped during upgrade.+ Graff deliberately does not persist inferred turn/task/session scopes: adding+ those scopes later requires a stable lifecycle identity shared by every+ frontend, not natural-language heuristics. Tests cover fail-closed capture,+ legacy labeling, visible metadata, same-turn refresh and every fullscreen TUI+ runtime trajectory.diff --cc docs/adr/README.mdindex 3b7dd76b,9b359d20..f3908d8a--- a/docs/adr/README.md+++ b/docs/adr/README.md@@@ -98,8 -98,7 +98,9 @@@ record only when you need the evidence| [0085](0085-in-session-update-is-next-launch.md) | `/update` installs a verified release for the next launch; this session keeps its original binary. || [0086](0086-desktop-drafts-belong-to-open-chats.md) | Unsent desktop drafts and uploads belong to open chats and survive hidden panes; closing a chat disposes them. || [0087](0087-bounded-desktop-presentation-work.md) | Bound syntax caches and live code rendering; project saved transcripts before sending them to the renderer and measure identical desktop workloads. |-| [0088](0088-project-constraints-require-explicit-scope.md) | Local steering stays local; durable project constraints require explicit scope and exact current-user text, while legacy unscoped records are reviewable. |+| [0088](0088-failed-children-return-partial-evidence.md) | Failed children return bounded partial evidence with error status intact, including an excerpt for workflow synthesis. |+| [0089](0089-canonical-compaction-windows-survive-recovery.md) | Preserve standalone compaction windows across pruning and resume; opaque recovery uses the server or reports failure without discarding history. |++| [0090](0090-project-constraints-require-explicit-scope.md) | Local steering stays local; durable project constraints require explicit scope and exact current-user text, while legacy unscoped records are reviewable. |## When to write one