@theglitchking/persistent-planning 2.0.0 → 3.0.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.
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "persistent-planning-marketplace",
3
+ "owner": {
4
+ "name": "TheGlitchKing",
5
+ "email": "theglitchking@users.noreply.github.com"
6
+ },
7
+ "metadata": {
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.0.1"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "persistent-planning",
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.0.1",
16
+ "author": {
17
+ "name": "TheGlitchKing"
18
+ },
19
+ "homepage": "https://github.com/TheGlitchKing/persistent-planning",
20
+ "repository": "https://github.com/TheGlitchKing/persistent-planning.git",
21
+ "license": "MIT",
22
+ "keywords": [
23
+ "planning",
24
+ "persistent",
25
+ "markdown",
26
+ "context-engineering",
27
+ "task-tracking",
28
+ "working-memory",
29
+ "goal-tracking",
30
+ "claude-code"
31
+ ],
32
+ "category": "productivity",
33
+ "tags": [
34
+ "planning",
35
+ "context-engineering",
36
+ "working-memory"
37
+ ],
38
+ "source": {
39
+ "source": "npm",
40
+ "package": "@theglitchking/persistent-planning"
41
+ },
42
+ "strict": true
43
+ }
44
+ ]
45
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "persistent-planning",
3
- "version": "2.0.0",
3
+ "version": "3.0.1",
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"
package/CHANGELOG.md CHANGED
@@ -2,6 +2,73 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [3.0.1] - 2026-05-08
6
+
7
+ ### Fixed
8
+ - **Critical: lg-mode init scripts and templates were excluded from the npm package.** The 3.0.0 release had `scripts/link-skills.js` (singular file) in the package.json `files` array instead of `scripts/` (whole dir), and `templates/` was missing entirely. As a result, users installing v3.0.0 got the slash command markdown but the underlying `init-phase.sh`, `init-task.sh`, `init-atom.sh`, `detect-mode.sh`, `lib/planning.sh`, and the four lg-mode templates (`phase.md`, `task.md`, `atom.md`, `notes.md`) were all missing — meaning lg mode silently broke on first invocation.
9
+
10
+ This patch updates the `files` array to include `scripts/` and `templates/` directories, and bumps to 3.0.1. v3.0.0 should be considered broken; consumers should upgrade to 3.0.1 immediately.
11
+
12
+ ### How this happened
13
+ The `files` array was the legacy v2 contents (which only needed `scripts/link-skills.js`). When v3.0 added new scripts and templates I missed updating the array. Caught when verifying the published 3.0.0 tarball contents.
14
+
15
+ ## [3.0.0] - 2026-05-07
16
+
17
+ ### Added — Lg-mode (large/team) layered planning
18
+
19
+ v3.0 introduces a new **layered planning mode** alongside the existing single-task flow. The mode is auto-detected (90-day git-author-count heuristic; ≥2 distinct authors → lg) and is sticky once chosen.
20
+
21
+ **Four layers** in lg mode:
22
+
23
+ - **Phase** — strategic grouping of related tasks (top)
24
+ - **Task** — bounded deliverable; declares `depends_on` + `parallelizable` for subagent team scheduling
25
+ - **Atom** — subagent hand-off unit; sequential within a task; status: `ready | in_progress | done | blocked` with reopen support
26
+ - **Notes** — cross-cutting references scoped to a phase or task
27
+
28
+ All four layers carry HEWTD-aligned frontmatter (`tier: plan`). `version` is intentionally omitted — HEWTD 2.2.0+ makes it conditionally optional for plan-tier docs.
29
+
30
+ ### Added — `/start-task` and `/start-atom` slash commands
31
+
32
+ - `/start-task "<name>" --parent <phase>` — adds a task under an existing phase (lg only)
33
+ - `/start-atom "<name>" --parent <task>` — adds an atom (subagent hand-off unit) under a task (lg only); auto-resolves the parent phase by walking `.planning/`; auto-assigns sequence number
34
+ - `/start-planning` updated to dispatch sm vs lg based on detect-mode.sh; accepts `--mode sm|lg` for explicit override
35
+
36
+ ### Added — `.planning/.meta/workspace.json`
37
+
38
+ Per-project mode tracker. Fields: `schema_version`, `mode`, `auto_detected`, `detected_contributors`, `created_at`. Bootstrapped on first lg-mode init. See `docs/workspace-json.md` for the full schema.
39
+
40
+ ### Added — Documentation
41
+
42
+ - `docs/lg-mode.md` — full lg-mode guide
43
+ - `docs/atom-granularity.md` — anti-pattern guide for inline-checkbox-vs-standalone-atom
44
+ - `docs/workspace-json.md` — workspace.json schema reference
45
+
46
+ ### Added — Scripts
47
+
48
+ - `scripts/detect-mode.sh` — sm/lg resolution
49
+ - `scripts/lib/planning.sh` — shared bash helpers
50
+ - `scripts/init-phase.sh`, `scripts/init-task.sh`, `scripts/init-atom.sh` — lg-mode init scripts
51
+
52
+ ### Added — Templates
53
+
54
+ - `templates/lg/{phase,task,atom,notes}.md` — HEWTD-frontmattered layer templates
55
+
56
+ ### Subagent contract (requires semantic-memory 1.0)
57
+
58
+ Lg-mode plans are designed to be read by subagents via semantic-memory's MCP verbs (registered conditionally on the `plans` corpus). When semantic-memory is absent, persistent-planning falls back to filesystem-based reads — slash commands still work; subagent comprehension degrades.
59
+
60
+ ### Backwards compatibility
61
+
62
+ - **Sm mode preserved exactly**: existing `.planning/<task-slug>/{task_plan.md, notes.md}` directories continue to work without changes. The original `/start-planning "Task name"` flow is identical to v2.
63
+ - **Auto-detection is non-disruptive**: existing v2 plans aren't migrated. New `/start-planning` invocations auto-detect mode and create new artifacts using the resolved mode.
64
+
65
+ ### Optional dependencies
66
+
67
+ - `@theglitchking/hit-em-with-the-docs ^2.2.0` — required for `hewtd validate` to accept lg-mode plan frontmatter (introduces `tier: "plan"` + conditional `version`)
68
+ - `@theglitchking/semantic-memory ^1.0.0` (formerly `semantic-sidekick`) — required for the planning MCP verbs that subagents use to read/mutate lg-mode plans
69
+
70
+ When neither is installed, lg mode still works as a pure file-authoring flow.
71
+
5
72
  ## [2.0.0] - 2026-04-18
