Repository navigation
Backlog
Labels
enhancementNew feature or requestepic:preflightPreflight answer: make every AI agent want Charter's governancepriority:p1Should ship this cycletype:featureNew capability or extension point
Description
Problem
The first thing an agent sees decides whether it ever comes back. Today, at pinned 5412100:
CLAUDE.mdsays to callcharter_contextbefore anything else. That returns a snapshot with branch, dirty state and recent commits, which is a weakergit status, and is sometimes stale (context-refresh --once and charter_context serve a stale snapshot as fresh after a branch, HEAD or working-tree change #440). The first impression teaches the agent to skip Charter.AGENTS.md,GEMINI.md,.cursorrulesand the Copilot pointer each say only "see.ai/manifest.adf", and show nothing about what Charter can tell you..ai/state.adfsaysCURRENT: v1.9.3while the package is 3.0.0.- When the pre-commit evidence gate fails, it says "Fix failing constraints before merging" with no source file, no repair, and no test.
Proposed
- Every vendor pointer (generated by the pointer templates and
adf compile, not hand-edited) shows one real, short example of the preflight answer and one line: "Before editing a file, runcharter adf context --files <path>: it tells you the rule that binds it, its headroom, whether it's a published contract, and the test to run first." Same content for every vendor; Charter is cross-agent by design. - Replace "call
charter_contextfirst" with the preflight line. Keepcharter_contextavailable but don't lead with it. - Gate failure output ends with the preflight answer for the failing file: source, measured vs ceiling, the smallest legitimate repair ("remove N lines or extract"), and the verification command. Raising the ceiling is shown as an owner decision, never the default next step.
- Refresh
state.adfso the repo's own first impression is current.
Acceptance
charter adf compile/ pointer generation produces the new text for every supported vendor file. A snapshot test covers each vendor.- An induced ceiling failure (fixture: baseline 4, ceiling 5, add 2 lines) prints the source file,
6/5, the repair, and the rerun command. After the repair, the same command exits 0. - No vendor file gets content the others lack.
Depends on the preflight answer (#447) for full value; items 2–4 can ship first. Part of #437.
Coordination with existing issues
- Release needed: published 2.1.0 still overwrites a hardened governance workflow (docs on main say it won't) #397 (release gap): most agents run the published CLI (npm
latestis 2.1.0). Generated pointer text must only advertise behaviour the installed CLI has. Gate the preflight line on the CLI version that generates the pointer, or fall back to a line that's true for that version. Acceptance: pointers generated by a CLI without preflight fields don't mention them. - hook: commit-msg gate does not apply CI's HIGH-risk unlinked-commit check #342 (hook vs CI): the new gate-failure output must be identical whether the failure comes from the local hook or from CI. One code path renders both.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestepic:preflightPreflight answer: make every AI agent want Charter's governancepriority:p1Should ship this cycletype:featureNew capability or extension point
Activity
fix(cli): correct repair-block advice for --context, directories and …
fix(cli): keep fenced text whole and drop duplicate preflight blocks