specsail 0.2.0 → 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/CHANGELOG.md +6 -0
- package/ROADMAP.md +15 -12
- package/docs/runbook.md +40 -0
- package/{templates/.specsail/docs → docs}/workflow.md +12 -12
- package/package.json +5 -4
- package/src/cli.js +3 -1
- package/test/acceptance/cli.acceptance.test.js +3 -0
- package/{scripts → tools}/check-content.mjs +15 -2
- package/{scripts → tools}/release.sh +1 -1
- package/templates/.specsail/docs/runbook.md +0 -44
- /package/{specs → templates/specs}/_templates/blocked.md +0 -0
- /package/{specs → templates/specs}/_templates/plan.md +0 -0
- /package/{specs → templates/specs}/_templates/request.md +0 -0
- /package/{specs → templates/specs}/_templates/review.md +0 -0
- /package/{specs → templates/specs}/_templates/spec.md +0 -0
- /package/{specs → templates/specs}/_templates/tasks.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable SpecSail changes are recorded here.
|
|
4
4
|
|
|
5
|
+
## 0.2.1 — 2026-10-22
|
|
6
|
+
|
|
7
|
+
- Simplify the repository layout: `templates/` now mirrors the installed layout, feature templates live under `templates/specs/`, and maintainer tooling moved to `tools/`.
|
|
8
|
+
- Single-source the installed workflow and runbook from `docs/`; remove the duplicated template copies.
|
|
9
|
+
- Remove the vestigial `tests/` placeholder. No change to `npx specsail init` output or consumer paths.
|
|
10
|
+
|
|
5
11
|
## 0.2.0 — 2026-10-21
|
|
6
12
|
|
|
7
13
|
- Add conversational mode: ask your coding agent for a change and the First Mate (`manage`) runs the workflow, bootstrapping project docs and the Makefile first.
|
package/ROADMAP.md
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
# SpecSail roadmap
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ordered by the evidence each item unlocks. Completed work rolls into `CHANGELOG.md` instead of accumulating here.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Now (0.3.0 candidates)
|
|
6
6
|
|
|
7
|
-
1.
|
|
8
|
-
2. **
|
|
9
|
-
3. **
|
|
10
|
-
4. **Prove the gates.** Add evaluation cases where agents encounter ambiguous specs, failing tests, scope changes, and the Captain approval gates; verify they stop instead of guessing, weakening tests, or merging.
|
|
11
|
-
5. **Document release/support policy.** Use pilot feedback to settle supported Node versions, upgrade expectations, and the optional runner's platform support before declaring 1.0 stability.
|
|
7
|
+
1. **`specsail update`** — upgrade `.specsail/` from the version in `.specsail.json`, with a dry-run, a conflict report, and no silent overwrites of consumer edits.
|
|
8
|
+
2. **Run the conversational mode in real projects.** Two feature cycles each in a JavaScript/TypeScript, Python, and Go codebase. Record every point where the human or agent had to reinterpret an instruction, and keep representative cases as evaluation fixtures.
|
|
9
|
+
3. **Publish a tested agent compatibility matrix.** Exercise OpenCode, Claude Code, Codex, Cursor, Copilot, and Gemini CLI against the conversational trigger and skills; distinguish tested tools from tools expected to work by convention.
|
|
12
10
|
|
|
13
|
-
##
|
|
11
|
+
## Next (before 1.0)
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
4. **Prove the gates.** Add evaluation cases for ambiguous specs, wrong-reason test failures, scope creep, and Captain approvals; verify agents stop instead of guessing, weakening tests, or merging.
|
|
14
|
+
5. **Document support and upgrade policy.** Settle the supported Node range, the bash runner's platform matrix (macOS, Linux, WSL, Git Bash), and what consumers should expect from a minor upgrade.
|
|
15
|
+
|
|
16
|
+
## Later (demand-driven)
|
|
17
|
+
|
|
18
|
+
- Windows-native runner for headless execution outside WSL/Git Bash.
|
|
19
|
+
- Opt-in language/framework presets; the core stays stack-neutral.
|
|
20
|
+
- Opt-in agent-specific adapters or commands that never become mandatory.
|
|
21
|
+
- Richer `specsail doctor` checks once `update` defines the installed-file contract.
|
package/docs/runbook.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# SpecSail runbook
|
|
2
|
+
|
|
3
|
+
Step-by-step operating guide. The workflow reference in this folder (`workflow.md`) is the concise summary.
|
|
4
|
+
|
|
5
|
+
## Talk to the First Mate
|
|
6
|
+
|
|
7
|
+
In a coding agent, ask for the change in normal language: *"let's add user authentication."* The agent reads the SpecSail rules in `AGENTS.md`, starts `.specsail/skills/manage/SKILL.md`, and:
|
|
8
|
+
|
|
9
|
+
1. Checks `docs/project.md`, `docs/architecture.md`, and the `Makefile` verify target. Missing or starter content is drafted with the Captain's answers first.
|
|
10
|
+
2. Scaffolds `specs/<slug>/` and runs Scout, Navigator, Quartermaster, Hands, Bosun, and Clerk in order.
|
|
11
|
+
3. Stops at each gate: request confirmed, spec approved, tests approved, architecture approved if affected, and merge.
|
|
12
|
+
|
|
13
|
+
Commands are optional after `npx specsail init`.
|
|
14
|
+
|
|
15
|
+
## Run a feature manually (optional)
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npx specsail new <slug> <fix|update|new>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
1. **Scout / Product Owner:** clarify the raw request and record it in `request.md`.
|
|
22
|
+
2. **Navigator / Tech Lead, spec mode:** draft `spec.md`. The Captain approves it before any plan is written.
|
|
23
|
+
3. **Navigator / Tech Lead, plan mode:** write `plan.md` and `tasks.md` from the approved spec.
|
|
24
|
+
4. **Quartermaster / QA:** write executable failing tests for only the current phase's approved criteria. The Captain approves them before implementation.
|
|
25
|
+
5. **Hands / Developer:** implement one planned task, run `make verify`, and report scope or spec problems instead of silently expanding.
|
|
26
|
+
6. **Bosun / Reviewer:** independently run verification and review against the spec, tests, plan, and architecture.
|
|
27
|
+
7. **Clerk / Release:** update docs/changelog and prepare the PR. The Captain checks CI and merges.
|
|
28
|
+
|
|
29
|
+
The Captain may pause at any gate. Agents do not approve specs/tests or merge. See `workflow.md` for task states, FIX routing, gates, and parallel-work rules.
|
|
30
|
+
|
|
31
|
+
## Gates and review
|
|
32
|
+
|
|
33
|
+
- **Spec:** the Captain reviews every acceptance criterion and approves before planning.
|
|
34
|
+
- **Tests:** the Captain checks the phase's tests fail for the right reason before implementation.
|
|
35
|
+
- **Review:** the First Mate asks whether to use a second session/model. If the Captain accepts same-model review, the caveat is recorded in `review.md`.
|
|
36
|
+
- **Merge:** the Captain checks CI, protected paths, and docs, then merges.
|
|
37
|
+
|
|
38
|
+
## Optional headless runner
|
|
39
|
+
|
|
40
|
+
The installed Bash runner at `.specsail/scripts/run-agent.sh` supports configured Claude, Codex, and OpenCode CLIs plus a custom command. Configure `.specsail/agents.env` from `.specsail/agents.env.example`. Invoke stages by name (`understand`) or alias (`scout`); the orchestrator is `manage` / `first-mate`. It requires Git and Bash; using skills interactively with any coding tool that can read Markdown does not.
|
|
@@ -15,42 +15,42 @@ SpecSail uses durable Markdown artifacts to carry intent between stages. The Cap
|
|
|
15
15
|
| 5 | review | Reviewer — Bosun | spec, plan, tasks, diff, invariants | review report, task status |
|
|
16
16
|
| 6 | ship | Release — Clerk | spec, plan, tasks, diff | docs, changelog, PR |
|
|
17
17
|
|
|
18
|
-
The human Captain is not an agent role.
|
|
18
|
+
The human Captain is not an agent role. The Captain approves `spec.md`, approves each phase's acceptance tests, and merges.
|
|
19
19
|
|
|
20
20
|
## Conversational operation
|
|
21
21
|
|
|
22
|
-
The Captain starts with a normal request
|
|
22
|
+
The Captain starts with a normal request. The First Mate checks `docs/project.md`, `docs/architecture.md`, and the `Makefile` verify target; if any are missing or still starter templates, it bootstraps them with the Captain's answers before starting the feature. It then runs the stages in order. Commands are optional.
|
|
23
23
|
|
|
24
24
|
**Recording approvals:** on explicit approval, the agent records `Status: APPROVED — Captain (chat), YYYY-MM-DD` in the artifact. The Captain's decision is the approval; the file is the evidence. Silence is not approval.
|
|
25
25
|
|
|
26
|
-
**Review independence:** the First Mate asks
|
|
26
|
+
**Review independence:** the First Mate asks whether to review in a second session/model. If the Captain accepts same-model review, the caveat is recorded in `review.md`.
|
|
27
27
|
|
|
28
28
|
## Change paths
|
|
29
29
|
|
|
30
30
|
| Type | Path |
|
|
31
31
|
|---|---|
|
|
32
32
|
| FIX | understand → spec with a reproduction criterion → acceptance test → implement → review → ship. Skip architecture planning unless needed. |
|
|
33
|
-
| FEATURE UPDATE | full flow;
|
|
33
|
+
| FEATURE UPDATE | full flow; skip architecture decisions if `Architecture affected: NO`. |
|
|
34
34
|
| NEW FEATURE | full flow. |
|
|
35
35
|
| Trivial (typo, config, dependency bump) | Normal PR and `make verify`; no feature artifacts. |
|
|
36
36
|
|
|
37
37
|
## Human gates
|
|
38
38
|
|
|
39
|
-
1. Confirm the request and resolve or
|
|
40
|
-
2.
|
|
41
|
-
3.
|
|
42
|
-
4. Merge only after CI
|
|
39
|
+
1. Confirm the request and resolve or defer its open questions.
|
|
40
|
+
2. Approve `spec.md` before planning.
|
|
41
|
+
3. Approve acceptance tests for the current phase before implementation.
|
|
42
|
+
4. Merge only after CI, review, protected-path, and documentation checks pass.
|
|
43
43
|
|
|
44
|
-
Architecture decisions require Captain approval when
|
|
44
|
+
Architecture decisions require Captain approval when architecture is affected. Agents never approve or merge.
|
|
45
45
|
|
|
46
46
|
## Task states and done
|
|
47
47
|
|
|
48
|
-
`TODO → IN_PROGRESS → DEV_DONE → DONE`; rework uses `CHANGES_REQUESTED`; an unresolved issue uses `BLOCKED`
|
|
48
|
+
`TODO → IN_PROGRESS → DEV_DONE → DONE`; rework uses `CHANGES_REQUESTED`; an unresolved issue uses `BLOCKED` and `blocked.md`. Escalate after three review iterations.
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Done means `make verify` is green, linked criteria pass, required docs are updated, and the Bosun marks the task `DONE`.
|
|
51
51
|
|
|
52
52
|
## Parallel work and review
|
|
53
53
|
|
|
54
|
-
- Define API contracts before parallel multi-app work;
|
|
54
|
+
- Define API contracts before parallel multi-app work; use one worktree per independent task/app.
|
|
55
55
|
- Do not parallelize tasks that touch the same module or shared task-status rows.
|
|
56
56
|
- CI is deterministic verification; Bosun review checks behavior and invariants; the Captain merges.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specsail",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A spec-driven AI development crew. Navigate by spec. Deliver with confidence.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,18 +14,19 @@
|
|
|
14
14
|
"bin/",
|
|
15
15
|
"src/",
|
|
16
16
|
"scripts/*.sh",
|
|
17
|
-
"scripts/check-content.mjs",
|
|
18
17
|
"skills/",
|
|
19
|
-
"
|
|
18
|
+
"docs/workflow.md",
|
|
19
|
+
"docs/runbook.md",
|
|
20
20
|
"test/",
|
|
21
21
|
"templates/",
|
|
22
|
+
"tools/",
|
|
22
23
|
"README.md",
|
|
23
24
|
"ROADMAP.md",
|
|
24
25
|
"LICENSE",
|
|
25
26
|
"CHANGELOG.md"
|
|
26
27
|
],
|
|
27
28
|
"scripts": {
|
|
28
|
-
"lint": "node
|
|
29
|
+
"lint": "node tools/check-content.mjs",
|
|
29
30
|
"typecheck": "node --check bin/specsail.js && node --check src/cli.js",
|
|
30
31
|
"test": "node --test test/*.test.js",
|
|
31
32
|
"accept": "node --test test/acceptance/*.test.js",
|
package/src/cli.js
CHANGED
|
@@ -155,7 +155,7 @@ async function init(cwd, output, root) {
|
|
|
155
155
|
[path.join(root, "templates/.specsail"), path.join(cwd, ".specsail")],
|
|
156
156
|
[path.join(root, "skills"), path.join(cwd, ".specsail/skills")],
|
|
157
157
|
[path.join(root, "scripts"), path.join(cwd, ".specsail/scripts"), { suffixes: [".sh"] }],
|
|
158
|
-
[path.join(root, "specs/_templates"), path.join(cwd, ".specsail/templates/specs/_templates")],
|
|
158
|
+
[path.join(root, "templates/specs/_templates"), path.join(cwd, ".specsail/templates/specs/_templates")],
|
|
159
159
|
];
|
|
160
160
|
let created = 0;
|
|
161
161
|
let skipped = 0;
|
|
@@ -166,6 +166,8 @@ async function init(cwd, output, root) {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
const individualFiles = [
|
|
169
|
+
[path.join(root, "docs/workflow.md"), path.join(cwd, ".specsail/docs/workflow.md")],
|
|
170
|
+
[path.join(root, "docs/runbook.md"), path.join(cwd, ".specsail/docs/runbook.md")],
|
|
169
171
|
[path.join(root, "templates/Makefile"), path.join(cwd, "Makefile")],
|
|
170
172
|
[path.join(root, "templates/docs/project.md"), path.join(cwd, "docs/project.md")],
|
|
171
173
|
[path.join(root, "templates/docs/architecture.md"), path.join(cwd, "docs/architecture.md")],
|
|
@@ -44,6 +44,9 @@ test("init preserves project-owned files, installs the crew, and is repeatable",
|
|
|
44
44
|
assert.match(await readFile(path.join(cwd, ".specsail/skills/manage/SKILL.md"), "utf8"), /First Mate/);
|
|
45
45
|
assert.match(await readFile(path.join(cwd, ".specsail/skills/review/SKILL.md"), "utf8"), /Bosun/);
|
|
46
46
|
assert.match(await readFile(path.join(cwd, ".specsail/skills/ship/SKILL.md"), "utf8"), /Clerk/);
|
|
47
|
+
assert.match(await readFile(path.join(cwd, ".specsail/docs/workflow.md"), "utf8"), /SpecSail workflow reference/);
|
|
48
|
+
assert.match(await readFile(path.join(cwd, ".specsail/docs/runbook.md"), "utf8"), /SpecSail runbook/);
|
|
49
|
+
assert.match(await readFile(path.join(cwd, ".specsail/templates/specs/_templates/spec.md"), "utf8"), /Status: DRAFT/);
|
|
47
50
|
assert.match(await readFile(path.join(cwd, "AGENTS.md"), "utf8"), /skills\/manage\/SKILL\.md/);
|
|
48
51
|
assert.match(await readFile(path.join(cwd, ".gitignore"), "utf8"), /\.specsail\/agents\.env/);
|
|
49
52
|
assert.deepEqual(JSON.parse(await readFile(path.join(cwd, ".specsail.json"), "utf8")), { version: manifest.version, localSetting: true });
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { readFile, readdir } from "node:fs/promises";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
4
5
|
|
|
@@ -54,9 +55,21 @@ for (const term of ["Navigate by spec. Deliver with confidence.", "The **Captain
|
|
|
54
55
|
if (!readme.includes(term)) fail(`README.md must document: ${term}`);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
const templateFiles = await readdir(path.join(root, "specs/_templates"));
|
|
58
|
+
const templateFiles = await readdir(path.join(root, "templates/specs/_templates"));
|
|
58
59
|
for (const name of ["request.md", "spec.md", "plan.md", "tasks.md"]) {
|
|
59
|
-
if (!templateFiles.includes(name)) fail(`missing feature scaffold template specs/_templates/${name}`);
|
|
60
|
+
if (!templateFiles.includes(name)) fail(`missing feature scaffold template templates/specs/_templates/${name}`);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const methodologyDocs = ["workflow.md", "runbook.md"];
|
|
64
|
+
for (const name of methodologyDocs) {
|
|
65
|
+
try {
|
|
66
|
+
await readFile(path.join(root, "docs", name), "utf8");
|
|
67
|
+
} catch {
|
|
68
|
+
fail(`missing canonical methodology doc docs/${name}`);
|
|
69
|
+
}
|
|
70
|
+
if (existsSync(path.join(root, "templates/.specsail/docs", name))) {
|
|
71
|
+
fail(`templates/.specsail/docs/${name} duplicates docs/${name}; keep a single source`);
|
|
72
|
+
}
|
|
60
73
|
}
|
|
61
74
|
|
|
62
75
|
const templateAgents = await readFile(path.join(root, "templates/.specsail/AGENTS.md"), "utf8");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Bump the version, commit, and push a release tag. The tag starts the release workflow.
|
|
3
|
-
# Usage:
|
|
3
|
+
# Usage: tools/release.sh <x.y.z>
|
|
4
4
|
set -euo pipefail
|
|
5
5
|
VERSION="${1:?usage: release.sh <x.y.z>}"
|
|
6
6
|
[[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "version must be x.y.z (no leading v)" >&2; exit 1; }
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# SpecSail runbook
|
|
2
|
-
|
|
3
|
-
Step-by-step operating guide. `.specsail/docs/workflow.md` is the concise reference.
|
|
4
|
-
|
|
5
|
-
## Talk to the First Mate
|
|
6
|
-
|
|
7
|
-
In your coding agent, ask for the change in normal language: *"let's add user authentication"* or *"fix the login lockout bug."* The agent reads `.specsail/skills/manage/SKILL.md` and starts the workflow:
|
|
8
|
-
|
|
9
|
-
1. Checks `docs/project.md`, `docs/architecture.md`, and the `Makefile` verify target. If they are missing or still starter templates, it interviews you and drafts them.
|
|
10
|
-
2. Scaffolds `specs/<slug>/`, asks any questions, and runs Scout, Navigator, Quartermaster, Hands, Bosun, and Clerk in order.
|
|
11
|
-
3. Stops at each gate: request confirmed, spec approved, tests approved, architecture approved when affected, and merge. Approve in chat; the agent records the decision with your name and date.
|
|
12
|
-
|
|
13
|
-
Commands are optional. Use them if you prefer manual control, CI, or scripting.
|
|
14
|
-
|
|
15
|
-
## Run stages manually (optional)
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
./.specsail/scripts/start-phase.sh <slug> 1
|
|
19
|
-
./.specsail/scripts/new-feature.sh <slug> <fix|update|new>
|
|
20
|
-
./.specsail/scripts/run-agent.sh scout <slug>
|
|
21
|
-
./.specsail/scripts/run-agent.sh navigator <slug>
|
|
22
|
-
./.specsail/scripts/run-agent.sh quartermaster <slug> "AC-1,AC-2"
|
|
23
|
-
./.specsail/scripts/run-agent.sh hands <slug> T-1
|
|
24
|
-
./.specsail/scripts/run-agent.sh bosun <slug> T-1
|
|
25
|
-
./.specsail/scripts/run-agent.sh clerk <slug>
|
|
26
|
-
./.specsail/scripts/open-pr.sh <slug> 1
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Stage names also work: `understand`, `plan`, `acceptance-tests`, `implement`, `review`, `ship`. The orchestrator is `manage` / `first-mate`.
|
|
30
|
-
|
|
31
|
-
## Gates and review
|
|
32
|
-
|
|
33
|
-
- **Spec:** the Captain reviews every acceptance criterion and approves before planning.
|
|
34
|
-
- **Tests:** the Captain checks the phase's tests fail for the right reason before implementation.
|
|
35
|
-
- **Review:** the First Mate asks whether to use a second session/model. If you accept same-model review, the caveat is recorded in `review.md`.
|
|
36
|
-
- **Merge:** the Captain checks CI, protected paths, and docs, then merges.
|
|
37
|
-
|
|
38
|
-
For later phases, create the phase branch with `start-phase.sh <slug> <phase>`, then write and approve that phase's acceptance tests before implementation.
|
|
39
|
-
|
|
40
|
-
## Optional headless runner
|
|
41
|
-
|
|
42
|
-
The Bash runner supports configured Claude, Codex, and OpenCode CLIs, plus a custom command. Copy `.specsail/agents.env.example` to `.specsail/agents.env` to configure it. The runner is optional; any coding tool that can read the project instructions and Markdown skills can follow the workflow interactively. Keep each agent's tool permissions and writable paths minimal.
|
|
43
|
-
|
|
44
|
-
The scripts require Git and Bash (macOS, Linux, WSL, or Git Bash). The Markdown workflow and Node-based `specsail` commands do not depend on a particular application language or coding agent.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|