Skip to content

Milestone v1.2: Shared-Context Tracking & Curation#20

Merged
briansumma merged 200 commits into
developfrom
develop-preview
Jun 26, 2026
Merged

Milestone v1.2: Shared-Context Tracking & Curation#20
briansumma merged 200 commits into
developfrom
develop-preview

Conversation

@briansumma

@briansumma briansumma commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Milestone v1.2: Shared-Context Tracking & Curation
Goal: Confirm the already-shipped P0 hygiene behaves correctly before anything builds on it — no re-implementation, just a commit↔behavior verification record.
Status: Verified ✓

This milestone ships Phases 8–12 of the CHESA Fork Team Toolkit: P0 hygiene verification, one authoritative .wolf/ ignore list, a dependency-free hook-side exclusion matcher, the framework-blind resume protocol, and framework-blind curation machinery (proposed learnings capture, Git-boundary promotion gate, and cerebrum freshness integrity).

Changes

Phase 8: Verify Landed P0 Hygiene

Map each shipped P0 behavior to its develop-preview commit and confirm it holds on the acme replay.

Key files:

  • tests/hooks/integration/acme-grounded.test.ts
  • .planning/phases/08-verify-landed-p0-hygiene/08-VERIFICATION.md

Phase 9: Tracking Hygiene — One Authoritative Ignore List

Rewrite the .wolf/.gitignore template to untrack derived build output (hooks/, buglog.json, suggestions.json) and document the consumer-root ignore rule.

Key files:

  • src/templates/wolf-gitignore
  • src/cli/init.ts
  • tests/cli/init.test.ts
  • docs/updating.md

Phase 10: Hook-Side In-Project Exclusion

Promote the scanner matcher into a dependency-free src/hooks/wolf-ignore.ts module and apply exclude_patterns + root .gitignore in the post-write hook.

Key files:

  • src/hooks/wolf-ignore.ts
  • src/hooks/shared.ts
  • src/hooks/post-write.ts
  • src/scanner/anatomy-scanner.ts

Phase 11: Framework-Blind Resume Protocol

Remove STATUS.md and replace it with a tool-agnostic resume seam in OPENWOLF.md; strip hardcoded execution-layer references.

Key files:

  • src/templates/OPENWOLF.md
  • src/templates/claude-rules-openwolf.md
  • src/cli/init.ts
  • src/hooks/stop.ts

Phase 12: Framework-Blind Curation Machinery

Add continuous proposed-learnings capture, openwolf learnings check promotion gate, and cerebrum freshness integrity via .wolf/cerebrum-freshness.json.

Key files:

  • src/hooks/stop.ts
  • src/cli/index.ts
  • src/cli/learnings.ts
  • src/buglog/buglog.ts
  • src/cli/status.ts

Requirements Addressed

  • VER-01 — Verify already-shipped P0 hygiene against the acme replay.
  • R4 — One authoritative .wolf/.gitignore (authored-vs-derived).
  • R6 — Dependency-free hook-side in-project exclusion matcher.
  • R11 — Framework-blind resume protocol (remove STATUS.md).
  • R7a — Continuous proposed-learnings capture.
  • R7b — Git-boundary promotion gate (openwolf learnings check).
  • R9 — Cerebrum freshness integrity via SHA-256 sidecar.

Verification

  • Automated verification: PASS
  • Acme replay regression tests green (Phase 8)
  • tsc --noEmit -p tsconfig.hooks.json clean (C2 gate, Phase 10)
  • Framework-blind grep gate clean (C1 gate, Phase 11)
  • openwolf status / openwolf learnings check exit-code contracts verified (Phase 12)

Key Decisions

  • D-13 — Commit model = authored-vs-derived (not shared-vs-per-dev).
  • D-14 — Remove STATUS.md; OpenWolf stays framework-blind.
  • D-15 — R7 split: capture via stop hook, promotion at the Git boundary.
  • D-17 — Untrack compiled hooks/.
  • D-18 — Keep ignore dep CLI/daemon-only; zero-dep matcher in the hook.
  • D-19openwolf learnings check subcommand.
  • D-20status is read-only; baseline updates only via sanctioned curation.

