@coopcli/specplan 5.2.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/README.md +40 -0
- package/dist/cli/index.js +2650 -0
- package/dist/client/assets/index-DevSOQuK.css +1 -0
- package/dist/client/assets/index-GtBmBt6t.js +78 -0
- package/dist/client/index.html +13 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @coopcli/specplan
|
|
2
|
+
|
|
3
|
+
Plan a project as a DAG of **specs** and **user stories** on a React Flow canvas, and generate OpenSpec changes per spec card. Local-only: the server binds to 127.0.0.1 and model calls run with your own Anthropic credentials.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @coopcli/specplan ./openspec
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
- **DAG planning model** — spec→spec edges are dependencies (kept acyclic; a cycle is rejected with the full path named), spec→story edges are containment (the coverage relation). User stories carry no edges of their own and must follow `As a <user>, I want to <feature> so that <value proposition>`.
|
|
12
|
+
- **Backlog** — anything not contained by a spec is uncovered work and shows in the backlog until a spec contains it.
|
|
13
|
+
- **Non-destructive chat** — a Claude-backed tool-calling assistant that can `create_spec`, `create_user_story`, `link_dependency`, `contain_story`, and `reorder`. There is no delete tool, structurally.
|
|
14
|
+
- **Per-spec generation** — each spec card generates its own OpenSpec change (`openspec/changes/<specId>/`) from the stories it contains; every story maps to a `#### Scenario:` block and the output must pass `openspec validate <specId> --strict`. Hand-edited bodies are detected by content hash and never overwritten (metadata-only update).
|
|
15
|
+
- **Layered YAML storage** — the DAG lives at `<root>/specplan.yaml`, plus one `specplan.yaml` per change directory (stories, dependencies, generation hash). Comments in hand-edited files survive round trips; the filesystem is the source of truth.
|
|
16
|
+
|
|
17
|
+
## CLI
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
specplan [rootDir] [--port <n>] # launch the browser app (default ./openspec, port 8789)
|
|
21
|
+
specplan generate <specId> [rootDir] # headless generation; exit non-zero on strict-validation failure
|
|
22
|
+
specplan validate [rootDir] # schema + acyclicity + story-formula check, named errors
|
|
23
|
+
specplan login [--profile] [--web-url] # CoopCLI account (browser OAuth, ~/.coopcli/config.json)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Credentials
|
|
27
|
+
|
|
28
|
+
Chat and generation need Anthropic credentials on the machine — `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or the Anthropic CLI's login profile (`ant auth login`). Planning works without them.
|
|
29
|
+
|
|
30
|
+
## Development (repo)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm --filter @coopcli/specplan dev # vite HMR (:5173-ish) + API on :8789
|
|
34
|
+
pnpm --filter @coopcli/specplan check # tsc
|
|
35
|
+
pnpm --filter @coopcli/specplan test # vitest (model, storage, server, chat, generation)
|
|
36
|
+
pnpm --filter @coopcli/specplan test:e2e # Playwright against a throwaway fixture tree
|
|
37
|
+
pnpm --filter @coopcli/specplan build:cli
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The product site (`site/`) is an assets-only worker (`specplan-microsite`) served at `coopcli.com/products/specplan` behind `coopcli-router`; `pnpm site:dev` runs it on :4324. See `TESTING.md` for the scenario→test map.
|