6
73
 
7
74
  ### ⚠️ Breaking changes
package/README.md CHANGED
@@ -43,43 +43,48 @@ For every complex task, create three files:
43
43
 
44
44
  ## Installation
45
45
 
46
- ### Option 1: NPM (Recommended)
46
+ > **v1 → v2 breaking change**: the hand-rolled `persistent-planning install --scope ...` flow was removed. Skills and slash commands are now placed automatically — either by the Claude Code plugin marketplace, or by npm's postinstall symlinking. See [CHANGELOG.md](./CHANGELOG.md) for the full migration guide.
47
47
 
48
- ```bash
49
- # Install globally
50
- npm install -g @theglitchking/persistent-planning
51
- persistent-planning install --scope user
48
+ ### Option A: Claude Code Plugin Marketplace (Recommended)
52
49
 
53
- # Or via npx (no global install)
54
- npx @theglitchking/persistent-planning install --scope user
55
50
  ```
51
+ /plugin marketplace add TheGlitchKing/persistent-planning
52
+ /plugin install persistent-planning@persistent-planning-marketplace
53
+ ```
54
+
55
+ ### Option B: Project-level npm install
56
56
 
57
- ### Option 2: Installer Script
57
+ Pins the exact version in `package.json`, visible to teammates, CI, and LLMs reading the repo. Postinstall symlinks `skills/persistent-planning/` into `<project>/.claude/skills/`, writes a default `.claude/persistent-planning.json` (update policy `nudge`), and registers a SessionStart hook in `.claude/settings.json` if one is present. Dedup: if the plugin marketplace version is already enabled in `~/.claude/settings.json`, the npm hook registration is skipped.
58
58
 
59
59
  ```bash
