Repository navigation
[Spec 1797] adopt-bootstrap-the-governance - #1808
amrmelsayed wants to merge 99 commits into
Conversation
…under any umask (unrelated to Spec 1797)
…tarter's guidance comment
Architect integration review (main) — round 1, head 3fe8403Risk tier: High (+5755/-331, 48 files; new CLI command, adopt/update integration, harness capability, consult tripwire moved to a shared lib). 3-way review: Codex REQUEST_CHANGES, Claude APPROVE (seven items), Gemini skipped (agy not signed in). CI 7/7 green on this head. I verified the headline findings in source and exercised the real path from the branch build on a fresh shallow clone of a real public repo ( Must fix before the pr gate
Noted, not blocking
ProcessFix 1-4 in this branch, CMAP the fix, push, post the new head here and tell main. Main re-reviews the delta and takes the pr gate to the owner. Not merging. |
…fail the run; fence-proof git digest; tolerate --> placement
…d and watched through the link; pin the starter templates
… a failing bootstrap pass is reported, not propagated
…paths live in lib; bootstrap-docs loads lazily again
… re-snapshot; adopt JSDoc; approval frontmatter
Integration review round 1: addressed (new head
|
Architect integration review (main) — round 2, head 7ebbe95Re-reviewed the delta since 3fe8403 (four fix commits, the review-phase docs commit, and a clean merge of
Also taken: mutations during the draft review now fail the run (Codex round 1), the fence-proof git digest and Verdict: APPROVE for integration. Taking the pr gate to the owner; merge waits on the owner's word and 7/7 green on 7ebbe95. Outstanding on the owner's side, not the builder's: one genuine interactive launch from this build (main's UX check). |
…ess providers The Claude and codex subcommand and blocking-flag lists are CLI-specific knowledge; they now sit beside the provider that uses them, unexported, and the tests check the blocker through the provider. Refs #1810 for the full split of built-in providers out of harness.ts.
waleedkadous
left a comment
There was a problem hiding this comment.
Overall, really like the direction and am happy to approve.
One thing to consider: is the code for the bootstrap-docs-prompt duplicative of the update-arch-docs protocol? Is there a way we could just have codev bootstrap-docs just invoke the protocol?
|
|
||
| A bounded digest of the repository's history, prepared for you: the most recent commit subjects plus subjects matching fix, revert, incident and similar words. Use it to find scar tissue for `lessons-learned.md`. Inspect individual commits with `git show <hash>` when one looks significant; do not walk the full log. | ||
|
|
||
| {{GIT_DIGEST}} |
There was a problem hiding this comment.
I find that just giving the agent tools is the best way and telling it how to explore instead of a pre-cooked digets works best.
…ed skills; bootstrap runs the installed skill The agent now explores git history itself, guided by the update-arch-docs skill's bootstrap-mode survey step, and the prompt no longer restates the skill's rules. codev update replaces shipped skills the user never edited (matched against a generated history of shipped versions) and offers an edited skill's new version as .codev-new on every update. bootstrap-docs names the installed skill when it matches the package and inlines the packaged text otherwise. Refs #1811.
…esolved .codev-new; real-repo run 3 An edited skill holding a symlinked subdirectory let the .codev-new write land outside the project; a skill holding a symlink, or a symlinked skills root, is now left alone. A pending .codev-new that the skill has caught up with is removed. Records real-repo run 3 (older-adopter path) and the round-3 consultation. Refs #1811.
…e keeps unshipped files update --dry-run now previews skill changes (added, updated, conflict, skipped) without writing. --force on an edited skill overwrites only the package's files and keeps files the package does not ship. The edited path drops a .codev-new once its file matches again. A test ties the skill's cap numbers to the validator, the inline fallback reads the launching harness's skill copy, the hash generator has a pnpm script, and the codev skill warns about running update here with an older package. Refs #1811.
… no root files copyRootFiles takes dryRun. Under --dry-run (with or without --force), update now reports CLAUDE.md / AGENTS.md as new, updated or conflicting with 'would be' wording and writes neither the files nor .codev-new copies. Before, a dry run wrote .codev-new copies and --dry-run --force created a missing root file.
…quired sections An empty Critical facts / Map of <cold doc> section could pass when a similarly named section held bullets, and such a section counted toward the caps. Counting is now scoped to the exact required headings. Also moves an orphaned JSDoc and documents the .consult/ detection exemption.
Summary
Adds
codev bootstrap-docs. It drafts the four governance docs (hotarch-critical.md/lessons-critical.md, coldarch.md/lessons-learned.md) from an existing codebase and its git history, so adopting Codev on a mature project no longer leaves placeholders behind.Who does what:
update-arch-docsskill and explores the code and git history itself, with read-only commands..consult/bootstrap-docs/;Integration:
codev adoptoffers the pass after its merge session exits (never under-y), andcodev updateprints a hint.Also in this PR, at the owner's request (#1811):
codev updatenow refreshes shipped skills.<file>.codev-newcopy that joins the merge session, on every update while it differs. This is the same treatment CLAUDE.md gets.--forcereplaces edited skills too.With that in place,
bootstrap-docsruns the project's installed skill by name when it is identical to the package's version, and inlines the packaged skill text otherwise.Closes #1797
Closes #1811
Changes
lib/governance-bootstrap.ts: classifier, non-empty-repo rule, hot/cold validator, and the eligibility rules shared by adopt, update and bootstrap-docs.lib/tree-snapshot.ts: the change-detection core, promoted from consult's tree tripwire. It adds an index fingerprint, support for a project in a repo subdirectory, an unborn HEAD, symlinks compared by target, and a non-git walk.HarnessProvider.buildInteractiveTaskLaunch: claude and codex only, with positive identification and per-provider launch blockers. Any other harness gets the prompt-file fallback.commands/bootstrap-docs.tswith--dry-run, plus the adopt and update integration.lib/skill-refresh.ts(codev update: refresh unedited shipped skills; bootstrap-docs runs the installed skill by name #1811), with a generated history of shipped skill versions (lib/shipped-skill-hashes.ts, built byscripts/generate-shipped-skill-hashes.mts). A test fails when a shipped skill changes without the history being regenerated.update-arch-docsskill, in all four copies:cloud-config.test.tssets its umask precondition explicitly, and a flakysession-manager.test.tscase is skipped, citing Flaky: session-manager real-shellper tests use fixed wall-clock deadlines that fail under full-suite load (CI-skipped, so only local/porch runs see them) #1800.Testing
tscis clean.sindresorhus/execa, three runs; details are in the review doc. Run 3 is on the final code and played an older adopter whose skill predates bootstrap mode:codev updaterefreshedupdate-arch-docsand nothing else;bootstrap-docsthen ran the installed skill (the transcript shows the agent loading it) and explored git history with the skill's commands;Spec
codev/specs/1797-adopt-bootstrap-the-governance.md (the digest removal and #1811 are recorded under Deviations in the review)
Review
codev/reviews/1797-adopt-bootstrap-the-governance.md