stepwell 0.0.0-stage → 0.2.4

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,117 @@
1
+ ---
2
+ name: stepwell
3
+ description: STEPWELL method for projects with BACKLOG.md/PROGRESS.md and the stepwell-MCP-Server — session entry, status maintenance, archival and release discipline. Active when the target project contains the four STEPWELL files or the user explicitly asks for STEPWELL.
4
+ ---
5
+
6
+ # STEPWELL — Method (stepwell)
7
+
8
+ Binding method: `docs/PLAYBOOK.md` in the target project (verbatim copy). Checklist:
9
+ `docs/LESSONS.md`. This skill file summarises **when to call which tool** —
10
+ it does not replace the tools nor the method.
11
+
12
+ **New to STEPWELL?** Start from `docs/QUICKSTART.md` in the tool repo (≤5 minutes:
13
+ core loop, the four files, the five rules) — this pointer is the fast entry; the
14
+ binding method remains PLAYBOOK.md (Decision 15: QUICKSTART is stepwell-local, not a
15
+ distributed verbatim copy).
16
+
17
+ ## The four files
18
+
19
+ `BACKLOG.md` (only open items, priority sections 🔴→🔵), `PROGRESS.md` (progress table +
20
+ detail blocks of **active** phases), `docs/archive/BACKLOG_ARCHIVE.md` and
21
+ `docs/archive/PROGRESS_ARCHIVE.md` (both **append-only** — never edited afterwards).
22
+ Large projects may split the archives into shards per phase
23
+ (`docs/archive/*_ARCHIVE.p<n>.md`) — the tools rotate them automatically while a phase
24
+ runs; every reader (validate/status/show/hashes) sees the concatenated view.
25
+
26
+ If all four are missing in `root`: no STEPWELL project here — **no action required**
27
+ (read access is harmless and triggers nothing) unless the user explicitly asks to
28
+ adopt STEPWELL; only then create the files from the templates: MCP resources
29
+ `stepwell://templates/{kind}` (backlog | progress | backlog-archive |
30
+ progress-archive), then run `docs_validate` — must be clean.
31
+
32
+ ## Session entry (in this order, before any write operation)
33
+
34
+ 1. `docs_status` (root) — aggregate + validation findings.
35
+ 2. `progress_show` (root, phase) — detail block of the active phase.
36
+ 3. Next open step = first ⬜ row of the active phase. Work sequentially, never skip steps.
37
+ 4. Fast path (PLAYBOOK §0.9): when the hashes delivered by `docs_status`/Read-Tools/resources match the last known state, skip re-reading PLAYBOOK/LESSONS in full — the step scope suffices. Place independent read calls in parallel.
38
+
39
+ ## Status maintenance — always via the tools, never by hand (LESSONS 17)
40
+
41
+ - `progress_update` — step status in the table + detail block (🔄 before starting, ✅
42
+ after verified completion; a complete phase moves to its own archive shard
43
+ `PROGRESS_ARCHIVE.p<n>.md` automatically).
44
+ Optional parameters: `title` (rename phase title), `note` (verification line in
45
+ the archive block), `checkpoint` (commit SHA of the phase, 7–40 hex).
46
+ - `archive_item` — completed backlog item verbatim into the archive + one-liner where
47
+ the block lives (BACKLOG Done Index, or the shard's own index section while a phase
48
+ runs; `note` = commit hash).
49
+ - `backlog_add` / `backlog_update` / `backlog_remove` — add/change/remove items in a
50
+ format-safe way (instead of hand-editing).
51
+ - `progress_plan_phase` — plan a new phase ahead (table rows ⬜ + scope skeleton).
52
+ - `docs_repair` — mechanical repair of validate findings (H9/30.2): placeholder stamps,
53
+ legacy `YYMMDD/HHMM` dates, un-archived checked-off items, missing index lines,
54
+ single-row WIP skeletons. Dry-run first; everything needing judgment stays a finding.
55
+ `docs_validate` stays the read-only diagnostic — repair is a separate tool by design.
56
+ - In parallel workstreams: `workstream_sync status` names file collisions before they
57
+ happen (`predictedOverlap`, H10/30.4) and id/step collisions across worktrees
58
+ (`idCollisions`, M20/30.5); `considerWorktrees: true` on `backlog_add`/`progress_plan_phase`
59
+ keeps the next free id/phase/step collision-free across trees (M20/30.5).
60
+ - `dryRun` defaults to `true` everywhere: preview/diff first, then write with
61
+ `dryRun: false`.
62
+
63
+ ## Gates (binding)
64
+
65
+ - **Release gate:** plan → package → **only after explicit human release** implement.
66
+ Agents do not start code steps on their own.
67
+ - **Content gates per file class:** source/test edits in step scope = autonomous;
68
+ dependency manifests / Dockerfiles = pause; `.env` / CI workflows / deleting tests /
69
+ schema migrations = explicit human gate.
70
+ - **Inline-fix lane:** a bug in a running, released step scope (≤ ~10 lines, only
71
+ "low" file classes) may be fixed on the spot — required afterwards: retro
72
+ `backlog_add` (series `F`) + immediate `archive_item` with the commit hash.
73
+ - **Test-first (RED → GREEN):** every code step brings its tests; the RED phase is
74
+ evidenced (own test commit with failure evidence), verification before every ✅:
75
+ `npm run typecheck && npm run test` (or project equivalent) — must be clean.
76
+
77
+ ## Closures
78
+
79
+ - **Step done:** `progress_update` ✅ only after passing verification; commit per
80
+ step (tests first, then implementation — auditable in the log).
81
+ - **Phase done:** `progress_update` moves the block verbatim into `PROGRESS_ARCHIVE`;
82
+ then check doc sync (AGENTS kickoff, README, PLAYBOOK copies) and commit.
83
+ - Before every commit: `docs_validate` must be clean.
84
+
85
+ ## Workstream mode — parallel phases via git worktrees (PLAYBOOK §1, H5)
86
+
87
+ When a phase runs as a **workstream** (own git worktree + branch, one phase per
88
+ workstream), the per-step ritual is CLI-first — no MCP registration needed:
89
+
90
+ 1. `stepwell sync pull --root <worktree>` — merge trunk into your branch (dry-run
91
+ preview by default; add `--apply`). Conflicts surface HERE, in your own tree:
92
+ clean abort + structured report — resolve, then pull again.
93
+ 2. Implement; commit code yourself (PLAYBOOK §4); verify (`typecheck` + suite).
94
+ 3. `stepwell progress-update … --apply --commit` — the tool commits ONLY the four
95
+ doc files on your branch (never code, never foreign files; `COMMIT_BLOCKED` on a
96
+ pre-staged index; a failed commit keeps the edits applied — commit yourself then).
97
+ 4. Verify the merged state, then `stepwell sync push --root <worktree> --apply` —
98
+ trunk fast-forwards only (precondition: trunk head already pulled; a stale branch
99
+ gets `STALE_BRANCH` → go to 1).
100
+ 5. `stepwell sync status --root <worktree>` — who else is active (branches + last
101
+ commit times) and which files overlap with your work.
102
+
103
+ Worktree/branch creation and cleanup stay manual rituals (`git worktree add …`,
104
+ `git worktree remove` after phase completion). **Verify the removal (M16):**
105
+ `worktree remove` deregisters but can leave a husk directory when untracked content
106
+ (e.g. `node_modules`) survived — `stepwell sync status` reports such leftovers
107
+ (`husks[]`, a stale `.git` pointer) and prunable registrations (`prunable[]`);
108
+ resolve with `git worktree prune` + `rm -rf <dir>`. Without git, a project stays
109
+ single-tree sequential. Details: README "Workstreams" + PLAYBOOK §1.
110
+
111
+ ## Tool alternatives
112
+
113
+ Without the MCP server, the same surface is available as a CLI (`npx stepwell`):
114
+ `status`/`backlog`/`progress`/`validate`/`archive`/`progress-update`/`sync` — `--json`
115
+ output carries the versioned schema field (`schema: <n>`; breaking ⇒ bump the number).
116
+ `--commit` on `archive`/`progress-update` automates the four-doc commit (H5). The
117
+ method itself lives in PLAYBOOK.md — this skill is only the pointer to the tools.
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.