60
- git clone https://github.com/TheGlitchKing/persistent-planning.git
61
- cd persistent-planning
62
- ./install.sh --scope user # Available in all projects
63
- # OR
64
- ./install.sh --scope project # Current project only
60
+ npm install --save-dev @theglitchking/persistent-planning
65
61
  ```
66
62
 
67
- ### Option 3: Claude Marketplace
63
+ ### Option C: Try it (no install)
68
64
 
69
- ```
70
- /plugin install TheGlitchKing/persistent-planning
65
+ ```bash
66
+ npx @theglitchking/persistent-planning status
71
67
  ```
72
68
 
73
- ### Option 4: Manual Installation
69
+ ## Update management
70
+
71
+ Each install ships with an update policy. By default the plugin checks npm at session start and prints a one-liner when a newer version is available — no changes made. Opt into automatic updates or silence the check entirely:
74
72
 
75
73
  ```bash
76
- mkdir -p ~/.claude/skills
77
- cp -r persistent-planning/skills/SKILL.md ~/.claude/skills/persistent-planning/SKILL.md
78
- cp -r persistent-planning/scripts ~/.claude/skills/persistent-planning/scripts
79
- cp -r persistent-planning/docs ~/.claude/skills/persistent-planning/docs
80
- cp persistent-planning/.claude/commands/start-planning.md ~/.claude/commands/start-planning.md
74
+ # Slash commands
75
+ /persistent-planning:policy auto # auto-update on session start
76
+ /persistent-planning:policy nudge # one-liner nudge only (default)
77
+ /persistent-planning:policy off # silent
78
+
79
+ # CLI equivalents
80
+ npx --no @theglitchking/persistent-planning policy auto
81
+ npx --no @theglitchking/persistent-planning status # installed, latest, policy, hook state
82
+ npx --no @theglitchking/persistent-planning update # runs npm update + relinks skills
83
+ npx --no @theglitchking/persistent-planning relink # re-symlink skills only
81
84
  ```
82
85
 
86
+ Policy resolution order: `PERSISTENT_PLANNING_UPDATE_POLICY` env var → `<project>/.claude/persistent-planning.json` → default `nudge`.
87
+
83
88
  ## Usage
84
89
 
85
90
  ### Quick Start
@@ -151,23 +156,29 @@ Each task gets its own directory. No conflicts, no overwrites.
151
156
  ```
152
157
  persistent-planning/
153
158
  ├── .claude-plugin/
154
- │ └── plugin.json # Plugin manifest
155
- ├── .claude/
156
- │ └── commands/
157
- │ └── start-planning.md # /start-planning command
158
- ├── skills/
159
- │ └── SKILL.md # Core skill definition
159
+ │ └── plugin.json # Plugin manifest (marketplace loader)
160
+ ├── bin/
161
+ │ └── persistent-planning.js # CLI (update/policy/status/relink)
162
+ ├── commands/
163
+ │ ├── start-planning.md # /start-planning slash command
164
+ │ ├── update.md # /persistent-planning:update
165
+ │ ├── policy.md # /persistent-planning:policy
166
+ │ ├── status.md # /persistent-planning:status
167
+ │ └── relink.md # /persistent-planning:relink
168
+ ├── hooks/
169
+ │ ├── hooks.json # SessionStart hook manifest
170
+ │ └── session-start.js # Runtime-delegated hook
160
171
  ├── scripts/
161
- │ └── init-planning.sh # Automated setup script
172
+ │ └── link-skills.js # Postinstall (runtime-delegated)
173
+ ├── skills/
174
+ │ └── persistent-planning/
175
+ │ └── SKILL.md # Core skill definition
162
176
  ├── docs/
163
177
  │ ├── reference.md # Manus context engineering principles
164
178
  │ └── examples.md # Worked examples
165
- ├── install.sh # Plugin installer
166
- ├── uninstall.sh # Plugin uninstaller
167
- ├── plugin.json # Root plugin metadata
168
- ├── README.md # This file
169
- ├── LICENSE # MIT license
170
- └── CHANGELOG.md # Version history
179
+ ├── README.md
180
+ ├── LICENSE
181
+ └── CHANGELOG.md
171
182
  ```
172
183
 
173
184
  ## Cleanup
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: start-atom
3
+ description: "Add an atom (subagent hand-off unit) under an existing task in lg-mode persistent-planning. Creates .planning/<phase>/<task>/atoms/<atom-slug>.md with auto-incremented sequence. Requires --parent <task-slug>. Lg mode only."
4
+ ---
5
+
6
+ # /start-atom
7
+
8
+ Add an atom — the smallest unit of planning, designed for subagent hand-off — under an existing task. **Lg mode only.**
9
+
10
+ ---
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ /start-atom "Atom name" --parent <task-slug>
16
+ ```
17
+
18
+ ## Examples
19
+
20
+ ```
21
+ /start-atom "Update zod schema" --parent hewtd-schema-extension
22
+ /start-atom "Add plan-tier tests" --parent hewtd-schema-extension
23
+ /start-atom "Bump to 2.2.0" --parent hewtd-schema-extension
24
+ ```
25
+
26
+ ---
27
+
28
+ ## What To Do
29
+
30
+ When the user runs `/start-atom "<name>" --parent <task-slug>`:
31
+
32
+ 1. Run the init script:
33
+ ```bash
34
+ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")/../scripts"
35
+ bash "${SCRIPT_DIR}/init-atom.sh" "<name>" --parent "<task-slug>"
36
+ ```
37
+
38
+ The script auto-resolves which phase contains the task (no need to specify the phase). It auto-assigns the next sequence number based on existing atoms in the same task's `atoms/` directory.
39
+
40
+ If the script isn't found at that path, try:
41
+ ```bash
42
+ bash scripts/init-atom.sh "<name>" --parent "<task-slug>"
43
+ bash ~/.claude/skills/persistent-planning/scripts/init-atom.sh "<name>" --parent "<task-slug>"
44
+ ```
45
+
46
+ 2. After completion, remind the user:
47
+ - Edit `.planning/<phase>/<task>/atoms/<atom-slug>.md` to define:
48
+ - `## What to do` — the atomic action
49
+ - `## Inputs` — files / state the atom depends on
50
+ - `## Expected outputs` — files / commands / state changes
51
+ - `## Acceptance criteria` — how to verify completion
52
+ - The atom starts with `status: ready`. A subagent will claim it (status → `in_progress`) and complete it (status → `done`).
53
+
54
+ ---
55
+
56
+ ## What It Creates
57
+
58
+ ```
59
+ .planning/<phase-slug>/<task-slug>/atoms/
60
+ └── <atom-slug>.md # HEWTD-frontmattered atom (parent: <task-slug>, sequence: N)
61
+ ```
62
+
63
+ The atom file includes the structured sections needed for subagent comprehension. It's the contract a subagent reads to know exactly what to do.
64
+
65
+ ## Atoms vs. inline checkboxes
66
+
67
+ Not every step needs a standalone atom file. The rule of thumb:
68
+
69
+ - **Inline checkbox in `task.md`**: simple, self-contained step that doesn't need its own context file. The user (or the active agent) handles it directly.
70
+ - **Standalone atom file via `/start-atom`**: a step that will be **handed off to a subagent**. Atoms get their own files because subagents need explicit inputs / outputs / acceptance criteria they can read structured rather than parse from prose.
71
+
72
+ See `docs/atom-granularity.md` for full anti-pattern guidance with examples.
73
+
74
+ ## Sequence semantics
75
+
76
+ Atoms within a task default to **sequential** processing. The `sequence:` frontmatter field is auto-assigned (1 + max existing). The planning MCP's `next_atom(task)` verb returns the next `status: ready` atom in sequence order.
77
+
78
+ Sequential matches the single-agent reality and eliminates filesystem race conditions on claim. If you have a genuine parallel-atom workload, that's a Phase 4.x conversation; today, atoms hand off one at a time.
79
+
80
+ ## Lg-mode-only
81
+
82
+ This command refuses to run if the project is in sm mode. To switch:
83
+
84
+ ```
85
+ /start-planning "<phase name>" --mode lg
86
+ ```
87
+
88
+ ## See also
89
+
90
+ - `/start-planning` — initialize the planning structure (phase in lg)
91
+ - `/start-task` — add a task under a phase
92
+ - `docs/lg-mode.md` — full lg-mode layer model
93
+ - `docs/atom-granularity.md` — when to spawn an atom file vs. inline checkbox
@@ -1,65 +1,115 @@
1
1
  ---
2
2
  name: start-planning
3
- description: "Initialize persistent planning structure for a task. Creates .planning/[task-slug]/ with task_plan.md and notes.md for on-disk working memory that persists across sessions."
3
+ description: "Initialize persistent planning structure. In sm mode (solo/small) creates .planning/[task-slug]/ with task_plan.md + notes.md (v2 behavior). In lg mode (team/large), creates a phase: .planning/[phase-slug]/{phase.md, notes.md} and bootstraps .planning/.meta/workspace.json. Mode auto-detects via 90-day git author count (≥2 = lg) or can be forced with --mode."
4
4
  ---
5
5
 
6
6
  # /start-planning
7
7
 
8
- Initialize the persistent planning structure for a task.
8
+ Initialize the persistent planning structure. Mode (sm vs lg) determines what gets created.
9
9
 
10
10
  ---
11
11
 
12
12
  ## Usage
13
13
 
14
14
  ```
15
- /start-planning "Your task name here"
15
+ /start-planning "Your name here" # auto-detect mode
16
+ /start-planning "Your name here" --mode sm # force small mode (single task)
17
+ /start-planning "Your name here" --mode lg # force large mode (phase)
16
18
  ```
17
19
 
20
+ ## Mode behavior
21
+
22
+ - **sm mode** (solo / small): creates `.planning/<slug>/{task_plan.md, notes.md}`. Single-task flow. Identical to v2 behavior.
23
+ - **lg mode** (team / large): creates `.planning/<phase-slug>/{phase.md, notes.md}` — the new top-layer "phase" artifact. Add tasks under it with `/start-task`, atoms with `/start-atom`. Bootstraps `.planning/.meta/workspace.json`.
24
+
25
+ Mode is auto-detected via 90-day git author count (≥2 distinct authors → lg, else sm), with a printed decision banner. Once detected (or explicitly set with `--mode`), the choice is sticky in `.planning/.meta/workspace.json` for all subsequent runs.
26
+
18
27
  ## Examples
19
28
 
20
29
  ```
21
- /start-planning "Refactor authentication system"
22
- /start-planning "Build REST API with JWT"
23
- /start-planning "Fix memory leak in worker process"
30
+ /start-planning "Refactor authentication system" # solo: makes a task plan
31
+ /start-planning "Foundation" # team: makes a phase
32
+ /start-planning "Multi-corpus refactor" --mode lg # force lg
33
+ /start-planning "Quick spike" --mode sm # force sm
24
34
  ```
25
35
 
26
36
  ---
27
37
 
28
38
  ## What To Do
29
39
 
30
- When the user runs `/start-planning "Task Name"`:
40
+ When the user runs `/start-planning "<name>" [--mode sm|lg]`:
31
41
 
