@theglitchking/persistent-planning 3.0.1 → 3.1.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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.documentation/INDEX.md +216 -0
- package/.documentation/README.md +90 -0
- package/.documentation/REGISTRY.md +80 -0
- package/.documentation/agents/INDEX.md +43 -0
- package/.documentation/agents/REGISTRY.md +38 -0
- package/.documentation/api/INDEX.md +43 -0
- package/.documentation/api/REGISTRY.md +38 -0
- package/.documentation/architecture/INDEX.md +48 -0
- package/.documentation/architecture/REGISTRY.md +53 -0
- package/{docs/reference.md → .documentation/architecture/context-engineering-principles.md} +20 -1
- package/{docs → .documentation/architecture}/lg-mode.md +17 -8
- package/.documentation/archive/README.md +46 -0
- package/.documentation/backups/INDEX.md +43 -0
- package/.documentation/backups/REGISTRY.md +38 -0
- package/.documentation/database/INDEX.md +43 -0
- package/.documentation/database/REGISTRY.md +38 -0
- package/.documentation/devops/INDEX.md +43 -0
- package/.documentation/devops/REGISTRY.md +38 -0
- package/.documentation/drafts/.gitkeep +1 -0
- package/.documentation/features/INDEX.md +43 -0
- package/.documentation/features/REGISTRY.md +38 -0
- package/.documentation/plans/INDEX.md +43 -0
- package/.documentation/plans/REGISTRY.md +38 -0
- package/.documentation/procedures/INDEX.md +42 -0
- package/.documentation/procedures/REGISTRY.md +51 -0
- package/.documentation/procedures/plan-completion-and-archive.md +151 -0
- package/.documentation/quickstart/INDEX.md +42 -0
- package/.documentation/quickstart/REGISTRY.md +51 -0
- package/{docs → .documentation/quickstart}/examples.md +20 -0
- package/.documentation/reference/INDEX.md +42 -0
- package/.documentation/reference/REGISTRY.md +51 -0
- package/{docs → .documentation/reference}/workspace-json.md +11 -5
- package/.documentation/security/INDEX.md +43 -0
- package/.documentation/security/REGISTRY.md +38 -0
- package/.documentation/standards/INDEX.md +43 -0
- package/.documentation/standards/REGISTRY.md +53 -0
- package/{docs → .documentation/standards}/atom-granularity.md +12 -5
- package/.documentation/standards/mandatory-closing-phases.md +125 -0
- package/.documentation/testing/INDEX.md +42 -0
- package/.documentation/testing/REGISTRY.md +51 -0
- package/.documentation/testing/test-suite.md +88 -0
- package/.documentation/troubleshooting/INDEX.md +43 -0
- package/.documentation/troubleshooting/REGISTRY.md +38 -0
- package/.documentation/workflows/INDEX.md +43 -0
- package/.documentation/workflows/REGISTRY.md +38 -0
- package/CHANGELOG.md +49 -0
- package/README.md +67 -7
- package/commands/archive-plan.md +66 -0
- package/commands/plan-status.md +62 -0
- package/commands/start-atom.md +3 -3
- package/commands/start-planning.md +2 -2
- package/commands/start-task.md +2 -2
- package/hooks/session-start.js +79 -8
- package/package.json +6 -3
- package/scripts/archive-plan.sh +146 -0
- package/scripts/init-planning.sh +23 -0
- package/scripts/plan-status.sh +121 -0
- package/skills/persistent-planning/SKILL.md +34 -9
- package/templates/lg/phase.md +18 -2
- package/templates/lg/task.md +1 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Mandatory Closing Phases
|
|
3
|
+
tier: standard
|
|
4
|
+
domains:
|
|
5
|
+
- standards
|
|
6
|
+
audience:
|
|
7
|
+
- developers
|
|
8
|
+
tags:
|
|
9
|
+
- testing
|
|
10
|
+
status: active
|
|
11
|
+
last_updated: '2026-08-31'
|
|
12
|
+
version: 1.0.0
|
|
13
|
+
purpose: The two phases every persistent-planning plan must end with — validate
|
|
14
|
+
success through comprehensive testing, then a documentation pass — why they
|
|
15
|
+
exist, how they are seeded, and how to keep them last.
|
|
16
|
+
estimated_read_time: 4 minutes
|
|
17
|
+
word_count: 770
|
|
18
|
+
last_validated: '2026-08-31'
|
|
19
|
+
backlinks: []
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Mandatory Closing Phases
|
|
23
|
+
|
|
24
|
+
Every plan this plugin creates ends with the same two units of work, in the same
|
|
25
|
+
order, no exceptions:
|
|
26
|
+
|
|
27
|
+
1. **Validate success through comprehensive testing**
|
|
28
|
+
2. **Documentation pass — create / update / deprecate docs**
|
|
29
|
+
|
|
30
|
+
They are seeded into the templates so an agent never has to remember them, and
|
|
31
|
+
they are marked `MANDATORY` in the artifact itself so an agent re-reading the
|
|
32
|
+
plan mid-run can see they are not optional filler.
|
|
33
|
+
|
|
34
|
+
## Why they exist
|
|
35
|
+
|
|
36
|
+
A plan that stops at "execute/build" produces work nobody has proven and nobody
|
|
37
|
+
can operate. Both failures are invisible at the moment they happen and expensive
|
|
38
|
+
later:
|
|
39
|
+
|
|
40
|
+
- **Without the validation phase**, "done" means "the agent believes it works."
|
|
41
|
+
The next change silently breaks it, because nothing fails when it does.
|
|
42
|
+
- **Without the documentation phase**, the knowledge of what changed lives only
|
|
43
|
+
in a chat transcript that is discarded at the end of the session. The next
|
|
44
|
+
contributor — human or agent — re-derives it from source, or gets it wrong.
|
|
45
|
+
|
|
46
|
+
Putting them *in the template* rather than in a style guide is the whole point.
|
|
47
|
+
Guidance in a style guide is read once; a checkbox in the plan the agent re-reads
|
|
48
|
+
before every decision stays in the attention window. This is the same
|
|
49
|
+
filesystem-as-working-memory reasoning behind the plan artifacts themselves — see
|
|
50
|
+
[Manus Context Engineering Principles](../architecture/context-engineering-principles.md).
|
|
51
|
+
|
|
52
|
+
## Where they live
|
|
53
|
+
|
|
54
|
+
| Mode | Artifact | Section | Seeded as |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| sm | `.planning/<slug>/task_plan.md` | `## Phases` | Phase 5 and Phase 6 of 6 |
|
|
57
|
+
| lg | `.planning/<phase-slug>/phase.md` | `## Tasks` | The last two task checkboxes |
|
|
58
|
+
|
|
59
|
+
In **sm mode** the plan is a single file, so the two phases are literally the
|
|
60
|
+
last two checkboxes under `## Phases`.
|
|
61
|
+
|
|
62
|
+
In **lg mode** the plan is a tree (phase → task → atom, see
|
|
63
|
+
[Lg-Mode Layered Planning Guide](../architecture/lg-mode.md)). The closing pair is seeded at the
|
|
64
|
+
**phase** level, because a phase is the strategic unit that actually ships. Every
|
|
65
|
+
phase validates its own work and documents its own work; a phase cannot be marked
|
|
66
|
+
`done` until both closing tasks are `done`. Individual tasks and atoms do **not**
|
|
67
|
+
each carry the pair — that would produce a documentation pass per atom, which is
|
|
68
|
+
noise.
|
|
69
|
+
|
|
70
|
+
Neither closing task may be marked `parallelizable: true`. They gate on
|
|
71
|
+
everything before them by definition.
|
|
72
|
+
|
|
73
|
+
## The ordering rule
|
|
74
|
+
|
|
75
|
+
> New work is inserted **above** the closing pair, never after it.
|
|
76
|
+
|
|
77
|
+
An agent adding phases to an sm plan renumbers the closing pair so they remain
|
|
78
|
+
last (Phase 5/6 becomes Phase 7/8, and so on). An agent adding tasks to an lg
|
|
79
|
+
phase appends them above the two closing checkboxes. The template states this
|
|
80
|
+
rule inline, directly beneath the checkboxes, so it survives the plan being read
|
|
81
|
+
in isolation without this document.
|
|
82
|
+
|
|
83
|
+
The rule is mechanical rather than a judgment call precisely so that it is
|
|
84
|
+
enforceable — see [how it is tested](../testing/test-suite.md).
|
|
85
|
+
|
|
86
|
+
## What each phase actually requires
|
|
87
|
+
|
|
88
|
+
**Validate success through comprehensive testing.** Prove the work with a check
|
|
89
|
+
that *fails if the change breaks*. A test that passes both before and after the
|
|
90
|
+
change validates nothing. For this repository that means adding assertions to
|
|
91
|
+
`tests/run.sh`; for a consuming project it means whatever that project's test
|
|
92
|
+
command is. Mutation-check the assertion at least once: break the thing on
|
|
93
|
+
purpose, confirm the test goes red, put it back.
|
|
94
|
+
|
|
95
|
+
**Documentation pass.** Create, update, or deprecate every doc the change
|
|
96
|
+
touches, answering: what it is, where it lives, how to fix it, how to operate it,
|
|
97
|
+
and why it matters. Deprecation counts — a doc made wrong by the change is worse
|
|
98
|
+
than a missing one. If [hit-em-with-the-docs](https://github.com/TheGlitchKing/hit-em-with-the-docs)
|
|
99
|
+
is installed, this pass **must** go through it (`hewtd integrate`, `hewtd
|
|
100
|
+
archive`, `hewtd maintain`) rather than hand-managed markdown, so the doc lands
|
|
101
|
+
in a domain and the indexes stay honest.
|
|
102
|
+
|
|
103
|
+
## How to operate it
|
|
104
|
+
|
|
105
|
+
Nothing to run — the phases arrive with the plan:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
/start-planning "Refactor auth" # sm: task_plan.md seeded with 6 phases
|
|
109
|
+
/start-planning "Foundation" --mode lg # lg: phase.md seeded with 2 closing tasks
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
To confirm the templates still seed them correctly after editing:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm test
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Failure modes
|
|
119
|
+
|
|
120
|
+
| Symptom | Cause | Fix |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| A new plan has only 4 phases | Plan created by persistent-planning < 3.1.0 | Append the two closing phases by hand; upgrade the plugin |
|
|
123
|
+
| Closing phases are no longer last | Work appended below them | Move the new phases above the pair and renumber |
|
|
124
|
+
| `npm test` fails on "documentation phase is last" | A template edit added a checkbox after the pair, or reworded the pair | Restore the ordering in `scripts/init-planning.sh` / `templates/lg/phase.md` |
|
|
125
|
+
| Phase marked `done` with closing tasks unchecked | Skipped the gate | Not done — finish both, then mark the phase |
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Testing Documentation Index
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [testing]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-08-31'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Complete listing of testing documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Testing Documentation
|
|
12
|
+
|
|
13
|
+
> Test strategies, fixtures, patterns, integration/e2e
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
- **Total Documents:** 1
|
|
18
|
+
- **Domain:** `testing/`
|
|
19
|
+
- **Category:** development
|
|
20
|
+
- **Load Priority:** 7/10
|
|
21
|
+
|
|
22
|
+
## Documents
|
|
23
|
+
|
|
24
|
+
### Guides
|
|
25
|
+
|
|
26
|
+
| Document | Status | Updated | Words |
|
|
27
|
+
|----------|--------|---------|-------|
|
|
28
|
+
| [Test Suite](test-suite.md) | active | 2026-08-31 | 450 |
|
|
29
|
+
|
|
30
|
+
## Keywords
|
|
31
|
+
|
|
32
|
+
This domain covers: test, testing, tests, unit, unit-test, integration, integration-test, e2e, end-to-end, fixture
|
|
33
|
+
|
|
34
|
+
## Related Domains
|
|
35
|
+
|
|
36
|
+
- [Architecture](../architecture/) - System design, AI coach, project registry, patterns
|
|
37
|
+
- [Standards](../standards/) - Coding standards (backend, frontend, database, devops, security)
|
|
38
|
+
- [Reference](../reference/) - Schema, frontmatter, and CLI reference material for the planning artifacts
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
*Last updated: 2026-08-31*
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Testing Registry
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [testing]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-08-31'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Quick reference for testing documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Testing Registry
|
|
12
|
+
|
|
13
|
+
> Quick reference for test strategies, fixtures, patterns, integration/e2e.
|
|
14
|
+
|
|
15
|
+
## At a Glance
|
|
16
|
+
|
|
17
|
+
| Metric | Value |
|
|
18
|
+
|--------|-------|
|
|
19
|
+
| Documents | 1 |
|
|
20
|
+
| Category | development |
|
|
21
|
+
| Load Priority | 7/10 |
|
|
22
|
+
|
|
23
|
+
## Active Documents
|
|
24
|
+
|
|
25
|
+
- [Test Suite](test-suite.md)
|
|
26
|
+
|
|
27
|
+
## Recently Updated
|
|
28
|
+
|
|
29
|
+
- [Test Suite](test-suite.md) - 2026-08-31
|
|
30
|
+
|
|
31
|
+
## By Status
|
|
32
|
+
|
|
33
|
+
| Status | Count |
|
|
34
|
+
|--------|-------|
|
|
35
|
+
| active | 1 |
|
|
36
|
+
| draft | 0 |
|
|
37
|
+
| deprecated | 0 |
|
|
38
|
+
| archived | 0 |
|
|
39
|
+
|
|
40
|
+
## Keywords
|
|
41
|
+
|
|
42
|
+
`test` `testing` `tests` `unit` `unit-test` `integration` `integration-test` `e2e` `end-to-end` `fixture` `fixtures` `mock` `mocking` `stub` `pytest` `jest` `vitest` `playwright` `cypress` `coverage` `tdd` `bdd`
|
|
43
|
+
|
|
44
|
+
## See Also
|
|
45
|
+
|
|
46
|
+
- [Full Index](INDEX.md) - Complete document listing
|
|
47
|
+
- [Root Index](../INDEX.md) - All domains
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
*Last updated: 2026-08-31*
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Test Suite
|
|
3
|
+
tier: guide
|
|
4
|
+
domains:
|
|
5
|
+
- testing
|
|
6
|
+
audience:
|
|
7
|
+
- developers
|
|
8
|
+
tags: []
|
|
9
|
+
status: active
|
|
10
|
+
last_updated: '2026-08-31'
|
|
11
|
+
version: 1.0.0
|
|
12
|
+
purpose: What tests/run.sh covers, how to run it, how to add an assertion, and
|
|
13
|
+
why the suite is plain bash rather than a framework.
|
|
14
|
+
estimated_read_time: 3 minutes
|
|
15
|
+
word_count: 450
|
|
16
|
+
last_validated: '2026-08-31'
|
|
17
|
+
backlinks: []
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Test Suite
|
|
21
|
+
|
|
22
|
+
`tests/run.sh` is the whole test suite. It is plain bash with assert helpers —
|
|
23
|
+
no framework, no fixtures, no dependencies beyond what the scripts under test
|
|
24
|
+
already need.
|
|
25
|
+
|
|
26
|
+
## Why bash and not a framework
|
|
27
|
+
|
|
28
|
+
Everything under test *is* bash. `init-planning.sh`, `init-phase.sh`,
|
|
29
|
+
`init-task.sh`, `init-atom.sh`, and `detect-mode.sh` are shell scripts whose
|
|
30
|
+
observable behavior is "what landed on disk." A JS test runner would add a
|
|
31
|
+
dependency, a config file, and a translation layer between the runner and the
|
|
32
|
+
thing being run, to assert the same `grep`s. The suite stays in the language of
|
|
33
|
+
its subject.
|
|
34
|
+
|
|
35
|
+
The suite is also the thing that makes the
|
|
36
|
+
[mandatory closing phases](../standards/mandatory-closing-phases.md) enforceable rather than
|
|
37
|
+
aspirational: a template edit that pushes a checkbox below the closing pair turns
|
|
38
|
+
the suite red.
|
|
39
|
+
|
|
40
|
+
## How to run it
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm test # preferred
|
|
44
|
+
bash tests/run.sh # identical, no npm needed
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Output is one line per assertion and a `N passed, M failed` summary. Exit status
|
|
48
|
+
is non-zero if anything failed, so it drops into CI unchanged.
|
|
49
|
+
|
|
50
|
+
## What it covers
|
|
51
|
+
|
|
52
|
+
| Group | Asserts |
|
|
53
|
+
|---|---|
|
|
54
|
+
| sm mode | `task_plan.md` + `notes.md` land at the slugified path; the plan seeds 6 phases; validation is second-to-last and documentation is last; the ordering rule text is present; the task name is substituted; re-running does not clobber an edited plan |
|
|
55
|
+
| lg mode | `detect-mode.sh` honors the `workspace.json` override; `phase.md` + `notes.md` are created; the two closing tasks are last and in order; HEWTD `tier: plan` frontmatter is present; no `PLACEHOLDER` tokens survive rendering; `task.md` is created with the right `parent:`; atom `sequence:` auto-increments 1 → 2 |
|
|
56
|
+
| mode guards | `init-phase.sh` exits non-zero in sm mode |
|
|
57
|
+
|
|
58
|
+
Every test runs the real script against a throwaway `CLAUDE_PROJECT_DIR` created
|
|
59
|
+
with `mktemp -d`, then removes it. Nothing touches the repository's own
|
|
60
|
+
`.planning/` tree.
|
|
61
|
+
|
|
62
|
+
## How to add an assertion
|
|
63
|
+
|
|
64
|
+
Use the helpers already in the file — `assert_eq`, `assert_contains`,
|
|
65
|
+
`assert_file`, and `checkbox_lines` (which extracts the checkbox lines of a named
|
|
66
|
+
markdown section). A new case looks like:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
WS=$(new_workspace)
|
|
70
|
+
CLAUDE_PROJECT_DIR="$WS" bash "$REPO_DIR/scripts/init-planning.sh" "Some Task" >/dev/null
|
|
71
|
+
assert_contains "$WS/.planning/some-task/task_plan.md" "## Goal" "plan has a Goal section"
|
|
72
|
+
rm -rf "$WS"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Then prove the assertion can fail.** Break the template on purpose, run
|
|
76
|
+
`npm test`, confirm the new line goes red, and restore it. An assertion that has
|
|
77
|
+
never failed is not known to test anything.
|
|
78
|
+
|
|
79
|
+
## Failure modes
|
|
80
|
+
|
|
81
|
+
| Symptom | Cause | Fix |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `no unsubstituted placeholders remain` fails | A template gained a `*_PLACEHOLDER` token with no matching substitution arg | Add the `KEY=value` pair to the matching `planning_render_and_log` call |
|
|
84
|
+
| `init-phase.sh refuses to run in sm mode` fails | The lg-mode guard was dropped from an init script | Restore the `planning_mode` check |
|
|
85
|
+
| Every lg assertion fails at once | `templates/lg/` not resolvable from the script directory | Check the `TEMPLATE_DIR` fallback chain in the init scripts |
|
|
86
|
+
| Tests pass locally, lg mode broken for installed users | `templates/` or `scripts/` missing from the `files` array in `package.json` | Add them, verify with `npm pack` before publishing |
|
|
87
|
+
|
|
88
|
+
That last row is not hypothetical — it is exactly how v3.0.0 shipped broken.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Troubleshooting Documentation Index
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [troubleshooting]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-08-31'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Complete listing of troubleshooting documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Troubleshooting Documentation
|
|
12
|
+
|
|
13
|
+
> Debug guides, common issues, solutions
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
- **Total Documents:** 0
|
|
18
|
+
- **Domain:** `troubleshooting/`
|
|
19
|
+
- **Category:** advanced
|
|
20
|
+
- **Load Priority:** 6/10
|
|
21
|
+
|
|
22
|
+
## Documents
|
|
23
|
+
|
|
24
|
+
*No documents in this domain yet.*
|
|
25
|
+
|
|
26
|
+
To add a document:
|
|
27
|
+
|
|
28
|
+
1. Create a markdown file in this directory
|
|
29
|
+
2. Add YAML frontmatter with required metadata
|
|
30
|
+
3. Run `npx hit-em-with-the-docs integrate <file>`
|
|
31
|
+
## Keywords
|
|
32
|
+
|
|
33
|
+
This domain covers: troubleshooting, troubleshoot, debug, debugging, issue, issues, problem, problems, error, errors
|
|
34
|
+
|
|
35
|
+
## Related Domains
|
|
36
|
+
|
|
37
|
+
- [Agents](../agents/) - Expert agent documentation, specialty matrix
|
|
38
|
+
- [Backups](../backups/) - Backup/restore guides, disaster recovery
|
|
39
|
+
- [Plans](../plans/) - Planning documents, roadmaps, proposals
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
*Last updated: 2026-08-31*
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Troubleshooting Registry
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [troubleshooting]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-08-31'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Quick reference for troubleshooting documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Troubleshooting Registry
|
|
12
|
+
|
|
13
|
+
> Quick reference for debug guides, common issues, solutions.
|
|
14
|
+
|
|
15
|
+
## At a Glance
|
|
16
|
+
|
|
17
|
+
| Metric | Value |
|
|
18
|
+
|--------|-------|
|
|
19
|
+
| Documents | 0 |
|
|
20
|
+
| Category | advanced |
|
|
21
|
+
| Load Priority | 6/10 |
|
|
22
|
+
|
|
23
|
+
## Documents
|
|
24
|
+
|
|
25
|
+
*No documents in this domain yet.*
|
|
26
|
+
|
|
27
|
+
## Keywords
|
|
28
|
+
|
|
29
|
+
`troubleshooting` `troubleshoot` `debug` `debugging` `issue` `issues` `problem` `problems` `error` `errors` `fix` `solution` `solutions` `resolve` `diagnose` `diagnosis` `log` `logs` `faq`
|
|
30
|
+
|
|
31
|
+
## See Also
|
|
32
|
+
|
|
33
|
+
- [Full Index](INDEX.md) - Complete document listing
|
|
34
|
+
- [Root Index](../INDEX.md) - All domains
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
*Last updated: 2026-08-31*
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Workflows Documentation Index
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [workflows]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-08-31'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Complete listing of workflows documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Workflows Documentation
|
|
12
|
+
|
|
13
|
+
> Process documentation, multi-step operations
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
- **Total Documents:** 0
|
|
18
|
+
- **Domain:** `workflows/`
|
|
19
|
+
- **Category:** features
|
|
20
|
+
- **Load Priority:** 5/10
|
|
21
|
+
|
|
22
|
+
## Documents
|
|
23
|
+
|
|
24
|
+
*No documents in this domain yet.*
|
|
25
|
+
|
|
26
|
+
To add a document:
|
|
27
|
+
|
|
28
|
+
1. Create a markdown file in this directory
|
|
29
|
+
2. Add YAML frontmatter with required metadata
|
|
30
|
+
3. Run `npx hit-em-with-the-docs integrate <file>`
|
|
31
|
+
## Keywords
|
|
32
|
+
|
|
33
|
+
This domain covers: workflow, workflows, process, processes, flow, flowchart, sequence, pipeline, automation, automated
|
|
34
|
+
|
|
35
|
+
## Related Domains
|
|
36
|
+
|
|
37
|
+
- [Procedures](../procedures/) - Step-by-step operational procedures (SOP)
|
|
38
|
+
- [Quickstart](../quickstart/) - Setup guides, dev workflow, onboarding
|
|
39
|
+
- [Features](../features/) - Feature implementation guides, admin docs
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
*Last updated: 2026-08-31*
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Workflows Registry
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [workflows]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-08-31'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Quick reference for workflows documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Workflows Registry
|
|
12
|
+
|
|
13
|
+
> Quick reference for process documentation, multi-step operations.
|
|
14
|
+
|
|
15
|
+
## At a Glance
|
|
16
|
+
|
|
17
|
+
| Metric | Value |
|
|
18
|
+
|--------|-------|
|
|
19
|
+
| Documents | 0 |
|
|
20
|
+
| Category | features |
|
|
21
|
+
| Load Priority | 5/10 |
|
|
22
|
+
|
|
23
|
+
## Documents
|
|
24
|
+
|
|
25
|
+
*No documents in this domain yet.*
|
|
26
|
+
|
|
27
|
+
## Keywords
|
|
28
|
+
|
|
29
|
+
`workflow` `workflows` `process` `processes` `flow` `flowchart` `sequence` `pipeline` `automation` `automated` `multi-step` `orchestration` `state-machine`
|
|
30
|
+
|
|
31
|
+
## See Also
|
|
32
|
+
|
|
33
|
+
- [Full Index](INDEX.md) - Complete document listing
|
|
34
|
+
- [Root Index](../INDEX.md) - All domains
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
*Last updated: 2026-08-31*
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [3.1.0] - 2026-08-31
|
|
6
|
+
|
|
7
|
+
### Added — Status tracking and completion archive (#4)
|
|
8
|
+
|
|
9
|
+
Plans now report their own completion, and completed plans get retired out of the active tree.
|
|
10
|
+
|
|
11
|
+
**Completion is derived, not declared.** A plan is COMPLETE when every checkbox under it is checked, or when its top-level artifact (`phase.md` / `task_plan.md` / `task.md`) declares `status: done`. Nothing has to be remembered or kept in sync — checking the last box *is* the signal. Combined with the mandatory closing phases above, a plan cannot read COMPLETE until its work has been tested and documented.
|
|
12
|
+
|
|
13
|
+
- `scripts/plan-status.sh` — the single implementation of the scan. Default output is a table (`in progress` / `blocked` / `COMPLETE` / `empty` / `archived` with a checked/total count); `--complete` prints one complete slug per line; `--nudge` prints a one-line notice or nothing.
|
|
14
|
+
- `scripts/archive-plan.sh` — moves `.planning/<slug>/` to `.planning/.archive/<slug>/`, ensures that path is gitignored, and stamps the top-level artifact `status: archived` + `archived_on` (or a dated footer for sm plans without frontmatter). Prefers `git mv` when the plan is tracked. Refuses incomplete plans unless `--force`; also supports `--all-complete` and `--dry-run`. Nothing is ever deleted.
|
|
15
|
+
- `hooks/session-start.js` — now surfaces complete-but-unarchived plans in the session's context. It merges the notice into the runtime's single `SessionStart` response by intercepting that one stdout write, since the runtime exposes no append hook and a second response line would be invalid; it fails open, so the update check is unaffected if the payload isn't the expected shape.
|
|
16
|
+
- `/plan-status` and `/archive-plan` slash commands.
|
|
17
|
+
- Both plan templates gained an `## On Completion` section stating the rule and the archive command, so an agent reading only the plan still learns the protocol.
|
|
18
|
+
|
|
19
|
+
`.planning/.archive/` is gitignored on purpose: a completed plan is local history. Anything worth sharing gets promoted into a real doc by the mandatory documentation phase.
|
|
20
|
+
|
|
21
|
+
Test suite grows to 42 assertions. New doc: `.documentation/procedures/plan-completion-and-archive.md`.
|
|
22
|
+
|
|
23
|
+
### Added — Mandatory closing phases (#5)
|
|
24
|
+
|
|
25
|
+
Every plan now ends with the same two units of work, seeded by the templates so an agent never has to remember them:
|
|
26
|
+
|
|
27
|
+
1. **Validate success through comprehensive testing**
|
|
28
|
+
2. **Documentation pass — create/update/deprecate docs**
|
|
29
|
+
|
|
30
|
+
- **sm mode**: `task_plan.md` seeds 6 phases instead of 4; phases 5 and 6 are the mandatory pair, marked `MANDATORY`.
|
|
31
|
+
- **lg mode**: `templates/lg/phase.md` seeds the pair as the last two task checkboxes. A phase cannot be marked `done` until both are `done`, and neither may be `parallelizable`.
|
|
32
|
+
- Both templates carry the ordering rule inline: new work is inserted **above** the pair, never after it.
|
|
33
|
+
|
|
34
|
+
### Added — Test suite
|
|
35
|
+
|
|
36
|
+
`tests/run.sh` — plain bash asserts (no framework), wired to `npm test`. 21 assertions covering sm/lg init, the closing-phase ordering, slug conversion, template placeholder substitution, atom sequence auto-increment, idempotent re-runs, and the lg-mode guard on `init-phase.sh`.
|
|
37
|
+
|
|
38
|
+
### Changed — Documentation moved to hit-em-with-the-docs
|
|
39
|
+
|
|
40
|
+
`docs/` is gone; documentation now lives in a hewtd-managed `.documentation/` tree, split by domain:
|
|
41
|
+
|
|
42
|
+
| Was | Now |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `docs/lg-mode.md` | `.documentation/architecture/lg-mode.md` |
|
|
45
|
+
| `docs/reference.md` | `.documentation/architecture/context-engineering-principles.md` |
|
|
46
|
+
| `docs/atom-granularity.md` | `.documentation/standards/atom-granularity.md` |
|
|
47
|
+
| `docs/workspace-json.md` | `.documentation/reference/workspace-json.md` |
|
|
48
|
+
| `docs/examples.md` | `.documentation/quickstart/examples.md` |
|
|
49
|
+
|
|
50
|
+
New docs: `.documentation/standards/mandatory-closing-phases.md` and `.documentation/testing/test-suite.md`. A custom `reference` domain is registered in `.claude/hit-em-with-the-docs.json`. The npm `files` array now ships `.documentation/` in place of `docs/`.
|
|
51
|
+
|
|
52
|
+
Links in older CHANGELOG entries still point at the old `docs/` paths; they are left as written, since they describe the layout as it was at those releases.
|
|
53
|
+
|
|
5
54
|
## [3.0.1] - 2026-05-08
|
|
6
55
|
|
|
7
56
|
### Fixed
|
package/README.md
CHANGED
|
@@ -7,6 +7,13 @@ A Claude Code plugin that uses on-disk markdown files as "working memory" for pl
|
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
[](https://github.com/TheGlitchKing/persistent-planning)
|
|
9
9
|
|
|
10
|
+
> [!NOTE]
|
|
11
|
+
> **New in 3.0.0 — sm/lg modes + layered planning.** Solo work and quick spikes still get the original single-task flow (now called **sm mode**). Multi-week projects with multiple contributors get a new **lg mode** with layered phase / task / atom / notes artifacts that subagents can pick up via [semantic-memory](https://github.com/TheGlitchKing/semantic-sidekick)'s MCP. Mode is auto-detected from 90-day git author count; sm preserved bit-for-bit from v2. See [`.documentation/architecture/lg-mode.md`](./.documentation/architecture/lg-mode.md) for the layered model + [`.documentation/standards/atom-granularity.md`](./.documentation/standards/atom-granularity.md) for the inline-checkbox-vs-standalone-atom decision rule.
|
|
12
|
+
>
|
|
13
|
+
> Two new slash commands ship in 3.0: `/start-task "Name" --parent <phase>` and `/start-atom "Name" --parent <task>` (lg-mode only). `/start-planning` now dispatches to either flow based on detected mode (with `--mode sm|lg` override).
|
|
14
|
+
>
|
|
15
|
+
> All lg-mode artifacts carry [HEWTD](https://github.com/TheGlitchKing/hit-em-with-the-docs) 2.2.0+ frontmatter (`tier: "plan"`).
|
|
16
|
+
|
|
10
17
|
---
|
|
11
18
|
|
|
12
19
|
## Why This Plugin?
|
|
@@ -161,6 +168,8 @@ persistent-planning/
|
|
|
161
168
|
│ └── persistent-planning.js # CLI (update/policy/status/relink)
|
|
162
169
|
├── commands/
|
|
163
170
|
│ ├── start-planning.md # /start-planning slash command
|
|
171
|
+
│ ├── plan-status.md # /plan-status
|
|
172
|
+
│ ├── archive-plan.md # /archive-plan
|
|
164
173
|
│ ├── update.md # /persistent-planning:update
|
|
165
174
|
│ ├── policy.md # /persistent-planning:policy
|
|
166
175
|
│ ├── status.md # /persistent-planning:status
|
|
@@ -169,26 +178,77 @@ persistent-planning/
|
|
|
169
178
|
│ ├── hooks.json # SessionStart hook manifest
|
|
170
179
|
│ └── session-start.js # Runtime-delegated hook
|
|
171
180
|
├── scripts/
|
|
181
|
+
│ ├── init-*.sh # planning artifact creation (sm + lg)
|
|
182
|
+
│ ├── plan-status.sh # completion scan (single implementation)
|
|
183
|
+
│ ├── archive-plan.sh # retire a completed plan
|
|
172
184
|
│ └── link-skills.js # Postinstall (runtime-delegated)
|
|
173
185
|
├── skills/
|
|
174
186
|
│ └── persistent-planning/
|
|
175
187
|
│ └── SKILL.md # Core skill definition
|
|
176
|
-
├──
|
|
177
|
-
|
|
178
|
-
│ └──
|
|
188
|
+
├── templates/lg/ # phase / task / atom / notes templates (lg mode)
|
|
189
|
+
├── tests/
|
|
190
|
+
│ └── run.sh # bash smoke tests (npm test)
|
|
191
|
+
├── .documentation/ # hewtd-managed docs — start at INDEX.md
|
|
192
|
+
│ ├── architecture/ # lg-mode layer model, context-engineering rationale
|
|
193
|
+
│ ├── standards/ # mandatory closing phases, atom granularity
|
|
194
|
+
│ ├── reference/ # workspace.json schema
|
|
195
|
+
│ ├── testing/ # test suite guide
|
|
196
|
+
│ └── quickstart/ # worked examples
|
|
179
197
|
├── README.md
|
|
180
198
|
├── LICENSE
|
|
181
199
|
└── CHANGELOG.md
|
|
182
200
|
```
|
|
183
201
|
|
|
202
|
+
## Status tracking and archive
|
|
203
|
+
|
|
204
|
+
A plan is **complete** when every checkbox in it is checked (or its top-level artifact says `status: done`). Completion is derived from the artifacts, so it cannot drift from what the plan actually says — checking the last box *is* the signal.
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
/plan-status # what's in progress, blocked, or complete
|
|
208
|
+
/archive-plan <slug> # retire a completed plan
|
|
209
|
+
/archive-plan --all-complete # retire all of them
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Archiving moves `.planning/<slug>/` to the gitignored `.planning/.archive/<slug>/` and stamps it `status: archived` + `archived_on`. Nothing is deleted — restore by moving the directory back out.
|
|
213
|
+
|
|
214
|
+
The SessionStart hook mentions complete-but-unarchived plans at the top of the next session, so a finished plan gets retired instead of rediscovered. Full protocol: [Plan Completion and Archive](./.documentation/procedures/plan-completion-and-archive.md).
|
|
215
|
+
|
|
216
|
+
## Documentation
|
|
217
|
+
|
|
218
|
+
Docs are managed by [hit-em-with-the-docs](https://github.com/TheGlitchKing/hit-em-with-the-docs) and live in `.documentation/`, split by domain. Start at [`.documentation/INDEX.md`](./.documentation/INDEX.md).
|
|
219
|
+
|
|
220
|
+
| Doc | What it covers |
|
|
221
|
+
|---|---|
|
|
222
|
+
| [Lg-Mode Layered Planning Guide](./.documentation/architecture/lg-mode.md) | phase / task / atom / notes layer model, scheduling, subagent contract |
|
|
223
|
+
| [Manus Context Engineering Principles](./.documentation/architecture/context-engineering-principles.md) | the rationale the whole plugin is built on |
|
|
224
|
+
| [Mandatory Closing Phases](./.documentation/standards/mandatory-closing-phases.md) | the two phases every plan must end with, and why |
|
|
225
|
+
| [Atom Granularity](./.documentation/standards/atom-granularity.md) | inline checkbox vs. standalone atom file |
|
|
226
|
+
| [workspace.json Reference](./.documentation/reference/workspace-json.md) | mode tracker schema |
|
|
227
|
+
| [Plan Completion and Archive](./.documentation/procedures/plan-completion-and-archive.md) | how completion is detected and how plans are retired |
|
|
228
|
+
| [Test Suite](./.documentation/testing/test-suite.md) | what `npm test` covers, how to add a case |
|
|
229
|
+
| [Worked Examples](./.documentation/quickstart/examples.md) | end-to-end planning walkthroughs |
|
|
230
|
+
|
|
231
|
+
`INDEX.md` and `REGISTRY.md` are generated — change the documents, then run `npx hewtd maintain --quick`.
|
|
232
|
+
|
|
233
|
+
## Testing
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
npm test # bash smoke tests over the init scripts (tests/run.sh)
|
|
237
|
+
```
|
|
238
|
+
|
|
184
239
|
## Cleanup
|
|
185
240
|
|
|
241
|
+
Prefer archiving — it keeps the record of what was done:
|
|
242
|
+
|
|
186
243
|
```bash
|
|
187
|
-
|
|
188
|
-
|
|
244
|
+
/archive-plan [task-name]
|
|
245
|
+
```
|
|
189
246
|
|
|
190
|
-
|
|
191
|
-
|
|
247
|
+
Hard deletion still works, but throws that record away:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
rm -rf .planning/[task-name]/ # one plan
|
|
251
|
+
rm -rf .planning/ # everything, archive included
|
|
192
252
|
```
|
|
193
253
|
|
|
194
254
|
## Acknowledgments
|