claude-code-session-manager 0.129.0 → 0.130.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/assets/AgentLibrary-Dlhtc8Ty.js +2 -0
- package/dist/assets/AppSettings-A3KoPcmL.js +2 -0
- package/dist/assets/Button-DvTXa_-4.js +1 -0
- package/dist/assets/Extensions-Ddb4sQpO.js +13 -0
- package/dist/assets/{History-B2x-LMlT.js → History-DcnZxMoU.js} +2 -2
- package/dist/assets/Library-LftcMs6C.js +32 -0
- package/dist/assets/ListDetail-CnL1azR0.js +1 -0
- package/dist/assets/{Memory-CnalwnFf.js → Memory-smN9-Yoo.js} +8 -8
- package/dist/assets/{Panel-BzIklgKf.js → Panel-CA6TdCHv.js} +1 -1
- package/dist/assets/ProvenanceBadge-Y3DhyiJo.js +1 -0
- package/dist/assets/Scheduler-Ca1qo_kp.js +16 -0
- package/dist/assets/Settings-BFwlV-as.js +2 -0
- package/dist/assets/{SkillReferenceGraph-DOhiCxuL.js → SkillReferenceGraph-2WMsKdmr.js} +1 -1
- package/dist/assets/SourceChip-CeprSxwb.js +1 -0
- package/dist/assets/SystemPrompt-B8TXIGXo.js +1 -0
- package/dist/assets/{TiptapBody-Du6jRBoW.js → TiptapBody-BvxcQ_tS.js} +1 -1
- package/dist/assets/{Toggle-Qdi2Z7VD.js → Toggle-keTV_HDb.js} +1 -1
- package/dist/assets/ViewTabs-fupn9keJ.js +1 -0
- package/dist/assets/VoiceButton-5ETBv9eI.js +1 -0
- package/dist/assets/{historyTotals-8ecP_6wF.js → historyTotals-NAZqiuzd.js} +1 -1
- package/dist/assets/{index-DtdWBGrI.css → index-Bp8XE9A6.css} +1 -1
- package/dist/assets/index-QJxszEhM.js +3086 -0
- package/dist/index.html +2 -2
- package/dist-web/app.css +1 -1
- package/dist-web/app.js +396 -412
- package/package.json +1 -1
- package/plugins/CLAUDE.md +2 -2
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +2 -2
- package/plugins/session-manager-dev/skills/builder/4-manual/SKILL.md +2 -2
- package/plugins/session-manager-dev/skills/develop/SKILL.md +3 -3
- package/plugins/session-manager-dev/skills/maintaining-md-network/SKILL.md +62 -0
- package/plugins/session-manager-dev/skills/maintaining-md-network/audit.md +169 -0
- package/plugins/session-manager-dev/skills/maintaining-md-network/drift-check.md +183 -0
- package/plugins/session-manager-dev/skills/maintaining-md-network/placement.md +39 -0
- package/plugins/session-manager-dev/skills/maintaining-md-network/plan.md +79 -0
- package/plugins/session-manager-dev/skills/maintaining-md-network/scripts/drift-check.cjs +400 -0
- package/scripts/scheduler-mcp-server.cjs +25 -6
- package/src/main/agentLibrary.cjs +36 -10
- package/src/main/build-info.json +4 -4
- package/src/main/config.cjs +15 -0
- package/src/main/health.cjs +49 -22
- package/src/main/index.cjs +19 -3
- package/src/main/ipcSchemas.cjs +36 -3
- package/src/main/lib/activeSessions.cjs +6 -2
- package/src/main/lib/claude/modelCatalog.cjs +15 -31
- package/src/main/lib/claudeConfig.cjs +156 -0
- package/src/main/lib/effectiveSettings.cjs +120 -0
- package/src/main/lib/epic/delegationReadiness.cjs +3 -3
- package/src/main/lib/feedback-remote/macroAdminRoutes.cjs +84 -11
- package/src/main/lib/git/gitWorktree.cjs +400 -9
- package/src/main/lib/git/runtimeStateUntrack.cjs +124 -0
- package/src/main/lib/mcpToolCatalog.cjs +8 -2
- package/src/main/lib/memoryDirResolve.cjs +2 -8
- package/src/main/lib/opsOwnership.cjs +63 -2
- package/src/main/lib/persona-macro/builtinMacros.cjs +30 -0
- package/src/main/lib/persona-macro/macroLibrary.cjs +34 -6
- package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +22 -0
- package/src/main/lib/updateCheck.cjs +6 -1
- package/src/main/pluginInstall.cjs +100 -1
- package/src/main/promptSessionsIpc.cjs +39 -1
- package/src/main/scheduler.cjs +12 -2
- package/src/main/seedDevPlugin.cjs +2 -1
- package/src/main/templates/PRD_AUTHORING.md +3 -3
- package/src/main/updaterIpc.cjs +5 -1
- package/src/main/usage.cjs +5 -20
- package/src/main/voiceHotkey.cjs +16 -0
- package/src/main/voiceSettings.cjs +24 -0
- package/src/main/voiceWizard.cjs +27 -36
- package/src/preload/api.d.ts +53 -2
- package/src/preload/apiSurface.json +63 -7
- package/src/preload/index.cjs +12 -1
- package/src/seed/agents/demo-video-builder.md +2 -2
- package/src/seed/agents/validator.md +2 -2
- package/dist/assets/AgentLibrary-Cp250YHF.js +0 -2
- package/dist/assets/Button-DU5UF-6L.js +0 -1
- package/dist/assets/DataModel-CPf6f17e.js +0 -1
- package/dist/assets/Hooks-BWr33C4Q.js +0 -3
- package/dist/assets/Library-DBNLTAa8.js +0 -46
- package/dist/assets/ListDetail-BGBw6egp.js +0 -1
- package/dist/assets/McpServers-DywZ50Ec.js +0 -2
- package/dist/assets/Permissions-mgRifwQc.js +0 -3
- package/dist/assets/Plugins-CV42zfid.js +0 -2
- package/dist/assets/ProvenanceBadge-DYmX4xgB.js +0 -1
- package/dist/assets/SaveBar-DxrAfnlC.js +0 -1
- package/dist/assets/Scheduler-iyUl1NDl.js +0 -16
- package/dist/assets/ScopeSwitcher-CC8BDPgf.js +0 -1
- package/dist/assets/Settings-CWBnQghD.js +0 -4
- package/dist/assets/Skills-3Er-9YA9.js +0 -2
- package/dist/assets/SystemPrompt-BLxdvZ9K.js +0 -1
- package/dist/assets/TagLibrary-BZ6QHYMQ.js +0 -1
- package/dist/assets/ViewTabs-BKfFsziD.js +0 -1
- package/dist/assets/index-GI6F_j41.js +0 -3083
- package/dist/assets/listSkills-C1aWKf0T.js +0 -1
- package/dist/assets/settingsSchema-lHTHAabD.js +0 -1
- package/dist/assets/skillFrontmatter-8X1Uc282.js +0 -10
- package/dist/assets/useAgentsDirWatch-CcsoD1bp.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-session-manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.130.1",
|
|
4
4
|
"description": "Local cockpit for the Claude Code CLI — multi-tab terminal, full config surface, scheduler, voice dictation, and live observability.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main/index.cjs",
|
package/plugins/CLAUDE.md
CHANGED
|
@@ -5,8 +5,8 @@ Part of the **AGENT LAYER** partition — see
|
|
|
5
5
|
|
|
6
6
|
## What's here
|
|
7
7
|
|
|
8
|
-
`session-manager-dev/skills/` —
|
|
9
|
-
plugins/session-manager-dev/skills` 2026-
|
|
8
|
+
`session-manager-dev/skills/` — 4 skills (`builder`, `develop`, `maintaining-md-network`, `send-feedback`) — verified against `ls
|
|
9
|
+
plugins/session-manager-dev/skills` 2026-11-06; keep in sync with `project-partition.md` and
|
|
10
10
|
`seedDevPlugin.cjs`'s header count.
|
|
11
11
|
|
|
12
12
|
Two manifests: root [`.claude-plugin/marketplace.json`](../.claude-plugin/marketplace.json)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "session-manager-dev",
|
|
3
|
-
"description": "The default end-to-end development skillset for the Claude Code Session Manager: decompose work into scheduler PRDs and track them to a validated finish (/develop), publish releases to npm (/builder),
|
|
4
|
-
"version": "0.
|
|
3
|
+
"description": "The default end-to-end development skillset for the Claude Code Session Manager: decompose work into scheduler PRDs and track them to a validated finish (/develop), publish releases to npm (/builder), hand a finding to another project on this machine (/send-feedback), and review or drift-check a project's CLAUDE.md/markdown network (/maintaining-md-network). Together with the session-manager scheduler these form a develop → queue → validate → release loop.",
|
|
4
|
+
"version": "0.3.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bilko Bibitkov",
|
|
7
7
|
"email": "BilkoBibitkov2000@gmail.com",
|
|
@@ -117,8 +117,8 @@ Report, in this order:
|
|
|
117
117
|
|
|
118
118
|
- Not a screenshot pipeline. Capturing and annotating real app screenshots is its own PRD;
|
|
119
119
|
until it lands, figures are placed by hand and unplaced slots render as honest placeholders.
|
|
120
|
-
- Not a marketing-copy editor. The product page (`
|
|
120
|
+
- Not a marketing-copy editor. The product page (`Bilko:src/pages/session-manager-landing/` in the Bilko repo) is
|
|
121
121
|
separate from the manual it links to.
|
|
122
122
|
- Not a pricing or entitlement change. The manual is free. The legacy `session_manager` SKU and
|
|
123
|
-
the `MANUAL_PRODUCT_KEY` mapping in `shared/manual-catalog.ts` stay wired only so late payments
|
|
123
|
+
the `MANUAL_PRODUCT_KEY` mapping in `Bilko:shared/manual-catalog.ts` stay wired only so late payments
|
|
124
124
|
resolve and past buyers keep their rows — removing either is an explicit decision, not a step.
|
|
@@ -223,8 +223,8 @@ End every plan with exactly one validate PRD:
|
|
|
223
223
|
3. Goal: the plan's slugs and titles.
|
|
224
224
|
4. Criteria: one per PRD, citing it by slug
|
|
225
225
|
(under `$SM_PROJECT_ROOT/session-manager-operations/scheduler/epics/<epic-id>/`; find it by
|
|
226
|
-
slug under prds/ or prds-archived/, possibly a timestamped subfolder. Why: `session-manager-operations/scheduler/`
|
|
227
|
-
the validator's job worktree. The last: write and commit
|
|
226
|
+
slug under prds/ or prds-archived/, possibly a timestamped subfolder. Why: runtime namespaces such as `session-manager-operations/scheduler/` carry their own `.gitignore`
|
|
227
|
+
(runtime-ops-namespaces-self-ignore), so they are never in the validator's job worktree. The last: write and commit
|
|
228
228
|
`session-manager-operations/reviews/validation/<epic-id>/<validate-slug>.md`, relative to the repository root
|
|
229
229
|
(`git rev-parse --show-toplevel`), not to any subdirectory you `cd`'d into to run a gate.
|
|
230
230
|
5. Notes: "Work as the validator persona — the procedure is your system prompt." and a line
|
|
@@ -295,7 +295,7 @@ Rules:
|
|
|
295
295
|
|
|
296
296
|
## Never
|
|
297
297
|
|
|
298
|
-
- Write a PRD by hand, or anywhere the API does not.
|
|
298
|
+
- Write a PRD by hand, or anywhere the API does not. data/prds/, docs/prds/,
|
|
299
299
|
`~/.claude/session-manager/scheduled-plans/prds/` and the retired flat
|
|
300
300
|
`session-manager-operations/scheduler/prds/` never run.
|
|
301
301
|
- Combine unrelated features in one PRD.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maintaining-md-network
|
|
3
|
+
description: >-
|
|
4
|
+
Reviews, audits or drift-checks a project's CLAUDE.md and wider markdown
|
|
5
|
+
network (CLAUDE.md, AGENTS.md, rules, skills, docs, READMEs, auto memory) so
|
|
6
|
+
agents start from one short entry map and find each fact in exactly one
|
|
7
|
+
place, with nothing stale. Use when the user asks to review, audit, clean up,
|
|
8
|
+
restructure or drift-check a project's CLAUDE.md or docs, when the Review MD
|
|
9
|
+
network macro runs, or says "/maintaining-md-network". Takes a Scope and a
|
|
10
|
+
Mode (Full review or Drift check).
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# maintaining-md-network
|
|
14
|
+
|
|
15
|
+
**Goal:** every agent that works on or with this project starts from one short entry map, follows links to a few owner docs, and finds each fact in exactly one place, with nothing stale.
|
|
16
|
+
|
|
17
|
+
## Inputs
|
|
18
|
+
|
|
19
|
+
- **Scope:** a folder, or the whole project (default).
|
|
20
|
+
- **Mode:** Full review or Drift check.
|
|
21
|
+
|
|
22
|
+
## Rule
|
|
23
|
+
|
|
24
|
+
Research and report in the first turn. Change no files until the human approves, then plan the work with `/develop`.
|
|
25
|
+
|
|
26
|
+
## References
|
|
27
|
+
|
|
28
|
+
Each is one level deep; none links another.
|
|
29
|
+
|
|
30
|
+
- [placement.md](placement.md): read when deciding where a kind of instruction belongs, or what moves into a skill, rule, hook or subagent.
|
|
31
|
+
- [audit.md](audit.md): read for steps 1-4 (census, audiences, links, truth check), the time box and the subagent brief.
|
|
32
|
+
- [plan.md](plan.md): read for the report contents, verdicts, records and runtime state, the `/develop` order and cross-repo routing.
|
|
33
|
+
- [drift-check.md](drift-check.md): read for Drift check mode, running the script and the review record.
|
|
34
|
+
|
|
35
|
+
The script is `<skill base dir>/scripts/drift-check.cjs`.
|
|
36
|
+
|
|
37
|
+
## Full review
|
|
38
|
+
|
|
39
|
+
Copy this checklist and tick it off:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Full review
|
|
43
|
+
- [ ] 1. Census of every instruction and doc file (audit.md)
|
|
44
|
+
- [ ] 2. Audiences and entry points (audit.md)
|
|
45
|
+
- [ ] 3. Links and consumers (audit.md)
|
|
46
|
+
- [ ] 4. Truth check against code and config (audit.md)
|
|
47
|
+
- [ ] 5. Report: proposed network, one-owner table, verdicts, placement, maintenance plan (plan.md, placement.md)
|
|
48
|
+
- [ ] 6. After approval, plan with /develop in the order plan.md gives; commit the review record (plan.md, drift-check.md)
|
|
49
|
+
- [ ] 7. Route cross-repo findings (plan.md)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Drift check
|
|
53
|
+
|
|
54
|
+
Copy this checklist and tick it off:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Drift check
|
|
58
|
+
- [ ] Run the script over the changed files (drift-check.md)
|
|
59
|
+
- [ ] Re-do census, links and truth check only for files changed since the last review record (audit.md steps 1, 3, 4)
|
|
60
|
+
- [ ] Report findings; change no files until approved
|
|
61
|
+
- [ ] After approval, fix with /develop and write a new review record (drift-check.md)
|
|
62
|
+
```
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Audit reference (steps 1-4)
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- [Time box](#time-box)
|
|
6
|
+
- [1. Census](#1-census)
|
|
7
|
+
- [2. Audiences and entry points](#2-audiences-and-entry-points)
|
|
8
|
+
- [3. Links and consumers](#3-links-and-consumers)
|
|
9
|
+
- [4. Truth check](#4-truth-check)
|
|
10
|
+
- [Subagent brief](#subagent-brief)
|
|
11
|
+
|
|
12
|
+
Use this file for the research half of a review. It lets the whole audit fit inside one 30-minute headless turn. Change no files while auditing.
|
|
13
|
+
|
|
14
|
+
## Time box
|
|
15
|
+
|
|
16
|
+
In a turn that is killed at 30 minutes:
|
|
17
|
+
|
|
18
|
+
| Phase | Budget |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| Step 1, census | at most 5 minutes |
|
|
21
|
+
| Steps 2-4, audiences, links, truth check | at most 12 minutes |
|
|
22
|
+
| Report | 5 minutes |
|
|
23
|
+
|
|
24
|
+
The rest is slack. Do not spend it. Start the report at minute 17 at the latest, with whatever you have, and mark unfinished checks as "not checked".
|
|
25
|
+
|
|
26
|
+
Use at most 4 read-only subagents, one per cluster of files. Start them in the same message so they run in parallel. Paste the [Subagent brief](#subagent-brief) into each prompt.
|
|
27
|
+
|
|
28
|
+
Two lessons from the first hand-run review:
|
|
29
|
+
|
|
30
|
+
- Without a time box, audit subagents took 11-17 minutes each. That is why every brief carries a 10-minute limit and a 600-word cap.
|
|
31
|
+
- One "read-only" subagent still wrote a scratch file. Saying "read-only" is not enough. The brief must say "write no files at all, not even scratch files". After the subagents return, run `git status --short` and delete anything you did not create.
|
|
32
|
+
|
|
33
|
+
## 1. Census
|
|
34
|
+
|
|
35
|
+
List every instruction or doc file. Count each kind:
|
|
36
|
+
|
|
37
|
+
- `CLAUDE.md`, `AGENTS.md` and `CLAUDE.local.md` at every level of the tree.
|
|
38
|
+
- `.claude` rules, skills, agents and commands.
|
|
39
|
+
- `docs/`, READMEs, CONTRIBUTING and ADRs.
|
|
40
|
+
- The project's auto-memory `MEMORY.md`.
|
|
41
|
+
- Any doc a tool or script returns verbatim.
|
|
42
|
+
|
|
43
|
+
Start with the tracked files, then add the untracked ones:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
git ls-files -- '*.md'
|
|
47
|
+
git ls-files --others --exclude-standard -- '*.md'
|
|
48
|
+
git ls-files --others --ignored --exclude-standard -- '*.md'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Record these fields for each file:
|
|
52
|
+
|
|
53
|
+
| Field | Command |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| Lines | `wc -l < <file>` |
|
|
56
|
+
| Last commit date | `git log -1 --format=%cs -- <file>` |
|
|
57
|
+
| Tracked or not | `git ls-files --error-unmatch -- <file>` (exit 0 = tracked); `git check-ignore -v <file>` shows the ignore rule |
|
|
58
|
+
| Human or program written | `git log --format=%an -- <file>` for the authors; a bot or script author, a generated-file header, or a script that writes the path means program |
|
|
59
|
+
|
|
60
|
+
Do the lines and dates in one pass over the file list, not one command per file by hand. Find the writer of a suspect file with `git grep -n "<file name>" -- '*.js' '*.cjs' '*.ts' '*.py' '*.sh'`.
|
|
61
|
+
|
|
62
|
+
Then report the share of markdown that is machine-written records or runtime state: files and lines of that kind, divided by all markdown files and lines. The drift-check script does not compute this share. Compute it by hand, per top-level folder:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
git ls-files -- '*.md' | cut -d/ -f1 | sort | uniq -c
|
|
66
|
+
git ls-files -z -- '*.md' | xargs -0 wc -l | sort -n
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The first command counts tracked markdown files per top-level folder (files in the repo root show as their own name). In the second, sum the lines per folder and read the last `total` line for all markdown. Mark each folder as docs, records or state by the writer check above, then divide. Run the same two commands with `--others --exclude-standard` for untracked files. Records and state are not docs. Keep them out of the owner-doc plan, and never propose deleting state that a program reads.
|
|
70
|
+
|
|
71
|
+
## 2. Audiences and entry points
|
|
72
|
+
|
|
73
|
+
Name each audience that reads this project's markdown, and for each one write down what it loads automatically and where it runs:
|
|
74
|
+
|
|
75
|
+
- **Maintainers.** They open the repo and work in it. They load the root and nested `CLAUDE.md` files, `AGENTS.md`, unscoped rules and auto memory. Check which of these a session in a git worktree outside the project folder still loads. Parent-folder `CLAUDE.md` files are not loaded there, so the map must live inside the repo.
|
|
76
|
+
- **Agents in other repos that consume the project.** They use its API, MCP server, SDK or published package. They load their own repo's files and read only what the package ships or a tool returns. Check the package's file list (`files` in `package.json`, `.npmignore`, the published tarball) to see which docs reach them.
|
|
77
|
+
- **Operators.** They deploy and run it, on servers or schedulers. They read runbooks, READMEs and config comments, and often run where no repo checkout exists.
|
|
78
|
+
- **End users.** They see the product docs, help text and web pages, and nothing else.
|
|
79
|
+
|
|
80
|
+
A doc that a tool, script or endpoint returns verbatim is an **entry point**, even when no human opens it as a file. For each one:
|
|
81
|
+
|
|
82
|
+
1. Record its size in lines.
|
|
83
|
+
2. If it is over 100 lines, give it a contents list.
|
|
84
|
+
3. Write its links as repo-root paths. A relative link breaks when the text is read away from its folder.
|
|
85
|
+
4. Find the code that serves it, and note whether that code reads headings by name.
|
|
86
|
+
|
|
87
|
+
Imports from outside the repo need a one-time approval, so do not point an entry map at files outside the repo.
|
|
88
|
+
|
|
89
|
+
## 3. Links and consumers
|
|
90
|
+
|
|
91
|
+
For each doc, find everything that links to it or reads it. Search for the file name, its repo-root path and its title:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
git grep -n -e "<file name>" -e "<path>"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Cover each place a reference can live:
|
|
98
|
+
|
|
99
|
+
- Other docs (links, "see X" prose, tables of contents).
|
|
100
|
+
- Code comments and string constants.
|
|
101
|
+
- Tests, including fixtures and snapshots that read a doc.
|
|
102
|
+
- Scripts, build files and CI workflows.
|
|
103
|
+
- Other repos and tools: package manifests, installers, MCP tools and endpoints that return the text.
|
|
104
|
+
|
|
105
|
+
Record the consumer kinds for each doc. A doc with no consumer and no live link is a candidate for deletion. A doc a program reads is not.
|
|
106
|
+
|
|
107
|
+
**Headings cited by name must not change.** Search for every `#anchor` and every quoted heading, in docs, code and tests. When a consumer cites a heading, keep the heading text exactly, or change the citation in the same commit.
|
|
108
|
+
|
|
109
|
+
After any restructure, search for every deleted or renamed doc name across all file types, not only markdown links. Code strings, scripts, tool descriptions and error messages cite doc names too, and a link checker never sees them:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
git grep -n -F -e "<old file name>" -e "<old path>"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Run it with no `-- '*.md'` filter, once per deleted or renamed doc, and fix or justify every hit.
|
|
116
|
+
|
|
117
|
+
Run the link check once over the whole tree, so you do not check links by hand: use the project's drift-check script if it has one.
|
|
118
|
+
|
|
119
|
+
## 4. Truth check
|
|
120
|
+
|
|
121
|
+
First look for **duplicate facts**, the same fact kept in two docs. Take 3-5 distinctive lines from each always-loaded file (a command with its flags, a number, a rule stated in a unique phrase) and search the other docs for each one:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
git grep -n -F -e "<distinctive line 1>" -e "<distinctive line 2>" -- '*.md'
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
A hit outside the file the line came from is a duplicate. Name one owner for the fact and report the other copies as removals.
|
|
128
|
+
|
|
129
|
+
Verify each claim in the docs against code and config. Cite `file:line` for every finding, both the doc line and the line that proves or disproves it. Check these kinds of claim:
|
|
130
|
+
|
|
131
|
+
- **Paths.** Does the file or folder exist, and is it spelled right?
|
|
132
|
+
- **Commands.** Does the script exist in `package.json`, a Makefile or a task runner? Do the flags exist?
|
|
133
|
+
- **Counts.** "12 endpoints", "7 tags", "4 hooks": count them in code. Worked example: a README says "exposes 9 MCP tools" and lists them. Count the registrations, for example `git grep -c -E "registerTool|server\.tool\(" -- src`, then compare both the number and the names with the README list. Cite the README line and the registering line. A mismatch in either is a finding.
|
|
134
|
+
- **Versions.** Runtime, framework and package versions against the manifest and lockfile.
|
|
135
|
+
- **Endpoints.** Routes, methods and ports against the route table or server code.
|
|
136
|
+
- **Prices.** Plan names and amounts against billing config and the pricing page source.
|
|
137
|
+
- **Schedules.** Cron lines, intervals and retention periods against the scheduler config.
|
|
138
|
+
- **Owners.** Teams, names and contact points against `CODEOWNERS`, the manifest and the host config.
|
|
139
|
+
|
|
140
|
+
Also flag these, even when every fact is true today:
|
|
141
|
+
|
|
142
|
+
1. **Every hand-kept list that copies a source of truth**: a registry, `package.json`, a route table, a directory listing, an enum. The list will drift. Replace it with a pointer to the source, or with a command that prints the list.
|
|
143
|
+
2. **Instructions written for an older model's limits**: "remember to...", "always double-check...", step-by-step hand-holding, or all-caps warnings that a current model does not need.
|
|
144
|
+
3. **Time-sensitive wording**: "currently", "as of", "new", "recently", "we plan to", dates, and "v1 only". History belongs in git, not in docs. Reword to the present tense, or delete.
|
|
145
|
+
|
|
146
|
+
## Subagent brief
|
|
147
|
+
|
|
148
|
+
Copy this template into each subagent prompt. Fill in the cluster and the question list. Do not shorten the limits.
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
You are auditing one cluster of a project's markdown files. Read only.
|
|
152
|
+
|
|
153
|
+
Cluster: <name the cluster: a folder, or a list of files>
|
|
154
|
+
|
|
155
|
+
For each file in the cluster, report:
|
|
156
|
+
1. Lines, last commit date, tracked or not, human- or program-written.
|
|
157
|
+
2. Who links to it or reads it (docs, code, tests, scripts, CI, other repos, tools).
|
|
158
|
+
3. Claims that are wrong, checked against code and config. Cite file:line.
|
|
159
|
+
4. Hand-kept lists that copy a source of truth, instructions written for an
|
|
160
|
+
older model's limits, and time-sensitive wording.
|
|
161
|
+
|
|
162
|
+
Rules:
|
|
163
|
+
- Limit: 10 minutes. Stop at 10 minutes and report what you have.
|
|
164
|
+
- Cap: 600 words. Use a terse list, one line per finding.
|
|
165
|
+
- Write no files at all, not even scratch files. Do not edit, move or delete
|
|
166
|
+
anything. Run read-only commands only.
|
|
167
|
+
- Cite file:line for every finding. If you did not check something, say
|
|
168
|
+
"not checked".
|
|
169
|
+
```
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Drift check and review record
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- [Running the script](#running-the-script)
|
|
6
|
+
- [Path conventions](#path-conventions)
|
|
7
|
+
- [First run: exclude machine records](#first-run-exclude-machine-records)
|
|
8
|
+
- [Drift check mode](#drift-check-mode)
|
|
9
|
+
- [Review record](#review-record)
|
|
10
|
+
- [The map's maintainer comment](#the-maps-maintainer-comment)
|
|
11
|
+
|
|
12
|
+
## Running the script
|
|
13
|
+
|
|
14
|
+
The script is dependency-free Node. Run it through the skill's base directory:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
node <skill base dir>/scripts/drift-check.cjs --root <repo>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Flags
|
|
21
|
+
|
|
22
|
+
| Flag | Meaning |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `--root <dir>` | Repo to check. Defaults to the current directory. Must be a directory. |
|
|
25
|
+
| `--map <path>` | The entry map. Default: the CLAUDE.md or AGENTS.md at the root that holds the maintainer comment (see below). |
|
|
26
|
+
| `--file <path>` | Check only this file. Repeat for each file. Default: every tracked `.md` file (all `.md` files outside `.git` and `node_modules` when the repo is not git). |
|
|
27
|
+
| `--exclude <prefix>` | Skip files whose repo-relative path starts with the prefix. Repeat as needed. |
|
|
28
|
+
| `--checks <list>` | Comma list from `links`, `paths`, `limits`, `contents`. Default: all four. |
|
|
29
|
+
| `--strict-paths` | Report `unanchored-path` findings, and treat a link starting with `/` that matches no file as broken. Off by default. |
|
|
30
|
+
|
|
31
|
+
A flag that needs a value fails if the value is missing or starts with `--`.
|
|
32
|
+
|
|
33
|
+
### Output
|
|
34
|
+
|
|
35
|
+
One JSON object on stdout:
|
|
36
|
+
|
|
37
|
+
- `root`: the resolved repo root.
|
|
38
|
+
- `map`: the map file used, or null.
|
|
39
|
+
- `notes`: plain-text caveats, such as `no md-network-map comment found; the 70-line map limit was not applied`. Read it: an empty map means the map limit never ran.
|
|
40
|
+
- `checkedFiles`: the repo-relative files checked.
|
|
41
|
+
- `findings`: a list, sorted by file then line.
|
|
42
|
+
- `counts`: findings per kind.
|
|
43
|
+
|
|
44
|
+
### Finding kinds
|
|
45
|
+
|
|
46
|
+
| Kind | Fields | Raised when |
|
|
47
|
+
| --- | --- | --- |
|
|
48
|
+
| `broken-link` | file, line, target | A markdown link to a file does not resolve, relative to the doc or to the repo root. URLs and `#anchors` are skipped. A missing target that git ignores (runtime state) is not reported, the same exemption the paths check has. |
|
|
49
|
+
| `missing-path` | file, line, target | An inline code span that is a path candidate does not exist (relative to the root or the doc), no tracked file matches it as a suffix, and git does not ignore it. |
|
|
50
|
+
| `unanchored-path` | file, line, target, matches | Only with `--strict-paths`. The span does not resolve from the root or the doc, but tracked files match it as a path suffix or folder. The doc names the path without its full prefix. |
|
|
51
|
+
| `over-line-limit` | file, lines, expandedLines, limit | A CLAUDE.md, AGENTS.md or unscoped `.claude/rules` file has more than 200 lines, or the map has more than 70. `expandedLines` counts the file plus every `.md` it pulls in with an at-sign import (up to 4 hops, each file once); the limit applies to `expandedLines`. |
|
|
52
|
+
| `no-contents-list` | file, lines | A doc over 100 lines has no Contents heading and no list of anchor links near the top. |
|
|
53
|
+
|
|
54
|
+
Links and code spans inside fenced code blocks and HTML comments are ignored.
|
|
55
|
+
|
|
56
|
+
Rules the script applies:
|
|
57
|
+
|
|
58
|
+
- Path candidate: a code span is checked only if it has a slash, no spaces or glob/placeholder characters, no leading tilde, slash or at-sign, no URL scheme, and no domain-like first segment. It is then checked only if it is anchored: its last segment has a file extension, it ends in a slash, or its first segment exists at the repo root. A span like foo/bar with none of these is skipped. A trailing line suffix such as :12 or :12-20 is dropped first.
|
|
59
|
+
- Site route: a link starting with a single slash that does not exist under the repo root is treated as a website route and skipped. `--strict-paths` turns that skip off.
|
|
60
|
+
- Ignore marker: a line that contains the marker `<!-- drift-check-ignore -->` is skipped by the link and path checks.
|
|
61
|
+
- Ellipsis rule: a span with a `...` segment, such as src/.../x.ts, is a placeholder and is skipped.
|
|
62
|
+
- Map detection: without `--map`, the script looks for the maintainer comment in the root CLAUDE.md and AGENTS.md, then in the `.md` files they import with at-sign imports. The first file with the comment is the map.
|
|
63
|
+
|
|
64
|
+
## Path conventions
|
|
65
|
+
|
|
66
|
+
A backticked path claims the file exists in this repo. The script checks every such span, so write paths that legitimately do not exist here in a form it skips:
|
|
67
|
+
|
|
68
|
+
- A path in another repo: use a repo prefix and colon, such as Bilko:server/x.ts. The script skips it like a URL scheme. A ~/Projects/<repo>/ path also works, because a leading tilde is skipped.
|
|
69
|
+
- A retired or forbidden path named on purpose: write it in plain text, without backticks. Or end its line with the `<!-- drift-check-ignore -->` marker.
|
|
70
|
+
- A placeholder: a span with a `...` segment is skipped.
|
|
71
|
+
|
|
72
|
+
Write examples in plain text, not backticks, unless the path really exists.
|
|
73
|
+
|
|
74
|
+
Template placeholders: the links check skips a link target that contains double curly braces, a dollar sign followed by curly braces, or an angle-bracket placeholder such as repo in angle brackets. These are template fill-ins, not real paths.
|
|
75
|
+
|
|
76
|
+
Template folders: a folder of templates, such as docs/templates, holds relative links that only resolve once the template is rendered somewhere else. Pass each such folder as its own `--exclude` prefix, and record the flag in the review record's Drift-check command line.
|
|
77
|
+
|
|
78
|
+
## First run: exclude machine records
|
|
79
|
+
|
|
80
|
+
Machine-written records and runtime folders (job logs, archived PRDs, review records, generated reports) hold thousands of stale path mentions and drown real findings. On the first Full review:
|
|
81
|
+
|
|
82
|
+
1. From the census, list every machine-record and runtime folder.
|
|
83
|
+
2. Pass each one as its own `--exclude` prefix, for example `--exclude <folder>/`.
|
|
84
|
+
3. Run the script. If findings still come mostly from one folder, exclude it too.
|
|
85
|
+
4. Write the exact flags into the review record's Drift-check command line.
|
|
86
|
+
5. Drift check mode reuses those flags unchanged.
|
|
87
|
+
|
|
88
|
+
### Exit codes
|
|
89
|
+
|
|
90
|
+
- 0: no findings.
|
|
91
|
+
- 1: one or more findings. The JSON is still printed.
|
|
92
|
+
- 2: usage error (unknown flag, missing value, unknown check, bad root or map). A message goes to stderr.
|
|
93
|
+
|
|
94
|
+
### Use as a gate
|
|
95
|
+
|
|
96
|
+
Put the script on a `/develop` gate line. Exit 1 fails the gate:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
timeout 120 node <skill base dir>/scripts/drift-check.cjs --root . --checks links,limits,contents
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use `--checks links,limits,contents` when a doc legitimately names paths that do not exist yet. Run all four checks in the scheduled sweep.
|
|
103
|
+
|
|
104
|
+
### Use in CI or on a schedule
|
|
105
|
+
|
|
106
|
+
One CI step, run on every pull request and on a weekly cron:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
- name: Markdown network drift check
|
|
110
|
+
run: node <skill base dir>/scripts/drift-check.cjs --root .
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Replace the placeholder with the script's installed location. The step fails on any finding, and the JSON in the log lists them. A scheduled run catches rot that no pull request touched, such as a path removed from the code.
|
|
114
|
+
|
|
115
|
+
## Drift check mode
|
|
116
|
+
|
|
117
|
+
Drift check mode reviews only what changed since the last review.
|
|
118
|
+
|
|
119
|
+
1. Find the newest record: the file with the latest date among session-manager-operations/reviews/docs/<date>-md-network.md, or the project's own reviews folder. Read its Base commit, Map and Drift-check command.
|
|
120
|
+
2. If there is no record, stop and run a Full review instead. Also run a Full review when the record is stale by restructure: its Verdicts table names docs that no longer exist, or its Base commit is not an ancestor of HEAD (check with `git merge-base --is-ancestor <base> HEAD`). A diff from such a base is not a trustworthy list of changes.
|
|
121
|
+
3. List the changed files: `git diff --name-only <base>..HEAD`. Keep only the `.md` files that still exist.
|
|
122
|
+
4. Run the script with one `--file` per changed `.md` file, plus the `--map` and `--exclude` flags the record used:
|
|
123
|
+
`node <skill base dir>/scripts/drift-check.cjs --root <repo> --file <changed.md> --map <map> --exclude <prefix>`
|
|
124
|
+
5. Run audit steps 1 (Census), 3 (Links and consumers) and 4 (Truth check) on those files only. A changed code file can make an unchanged doc stale, so also check docs that cite the changed code.
|
|
125
|
+
6. Report: script findings, census changes, new duplicated facts, wrong claims. Change no files until the human approves.
|
|
126
|
+
7. After approval, commit a new review record whose Base commit is the current HEAD.
|
|
127
|
+
|
|
128
|
+
## Review record
|
|
129
|
+
|
|
130
|
+
Every review, Full or Drift check, ends with one dated record, committed with the work. It is the next drift check's baseline.
|
|
131
|
+
|
|
132
|
+
Path: session-manager-operations/reviews/docs/<YYYY-MM-DD>-md-network.md (or the project's own reviews folder). Use one record per day; a second record on the same date takes a -2 suffix (and -3, and so on). Commit it last, so Base commit is the commit just before it.
|
|
133
|
+
|
|
134
|
+
Template:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
# Markdown network review <YYYY-MM-DD>
|
|
138
|
+
|
|
139
|
+
- Date: <YYYY-MM-DD>
|
|
140
|
+
- Mode: Full review | Drift check
|
|
141
|
+
- Scope: <folder, or the whole project>
|
|
142
|
+
- Base commit: <full sha of HEAD when the review finished>
|
|
143
|
+
- Owner: <name or team that owns the map>
|
|
144
|
+
- Map: <path of the entry map>
|
|
145
|
+
- Drift-check command: node <skill base dir>/scripts/drift-check.cjs --root <repo> --map <map> --exclude <prefix> ...
|
|
146
|
+
- Findings counts: broken-link N, missing-path N, over-line-limit N, no-contents-list N
|
|
147
|
+
- Census summary: <files> files, <lines> lines, <pct>% machine-written
|
|
148
|
+
|
|
149
|
+
## Verdicts
|
|
150
|
+
|
|
151
|
+
| Doc | Verdict | Owner doc |
|
|
152
|
+
| --- | --- | --- |
|
|
153
|
+
| <path> | KEEP-OWNER / MERGE-INTO / SHRINK-TO-POINTER / MOVE-TO-OWNING-REPO / DELETE | <doc that owns the facts> |
|
|
154
|
+
|
|
155
|
+
## Decisions
|
|
156
|
+
|
|
157
|
+
- <decision, and why>
|
|
158
|
+
|
|
159
|
+
## Follow-up PRDs
|
|
160
|
+
|
|
161
|
+
- <PRD id or slug, one line each, or "none">
|
|
162
|
+
|
|
163
|
+
## Next review due
|
|
164
|
+
|
|
165
|
+
<YYYY-MM-DD, 3 to 6 months out>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Rules:
|
|
169
|
+
|
|
170
|
+
- Drift-check command holds the exact flags, so the next run repeats the same scope and exclusions.
|
|
171
|
+
- Base commit is a full sha. A short sha or a branch name drifts.
|
|
172
|
+
- In a Drift check record, the Verdicts table lists only the files reviewed.
|
|
173
|
+
- Next review due is also due after a major model release.
|
|
174
|
+
|
|
175
|
+
## The map's maintainer comment
|
|
176
|
+
|
|
177
|
+
The map carries one HTML comment, so the script and the next reviewer can find it and its owner:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
<!-- md-network-map owner: <name> last-review: <YYYY-MM-DD> -->
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Without `--map`, the script looks for this comment in CLAUDE.md, then AGENTS.md, at the repo root. The first file that has it is the map, and it gets the 70-line limit. Update `last-review` in the same commit as each review record. HTML comments are stripped before the model reads the file, so the comment costs no context.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Placement reference
|
|
2
|
+
|
|
3
|
+
Use this to decide where each kind of instruction belongs, and cite the source for every move a review proposes.
|
|
4
|
+
|
|
5
|
+
## Where each kind belongs
|
|
6
|
+
|
|
7
|
+
| Kind of instruction | Put it in | Rule and source |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Map, commands Claude must run, critical gotchas | Root CLAUDE.md or AGENTS.md | Loaded every session, so keep it under 200 lines. Hold only pointers, the commands Claude must run and critical gotchas: only what an agent can't find in the code. Sources: memory, large-codebases blog. |
|
|
10
|
+
| Both CLAUDE.md and AGENTS.md exist | One file imports the other | Import the shared file with `@path` so one file owns the text. Source: memory. |
|
|
11
|
+
| Project structure, file listings and feature tours | A directory pointer, or a command that prints the listing | The code is the source of truth, and a hand-kept tour in CLAUDE.md drifts. Replace the tour with one line naming the directory, or with a command such as `git ls-files <dir>`. This applies to small apps too. Sources: best-practices, large-codebases blog. |
|
|
12
|
+
| Conventions for one folder | That folder's CLAUDE.md, or a `.claude/rules` file with `paths:` frontmatter | Folder files load when Claude works there; path-scoped rules load only when matching files are touched. Sources: memory, steering article. |
|
|
13
|
+
| Procedures: releases, deploys, review checklists | A skill | A skill loads on demand, so its steps cost nothing until used. Sources: skills best practices, steering article. |
|
|
14
|
+
| Rules that must never be broken | A hook or a permission deny rule | CLAUDE.md is guidance Claude may not follow; hooks and deny rules are enforced. A hook can't cover work that runs outside Claude, such as cron scripts, CI jobs or a human's own shell. Guard those separately. Sources: best-practices, steering article. |
|
|
15
|
+
| Noisy side research | A subagent that returns a short summary | The subagent reads in its own context and hands back only the conclusion. Sources: best-practices, context-engineering article. |
|
|
16
|
+
| Notes for human maintainers | An HTML block comment (`<!-- ... -->`) | Block comments are stripped before the file loads, so they cost no context. Source: memory. |
|
|
17
|
+
| Progress records and history | Progress files and git history | Let the next session read them to pick up where the last stopped. Source: long-running harnesses article. |
|
|
18
|
+
| Ownership of a doc | One named owner per doc, reviewed every 3-6 months | Assign an owner so the doc is not left to drift. Source: large-codebases blog. |
|
|
19
|
+
|
|
20
|
+
## Size and load rules
|
|
21
|
+
|
|
22
|
+
- Imports organize text but don't save context: the imported file loads with its parent.
|
|
23
|
+
- Imports go at most four hops deep.
|
|
24
|
+
- Imports and symlinks that point outside the repo need a one-time approval.
|
|
25
|
+
- Sessions in git worktrees outside the project folder don't load parent-folder CLAUDE.md files, so the map lives inside the repo.
|
|
26
|
+
- A doc that a tool returns verbatim (an MCP tool, CLI help, a README shipped in a package) is an entry point too. Treat it like the map.
|
|
27
|
+
- SKILL.md stays under 500 lines, with references one level deep from it.
|
|
28
|
+
- Reference docs over 100 lines get a contents list.
|
|
29
|
+
- Avoid time-sensitive wording; it goes stale without any edit.
|
|
30
|
+
|
|
31
|
+
## Sources
|
|
32
|
+
|
|
33
|
+
- https://code.claude.com/docs/en/memory: size under 200 lines, imports (four hops, outside-repo approval), path-scoped rules, HTML comments stripped, worktree loading.
|
|
34
|
+
- https://code.claude.com/docs/en/best-practices: keep CLAUDE.md to what Claude can't infer; use hooks for must-happen rules; use subagents for noisy research.
|
|
35
|
+
- https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices: SKILL.md under 500 lines, references one level deep, contents list over 100 lines, no time-sensitive wording.
|
|
36
|
+
- https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents: load the smallest set of high-signal text; hand side work to subagents that return summaries.
|
|
37
|
+
- https://claude.com/blog/how-claude-code-works-in-large-codebases-best-practices-and-where-to-start: root file holds pointers only, assign an owner, review every 3-6 months.
|
|
38
|
+
- https://claude.com/resources/articles/steering-claude-code-skills-hooks-rules-subagents-and-more: which mechanism fits which kind of instruction (rules, skills, hooks, subagents).
|
|
39
|
+
- https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents: progress records and git history serve as memory across sessions.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Planning reference
|
|
2
|
+
|
|
3
|
+
Use this after the audit steps. It sets what the review report must contain, how to give each doc a verdict, the order `/develop` queues the restructure in, and how to route findings for other repos. Change no files until the human approves the report.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- [Report](#report)
|
|
8
|
+
- [Verdicts](#verdicts)
|
|
9
|
+
- [Records and runtime state](#records-and-runtime-state)
|
|
10
|
+
- [After approval](#after-approval)
|
|
11
|
+
- [Other repos](#other-repos)
|
|
12
|
+
|
|
13
|
+
## Report
|
|
14
|
+
|
|
15
|
+
Write one report. Include every item below.
|
|
16
|
+
|
|
17
|
+
1. **The proposed network.**
|
|
18
|
+
- One map of at most 70 lines.
|
|
19
|
+
- One entry point per audience.
|
|
20
|
+
- The fewest owner docs that cover the rest.
|
|
21
|
+
- A contents list on every reference doc over 100 lines.
|
|
22
|
+
- Links one level deep from the map: the map links to an owner doc, and the owner doc does not need another hop to answer the question.
|
|
23
|
+
2. **A one-owner table.** Add a row for every fact that appears in more than one doc. Give the owning doc, the docs that must lose the fact, and the single term used for the concept. Use one term per concept across the whole network.
|
|
24
|
+
3. **What moves out of the always-loaded files.** Name each item and its destination: a skill, a path-scoped rule, a hook, a permission rule or a subagent.
|
|
25
|
+
4. **Wrong claims and bugs.** List each claim that would mislead an agent, with the evidence as `file:line`. List bugs found in code, config or scripts while checking.
|
|
26
|
+
5. **A maintenance plan.**
|
|
27
|
+
- The drift-check script, run on a schedule or in CI.
|
|
28
|
+
- A named owner and a last-review date in the map's maintainer comment.
|
|
29
|
+
- A review every 3-6 months and after each major model release.
|
|
30
|
+
6. **Decisions.** Ask at most 4 decisions that would cost rework if guessed wrong. Decide everything else and say what you chose.
|
|
31
|
+
|
|
32
|
+
## Verdicts
|
|
33
|
+
|
|
34
|
+
Give every doc exactly one verdict.
|
|
35
|
+
|
|
36
|
+
| Verdict | Meaning |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| KEEP-OWNER | The doc is the single owner of its facts. Keep it and trim copies of other docs' facts out of it. |
|
|
39
|
+
| MERGE-INTO `<doc>` | The doc's facts belong in another owner doc. Move them there, then remove the doc and repoint every link. |
|
|
40
|
+
| SHRINK-TO-POINTER | Reduce the doc to a few lines that point to the owner. Use this when a link, a heading cited by name or a program still needs the path. |
|
|
41
|
+
| MOVE-TO-OWNING-REPO | The facts belong to another repo. Hand them over as described in Other repos. |
|
|
42
|
+
| DELETE | Remove the doc. Allowed only under the rule below. |
|
|
43
|
+
|
|
44
|
+
DELETE is allowed only when all three hold:
|
|
45
|
+
|
|
46
|
+
- No live link points to the doc.
|
|
47
|
+
- No program reads it: no script, test, CI job, hook or tool that serves docs verbatim.
|
|
48
|
+
- Its content is obsolete or owned elsewhere.
|
|
49
|
+
|
|
50
|
+
Git history keeps everything else. When any one of the three fails, choose SHRINK-TO-POINTER or MERGE-INTO instead.
|
|
51
|
+
|
|
52
|
+
## Records and runtime state
|
|
53
|
+
|
|
54
|
+
Some markdown is written by a program: logs, queue records, generated reports, state files. Count it in the census, and report its share of all markdown.
|
|
55
|
+
|
|
56
|
+
- Never delete state a program reads.
|
|
57
|
+
- Leave untracking to the tool that owns it. Do not run `git rm --cached` or edit ignore rules for files another tool writes. Name the owner and the finding in the report.
|
|
58
|
+
- Keep machine-written files out of the map and out of the owner docs.
|
|
59
|
+
|
|
60
|
+
## After approval
|
|
61
|
+
|
|
62
|
+
Plan the work with `/develop`, in this order:
|
|
63
|
+
|
|
64
|
+
1. **Delete obsolete docs.** Only docs with the DELETE verdict.
|
|
65
|
+
2. **One PRD per owner doc.** Each PRD moves that doc's facts into it and removes the same facts from the entry files in the same commit.
|
|
66
|
+
3. **Rewrite the map and entry files.** This PRD depends on all of step 2.
|
|
67
|
+
4. **Change any tool that serves docs.** Add the drift-check script as a gate or CI step.
|
|
68
|
+
5. **Validate.** Re-run the drift-check script and record the flags you used in the review record. Run `git grep -n -F -e "<old name>" -e "<old path>"` with no file-type filter for every deleted or renamed doc, so code strings, scripts and tool descriptions are covered, not only markdown links. Open each audience's entry point to confirm it reaches its owner docs.
|
|
69
|
+
|
|
70
|
+
Links must resolve for every audience. Tools that return text verbatim need repo-root paths. Commit a dated review record in the format drift-check.md defines, as the next drift check's baseline.
|
|
71
|
+
|
|
72
|
+
## Other repos
|
|
73
|
+
|
|
74
|
+
A finding that belongs to another repo goes through `/send-feedback`. Run `feedback_list_projects` first and send only to a project on that list. For a repo that is not on the list, the report states the facts and the paths, so a human can carry them over.
|
|
75
|
+
|
|
76
|
+
Two lessons from earlier reviews:
|
|
77
|
+
|
|
78
|
+
- Feedback to 5 sibling repos failed because they were not Session Manager projects. Check the list before sending.
|
|
79
|
+
- A map in a parent folder never loads in worktree sessions. Put each map inside the repo it serves.
|