TDD Audit

Test commit Impl commit gate_status
4f1d304 fix(hooks): bake absolute project root into hook commands; harden against quote/backslash paths missing
`
2f3e1f` fix(scanner): honor nested-path and glob exclude_patterns missing
`
5d76b0` fix(status): report per-developer files as runtime state, not missing errors missing
`
9f6339` fix(hooks): skip auto bug-detection on non-code files missing
`
1c89e2` chore: set version 1.2.0-beta → 1.2.1-beta missing
`
e48c50` harden: require absolute projectRoot; clarify exclude docs; guard code-ext set missing
`
3ef255` feat(scanner): opt-in respect_gitignore for the anatomy scanner missing
`
239f2c` chore: bump 1.2.1-beta → 1.3.0-beta (respect_gitignore feature → minor) missing
`
cac925` fix(anatomy): stop leaking machine-local paths into committed anatomy.md missing
`
13ac0d` wip: pause — shared-context PRD + P0 anatomy hygiene (R1/R3 landed; R6 next) missing
`
c430a9` feat(hooks): self-heal anatomy.md on session start when missing/stub (R2) missing
`
be9867` wip: pause handoff refresh — R2 self-heal done; next session formalizes the PRD via /gsd-new-milestone missing
`
5bb613` docs: start milestone v1.2 Shared-Context Tracking & Curation missing
`
8afc7f` docs: complete project research (R6/R7b/R9 targeted) missing
`
371f66` docs: define milestone v1.2 requirements + lock D-17..D-20 missing
`
ae8fb8` docs: create milestone v1.2 roadmap (5 phases) missing
`
ad7ec7` chore: clear consumed pause checkpoint (milestone v1.2 formalized) missing
`
40214c` chore: remove consumed HANDOFF.json (resumed into v1.2) missing
`
cbcb2d` docs(08): capture phase context missing
`
0decb2` docs(state): record phase 8 context session missing
`
596064` docs(09): capture phase context missing
`
9117da` docs(state): record phase 9 context session missing
`
baa59d` docs(10): capture phase context from assumptions discussion missing
`
e9bdfd` docs(10): research phase hook-side in-project exclusion missing
`
050f3a` docs(10): add research + validation strategy missing
`
9622fc` docs(10): capture phase context missing
`
a82040` docs(state): record phase 10 context session missing
`
e3916f` docs(11): capture phase context missing
`
38c0a1` docs(state): record phase 11 context session missing
`
80205c` docs(12): capture phase context missing
`
3f3800` docs(state): record phase 12 context session missing
`
1c3a4d` docs(08): add validation strategy missing
`
2f8a42` docs(08): create phase plan missing
`
dde46c` docs(08): create phase plan missing
`
3f1ea9` feat(08-01): add lean acme-snapshot fixture for R3/R5/Q2 regression replay missing
`
af75c3` docs(08-01): complete verify-landed-p0-hygiene plan 01 missing
`
c861d7` docs(08-02): author 08-VERIFICATION.md commit↔behavior record (VER-01) missing
`
4b2e1c` docs(08-02): complete verify-landed-p0-hygiene plan missing
`
b1cec2` docs(state): record phase 8 complete — all 6 P0 behaviors verified missing
`
70ed68` docs(09): create phase plan (one authoritative ignore list, R4) missing
`
9a1b81` docs(09): record phase plan in STATE.md missing
`
eedf9b` test(08-01): add acme-grounded R3 and R5 regression assertions to post-write.test.ts missing
`
51748d` test(09-01): add failing template-content assertions for authored-vs-derived model (RED) `
1d8b97` feat(09-01): rewrite wolf-gitignore on authored-vs-derived axis and fix RED test regex (GREEN) missing
`
5eb005` feat(09-01): export checkRootGitIgnore and add .wolf/-prefixed path advisory (D-09-09) missing
`
c37abd` docs(09-01): complete one-authoritative-ignore-list plan 01 missing
`
8a509c` docs(09-02): add R4 tracking-hygiene migration section to docs/updating.md missing
`
456f36` docs(09-02): complete tracking-hygiene-migration documentation plan missing
`
5da77b` docs(09): record phase 9 complete — one authoritative ignore list verified missing
`
9288f6` docs(planning): commit pre-research artifacts for phases 10-12 and fix 08-02 checklist missing
`
cee7f2` docs(10): create phase plan missing
`
2e153b` docs(10): mark open questions resolved in RESEARCH.md missing
`
317ffa` docs(10): record planning complete in STATE.md missing
`
d5c82a` test(10-01): add failing wolf-ignore matcher + gitignore parser tests `
1749e1` feat(10-01): promote matcher to shared wolf-ignore.ts + add gitignore parser missing
`
d6614d` refactor(10-01): verify C2 hook boundary + main build clean after matcher move missing
`
4b05e4` docs(10-01): complete wolf-ignore.ts shared matcher module plan missing
`
465de6` feat(10-02): gate recordAnatomyWrite on exclude_patterns + root .gitignore missing
`
7abf52` build(10-02): compile hooks and copy to .wolf/hooks/ — exclusion gate live missing
`
bb31b6` docs(10-02): complete in-project exclusion gate plan missing
`
04d8a2` docs(10): phase complete — verification passed, roadmap advanced to phase 11 missing
`
f6efbe` docs(11): research phase domain missing
`
123804` docs(11): add validation strategy missing
`
ac3cd3` docs(11): create phase plan — framework-blind resume protocol (3 plans) missing
`
65b50a` docs(11): create phase plan missing
`
fe7d0c` test(10-02): add E6 exclude + gitignore-gate + default-false integration tests `
ece37a` feat(11-01): delete STATUS.md template and remove seedStatus from init missing
`
adfc2e` feat(11-01): rewrite OPENWOLF.md and claude-rules to framework-blind resume seam missing
`
308a79` feat(11-01): add execution_layer slot to config.json; remove STATUS.md from init test missing
`
ced7fb` docs(11-01): complete framework-blind resume protocol plan 1 of 3 missing
`
223a6f` feat(11-02): delete checkStatusFreshness from stop.ts — D11-05 missing
`
ce2126` fix(11-02): replace execution-layer tool name in wolf-ignore.ts JSDoc — C1 missing
`
58c37c` docs(11-02): complete STATUS hook teardown plan missing
`
5b0ef5` feat(11-03): surface execution_layer in openwolf status missing
`
c077ac` feat(11-03): emit execution_layer hint at session start missing
`
52a111` docs(11-03): rewrite guides, banner historical artifacts, add changelog missing
`
9c0a76` docs(11-03): complete framework-blind-resume-protocol plan missing
`
d24049` docs(11): phase complete — verification passed, roadmap advanced to phase 12 missing
`
347c8d` docs(12): research phase domain missing
`
806113` docs(12): create phase plan — framework-blind curation machinery (4 plans) missing
`
40d691` docs(12): create phase plan missing
`
815e52` test(12-01): add failing tests for wolf-pantry dep-free aggregator `
0940d8` feat(12-01): create dep-free wolf-pantry hook module and relocate aggregator missing
`
708c45` refactor(12-01): verify no circular imports and both type-checks pass missing
`
5ed152` docs(12-01): complete framework-blind curation machinery plan summary missing
`
5759ff` docs(phase-12): update tracking after wave 1 missing
`
e874da` test(12-03): add R7a stub-capture guard cases to stop hook `
ea8bb8` feat(12-03): wire R7a capture stub into stop hook missing
`
98f6fa` docs(12-03): complete R7a stop-hook capture stub plan missing
`
9d2c70` test(12-02): add failing tests for learnings check and accept commands `
4d80ff` feat(12-02): implement learnings check, accept, and merge baseline writes missing
`
c8394c` docs(12-02): complete R7b/R9 curation machinery plan missing
`
9467b7` docs(12-02): append self-check to plan summary missing
`
f97806` docs(phase-12): update tracking after wave 2 missing
`
31a198` test(12-04): extend status tests with pending count and R9 freshness matrix `
884899` feat(12-04): add Curation block and R9 freshness check to status missing
`
7fdeb2` docs(12-04): add Phase 12 curation API to CHANGELOG missing
`
43a2b6` docs(12-04): complete status Curation + R9 freshness plan missing
`
2271ac` docs(phase-12): update tracking after wave 3 missing
`
091058` docs(phase-12): verification report missing
`
2b9793` docs(phase-12): complete phase execution missing
`
df1cf2` fix(12): R7a stub must not be mergeable missing
`
057778` docs(v1.2): milestone audit passed missing
`
7b2927` docs: complete v1.2 milestone closeout missing
`
2cfef9` docs: remove relocated v1.2 milestone audit stub missing
`
2393ff` fix(08): WR-01 normalize cross-platform path assertion in R3 replay missing
`
e541c8` fix(08): WR-02 rename concurrent-ish append test to sequential missing
`
63a4de` fix(08): IN-01 strict length assertions in positive-control bug tests missing
`
9cf874` fix(08): IN-02 document normalized ../ heading in anatomy-leak fixture missing
`
d2c797` fix(08): CR-01 guard post-write.ts main() so module is safe to import missing
`
a8d59a` fix(08): WR-01 validate .wolf/config.json anatomy field types before use missing
`
16d418` fix(08): WR-02 skip out-of-project paths in autoDetectBugFix missing
`
258966` fix(08): WR-03 reject cross-drive absolute relative paths in R3 guard missing
`
2b0cb2` fix(08): WR-04 protect anatomy.md read-modify-write with file lock missing
`
83be53` fix(08): WR-03 make withFileLock fail hard on lock acquisition failure missing
`
4fd0c1` fix(08): WR-04 distinguish async modifier from function name in bug-fix detection missing
`
45c097` fix(08): WR-05 skip code heuristics for prose extensions in summarizeEdit missing
`
a8f896` fix(08): WR-01 add end-to-end and concurrent autoDetectBugFix tests missing
`
bd8064` fix(08): WR-02 add test asserting acme fixture config excludes leak paths missing
`
b7c67e` fix(08): WR-03 update wolf-lock tests to expect hard failure missing
`
10797f` fix(09): WR-01 add --ignore-unmatch to .wolf untrack migration commands missing
`
2d87ac` fix(09): WR-02 expand migration untrack step to cover all derived .wolf files missing
`
93db01` fix(09): WR-04 report real user-data preserved count on upgrade missing
`
f48ac2` fix(09): WR-03 avoid reporting zero anatomy files as unchanged on upgrade missing
`
b91220` fix(09): WR-05 guard CLAUDE.md read/write in init against permission errors missing
`
5fed99` fix(09): WR-06 detect negated root .wolf/ rules in checkRootGitIgnore missing
`
772a38` fix(09): WR-07 require claude-rules-openwolf.md template and warn if missing missing
`
25a840` fix(09): IN-01 return boolean from writeTemplateFile and count only successful writes missing
`
593ae0` fix(09): IN-02 move imports to top of init.ts and group re-export missing
`
e1adc2` fix(09): IN-03 remove deprecated writeGitIgnore from init.ts missing
`
173535` fix(09): IN-04 document why cerebrum-freshness.json is absent from tracked list missing
`
68347f` fix(09): WR-01 extend root .wolf override detector for bare and anchored rules missing
`
a43dd7` fix(09): WR-02 remove unused skippedCount and newlyCreated bookkeeping missing
`
f4350e` fix(09): WR-03 default existsSync mock to real implementation missing
`
b9b5f4` fix(09): IN-01 emit checkRootGitIgnore advisories via console.warn missing
`
b87f54` fix(09): IN-02 include cerebrum-freshness.json in v1.2 untrack command missing
`
8c0aa9` fix(09): IN-03 add anchored root /.wolf/hooks/ advisory test missing
`
edd8f3` fix(09): WR-01 parse blanket .wolf/ rule line-by-line missing
`
521c14` fix(09): WR-02 move config.json from overwrite to preserve list missing
`
fed3c2` fix(09): WR-03 refresh .wolf/.gitignore during openwolf update missing
`
1ec3e2` fix(09): WR-04 preserve YAML frontmatter when injecting CLAUDE.md marker missing
`
8d3228` fix(09): IN-01 expand untrack commit message to full set missing
`
9e4a84` fix(09): IN-02 warn on generic dot-directory root gitignore rules missing
`
909d2e` fix(09): update test expectations for blanket .wolf/ rule classification missing
`
70bd8d` fix(10): CR-01 synchronize concurrent buglog appends with file lock missing
`
c06a64` fix(10): WR-01 protect updateAnatomyEntry with file lock missing
`
8d00cc` fix(10): WR-02 validate scanner exclude_patterns before use missing
`
4fe683` fix(10): WR-03 normalize leading and trailing slashes in exclude patterns missing
`
e75d3c` fix(10): WR-04 allow ** glob to match zero intermediate directories missing
`
d0eaca` fix(10): WR-05 rebuild hooks before worker test if sources are newer missing
`
40850a` fix(10): IN-01 skip binary files in recordAnatomyWrite missing
`
533734` fix(10): IN-02 deduplicate token classification extension sets missing
`
fabe7c` fix(10): IN-03 import scanner exclude helpers from public hook barrel missing
`
7db1f4` fix(10): CR-01 add out-of-project guard to updateAnatomyEntry missing
`
318a48` fix(10): WR-01 centralize out-of-project guard for memory and session tracking missing
`
e80a81` fix(10): WR-02 tokenize operators to detect ==→=== and !=→!== changes missing
`
23ee1b` fix(10): IN-01 strip strings and comments before fix heuristics missing
`
1c9f2c` fix(10): IN-02 summarize CSS edits by property-value changes missing
`
1bcaf1` fix(10): CR-01 add prototype-pollution guard to hook-side deepMergeDefaults missing
`
a5a266` fix(10): WR-01 run guard-clause and logic-fix heuristics on cleaned diff missing
`
09774c` fix(10): WR-02 detect ES module named imports in missing-import heuristic missing
`
2ab5fa` fix(10): WR-03 detect single-character comparison operator transitions missing
`
8db639` fix(10): WR-04 reuse hook-side serializeAnatomy in scanner missing
`
8bc199` fix(10): IN-01 tokenize ?? and async/await instead of substring checks missing
`
cc988d` fix(10): IN-02 inspect all conditions and return values with matchAll missing
`
5297cd` fix(11): WR-01 align Session End with staged-learning protocol missing
`
026735` fix(11): WR-02 stage user corrections instead of direct cerebrum.md updates missing
`
d656cb` fix(11): IN-01 reference buglog.ndjson in README table missing
`
0b3f9b` fix(11): IN-02 remove dead idempotency guard in stop hook missing
`
13bd73` fix(11): WR-01 honor OPENWOLF_METADATA_DIR in status command missing
`
3c4ce7` fix(11): WR-02 resolve package.json from correct directory missing
`
8436a6` fix(11): WR-03 detect .wolf/** and trailing-space blanket rules missing
`
46df61` fix(11): WR-04 support ? wildcards and escaped gitignore tokens missing
`
0cff95` fix(11): WR-05 collapse adjacent ** runs in globToRegExp missing
`
74035a` fix(11): WR-06 write complete default ledger object on session start missing
`
19fad4` fix(11): IN-01 align configuration docs with template defaults missing
`
3eaa57` fix(11): IN-02 align ARCHITECTURE.md with CLAUDE.md on compiled parts missing
`
a5f27a` fix(11): WR-01 align .wolf/.gitignore docs example with wolf-gitignore template missing
`
d343cc` fix(11): WR-03 classify escaped # and ! gitignore tokens as patterns before unescaping missing
`
9e673a` fix(11): WR-04 include seconds and milliseconds in session IDs to avoid same-minute collisions missing
`
7276e5` fix(11): WR-05 pass project root to selfHealAnatomy so OPENWOLF_METADATA_DIR scans the correct cwd missing
`
03d135` fix(11): WR-06 guard status cron heartbeat against NaN last_heartbeat values missing
`
a51ca2` fix(11): WR-07 parse proposed-learnings entries without splitting on every markdown heading missing
`
b96440` fix(11): IN-01 count wolf-ignore in shared.ts re-export architecture description missing
`
378ae7` fix(11): IN-02 match buglog.ndjson by basename instead of substring missing
`
478d38` fix(11): IN-03 trim execution_layer before surfacing it in status and session-start missing
`
fc3ae9` fix(11): IN-04 detect YAML frontmatter with CRLF line endings in writeClaudeRules missing
`
9a2ed7` fix(11): WR-07 preserve malformed-entry stderr warning in regex-based parser missing
`
0dacc7` fix(12): WR-005 restore console.log spy afterEach in status.test.ts missing
`
59103a` fix(12): IN-004 robust package.json version lookup from project root missing
`
93ecfc` fix(12): WR-004 normalize stop-hook stub gate by .wolf segment and scratch ext missing
`
013c1b` fix(12): WR-002 IN-001 IN-006 permissive proposal parser, single read, stable stub timestamp missing
`
0c1c98` docs(12): IN-002 document normalizeCerebrumBody whitespace-collapsing semantics missing
`
268b4e` fix(12): WR-001 WR-003 IN-003 learnings command exit codes and exact block identity missing
`
ed8200` fix(12): IN-005 skip status sidecar bootstrap when cerebrum.md is absent missing
`
1f206e` fix(09-01): add WR-04 regression test for double-advisory scenario (WR-01 WR-02 WR-03 WR-04) missing

Aggregate: 0 skill, 0 fallback, 0 exempt — 190 missing.

gate_status: skill=0, fallback=0, exempt=0, missing=190

briansumma and others added 9 commits June 25, 2026 12:33
…inst quote/backslash paths

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… errors

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Patch bump marking the develop-preview integration set (4 bug fixes). Version is read from package.json by the CLI; release-tag/install-doc references are left at 1.2.0-beta until an actual release/1.2.1-beta tag is cut.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e-ext set

Applied from the peer-review panel (APPROVE) on develop...develop-preview:
- hook-settings.ts: validateProjectRoot() rejects relative paths (defense vs the Q6 MODULE_NOT_FOUND root cause) + regression test
- configuration.md: exclude_patterns rule-selection-by-structure (presence of / and * selects the rule)
- post-write.ts: comment guarding CODE_FILE_EXTENSIONS against a future merge with src/utils/extensions.ts or the in-file codeExts

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds `anatomy.respect_gitignore` (default false). When enabled, buildAnatomy
loads the project-root `.gitignore` via the `ignore` package and excludes
matching files/dirs during the walk (union with `exclude_patterns`). Only the
root `.gitignore` is consulted; nested `.gitignore` files and global /
`core.excludesFile` patterns are out of scope.

`ignore` is added as a CLI/daemon-only dependency. Verified `src/scanner` is
never imported by a hook (src/hooks compiles standalone with no node_modules),
and confirmed no ignore-package require landed in `dist/hooks/` — so this does
not re-introduce a WOLF_ROOT-class MODULE_NOT_FOUND in the hooks.

Docs + config template updated; integration tests cover on/off behavior. Full
suite 150/150; tsc clean on both tsconfigs.

Implements Q1 from the deep review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two coupled anatomy-hygiene fixes, both grounded in the acme_translators
deployment (3 devs, ~3mo):

R1 (untrack): add anatomy.md to the shipped .wolf/.gitignore. It is a
derived/regenerated artifact, not authored knowledge — committing it churned
every session (49 commits, +3495/-2760 lines in acme) and leaked per-machine
paths to teammates. Also documents that a consumer repo's ROOT .gitignore must
not re-list .wolf/ paths (acme had a root rule silently override this file).

R3 (guard): the post-write hook now skips anatomy entries for out-of-project
paths (scratchpad, /tmp, sibling repos). Observed leak in acme: a tmp.* dir
committed into anatomy.md despite being listed in exclude_patterns, because the
incremental hook applies no exclusion. Extracted recordAnatomyWrite() so the
guard is unit-testable; +2 tests (out-of-project skip + in-project control).

Note: in-project gitignored/excluded dirs still leak via the hook (it honors
neither exclude_patterns nor .gitignore) — tracked separately as a follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@briansumma briansumma marked this pull request as draft June 25, 2026 19:21
briansumma and others added 20 commits June 25, 2026 14:27
…(R2)

Closes the broken-on-clone gap opened by R1 (cac925a untracked anatomy.md): a
fresh clone has no anatomy.md, and nothing regenerated it until the daemon's 6h
rescan or a manual `openwolf scan`.

New `src/hooks/wolf-selfheal.ts`: session-start detects a missing/stub anatomy.md
and triggers a detached, fire-and-forget `openwolf scan` to rebuild it (ready for
the next read/session; never blocks session start or trips the 5s hook timeout).

Spawns the `openwolf` CLI rather than importing the scanner — the scanner is
CLI-only (it pulls in `ignore`); importing it into a hook would break the
standalone hook build (MODULE_NOT_FOUND, the WOLF_ROOT failure class). Best-effort:
degrades silently if the CLI isn't on PATH.

Verified: tsc clean on both tsconfigs; no ignore-package import in dist/hooks/;
full suite 157/157; new tests cover missing/stub/healthy detection + the spawn.

Implements PRD R2 (within the unreleased 1.3.0-beta line — no version bump).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…es the PRD via /gsd-new-milestone

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
briansumma and others added 26 commits June 26, 2026 00:57
getVersion() now uses ../../package.json so it resolves to the project root
from both src/cli and dist/cli.

Co-Authored-By: Claude <noreply@anthropic.com>
checkRootGitIgnore now trims trailing spaces and treats .wolf/** as a blanket
rule, matching common gitignore idioms.

Co-Authored-By: Claude <noreply@anthropic.com>
matchesPattern and parseGitignoreLine now treat ? as a glob sentinel, and
parseGitignoreLine unescapes \#, \!, and escaped spaces before classifying a
line as a comment or negation.

Co-Authored-By: Claude <noreply@anthropic.com>
Consecutive ** tokens not followed by / now emit a single .* atom, preventing
pathological patterns from producing adjacent .* quantifiers that could cause
ReDoS-like backtracking.

Co-Authored-By: Claude <noreply@anthropic.com>
initializeSessionLedger now seeds the ledger with the full schema used by
stop.ts (created_at, sessions, daemon_usage, waste_flags, optimization_report)
so partial writes no longer leave missing top-level fields.

Co-Authored-By: Claude <noreply@anthropic.com>
Updated the designqc viewports default table to use the object format from
src/templates/config.json.

Co-Authored-By: Claude <noreply@anthropic.com>
Architecture now describes three independently compiled parts and explicitly
notes that Templates are a copy step rather than a separate compilation target.

Co-Authored-By: Claude <noreply@anthropic.com>
…e template

Co-Authored-By: Claude <noreply@anthropic.com>
…before unescaping

Co-Authored-By: Claude <noreply@anthropic.com>
…id same-minute collisions

Co-Authored-By: Claude <noreply@anthropic.com>
…ATA_DIR scans the correct cwd

Co-Authored-By: Claude <noreply@anthropic.com>
… values

Co-Authored-By: Claude <noreply@anthropic.com>
…every markdown heading

Co-Authored-By: Claude <noreply@anthropic.com>
…description

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
… session-start

Co-Authored-By: Claude <noreply@anthropic.com>
…eClaudeRules

Co-Authored-By: Claude <noreply@anthropic.com>
… parser

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ratch ext

Co-Authored-By: Claude <noreply@anthropic.com>
…, stable stub timestamp

Co-Authored-By: Claude <noreply@anthropic.com>
… semantics

Co-Authored-By: Claude <noreply@anthropic.com>
…block identity

Co-Authored-By: Claude <noreply@anthropic.com>
@briansumma briansumma changed the title Deep-review fixes: hook MODULE_NOT_FOUND, exclude globs, status/buglog noise (1.2.1-beta) Milestone v1.2: Shared-Context Tracking & Curation Jun 26, 2026
@briansumma briansumma marked this pull request as ready for review June 26, 2026 16:07
@briansumma briansumma merged commit 1e13236 into develop Jun 26, 2026
@briansumma briansumma deleted the develop-preview branch June 26, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant