@theglitchking/persistent-planning 3.4.2 → 3.6.0

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.
Files changed (58) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.documentation/INDEX.md +5 -4
  4. package/.documentation/REGISTRY.md +2 -2
  5. package/.documentation/agents/INDEX.md +2 -2
  6. package/.documentation/agents/REGISTRY.md +2 -2
  7. package/.documentation/api/INDEX.md +2 -2
  8. package/.documentation/api/REGISTRY.md +2 -2
  9. package/.documentation/architecture/INDEX.md +2 -2
  10. package/.documentation/architecture/REGISTRY.md +2 -2
  11. package/.documentation/architecture/lg-plan-artifact-lifecycle.md +4 -3
  12. package/.documentation/backups/INDEX.md +2 -2
  13. package/.documentation/backups/REGISTRY.md +2 -2
  14. package/.documentation/database/INDEX.md +2 -2
  15. package/.documentation/database/REGISTRY.md +2 -2
  16. package/.documentation/devops/INDEX.md +2 -2
  17. package/.documentation/devops/REGISTRY.md +2 -2
  18. package/.documentation/features/INDEX.md +2 -2
  19. package/.documentation/features/REGISTRY.md +2 -2
  20. package/.documentation/knowledge-base/facts/INDEX.md +57 -0
  21. package/.documentation/knowledge-base/facts/babel-fish-hook-adds-untracked-map.md +56 -0
  22. package/.documentation/knowledge-base/facts/claude-code-grep-v-exit-status.md +55 -0
  23. package/.documentation/knowledge-base/incidents/INDEX.md +17 -0
  24. package/.documentation/knowledge-base/symptoms/INDEX.md +17 -0
  25. package/.documentation/plans/INDEX.md +2 -2
  26. package/.documentation/plans/REGISTRY.md +2 -2
  27. package/.documentation/procedures/INDEX.md +2 -2
  28. package/.documentation/procedures/REGISTRY.md +2 -2
  29. package/.documentation/quickstart/INDEX.md +2 -2
  30. package/.documentation/quickstart/REGISTRY.md +2 -2
  31. package/.documentation/reference/INDEX.md +2 -2
  32. package/.documentation/reference/REGISTRY.md +2 -2
  33. package/.documentation/security/INDEX.md +2 -2
  34. package/.documentation/security/REGISTRY.md +2 -2
  35. package/.documentation/standards/INDEX.md +3 -3
  36. package/.documentation/standards/REGISTRY.md +3 -3
  37. package/.documentation/standards/mandatory-closing-phases.md +82 -27
  38. package/.documentation/testing/INDEX.md +2 -2
  39. package/.documentation/testing/REGISTRY.md +2 -2
  40. package/.documentation/testing/test-suite.md +3 -3
  41. package/.documentation/troubleshooting/INDEX.md +4 -3
  42. package/.documentation/troubleshooting/REGISTRY.md +6 -4
  43. package/.documentation/troubleshooting/docs-closer-missing-hewtd-steps.md +57 -0
  44. package/.documentation/troubleshooting/stale-skill-dir-drift.md +6 -3
  45. package/.documentation/workflows/INDEX.md +2 -2
  46. package/.documentation/workflows/REGISTRY.md +2 -2
  47. package/CHANGELOG.md +79 -0
  48. package/commands/start-planning.md +12 -0
  49. package/package.json +1 -1
  50. package/scripts/init-atom.sh +2 -0
  51. package/scripts/init-phase.sh +53 -10
  52. package/scripts/init-planning.sh +67 -5
  53. package/scripts/init-task.sh +2 -0
  54. package/scripts/lib/planning.sh +61 -0
  55. package/skills/persistent-planning/SKILL.md +24 -5
  56. package/templates/git-workflow-section.md +11 -0
  57. package/templates/lg/phase.md +21 -5
  58. package/templates/rules/persistent-planning.md +35 -0
@@ -6,13 +6,13 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official marketplace for persistent-planning - Persistent markdown-based planning for Claude Code. Context engineering pattern with task directories, progress tracking, and working memory that persists across sessions.",
9
- "version": "3.4.2"
9
+ "version": "3.6.0"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "persistent-planning",
14
14
  "description": "Persistent markdown-based planning for Claude Code. Uses on-disk markdown files as working memory for planning, progress tracking, and knowledge storage. Plans persist across sessions and support multiple concurrent tasks.",
15
- "version": "3.4.2",
15
+ "version": "3.6.0",
16
16
  "author": {
17
17
  "name": "TheGlitchKing"
18
18
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "persistent-planning",
3
- "version": "3.4.2",
3
+ "version": "3.6.0",
4
4
  "description": "Persistent markdown-based planning with task directories, progress tracking, and context engineering for multi-step Claude Code workflows",
5
5
  "author": {
6
6
  "name": "TheGlitchKing"
@@ -3,7 +3,7 @@ title: Documentation Index
3
3
  tier: reference
4
4
  domains: [root]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-10-23'
7
7
  version: '1.0.0'
8
8
  purpose: Navigation hub for all documentation
9
9
  ---
@@ -29,7 +29,7 @@ purpose: Navigation hub for all documentation
29
29
  | [Security](#security) | 0 | Security, auth, Vault, Keycloak, RLS |
30
30
  | [Standards](#standards) | 2 | Coding standards (backend, frontend, database, devops, security) |
31
31
  | [Testing](#testing) | 1 | Test strategies, fixtures, patterns, integration/e2e |
32
- | [Troubleshooting](#troubleshooting) | 2 | Debug guides, common issues, solutions |
32
+ | [Troubleshooting](#troubleshooting) | 3 | Debug guides, common issues, solutions |
33
33
  | [Workflows](#workflows) | 0 | Process documentation, multi-step operations |
34
34
  | [Reference](#reference) | 3 | Schema, frontmatter, and CLI reference material for the planning artifacts |
35
35
 
@@ -164,7 +164,7 @@ purpose: Navigation hub for all documentation
164
164
  | Document | Tier | Status | Updated |
165
165
  |----------|------|--------|----------|
166
166
  | [Atom Granularity (anti-pattern guide)](standards/atom-granularity.md) | standard | active | 2026-05-07 |
167
- | [Mandatory Closing Phases](standards/mandatory-closing-phases.md) | standard | active | 2026-08-31 |
167
+ | [Mandatory Closing Phases](standards/mandatory-closing-phases.md) | standard | active | 2026-10-23 |
168
168
 
169
169
  ---
170
170
 
@@ -188,6 +188,7 @@ purpose: Navigation hub for all documentation
188
188
 
189
189
  | Document | Tier | Status | Updated |
190
190
  |----------|------|--------|----------|
191
+ | [A plan's docs step has no hit-em-with-the-docs steps](troubleshooting/docs-closer-missing-hewtd-steps.md) | guide | active | 2026-10-23 |
191
192
  | [A plan won't read COMPLETE](troubleshooting/plan-never-reads-complete.md) | guide | active | 2026-09-04 |
192
193
  | [Stale skill directory — commands run frozen code](troubleshooting/stale-skill-dir-drift.md) | guide | active | 2026-09-04 |
193
194
 
@@ -219,6 +220,6 @@ purpose: Navigation hub for all documentation
219
220
 
220
221
  ## Maintenance
221
222
 
222
- - **Last generated:** 2026-09-04
223
+ - **Last generated:** 2026-10-23
223
224
  - **Run maintenance:** `npx hit-em-with-the-docs maintain`
224
225
  - **Regenerate index:** `npx hit-em-with-the-docs index`
@@ -3,7 +3,7 @@ title: Documentation Registry
3
3
  tier: reference
4
4
  domains: [root]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for all documentation domains
9
9
  ---
@@ -77,4 +77,4 @@ purpose: Quick reference for all documentation domains
77
77
 
78
78
  ---
79
79
 
80
- *Last updated: 2026-09-04*
80
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Agents Documentation Index
3
3
  tier: reference
4
4
  domains: [agents]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of agents documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: agent, agents, ai, assistant, expert, specialist, llm, langc
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-09-04*
43
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Agents Registry
3
3
  tier: reference
4
4
  domains: [agents]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for agents documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for agents documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-09-04*
38
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: API Documentation Index
3
3
  tier: reference
4
4
  domains: [api]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of api documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: api, endpoint, endpoints, route, routes, rest, restful, grap
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-09-04*
43
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: API Registry
3
3
  tier: reference
4
4
  domains: [api]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for api documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for api documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-09-04*
38
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Architecture Documentation Index
3
3
  tier: reference
4
4
  domains: [architecture]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of architecture documentation
9
9
  ---
@@ -47,4 +47,4 @@ This domain covers: architecture, design, system, system-design, pattern, patter
47
47
 
48
48
  ---
49
49
 
50
- *Last updated: 2026-09-04*
50
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Architecture Registry
3
3
  tier: reference
4
4
  domains: [architecture]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for architecture documentation
9
9
  ---
@@ -54,4 +54,4 @@ purpose: Quick reference for architecture documentation
54
54
 
55
55
  ---
56
56
 
57
- *Last updated: 2026-09-04*
57
+ *Last updated: 2026-09-26*
@@ -57,17 +57,18 @@ It **anchors on the MANDATORY marker, never on line numbers.** The list is a
57
57
  human-editable surface; positions do not survive contact with editing. This is tested
58
58
  against a hand-reordered, partially-checked, annotated list.
59
59
 
60
- ## The two closers
60
+ ## The three closers
61
61
 
62
- Every phase is scaffolded with both closing tasks as real directories:
62
+ Every phase is scaffolded with all three closing tasks as real directories, in this order:
63
63
 
64
64
  ```
65
+ <phase>/cleanup-remove-junk-and-unused-code/
65
66
  <phase>/validate-success-through-comprehensive-testing/
66
67
  <phase>/documentation-pass-create-update-deprecate-docs/
67
68
  ```
68
69
 
69
70
  Each gets `task.md` (with `mandatory: true`, `parallelizable: false`), `notes.md`,
70
- `atoms/`, and seeded atoms — not empty placeholders. They were previously two lines
71
+ `atoms/`, and seeded atoms — not empty placeholders. The original two were previously lines
71
72
  of prose in `phase.md`, which made the most important tasks in every plan the only
72
73
  ones with no artifact a subagent could read and nowhere to record decisions.
73
74
 
@@ -3,7 +3,7 @@ title: Backups Documentation Index
3
3
  tier: reference
4
4
  domains: [backups]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of backups documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: backup, backups, restore, recovery, disaster, disaster-recov
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-09-04*
43
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Backups Registry
3
3
  tier: reference
4
4
  domains: [backups]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for backups documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for backups documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-09-04*
38
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Database Documentation Index
3
3
  tier: reference
4
4
  domains: [database]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of database documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: database, db, postgres, postgresql, mysql, sql, schema, migr
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-09-04*
43
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Database Registry
3
3
  tier: reference
4
4
  domains: [database]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for database documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for database documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-09-04*
38
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: DevOps Documentation Index
3
3
  tier: reference
4
4
  domains: [devops]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of devops documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: devops, deployment, deploy, ci, cd, ci/cd, pipeline, docker,
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-09-04*
43
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: DevOps Registry
3
3
  tier: reference
4
4
  domains: [devops]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for devops documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for devops documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-09-04*
38
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Features Documentation Index
3
3
  tier: reference
4
4
  domains: [features]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of features documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: feature, features, implementation, guide, how-to, tutorial,
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-09-04*
43
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Features Registry
3
3
  tier: reference
4
4
  domains: [features]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for features documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for features documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-09-04*
38
+ *Last updated: 2026-09-26*
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: Facts Index
3
+ tier: reference
4
+ domains:
5
+ - knowledge-base
6
+ status: active
7
+ last_updated: '0000-00-00'
8
+ version: '1.0.0'
9
+ purpose: Auto-generated index of all facts in the knowledge base, grouped by tag then confidence.
10
+ ---
11
+
12
+ # Facts Index
13
+
14
+ <!-- Auto-generated by `hewtd maintain`. Do not edit by hand — changes will be overwritten. -->
15
+
16
+ **Total facts:** 2
17
+
18
+ ## babel-fish
19
+
20
+ ### confidence: high
21
+
22
+ | ID | Title | Last verified | Citers |
23
+ |--------------------------------------|-----------------------------------------------------------------------------------------------|---------------|--------|
24
+ | `babel-fish-hook-adds-untracked-map` | babel-fish's pre-commit hook commits an untracked project map into the next qualifying commit | 2026-10-23 | 0 |
25
+
26
+ ## claude-code
27
+
28
+ ### confidence: high
29
+
30
+ | ID | Title | Last verified | Citers |
31
+ |----------------------------------|-------------------------------------------------------------------|---------------|--------|
32
+ | `claude-code-grep-v-exit-status` | In Claude Code's Bash tool, grep -v exits 1 when any line matches | 2026-10-23 | 0 |
33
+
34
+ ## git
35
+
36
+ ### confidence: high
37
+
38
+ | ID | Title | Last verified | Citers |
39
+ |--------------------------------------|-----------------------------------------------------------------------------------------------|---------------|--------|
40
+ | `babel-fish-hook-adds-untracked-map` | babel-fish's pre-commit hook commits an untracked project map into the next qualifying commit | 2026-10-23 | 0 |
41
+
42
+ ## gotcha
43
+
44
+ ### confidence: high
45
+
46
+ | ID | Title | Last verified | Citers |
47
+ |--------------------------------------|-----------------------------------------------------------------------------------------------|---------------|--------|
48
+ | `babel-fish-hook-adds-untracked-map` | babel-fish's pre-commit hook commits an untracked project map into the next qualifying commit | 2026-10-23 | 0 |
49
+ | `claude-code-grep-v-exit-status` | In Claude Code's Bash tool, grep -v exits 1 when any line matches | 2026-10-23 | 0 |
50
+
51
+ ## shell
52
+
53
+ ### confidence: high
54
+
55
+ | ID | Title | Last verified | Citers |
56
+ |----------------------------------|-------------------------------------------------------------------|---------------|--------|
57
+ | `claude-code-grep-v-exit-status` | In Claude Code's Bash tool, grep -v exits 1 when any line matches | 2026-10-23 | 0 |
@@ -0,0 +1,56 @@
1
+ ---
2
+ title: babel-fish's pre-commit hook commits an untracked project map into the next qualifying commit
3
+ tier: fact
4
+ domains:
5
+ - troubleshooting
6
+ status: active
7
+ last_updated: 2026-10-23
8
+ id: babel-fish-hook-adds-untracked-map
9
+ confidence: high
10
+ last_verified: 2026-10-23
11
+ verify_command: |
12
+ command grep -n "git add .claude/project-map" .githooks/pre-commit
13
+ provenance:
14
+ - .planning/hewtd-aware-documentation-closer/
15
+ sources:
16
+ - .githooks/pre-commit
17
+ tags:
18
+ - gotcha
19
+ - babel-fish
20
+ - git
21
+ invalidated_by:
22
+ - babel-fish's hook stops running git add on the map, or only re-adds files that are already tracked
23
+ ---
24
+
25
+ # babel-fish's pre-commit hook commits an untracked project map into the next qualifying commit
26
+
27
+ ## Claim
28
+
29
+ Once the babel-fish installer has run (`core.hooksPath=.githooks`), any commit that stages a
30
+ `.py`, `.ts`, `.js`, `.go`, `.java`, `.yaml`/`.yml`, `package.json`, `Cargo.toml`, `go.mod` or
31
+ docker-compose file runs the codebase mapper. The mapper then runs
32
+ `git add .claude/project-map/...`. If the map has never been committed, this stages the whole
33
+ map (about 25 files) into that commit. Nothing reports it beyond the generator's progress lines.
34
+
35
+ It happened on the 3.6.0 release commit: bumping `package.json` brought in the entire map,
36
+ and it was pushed before anyone noticed.
37
+
38
+ ## How to verify
39
+
40
+ `.githooks/pre-commit` contains `git add .claude/project-map/PROJECT_MAP.md ...` inside the
41
+ "Codebase Mapper" block. After a commit touching one of those file types, run
42
+ `git show --stat HEAD`, which lists `.claude/project-map/` files you didn't stage.
43
+
44
+ ## Instead
45
+
46
+ Right after installing babel-fish, commit its output on its own: `.claude/project-map/`,
47
+ `.claude/rules/`, `.claude/CLAUDE.md`, `.githooks/` and the generated developer skill.
48
+ After that the hook only stages real map changes. To keep the map out of git, gitignore
49
+ `.claude/project-map/`, which turns the hook's `git add` into a no-op. Removing the map from a commit the hook
50
+ already touched means re-committing, and the hook re-adds it. So commit the map first and
51
+ rebuild the branch on top, rather than amending past the hook with `--no-verify`.
52
+
53
+ ## Consequences
54
+
55
+ Release and feature commits pick up unrelated generated files. Check
56
+ `git show --stat HEAD` after the first commit in a repo where babel-fish was just installed.
@@ -0,0 +1,55 @@
1
+ ---
2
+ title: In Claude Code's Bash tool, grep -v exits 1 when any line matches
3
+ tier: fact
4
+ domains:
5
+ - troubleshooting
6
+ status: active
7
+ last_updated: 2026-10-23
8
+ id: claude-code-grep-v-exit-status
9
+ confidence: high
10
+ last_verified: 2026-10-23
11
+ verify_command: |
12
+ printf 'abc\nxyz\n' | command grep -v xyz >/dev/null; echo "GNU grep: $? (expect 0)"; type -t grep
13
+ provenance:
14
+ - .planning/hewtd-aware-documentation-closer/
15
+ tags:
16
+ - gotcha
17
+ - claude-code
18
+ - shell
19
+ invalidated_by:
20
+ - Claude Code stops wrapping grep in a shell function, or its ugrep matches GNU grep's -v exit status
21
+ ---
22
+
23
+ # In Claude Code's Bash tool, grep -v exits 1 when any line matches
24
+
25
+ ## Claim
26
+
27
+ In Claude Code's Bash tool, `grep` is a shell function that runs Claude Code's bundled ugrep.
28
+ With `-v`, it prints the right (non-matching) lines but **exits 1 whenever any input line
29
+ matches the pattern**. GNU grep exits 0 as long as some line was selected. So
30
+ `if … | grep -vq PATTERN` reads "nothing selected" when lines were selected. That includes
31
+ `-vqE`, `-v -q -E` and `-vE`.
32
+
33
+ Observed while filtering date-only `hewtd index` churn: a loop meant to keep index files
34
+ with real changes (`grep -vqE "last_updated|Last updated"`) reverted every file, including
35
+ the new doc's index entry.
36
+
37
+ ## How to verify
38
+
39
+ In the Claude Code Bash tool: `type -t grep` prints `function`. Then
40
+ `printf 'abc\nxyz\n' | grep -v xyz >/dev/null; echo $?` prints `1`. The same line with
41
+ `command grep` prints `0`. The `verify_command` above checks the GNU side. The ugrep
42
+ side only reproduces inside Claude Code's Bash tool.
43
+
44
+ ## Instead
45
+
46
+ Use `command grep` whenever the **exit status** of `grep -v` matters (`if`, `&&`, `||`, `-q`).
47
+ Scripts run as child processes (`bash script.sh`, `npm test`) are unaffected, because the
48
+ function isn't exported, so `tests/run.sh` and the init scripts use GNU grep. Only commands
49
+ typed straight into the tool are affected.
50
+
51
+ ## Consequences
52
+
53
+ A silent wrong branch, not an error. Here it discarded generated index changes that should
54
+ have been committed. Anywhere `grep -v` is used as a test, the "some lines selected" case is
55
+ read as "none selected".
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: Incidents Index
3
+ tier: reference
4
+ domains:
5
+ - knowledge-base
6
+ - incidents
7
+ status: active
8
+ last_updated: '0000-00-00'
9
+ version: '1.0.0'
10
+ purpose: Auto-generated chronological index of all incidents in the knowledge base.
11
+ ---
12
+
13
+ # Incidents Index
14
+
15
+ <!-- Auto-generated by `hewtd maintain`. Do not edit by hand — changes will be overwritten. -->
16
+
17
+ _No incidents yet. Create one with the `templates/knowledge-base/incident-narrative.template.md` template._
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: Symptoms Index
3
+ tier: reference
4
+ domains:
5
+ - knowledge-base
6
+ - operations
7
+ status: active
8
+ last_updated: '0000-00-00'
9
+ version: '1.0.0'
10
+ purpose: Auto-generated mapping of symptom keys (alert names, user phrases, error patterns) to playbook anchors and their fact citations.
11
+ ---
12
+
13
+ # Symptoms Index
14
+
15
+ <!-- Auto-generated by `hewtd maintain`. Do not edit by hand — changes will be overwritten. -->
16
+
17
+ _No symptoms blocks found in scanned playbooks. Add a `symptoms:` block to any playbook frontmatter to populate this index._
@@ -3,7 +3,7 @@ title: Plans Documentation Index
3
3
  tier: reference
4
4
  domains: [plans]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of plans documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: plan, plans, planning, roadmap, proposal, proposals, rfc, de
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-09-04*
43
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Plans Registry
3
3
  tier: reference
4
4
  domains: [plans]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for plans documentation
9
9
  ---
@@ -35,4 +35,4 @@ purpose: Quick reference for plans documentation
35
35
 
36
36
  ---
37
37
 
38
- *Last updated: 2026-09-04*
38
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Procedures Documentation Index
3
3
  tier: reference
4
4
  domains: [procedures]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of procedures documentation
9
9
  ---
@@ -40,4 +40,4 @@ This domain covers: procedure, procedures, sop, standard-operating-procedure, st
40
40
 
41
41
  ---
42
42
 
43
- *Last updated: 2026-09-04*
43
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Procedures Registry
3
3
  tier: reference
4
4
  domains: [procedures]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for procedures documentation
9
9
  ---
@@ -50,4 +50,4 @@ purpose: Quick reference for procedures documentation
50
50
 
51
51
  ---
52
52
 
53
- *Last updated: 2026-09-04*
53
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Quickstart Documentation Index
3
3
  tier: reference
4
4
  domains: [quickstart]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of quickstart documentation
9
9
  ---
@@ -39,4 +39,4 @@ This domain covers: quickstart, quick-start, getting-started, setup, install, in
39
39
 
40
40
  ---
41
41
 
42
- *Last updated: 2026-09-04*
42
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Quickstart Registry
3
3
  tier: reference
4
4
  domains: [quickstart]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for quickstart documentation
9
9
  ---
@@ -48,4 +48,4 @@ purpose: Quick reference for quickstart documentation
48
48
 
49
49
  ---
50
50
 
51
- *Last updated: 2026-09-04*
51
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Reference Documentation Index
3
3
  tier: reference
4
4
  domains: [reference]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Complete listing of reference documentation
9
9
  ---
@@ -46,4 +46,4 @@ This domain covers: schema, frontmatter, workspace.json, field, enum, cli, flags
46
46
 
47
47
  ---
48
48
 
49
- *Last updated: 2026-09-04*
49
+ *Last updated: 2026-09-26*
@@ -3,7 +3,7 @@ title: Reference Registry
3
3
  tier: reference
4
4
  domains: [reference]
5
5
  status: active
6
- last_updated: '2026-09-04'
6
+ last_updated: '2026-09-26'
7
7
  version: '1.0.0'
8
8
  purpose: Quick reference for reference documentation
9
9
  ---
@@ -52,4 +52,4 @@ purpose: Quick reference for reference documentation
52
52
 
53
53
  ---
54
54
 
55
- *Last updated: 2026-09-04*
55
+ *Last updated: 2026-09-26*