32
- 1. Run the init script:
42
+ 1. **Resolve mode**:
33
43
  ```bash
34
- bash "$(dirname "$(readlink -f "$0")")/../scripts/init-planning.sh" "Task Name"
44
+ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")/../scripts"
45
+ # Honor explicit --mode flag if given; otherwise detect.
46
+ if [ -n "$EXPLICIT_MODE" ]; then
47
+ MODE="$EXPLICIT_MODE"
48
+ else
49
+ MODE=$(bash "${SCRIPT_DIR}/detect-mode.sh" --explain)
50
+ fi
35
51
  ```
36
52
 
37
- If the script is not found at that path, try these fallbacks in order:
53
+ 2. **Dispatch by mode**:
54
+
55
+ If `MODE=sm`:
38
56
  ```bash
39
- bash scripts/init-planning.sh "Task Name"
40
- bash ~/.claude/skills/persistent-planning/scripts/init-planning.sh "Task Name"
57
+ bash "${SCRIPT_DIR}/init-planning.sh" "<name>"
41
58
  ```
42
59
 
43
- 2. After the script completes, remind the user:
44
- - Edit `.planning/[task-slug]/task_plan.md` to define phases
45
- - Update the Status section as they work
46
- - Save findings to `.planning/[task-slug]/notes.md`
47
- - Re-read `task_plan.md` before major decisions
60
+ If `MODE=lg`:
61
+ ```bash
62
+ bash "${SCRIPT_DIR}/init-phase.sh" "<name>"
63
+ ```
64
+
65
+ If `--mode lg` was passed but workspace.json already exists with `mode: sm` (or vice versa), update workspace.json to the new mode (the override sticks).
66
+
67
+ 3. **After the script completes**:
68
+ - sm mode: remind the user to edit `task_plan.md`, update `Status`, save to `notes.md`
69
+ - lg mode: remind the user to add tasks via `/start-task "<task name>" --parent <phase-slug>`
70
+
71
+ If a script isn't found at the resolved path, try these fallbacks in order:
72
+ ```bash
73
+ bash scripts/init-phase.sh "<name>" # for lg
74
+ bash scripts/init-planning.sh "<name>" # for sm
75
+ bash ~/.claude/skills/persistent-planning/scripts/init-phase.sh "<name>"
76
+ bash ~/.claude/skills/persistent-planning/scripts/init-planning.sh "<name>"
77
+ ```
48
78
 
49
79
  ---
50
80
 
51
81
  ## What It Creates
52
82
 
83
+ ### sm mode
53
84
  ```
54
85
  .planning/
55
- └── [task-slug]/
56
- ├── task_plan.md # Track phases and progress
86
+ └── <slug>/
87
+ ├── task_plan.md # Track phases inline + progress
57
88
  └── notes.md # Store research and findings
58
89
  ```
59
90
 
60
- ## Task Slug Conversion
91
+ ### lg mode
92
+ ```
93
+ .planning/
94
+ ├── .meta/
95
+ │ └── workspace.json # {mode: "lg", auto_detected: true, ...}
96
+ └── <phase-slug>/
97
+ ├── phase.md # HEWTD-frontmattered top-layer artifact
98
+ └── notes.md # Cross-cutting notes for the phase
99
+ ```
100
+
101
+ Add tasks under a phase with `/start-task "<name>" --parent <phase-slug>`.
102
+
103
+ ## Slug conversion
104
+
105
+ Names are converted to URL-friendly slugs:
106
+ - "Refactor Authentication" → `refactor-authentication`
107
+ - "Multi-Corpus Refactor" → `multi-corpus-refactor`
108
+ - "Fix Bug #123" → `fix-bug-123`
109
+
110
+ ## See also
61
111
 
