pi-soly 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +372 -0
- package/agents/soly-debugger.md +60 -0
- package/agents/soly-documenter.md +82 -0
- package/agents/soly-oracle.md +69 -0
- package/agents/soly-refactor.md +65 -0
- package/agents/soly-reviewer.md +107 -0
- package/agents/soly-tester.md +56 -0
- package/agents/soly-worker.md +84 -0
- package/agents-install.ts +105 -0
- package/commands.ts +778 -0
- package/config.ts +228 -0
- package/core.ts +1599 -0
- package/docs.ts +235 -0
- package/env.ts +196 -0
- package/git.ts +95 -0
- package/html.ts +157 -0
- package/index.ts +718 -0
- package/integrations.ts +64 -0
- package/intent.ts +303 -0
- package/iteration.ts +712 -0
- package/nudge.ts +123 -0
- package/package.json +66 -0
- package/scratchpad.ts +117 -0
- package/tools.ts +1132 -0
- package/workflows/execute.ts +401 -0
- package/workflows/index.ts +235 -0
- package/workflows/inspect.ts +492 -0
- package/workflows/parser.ts +268 -0
- package/workflows/pause.ts +150 -0
- package/workflows/planning.ts +624 -0
- package/workflows/quick.ts +258 -0
- package/workflows/resume.ts +201 -0
- package/workflows-data/discuss-phase.md +292 -0
- package/workflows-data/execute-phase.md +200 -0
- package/workflows-data/execute-plan.md +251 -0
- package/workflows-data/execute-task.md +116 -0
- package/workflows-data/pause-work.md +142 -0
- package/workflows-data/plan-phase.md +199 -0
- package/workflows-data/plan-task.md +185 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Plan Phase
|
|
2
|
+
|
|
3
|
+
<purpose>Produce one or more PLAN.md files for a phase — each a self-contained contract (requirements, must_haves, tasks with runnable acceptance criteria) the executor can run standalone. Pre-compute wave numbers encoding the dependency graph. Update STATE.md.</purpose>
|
|
4
|
+
|
|
5
|
+
<path_discipline>
|
|
6
|
+
**All soly-managed files live under `.soly/`.** Never write PLAN.md, CONTEXT.md, RESEARCH.md, SUMMARY.md, iteration files, or handoffs to the project root. All phase files go in `.soly/phases/<NN>-<slug>/`. Use absolute paths (or paths starting with `$SOLY_DIR`) — never bare relative names that could land in cwd.
|
|
7
|
+
|
|
8
|
+
The iteration context file (path given by the parent in the task prompt) is your single source of truth for intent, STATE, ROADMAP, and any existing phase artifacts. Read it FIRST, before any of your own `read` or `ls` calls.
|
|
9
|
+
</path_discipline>
|
|
10
|
+
|
|
11
|
+
<read_first>`.soly/docs/` (INTENT, 0-point) · `.soly/STATE.md` (current position) · `.soly/ROADMAP.md` (this phase's row) · `.soly/REQUIREMENTS.md` if exists · `<phase>-CONTEXT.md` if exists (user decisions from `soly discuss`) · `<phase>-RESEARCH.md` if exists (chosen libs/patterns) · up to 3 most recent prior `*-SUMMARY.md` (avoid re-implementing). If `.soly/` missing → stop + error.</read_first>
|
|
12
|
+
|
|
13
|
+
<git_branch_invariant>
|
|
14
|
+
**Do not create, rename, or switch git branches.** The branch was established at `soly discuss` and is owned by the user's git workflow. Verify the current branch matches expectations, but do NOT change it.
|
|
15
|
+
</git_branch_invariant>
|
|
16
|
+
|
|
17
|
+
<plan_frontmatter_spec>
|
|
18
|
+
Every PLAN.md frontmatter (executor depends on it):
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
---
|
|
22
|
+
id: <NN>-<M>-<slug> # padded-phase, plan-number, slug (matches filename)
|
|
23
|
+
phase: <N> plan: <M>
|
|
24
|
+
title: "<short title>"
|
|
25
|
+
wave: <W> # 1 = first to run; 2 = depends on wave 1; etc.
|
|
26
|
+
depends-on: [<id-1>, <id-2>, ...]
|
|
27
|
+
requirements: [<REQ-ID-1>, <REQ-ID-2>, ...]
|
|
28
|
+
tags: [be, api, auth]
|
|
29
|
+
---
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Body MUST include `## Must Haves`:
|
|
33
|
+
|
|
34
|
+
```markdown
|
|
35
|
+
## Must Haves
|
|
36
|
+
### truths — user-observable behaviors (incl. error paths)
|
|
37
|
+
- [ ] <observable behavior>
|
|
38
|
+
### artifacts — files created/modified
|
|
39
|
+
- `<path>` — <what>
|
|
40
|
+
### key_links — concrete file→file wirings the executor preserves
|
|
41
|
+
- <src>:<symbol> → <consumer>:<symbol> — <wired>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Per-task structure (after Must Haves):
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
### Task 1: <name>
|
|
48
|
+
<task type="auto" tdd="false">
|
|
49
|
+
|
|
50
|
+
**Read first:** `<path>` — <why> · `<path>` — <why>
|
|
51
|
+
**Implementation:** <1–2 paragraphs>
|
|
52
|
+
**Acceptance criteria:** (every one RUNNABLE — grep/file-check/test/HTTP-probe, NOT "works correctly")
|
|
53
|
+
- [ ] <criterion>
|
|
54
|
+
**Verification:** `<command>` → <expected>
|
|
55
|
+
**Files to touch:** `<path>` — <change>
|
|
56
|
+
**Commit:** `<type>(<plan-id>): <imperative>`
|
|
57
|
+
</task>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Checkpoint task template (when user input is required mid-plan):
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
### Task 3: <name> — checkpoint:human-verify
|
|
64
|
+
<task type="checkpoint:human-verify">
|
|
65
|
+
**Builds on Task 1+2.**
|
|
66
|
+
**Verification steps for user:** 1. `<cmd>` should print `<expected>` · 2. Open `<URL>` and confirm `<behavior>`
|
|
67
|
+
**What I need:** "approved" or specific issues to fix.
|
|
68
|
+
</task>
|
|
69
|
+
```
|
|
70
|
+
</plan_frontmatter_spec>
|
|
71
|
+
|
|
72
|
+
<process>
|
|
73
|
+
|
|
74
|
+
**1. Initialize.** `bash` only (no SDK):
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
PHASE="$1"
|
|
78
|
+
# Worker subagent inherits the parent's cwd (the project root), so
|
|
79
|
+
# `pwd` IS the project root. The previous `cd .. && pwd` was a bug
|
|
80
|
+
# that sent files to the parent of the project (and then the worker
|
|
81
|
+
# would fall back to the `write` tool with a relative path, polluting
|
|
82
|
+
# the project root).
|
|
83
|
+
PROJECT_ROOT="$(pwd)"
|
|
84
|
+
SOLY_DIR="$PROJECT_ROOT/.soly"
|
|
85
|
+
PHASE_DIR=$(ls -d "$SOLY_DIR/phases/"*"-$PHASE-"* 2>/dev/null | head -1) || { echo "Phase $PHASE not found" >&2; exit 1; }
|
|
86
|
+
PADDED_PHASE=$(printf "%02d" "$(echo "$PHASE" | grep -oE '^[0-9]+' | sed 's/^0*//')")
|
|
87
|
+
PHASE_SLUG=$(basename "$PHASE_DIR")
|
|
88
|
+
mapfile -t EXISTING_PLANS < <(ls "$PHASE_DIR"/${PADDED_PHASE}-*-PLAN.md 2>/dev/null | sort)
|
|
89
|
+
NEXT_PLAN_NUM=$((${#EXISTING_PLANS[@]} + 1))
|
|
90
|
+
HAS_CONTEXT=$([ -f "$PHASE_DIR/${PADDED_PHASE}-CONTEXT.md" ] && echo true || echo false)
|
|
91
|
+
HAS_RESEARCH=$([ -f "$PHASE_DIR/${PADDED_PHASE}-RESEARCH.md" ] && echo true || echo false)
|
|
92
|
+
HAS_SUMMARIES=$(ls "$PHASE_DIR"/${PADDED_PHASE}-*-SUMMARY.md 2>/dev/null | wc -l | tr -d ' ')
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
| state | action |
|
|
96
|
+
|---|---|
|
|
97
|
+
| plans > 0 AND summaries > 0 | **Re-plan** — return `## Re-Plan Detected` to parent, ask user to confirm before overwriting |
|
|
98
|
+
| plans > 0 AND summaries = 0 | draft plans exist; you may ADD plans using existing files as context. **Do NOT overwrite** existing PLAN.md unless user asks |
|
|
99
|
+
| plans = 0 | fresh planning |
|
|
100
|
+
|
|
101
|
+
**2. Read intent (0-POINT).** The iteration context file (path given in the task prompt) already contains the intent docs as a summary. Use that. If you need a specific doc in full, read it directly from its path (listed in section 0 of the bundle). Capture 3–5 intent bullets that bear on this phase. If intent and ROADMAP conflict, surface before writing plans.
|
|
102
|
+
|
|
103
|
+
**3. Read phase context** (also in the iteration file) in priority order:
|
|
104
|
+
1. `<phase>-CONTEXT.md` if exists — user decisions, honor them. Missing decision in an area you need to plan → surface in report.
|
|
105
|
+
2. `<phase>-RESEARCH.md` if exists — chosen libs/patterns. Pitfalls → Must Haves or task body.
|
|
106
|
+
3. `.soly/ROADMAP.md` — this phase's row: goal, requirements, deps on other phases.
|
|
107
|
+
4. `.soly/REQUIREMENTS.md` if exists — full text + acceptance criteria for each `phase_req_ids`. Every requirement → some plan's `requirements:` array.
|
|
108
|
+
5. Up to 3 most recent prior `*-SUMMARY.md` — what was already built.
|
|
109
|
+
|
|
110
|
+
**4. Decompose into plans.**
|
|
111
|
+
|
|
112
|
+
**Heuristic:** 1 plan ≈ 2–8 tasks, fits in one executor session without context overflow. > 8 tasks → split at natural seams (foundational → feature → polish; or BE → FE → integration).
|
|
113
|
+
|
|
114
|
+
**Wave rules:**
|
|
115
|
+
- Wave 1: no deps (or only on prior-phase plans already Complete).
|
|
116
|
+
- Wave N: deps only on plans in waves 1..N-1 of this phase.
|
|
117
|
+
- Graph MUST be acyclic.
|
|
118
|
+
- Default split: wave 1 ≈ half the work; subsequent waves in dependency order.
|
|
119
|
+
|
|
120
|
+
Internal accumulator:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
PLAN STRUCTURE:
|
|
124
|
+
- Plan 1: <title> (wave 1) — covers REQ-01, REQ-02
|
|
125
|
+
- Plan 2: <title> (wave 1) — covers REQ-03
|
|
126
|
+
- Plan 3: <title> (wave 2, deps: 1, 2) — covers REQ-04, REQ-05
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Coverage:** every requirement → exactly one plan. Uncoverable → `## Uncovered Requirements` in report.
|
|
130
|
+
|
|
131
|
+
**5. Write plans.** Naming: `${PADDED_PHASE}-${M}-<slug>-PLAN.md` (slug = 3–5 kebab-case words). **Write the file at `${PHASE_DIR}/${PADDED_PHASE}-${M}-<slug>-PLAN.md`** — absolute path. Use the frontmatter spec above.
|
|
132
|
+
|
|
133
|
+
**Content rules:**
|
|
134
|
+
- Body must have `## Must Haves` (truths / artifacts / key_links).
|
|
135
|
+
- Acceptance criteria must be RUNNABLE (grep, file-check, test, HTTP probe) — not "works correctly".
|
|
136
|
+
- `must_haves.truths` = user-observable, not implementation details.
|
|
137
|
+
- `must_haves.key_links` = concrete file→file wirings the executor preserves.
|
|
138
|
+
- ≤ 8 tasks per plan (more → split).
|
|
139
|
+
|
|
140
|
+
**6. Validate plan graph.**
|
|
141
|
+
|
|
142
|
+
1. **Acyclic** — walk `depends-on:`. No plan depends on itself, transitively or directly. Cycle → restructure.
|
|
143
|
+
2. **Waves consistent** — `plan.wave > max(wave of its deps)`. If not, fix.
|
|
144
|
+
3. **Requirements covered** — every phase requirement → some plan's `requirements:`. If not, add a task or surface as `## Uncovered Requirements`.
|
|
145
|
+
4. **Files plausible** — each `key_links` source exists OR is created in an earlier plan. Note if unsure, don't fail.
|
|
146
|
+
|
|
147
|
+
**7. Commit plans:**
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Use absolute paths in the add — `git add` interprets them relative to cwd otherwise.
|
|
151
|
+
cd "$PROJECT_ROOT" && git add "$PHASE_DIR"/${PADDED_PHASE}-*-PLAN.md
|
|
152
|
+
git commit -m "chore(${PADDED_PHASE}): plan phase <N> — <M> plan(s)"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**8. Update STATE.md** (read + edit, no CLI):
|
|
156
|
+
- Phase status → `Planned`, `current_plan` → 1.
|
|
157
|
+
- `last_updated` → `date -u +"%Y-%m-%dT%H:%M:%SZ"`.
|
|
158
|
+
- If STATE.md has `progress:`, increment `total_plans` by new plan count.
|
|
159
|
+
- Keep < 150 lines — archive to `.soly/DECISIONS-INDEX.md` if it grows.
|
|
160
|
+
|
|
161
|
+
**9. Report:**
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
## Plan Complete — Phase <N> (<slug>)
|
|
165
|
+
### Plans Created
|
|
166
|
+
- Plan 1: <title> (wave 1) — <N> reqs, <M> tasks
|
|
167
|
+
- Plan 2: <title> (wave 1) — ...
|
|
168
|
+
- Plan 3: <title> (wave 2, deps: 1, 2) — ...
|
|
169
|
+
|
|
170
|
+
### Wave Breakdown
|
|
171
|
+
- Wave 1: <count> plan(s) — <one-line summary>
|
|
172
|
+
- Wave 2: <count> plan(s) — <one-line summary>
|
|
173
|
+
|
|
174
|
+
### Coverage
|
|
175
|
+
- Requirements: <N>/<M> covered<if uncovered: list>
|
|
176
|
+
|
|
177
|
+
### Files
|
|
178
|
+
- Plans: <paths> · STATE.md updated
|
|
179
|
+
|
|
180
|
+
### Open Questions
|
|
181
|
+
<none, or per-question needing user decision>
|
|
182
|
+
|
|
183
|
+
### Next Step
|
|
184
|
+
Parent summarizes + asks confirmation. On confirm: `soly execute-plan <N>` (or `soly execute <N>` for full phase).
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
</process>
|
|
188
|
+
|
|
189
|
+
<hard_rules>
|
|
190
|
+
- No production code. Planning only.
|
|
191
|
+
- No subagents (you ARE one). No `.soly/rules/` edits. No `.soly/docs/` edits without surfacing to parent.
|
|
192
|
+
- No git branch create/rename/switch.
|
|
193
|
+
- `must_haves` (truths/artifacts/key_links) is NOT optional — executor relies on it for self-verification.
|
|
194
|
+
- Every acceptance criterion is RUNNABLE — command/check/test, not "works correctly" or "feels right".
|
|
195
|
+
- Wave numbers pre-computed; dependency graph acyclic.
|
|
196
|
+
- Every phase requirement → some plan (coverage = 100% or surface).
|
|
197
|
+
- Conventional Commits 1.0.0.
|
|
198
|
+
- Return: created files, plan count, wave breakdown, open questions.
|
|
199
|
+
</hard_rules>
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Plan Task Workflow
|
|
2
|
+
|
|
3
|
+
# Всегда соблюдай правила проекта из .soly/rules/
|
|
4
|
+
# Не используй shortcuts ради скорости
|
|
5
|
+
|
|
6
|
+
<path_discipline>
|
|
7
|
+
**All soly-managed files live under `.soly/`.** PLAN.md lives at `.soly/features/<feature>/tasks/<task-id>/PLAN.md`. Never write plan files to the project root. Use absolute paths.
|
|
8
|
+
|
|
9
|
+
The iteration context file (path given by the parent in the task prompt) is your single source of truth for intent, STATE, the feature README, prior task SUMMARYs, and the current task PLAN (for refinement). Read it FIRST.
|
|
10
|
+
</path_discipline>
|
|
11
|
+
|
|
12
|
+
<purpose>
|
|
13
|
+
Create or refine PLAN.md for a single task. A task is a small atomic unit
|
|
14
|
+
of work — a feature slice, a contract change, a single endpoint, a single
|
|
15
|
+
UI page. Smaller than a phase plan; carries its own frontmatter so the
|
|
16
|
+
executor can pick it up standalone.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
Before any planning, read:
|
|
21
|
+
1. .soly/docs/ — INTENT (0-point)
|
|
22
|
+
2. .soly/STATE.md — current state
|
|
23
|
+
3. .soly/ROADMAP.md — high-level requirements
|
|
24
|
+
4. .soly/features/<feature>/README.md — feature context
|
|
25
|
+
5. .soly/contracts/* — shared API schemas (if any)
|
|
26
|
+
6. The task's existing PLAN.md (if refining) or relevant sibling tasks (if creating)
|
|
27
|
+
|
|
28
|
+
If `.soly/features/` is empty for the target feature, error and stop.
|
|
29
|
+
Do not invent feature paths.
|
|
30
|
+
</required_reading>
|
|
31
|
+
|
|
32
|
+
<task_frontmatter_spec>
|
|
33
|
+
PLAN.md starts with a YAML frontmatter block. The executor depends on it.
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
---
|
|
37
|
+
id: auth-be-login-a3f9 # slug-4hex, must match the directory name
|
|
38
|
+
kind: be # be | fe | infra | docs | integration
|
|
39
|
+
feature: auth # parent feature name (must match .soly/features/<feature>/)
|
|
40
|
+
status: ready # ready | in-progress | blocked | done
|
|
41
|
+
priority: high # high | medium | low
|
|
42
|
+
parallelizable: true # whether this task can run alongside other parallel tasks
|
|
43
|
+
depends-on: [] # list of task ids; each must be status: done before this runs
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
# Task: <title>
|
|
47
|
+
|
|
48
|
+
[body]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Defaults if unsure:
|
|
52
|
+
- kind: pick from the values above based on the work being planned
|
|
53
|
+
- priority: medium
|
|
54
|
+
- parallelizable: false
|
|
55
|
+
- depends-on: [] (only fill if you have a clear dep on an existing task)
|
|
56
|
+
</task_frontmatter_spec>
|
|
57
|
+
|
|
58
|
+
<process>
|
|
59
|
+
|
|
60
|
+
<step name="verify_target" priority="first">
|
|
61
|
+
Confirm what kind of planning this is:
|
|
62
|
+
|
|
63
|
+
- **new-task** — create the dir + write PLAN.md from scratch
|
|
64
|
+
- **existing-task** — refine an existing PLAN.md (do NOT rewrite from scratch;
|
|
65
|
+
preserve frontmatter, improve body)
|
|
66
|
+
|
|
67
|
+
If unclear, error and ask the parent.
|
|
68
|
+
</step>
|
|
69
|
+
|
|
70
|
+
<step name="read_intent" priority="first">
|
|
71
|
+
**0-POINT CHECK.** Re-read `.soly/docs/` (intent docs) before any planning.
|
|
72
|
+
The task PLAN.md is the contract; intent docs are the WHY. If you find
|
|
73
|
+
a conflict, flag it instead of silently choosing.
|
|
74
|
+
|
|
75
|
+
The iteration context file (path given in the task prompt) bundles the
|
|
76
|
+
intent docs as a summary, the feature README, and prior task SUMMARYs.
|
|
77
|
+
Use that as your starting point. If you need a specific doc in full,
|
|
78
|
+
read it directly from its path.
|
|
79
|
+
</step>
|
|
80
|
+
|
|
81
|
+
<step name="read_feature">
|
|
82
|
+
Read `.soly/features/<feature>/README.md` for feature-level context.
|
|
83
|
+
If missing, note it but proceed (the parent may not have written one yet).
|
|
84
|
+
</step>
|
|
85
|
+
|
|
86
|
+
<step name="check_contracts">
|
|
87
|
+
If the task touches API surfaces (BE endpoints, FE request shapes, shared
|
|
88
|
+
types), read `.soly/contracts/<feature>.openapi.yaml` or similar. Contracts
|
|
89
|
+
are the synchronizing artifact between parallel BE and FE tasks.
|
|
90
|
+
</step>
|
|
91
|
+
|
|
92
|
+
<step name="check_siblings">
|
|
93
|
+
For new-task: look at existing tasks in the same feature (if any) to
|
|
94
|
+
match style and identify natural dependencies. If a sibling task already
|
|
95
|
+
implements something this task depends on, add to `depends-on:`.
|
|
96
|
+
|
|
97
|
+
For existing-task: read sibling tasks only if the plan needs to be aware
|
|
98
|
+
of them (e.g., shared types, sequential ordering).
|
|
99
|
+
</step>
|
|
100
|
+
|
|
101
|
+
<step name="write_plan">
|
|
102
|
+
For new-task, structure the PLAN.md body like:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
# Task: <title>
|
|
106
|
+
|
|
107
|
+
## What
|
|
108
|
+
<1-2 paragraphs: what this task does, in plain language>
|
|
109
|
+
|
|
110
|
+
## Why
|
|
111
|
+
<1-2 sentences: what user-visible outcome / contract this enables>
|
|
112
|
+
|
|
113
|
+
## Acceptance criteria
|
|
114
|
+
- [ ] <criterion 1>
|
|
115
|
+
- [ ] <criterion 2>
|
|
116
|
+
- [ ] ...
|
|
117
|
+
|
|
118
|
+
## Files to touch
|
|
119
|
+
- <path> — <what changes>
|
|
120
|
+
- ...
|
|
121
|
+
|
|
122
|
+
## Edge cases
|
|
123
|
+
- <edge case 1>
|
|
124
|
+
- <edge case 2>
|
|
125
|
+
|
|
126
|
+
## Out of scope
|
|
127
|
+
- <explicitly NOT doing X>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
For existing-task, preserve the frontmatter. Refine the body to make
|
|
131
|
+
acceptance criteria testable, edge cases concrete, and "out of scope"
|
|
132
|
+
explicit. Do NOT bloat — a tight plan is better than an exhaustive one.
|
|
133
|
+
</step>
|
|
134
|
+
|
|
135
|
+
<step name="commit">
|
|
136
|
+
For new-task, commit the new PLAN.md:
|
|
137
|
+
```
|
|
138
|
+
# Use absolute path with `cd "$PROJECT_ROOT"` so git doesn't interpret
|
|
139
|
+
# a bare relative path as cwd-relative.
|
|
140
|
+
cd "$PROJECT_ROOT" && git add .soly/features/<feature>/tasks/<id>/PLAN.md
|
|
141
|
+
git commit -m "chore(tasks): plan <id>"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
For existing-task refinement, commit only if material change:
|
|
145
|
+
```
|
|
146
|
+
cd "$PROJECT_ROOT" && git add .soly/features/<feature>/tasks/<id>/PLAN.md
|
|
147
|
+
git commit -m "chore(tasks): refine plan <id>"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
If nothing material changed, do not commit.
|
|
151
|
+
|
|
152
|
+
**Worker bash setup (when you do need it):**
|
|
153
|
+
```bash
|
|
154
|
+
PROJECT_ROOT="$(pwd)" # worker inherits parent cwd = project root
|
|
155
|
+
SOLY_DIR="$PROJECT_ROOT/.soly"
|
|
156
|
+
```
|
|
157
|
+
</step>
|
|
158
|
+
|
|
159
|
+
<step name="report">
|
|
160
|
+
Return to parent:
|
|
161
|
+
- Created or refined path
|
|
162
|
+
- Task id (for new-task)
|
|
163
|
+
- Plan summary (1-3 bullets)
|
|
164
|
+
- Any open questions / decisions needing parent approval
|
|
165
|
+
- Any deps discovered (sibling tasks that should also be planned)
|
|
166
|
+
</step>
|
|
167
|
+
|
|
168
|
+
</process>
|
|
169
|
+
|
|
170
|
+
<hard_rules>
|
|
171
|
+
- Do not write production code. Planning only.
|
|
172
|
+
- Preserve existing frontmatter on refinement. Only update if you find a bug.
|
|
173
|
+
- For new-task, generate the id as `<slug>-<4hex>` (lowercase).
|
|
174
|
+
- Commit messages follow Conventional Commits 1.0.0 — `chore(tasks): ...`.
|
|
175
|
+
- Do not modify `.soly/rules/`.
|
|
176
|
+
- Do not run subagents yourself.
|
|
177
|
+
- **PATH DISCIPLINE:** PLAN.md goes to `.soly/features/<feature>/tasks/<id>/PLAN.md`. Never to the project root.
|
|
178
|
+
- Return: created/refined path, task id, plan summary, open questions.
|
|
179
|
+
</hard_rules>
|
|
180
|
+
|
|
181
|
+
<dual_mode_note>
|
|
182
|
+
Tasks are part of soly's dual-mode system. The project may also have
|
|
183
|
+
`.soly/phases/` (phase-based layout, distinct from task-based). You are only planning a specific task.
|
|
184
|
+
Do not touch phases. Do not modify ROADMAP.md or STATE.md.
|
|
185
|
+
</dual_mode_note>
|