This target repository follows wellmanifest/new-project policy-as-code.
Before any multi-step implementation, an agent must:
- Read
.governance/manifest.json,TODO.md,project/TICKETS.mdand the active ticket. - Reuse an unfinished ticket whose workstream and scope match. A second active
ticket is allowed only in a distinct workstream with no write-scope overlap.
Otherwise run
./project/new-ticket.sh --title "..." --agent "..." --workstream "...". - Complete the ticket
README.md, ownedai-*.md,intent.jsonandTODO.md. - Treat a user request that already says to execute or work autonomously as
SESSION_EXECUTION_AUTHORIZATION; record it in the agent-owned ticket file. - Move to
EDITwithout a second confirmation and stay insideintent.jsonallowedPaths. Ask for new authority only for destructive action, secret access, new external coordination, or material objective expansion. - Never create or edit
project/ticket-*/user-*.md; only its human owner or a trusted intake boundary may do so. - Keep executable source/tests/scripts outside ticket directories.
- Run the managed
./project/governance-check.sh(orproject\governance-check.baton Windows) plus the stack checks before reporting completion. Rootproject.sh/project.batare optional target-owned seed aliases and must not be assumed to contain the gate. - Serialize ticket-ID allocation before branching, then use a separate
branch/worktree per implementation ticket. Each diff must resolve to exactly
one active ticket. Shared contract paths are edited only by the declared
integration workstream;
integrationTicketcoordinates work but does not transfer path ownership. - Only
IN_PROGRESSreserves a workstream and write scope.BACKLOG,PLANandBLOCKEDretain evidence without blocking another implementation; transition back toIN_PROGRESSbefore changing source or tests. - Treat GitHub review as trusted only when it targets the current HEAD and
either a
Userlogin is in protectedtrusted-reviewersor aBotlogin is in the separate protectedtrusted-validator-appsinput. Never trust an arbitrary Bot review. - Require merge approval evidence to bind repository, PR, current HEAD, active ticket and actor. The protected resolver creates that evidence outside the PR checkout; repository-authored evidence is untrusted.
- A signed attestation is trusted only after a protected verifier validates its signature, issuer, predicate type and subject bindings.
- Validator-agent examples use
LLM_MODEL_VALIDATOR=openrouter/z-ai/glm-5.2; model findings stay advisory. - Configure GitHub with
delete_branch_on_merge=true. A merged ticket branch must disappear after merge. A PR closed without merge keeps its branch until the owner explicitly discards that unmerged work. When no PR is open, the only remote branch is the default branch. - At merge, publication or explicit pilot discard, inventory temporary linked worktrees, duplicate clones and non-default local branches. Verify dirty state and HEAD reachability before removal; preserve unknown or unique data. Remove an exact linked worktree through Git, prune its metadata and only then delete its released disposable branch. Prefer recoverable trash for a verified duplicate clone. The checker is read-only; during active work exempt a branch only through the exact allowlisted checkout path, never a pattern or branch name. Run the adopted workspace lifecycle checker through Goal for the terminal audit. CI validates GitHub state separately and cannot inspect a developer filesystem.
- Allocate every ticket ID only through
./project/new-ticket.shafter fetching/pruning. Never create or copyproject/ticket-{NNN}manually; the clone-wide lock and high-water reservation must exist before commit. - Keep an implementation ticket
IN_PROGRESS / PUBLICATIONthrough exact-head review and trusted merge. SetDONE / DONEonly in a governance-only closure based on the integrated default branch. - Resolve
GOV-*findings through.governance/diagnostics.jsonand its linked.governance/error/*.mdrunbook when present. Ticket logs are historical evidence and never authorize bypassing a fail-closed gate. - Keep each incident-specific
remediation-intent.dsl.jsonin its target ticket. Validate it before LLM planning and treat todo2code/LLM results as digest-bound advisory input; never let either expand the accepted intent.
Markdown approval is an audit note, not trusted merge approval. Required merge approval comes from the repository's protected review, attestation and ruleset boundary.