62
- Task names are converted to URL-friendly slugs:
63
- - "Refactor Authentication" -> `refactor-authentication`
64
- - "Build REST API" -> `build-rest-api`
65
- - "Fix Bug #123" -> `fix-bug-123`
112
+ - `/start-task` — add a task under a phase (lg mode only)
113
+ - `/start-atom` — add an atom (subagent hand-off unit) under a task (lg mode only)
114
+ - `docs/workspace-json.md` — workspace.json schema reference
115
+ - `docs/lg-mode.md` — full lg-mode guide (phase / task / atom / notes layer model)
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: start-task
3
+ description: "Add a task under an existing phase in lg-mode persistent-planning. Creates .planning/<phase>/<task-slug>/{task.md, notes.md, atoms/}. Requires --parent <phase-slug>. Lg mode only."
4
+ ---
5
+
6
+ # /start-task
7
+
8
+ Add a task under an existing phase. **Lg mode only** — refuses to run in sm mode.
9
+
10
+ ---
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ /start-task "Task name" --parent <phase-slug>
16
+ ```
17
+
18
+ ## Examples
19
+
20
+ ```
21
+ /start-task "HEWTD schema extension" --parent foundation
22
+ /start-task "Multi-corpus refactor" --parent semantic-memory-core
23
+ /start-task "Drift detection algorithm" --parent ecosystem-extensions
24
+ ```
25
+
26
+ ---
27
+
28
+ ## What To Do
29
+
30
+ When the user runs `/start-task "<name>" --parent <phase-slug>`:
31
+
32
+ 1. Run the init script:
33
+ ```bash
34
+ SCRIPT_DIR="$(dirname "$(readlink -f "$0")")/../scripts"
35
+ bash "${SCRIPT_DIR}/init-task.sh" "<name>" --parent "<phase-slug>"
36
+ ```
37
+
38
+ If the script isn't found at that path, try:
39
+ ```bash
40
+ bash scripts/init-task.sh "<name>" --parent "<phase-slug>"
41
+ bash ~/.claude/skills/persistent-planning/scripts/init-task.sh "<name>" --parent "<phase-slug>"
42
+ ```
43
+
44
+ 2. After completion, remind the user:
45
+ - Edit `.planning/<phase>/<task-slug>/task.md` to define the task goal
46
+ - Add atoms with `/start-atom "<name>" --parent <task-slug>` (or inline checkboxes for simple atoms)
47
+ - Update task frontmatter: `depends_on: [<other-task-slug>]` for sequential dependencies, or `parallelizable: true` for tasks with no inter-dependencies
48
+
49
+ ---
50
+
51
+ ## What It Creates
52
+
53
+ ```
54
+ .planning/<phase-slug>/
55
+ └── <task-slug>/
56
+ ├── task.md # HEWTD-frontmattered task artifact (parent: <phase-slug>)
57
+ ├── notes.md # Cross-cutting notes scoped to this task
58
+ └── atoms/ # Empty dir for future atoms (subagent hand-off units)
59
+ ```
60
+
61
+ ## Frontmatter scheduling fields
62
+
63
+ The `task.md` template includes two key scheduling fields:
64
+
65
+ - `depends_on: []` — array of other task slugs (within the same phase) this task depends on. The planning MCP's `next_task()` verb respects this graph.
66
+ - `parallelizable: false` — set to `true` for tasks that can be picked up in any order by subagent teams. Default `false` (conservative).
67
+
68
+ ## Lg-mode-only
69
+
70
+ This command refuses to run if the project is in sm mode. To switch:
71
+
72
+ ```
73
+ /start-planning "<phase name>" --mode lg
74
+ ```
75
+
76
+ That writes `.planning/.meta/workspace.json` with `mode: "lg"` and creates the first phase.
77
+
78
+ ## See also
79
+
80
+ - `/start-planning` — initialize the planning structure (phase in lg, task in sm)
81
+ - `/start-atom` — add an atom under a task
82
+ - `docs/lg-mode.md` — full lg-mode layer model
83
+ - `docs/atom-granularity.md` — when to spawn an atom file vs. add an inline checkbox