@theglitchking/persistent-planning 3.0.1 → 3.4.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 +224 -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 +50 -0
- package/.documentation/architecture/REGISTRY.md +57 -0
- package/{docs/reference.md → .documentation/architecture/context-engineering-principles.md} +20 -1
- package/{docs → .documentation/architecture}/lg-mode.md +33 -8
- package/.documentation/architecture/lg-plan-artifact-lifecycle.md +104 -0
- package/.documentation/architecture/skill-linking-and-reclaim.md +84 -0
- 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 +43 -0
- package/.documentation/procedures/REGISTRY.md +53 -0
- package/.documentation/procedures/plan-completion-and-archive.md +185 -0
- package/.documentation/procedures/plugin-update-delivery.md +99 -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 +49 -0
- package/.documentation/reference/REGISTRY.md +55 -0
- package/.documentation/reference/mandatory-frontmatter.md +71 -0
- package/.documentation/reference/skill-version-marker.md +70 -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 +145 -0
- package/.documentation/testing/INDEX.md +42 -0
- package/.documentation/testing/REGISTRY.md +51 -0
- package/.documentation/testing/test-suite.md +126 -0
- package/.documentation/troubleshooting/INDEX.md +43 -0
- package/.documentation/troubleshooting/REGISTRY.md +53 -0
- package/.documentation/troubleshooting/plan-never-reads-complete.md +109 -0
- package/.documentation/troubleshooting/stale-skill-dir-drift.md +115 -0
- package/.documentation/workflows/INDEX.md +43 -0
- package/.documentation/workflows/REGISTRY.md +38 -0
- package/CHANGELOG.md +198 -0
- package/README.md +67 -7
- package/bin/persistent-planning.js +56 -6
- 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 +191 -8
- package/package.json +6 -3
- package/scripts/archive-plan.sh +143 -0
- package/scripts/init-atom.sh +7 -0
- package/scripts/init-phase.sh +58 -6
- package/scripts/init-planning.sh +39 -4
- package/scripts/init-task.sh +7 -0
- package/scripts/lib/planning.sh +122 -0
- package/scripts/lib/skill-link.js +177 -0
- package/scripts/link-skills.js +38 -0
- package/scripts/plan-status.sh +196 -0
- package/skills/persistent-planning/SKILL.md +37 -9
- package/templates/lg/phase.md +22 -3
- package/templates/lg/task.md +4 -3
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '`mandatory:` task frontmatter'
|
|
3
|
+
tier: reference
|
|
4
|
+
domains:
|
|
5
|
+
- reference
|
|
6
|
+
audience:
|
|
7
|
+
- developers
|
|
8
|
+
tags: []
|
|
9
|
+
status: active
|
|
10
|
+
last_updated: '2026-09-04'
|
|
11
|
+
version: 1.0.0
|
|
12
|
+
purpose: >-
|
|
13
|
+
Contract for the mandatory: task frontmatter field — who sets it, what reads it, and
|
|
14
|
+
why absent must mean no enforcement for legacy plans.
|
|
15
|
+
estimated_read_time: 2 minutes
|
|
16
|
+
word_count: 270
|
|
17
|
+
last_validated: '2026-09-04'
|
|
18
|
+
backlinks: []
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# `mandatory:` task frontmatter
|
|
22
|
+
|
|
23
|
+
A boolean in an lg task's frontmatter marking it as one of the phase's mandatory
|
|
24
|
+
closing tasks. It is what turns "a phase cannot be done until both closers are done"
|
|
25
|
+
from a sentence in a template into something `plan-status.sh` enforces.
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
---
|
|
29
|
+
title: Validate success through comprehensive testing
|
|
30
|
+
plan_kind: task
|
|
31
|
+
status: draft
|
|
32
|
+
depends_on: []
|
|
33
|
+
parallelizable: false
|
|
34
|
+
mandatory: true
|
|
35
|
+
---
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Contract
|
|
39
|
+
|
|
40
|
+
| | |
|
|
41
|
+
|---|---|
|
|
42
|
+
| **Lives in** | `<phase>/<task>/task.md` frontmatter |
|
|
43
|
+
| **Default** | `false` — `templates/lg/task.md` ships it explicitly |
|
|
44
|
+
| **Set to `true` by** | `init-phase.sh`, on the two scaffolded closers only |
|
|
45
|
+
| **Read by** | `scripts/plan-status.sh` (`unfinished_mandatory()`) |
|
|
46
|
+
| **Effect** | a plan with any `mandatory: true` task whose `status` is neither `done` nor `archived` cannot read `COMPLETE`, however the checkboxes add up |
|
|
47
|
+
| **Absent means** | no enforcement — legacy behavior, exactly as before |
|
|
48
|
+
|
|
49
|
+
## Why absent must mean "no enforcement"
|
|
50
|
+
|
|
51
|
+
Plans created before 3.3.0 have no closer directories and no `mandatory:` frontmatter.
|
|
52
|
+
Treating absence as `true`, or inferring closers by title, would retroactively reopen
|
|
53
|
+
finished plans — worse than the bug this field fixes. The gate is strictly additive and
|
|
54
|
+
the test suite asserts a legacy plan still reads `COMPLETE`.
|
|
55
|
+
|
|
56
|
+
## Where it is enforced — once
|
|
57
|
+
|
|
58
|
+
`plan-status.sh` is the single implementation of "is this plan done?" per `CLAUDE.md`.
|
|
59
|
+
`archive-plan.sh` inherits the gate through its existing pre-flight call rather than
|
|
60
|
+
carrying a second copy of the rule, and `--complete` / `--nudge` — which the
|
|
61
|
+
SessionStart hook and `archive-plan.sh` consume — honour it too.
|
|
62
|
+
|
|
63
|
+
Ticking a checkbox is **not** sufficient for a mandatory task. The task's own `status:`
|
|
64
|
+
must be `done`. That distinction is the whole point: a closer that was ticked but never
|
|
65
|
+
performed is exactly the failure this guards.
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [lg plan artifact lifecycle](../architecture/lg-plan-artifact-lifecycle.md)
|
|
70
|
+
- [Plan completion and archive](../procedures/plan-completion-and-archive.md)
|
|
71
|
+
- [Plan never reads complete](../troubleshooting/plan-never-reads-complete.md)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Skill version marker (`.version`)
|
|
3
|
+
tier: reference
|
|
4
|
+
domains:
|
|
5
|
+
- reference
|
|
6
|
+
audience:
|
|
7
|
+
- developers
|
|
8
|
+
tags: []
|
|
9
|
+
status: active
|
|
10
|
+
last_updated: '2026-09-04'
|
|
11
|
+
version: 1.0.0
|
|
12
|
+
purpose: >-
|
|
13
|
+
Contract for the .version marker written beside SKILL.md — who writes it, when it
|
|
14
|
+
is deliberately not written, and why it is the secondary drift signal.
|
|
15
|
+
estimated_read_time: 2 minutes
|
|
16
|
+
word_count: 295
|
|
17
|
+
last_validated: '2026-09-04'
|
|
18
|
+
backlinks: []
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Skill version marker (`.version`)
|
|
22
|
+
|
|
23
|
+
A one-line file beside `SKILL.md` recording which package version a linked skill came
|
|
24
|
+
from. Written by `scripts/link-skills.js`, read by `scripts/lib/skill-link.js`.
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
.claude/skills/persistent-planning/.version -> "3.2.0\n"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Contract
|
|
31
|
+
|
|
32
|
+
| | |
|
|
33
|
+
|---|---|
|
|
34
|
+
| **Path** | `.claude/skills/<skill-name>/.version` |
|
|
35
|
+
| **Contents** | the package's `version`, plus a trailing newline |
|
|
36
|
+
| **Written by** | `writeVersionMarkers()`, after the linker runs |
|
|
37
|
+
| **Read by** | `readSkillVersion(consumerRoot, name)` — returns the string, or `null` |
|
|
38
|
+
| **Written when** | the skill resolves to `symlink-ok` |
|
|
39
|
+
| **Never written when** | the destination is a real directory |
|
|
40
|
+
| **Absent means** | unknown — never "current" |
|
|
41
|
+
|
|
42
|
+
## Why only healthy symlinks are stamped
|
|
43
|
+
|
|
44
|
+
Stamping a real directory would write "3.2.0" into a frozen pre-3.1.0 copy and mark
|
|
45
|
+
stale code as current — defeating the check it exists to support. A real directory is
|
|
46
|
+
left unstamped precisely so it reads as unknown.
|
|
47
|
+
|
|
48
|
+
Because a healthy skill dir is a symlink into the package, the marker written through
|
|
49
|
+
it lands in the package and is correct for free.
|
|
50
|
+
|
|
51
|
+
## Why not `package.json`
|
|
52
|
+
|
|
53
|
+
A `package.json` inside a skill directory invites npm to treat that directory as a
|
|
54
|
+
package and changes module resolution underneath it. A plain `.version` file cannot.
|
|
55
|
+
`skills/*/.version` is gitignored so a local install cannot commit a stray marker.
|
|
56
|
+
|
|
57
|
+
## This is the secondary signal
|
|
58
|
+
|
|
59
|
+
The **primary** drift signal is structural: is `.claude/skills/<name>` a symlink into
|
|
60
|
+
this package? A real directory is always drift, because nothing in the current system
|
|
61
|
+
creates one. That check needs no marker and cannot itself go stale.
|
|
62
|
+
|
|
63
|
+
The marker answers the follow-up question — *how far behind is it* — and is the only
|
|
64
|
+
signal available on install shapes where a symlink is impossible (Windows without
|
|
65
|
+
developer mode, some CI checkouts). Treat a missing marker as unknown, never as fine.
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [Skill linking and reclaim](../architecture/skill-linking-and-reclaim.md)
|
|
70
|
+
- [Stale skill directory](../troubleshooting/stale-skill-dir-drift.md)
|
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
title: workspace.json schema
|
|
3
3
|
tier: standard
|
|
4
4
|
domains:
|
|
5
|
-
-
|
|
6
|
-
status: active
|
|
7
|
-
last_updated: 2026-05-07
|
|
8
|
-
version: 1.0.0
|
|
5
|
+
- reference
|
|
9
6
|
audience:
|
|
10
7
|
- developers
|
|
11
|
-
|
|
8
|
+
tags: []
|
|
9
|
+
status: active
|
|
10
|
+
last_updated: '2026-05-07'
|
|
11
|
+
version: 1.0.0
|
|
12
|
+
purpose: Document the .planning/.meta/workspace.json schema introduced in v3.0
|
|
13
|
+
for sm/lg mode tracking
|
|
14
|
+
estimated_read_time: 2 minutes
|
|
15
|
+
word_count: 358
|
|
16
|
+
last_validated: '2026-08-31'
|
|
17
|
+
backlinks: []
|
|
12
18
|
---
|
|
13
19
|
|
|
14
20
|
# `workspace.json` schema (v3.0)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Security Documentation Index
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [security]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-09-04'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Complete listing of security documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Security Documentation
|
|
12
|
+
|
|
13
|
+
> Security, auth, Vault, Keycloak, RLS
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
- **Total Documents:** 0
|
|
18
|
+
- **Domain:** `security/`
|
|
19
|
+
- **Category:** core
|
|
20
|
+
- **Load Priority:** 9/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: security, auth, authentication, authorization, oauth, jwt, keycloak, vault, secrets, rls
|
|
34
|
+
|
|
35
|
+
## Related Domains
|
|
36
|
+
|
|
37
|
+
- [Database](../database/) - Schema, migrations, RLS, queries, procedures
|
|
38
|
+
- [API](../api/) - API endpoints, routes, specifications, contracts
|
|
39
|
+
- [DevOps](../devops/) - Deployment, CI/CD, Docker, environments, infrastructure
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
*Last updated: 2026-09-04*
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Security Registry
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [security]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-09-04'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Quick reference for security documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Security Registry
|
|
12
|
+
|
|
13
|
+
> Quick reference for security, auth, vault, keycloak, rls.
|
|
14
|
+
|
|
15
|
+
## At a Glance
|
|
16
|
+
|
|
17
|
+
| Metric | Value |
|
|
18
|
+
|--------|-------|
|
|
19
|
+
| Documents | 0 |
|
|
20
|
+
| Category | core |
|
|
21
|
+
| Load Priority | 9/10 |
|
|
22
|
+
|
|
23
|
+
## Documents
|
|
24
|
+
|
|
25
|
+
*No documents in this domain yet.*
|
|
26
|
+
|
|
27
|
+
## Keywords
|
|
28
|
+
|
|
29
|
+
`security` `auth` `authentication` `authorization` `oauth` `jwt` `keycloak` `vault` `secrets` `rls` `row-level-security` `rbac` `permissions` `access-control` `encryption` `ssl` `tls` `certificate`
|
|
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-09-04*
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Standards Documentation Index
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [standards]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-09-04'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Complete listing of standards documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Standards Documentation
|
|
12
|
+
|
|
13
|
+
> Coding standards (backend, frontend, database, devops, security)
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
- **Total Documents:** 2
|
|
18
|
+
- **Domain:** `standards/`
|
|
19
|
+
- **Category:** development
|
|
20
|
+
- **Load Priority:** 10/10
|
|
21
|
+
|
|
22
|
+
## Documents
|
|
23
|
+
|
|
24
|
+
### Standards
|
|
25
|
+
|
|
26
|
+
| Document | Status | Updated | Words |
|
|
27
|
+
|----------|--------|---------|-------|
|
|
28
|
+
| [Atom Granularity (anti-pattern guide)](atom-granularity.md) | active | 2026-05-07 | 556 |
|
|
29
|
+
| [Mandatory Closing Phases](mandatory-closing-phases.md) | active | 2026-08-31 | 770 |
|
|
30
|
+
|
|
31
|
+
## Keywords
|
|
32
|
+
|
|
33
|
+
This domain covers: standard, standards, convention, conventions, pattern, patterns, best-practice, best-practices, guideline, guidelines
|
|
34
|
+
|
|
35
|
+
## Related Domains
|
|
36
|
+
|
|
37
|
+
- [Architecture](../architecture/) - System design, AI coach, project registry, patterns
|
|
38
|
+
- [Testing](../testing/) - Test strategies, fixtures, patterns, integration/e2e
|
|
39
|
+
- [Reference](../reference/) - Schema, frontmatter, and CLI reference material for the planning artifacts
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
*Last updated: 2026-09-04*
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Standards Registry
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [standards]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-09-04'
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
purpose: Quick reference for standards documentation
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Standards Registry
|
|
12
|
+
|
|
13
|
+
> Quick reference for coding standards (backend, frontend, database, devops, security).
|
|
14
|
+
|
|
15
|
+
## At a Glance
|
|
16
|
+
|
|
17
|
+
| Metric | Value |
|
|
18
|
+
|--------|-------|
|
|
19
|
+
| Documents | 2 |
|
|
20
|
+
| Category | development |
|
|
21
|
+
| Load Priority | 10/10 |
|
|
22
|
+
|
|
23
|
+
## Active Documents
|
|
24
|
+
|
|
25
|
+
- [Atom Granularity (anti-pattern guide)](atom-granularity.md)
|
|
26
|
+
- [Mandatory Closing Phases](mandatory-closing-phases.md)
|
|
27
|
+
|
|
28
|
+
## Recently Updated
|
|
29
|
+
|
|
30
|
+
- [Mandatory Closing Phases](mandatory-closing-phases.md) - 2026-08-31
|
|
31
|
+
- [Atom Granularity (anti-pattern guide)](atom-granularity.md) - 2026-05-07
|
|
32
|
+
|
|
33
|
+
## By Status
|
|
34
|
+
|
|
35
|
+
| Status | Count |
|
|
36
|
+
|--------|-------|
|
|
37
|
+
| active | 2 |
|
|
38
|
+
| draft | 0 |
|
|
39
|
+
| deprecated | 0 |
|
|
40
|
+
| archived | 0 |
|
|
41
|
+
|
|
42
|
+
## Keywords
|
|
43
|
+
|
|
44
|
+
`standard` `standards` `convention` `conventions` `pattern` `patterns` `best-practice` `best-practices` `guideline` `guidelines` `style` `style-guide` `coding` `naming` `formatting` `linting` `rules`
|
|
45
|
+
|
|
46
|
+
## See Also
|
|
47
|
+
|
|
48
|
+
- [Full Index](INDEX.md) - Complete document listing
|
|
49
|
+
- [Root Index](../INDEX.md) - All domains
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
*Last updated: 2026-09-04*
|
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
title: Atom Granularity (anti-pattern guide)
|
|
3
3
|
tier: standard
|
|
4
4
|
domains:
|
|
5
|
-
-
|
|
6
|
-
status: active
|
|
7
|
-
last_updated: 2026-05-07
|
|
8
|
-
version: 1.0.0
|
|
5
|
+
- standards
|
|
9
6
|
audience:
|
|
10
7
|
- developers
|
|
11
|
-
|
|
8
|
+
tags: []
|
|
9
|
+
status: active
|
|
10
|
+
last_updated: '2026-05-07'
|
|
11
|
+
version: 1.0.0
|
|
12
|
+
purpose: When to spawn a standalone atom file vs. add an inline atom checkbox to
|
|
13
|
+
task.md. The atom layer is load-bearing for subagent hand-off; this doc keeps
|
|
14
|
+
it from being misused.
|
|
15
|
+
estimated_read_time: 3 minutes
|
|
16
|
+
word_count: 556
|
|
17
|
+
last_validated: '2026-08-31'
|
|
18
|
+
backlinks: []
|
|
12
19
|
---
|
|
13
20
|
|
|
14
21
|
# Atom Granularity
|
|
@@ -0,0 +1,145 @@
|
|
|
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 as many docs as needed to capture what was done, where it lives, how to troubleshoot it**
|
|
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 |
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## How they are enforced (3.3.0+)
|
|
129
|
+
|
|
130
|
+
In lg mode the two closers are no longer only checkbox lines. `init-phase.sh` scaffolds
|
|
131
|
+
each as a real task directory — `task.md` with `mandatory: true`, `notes.md`, `atoms/`,
|
|
132
|
+
and seeded atoms — so they are addressable artifacts like every other task.
|
|
133
|
+
|
|
134
|
+
Two mechanisms keep the rule true rather than advisory:
|
|
135
|
+
|
|
136
|
+
- **Ordering by construction.** `init-task.sh` inserts every new task *above* the first
|
|
137
|
+
MANDATORY entry, so the closers cannot be pushed out of last place by adding work.
|
|
138
|
+
- **Completion gated on status.** `plan-status.sh` refuses `COMPLETE` while any
|
|
139
|
+
`mandatory: true` task's own `status:` is not `done`. Ticking its checkbox is not
|
|
140
|
+
enough — a closer that was ticked but never performed is exactly the failure being
|
|
141
|
+
guarded.
|
|
142
|
+
|
|
143
|
+
Legacy plans without `mandatory:` frontmatter keep their previous behavior; the gate is
|
|
144
|
+
strictly additive. See [`mandatory:` frontmatter](../reference/mandatory-frontmatter.md)
|
|
145
|
+
and [lg plan artifact lifecycle](../architecture/lg-plan-artifact-lifecycle.md).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Testing Documentation Index
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [testing]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-09-04'
|
|
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-09-04*
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Testing Registry
|
|
3
|
+
tier: reference
|
|
4
|
+
domains: [testing]
|
|
5
|
+
status: active
|
|
6
|
+
last_updated: '2026-09-04'
|
|
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-09-04*
|