specweave 3.1.9 → 3.1.11
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/.claude-plugin/marketplace.json +2 -2
- package/README.md +3 -1
- package/bin/specweave.js +5 -0
- package/dist/src/cli/commands/create-increment.d.ts +2 -0
- package/dist/src/cli/commands/create-increment.d.ts.map +1 -1
- package/dist/src/cli/commands/create-increment.js +22 -2
- package/dist/src/cli/commands/create-increment.js.map +1 -1
- package/dist/src/cli/commands/generate-rubric.d.ts.map +1 -1
- package/dist/src/cli/commands/generate-rubric.js +13 -0
- package/dist/src/cli/commands/generate-rubric.js.map +1 -1
- package/dist/src/cli/commands/handoff.d.ts +2 -0
- package/dist/src/cli/commands/handoff.d.ts.map +1 -1
- package/dist/src/cli/commands/handoff.js +6 -0
- package/dist/src/cli/commands/handoff.js.map +1 -1
- package/dist/src/cli/commands/task.d.ts +4 -0
- package/dist/src/cli/commands/task.d.ts.map +1 -1
- package/dist/src/cli/commands/task.js +58 -23
- package/dist/src/cli/commands/task.js.map +1 -1
- package/dist/src/core/auto/config.d.ts.map +1 -1
- package/dist/src/core/auto/config.js +1 -3
- package/dist/src/core/auto/config.js.map +1 -1
- package/dist/src/core/auto/types.d.ts +0 -1
- package/dist/src/core/auto/types.d.ts.map +1 -1
- package/dist/src/core/auto/types.js +0 -2
- package/dist/src/core/auto/types.js.map +1 -1
- package/dist/src/core/config/types.d.ts +13 -1
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js +1 -0
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/hooks/handlers/pre-compact.d.ts +14 -4
- package/dist/src/core/hooks/handlers/pre-compact.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/pre-compact.js +36 -6
- package/dist/src/core/hooks/handlers/pre-compact.js.map +1 -1
- package/dist/src/core/hooks/handlers/require-increment.d.ts +6 -0
- package/dist/src/core/hooks/handlers/require-increment.d.ts.map +1 -1
- package/dist/src/core/hooks/handlers/require-increment.js +1 -1
- package/dist/src/core/hooks/handlers/require-increment.js.map +1 -1
- package/dist/src/core/increment/auto-commit.d.ts +91 -0
- package/dist/src/core/increment/auto-commit.d.ts.map +1 -0
- package/dist/src/core/increment/auto-commit.js +371 -0
- package/dist/src/core/increment/auto-commit.js.map +1 -0
- package/dist/src/core/increment/completion-validator.d.ts.map +1 -1
- package/dist/src/core/increment/completion-validator.js +11 -12
- package/dist/src/core/increment/completion-validator.js.map +1 -1
- package/dist/src/core/increment/metadata-manager.d.ts +1 -1
- package/dist/src/core/increment/metadata-manager.d.ts.map +1 -1
- package/dist/src/core/increment/metadata-manager.js +3 -9
- package/dist/src/core/increment/metadata-manager.js.map +1 -1
- package/dist/src/core/rubric/rubric-generator.d.ts.map +1 -1
- package/dist/src/core/rubric/rubric-generator.js +19 -18
- package/dist/src/core/rubric/rubric-generator.js.map +1 -1
- package/dist/src/core/session/handoff-remote.d.ts +2 -0
- package/dist/src/core/session/handoff-remote.d.ts.map +1 -1
- package/dist/src/core/session/handoff-remote.js +4 -1
- package/dist/src/core/session/handoff-remote.js.map +1 -1
- package/dist/src/core/session/work-handoff.d.ts +5 -0
- package/dist/src/core/session/work-handoff.d.ts.map +1 -1
- package/dist/src/core/session/work-handoff.js +17 -2
- package/dist/src/core/session/work-handoff.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave/defaults/rubric-defaults.md +4 -5
- package/plugins/specweave/skills/do/SKILL.md +3 -3
- package/src/core/schemas/specweave-config.schema.json +31 -46
- package/src/templates/AGENTS.md.template +5 -4
- package/src/templates/CLAUDE.md.template +1 -0
|
@@ -563,72 +563,57 @@
|
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
},
|
|
566
|
+
"git": {
|
|
567
|
+
"type": "object",
|
|
568
|
+
"description": "Commits of the increment's own spec.md, ledger.jsonl and metadata.json",
|
|
569
|
+
"properties": {
|
|
570
|
+
"autoCommitIncrement": {
|
|
571
|
+
"type": "boolean",
|
|
572
|
+
"default": false,
|
|
573
|
+
"description": "Commit those files (pathspec only, hooks run) after task, create-increment and handoff; --no-commit skips one command"
|
|
574
|
+
},
|
|
575
|
+
"autoPushIncrement": {
|
|
576
|
+
"type": "boolean",
|
|
577
|
+
"default": false,
|
|
578
|
+
"description": "After an auto-commit, fast-forward push the branch to its upstream"
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
},
|
|
566
582
|
"testing": {
|
|
567
583
|
"type": "object",
|
|
568
|
-
"description": "
|
|
584
|
+
"description": "Verification commands and optional test policy. Nothing here is set by default; TDD and coverage targets apply only when you set them.",
|
|
569
585
|
"properties": {
|
|
570
|
-
"
|
|
571
|
-
"type": "
|
|
572
|
-
"description": "
|
|
573
|
-
"
|
|
574
|
-
"default": "test-after"
|
|
586
|
+
"commands": {
|
|
587
|
+
"type": "array",
|
|
588
|
+
"description": "Commands `specweave verify` runs, in order. Empty or unset means auto-detect (package.json test, lint, build; Cargo, pytest or Go).",
|
|
589
|
+
"items": { "type": "string" }
|
|
575
590
|
},
|
|
576
|
-
"
|
|
577
|
-
"type": "
|
|
578
|
-
"description": "
|
|
579
|
-
"
|
|
580
|
-
"maximum": 100,
|
|
581
|
-
"default": 80
|
|
591
|
+
"mode": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"description": "Optional. How tests are written for new work. Unset means no test-order rule. `TDD` adds 'all tests must pass' to `specweave auto` success criteria.",
|
|
594
|
+
"enum": ["TDD", "test-after", "manual", "none"]
|
|
582
595
|
},
|
|
583
|
-
"
|
|
596
|
+
"coverage": {
|
|
584
597
|
"type": "object",
|
|
585
|
-
"description": "
|
|
598
|
+
"description": "Optional coverage targets. Unset means no coverage check. Below target is a warning at close, never a block.",
|
|
586
599
|
"properties": {
|
|
587
600
|
"unit": {
|
|
588
601
|
"type": "number",
|
|
589
602
|
"description": "Unit test line coverage target (Istanbul/c8 percentage)",
|
|
590
603
|
"minimum": 0,
|
|
591
|
-
"maximum": 100
|
|
592
|
-
"default": 80
|
|
604
|
+
"maximum": 100
|
|
593
605
|
},
|
|
594
606
|
"integration": {
|
|
595
607
|
"type": "number",
|
|
596
608
|
"description": "Integration test line coverage target (Istanbul/c8 percentage)",
|
|
597
609
|
"minimum": 0,
|
|
598
|
-
"maximum": 100
|
|
599
|
-
"default": 70
|
|
610
|
+
"maximum": 100
|
|
600
611
|
},
|
|
601
612
|
"e2e": {
|
|
602
613
|
"type": "number",
|
|
603
|
-
"description": "
|
|
614
|
+
"description": "Share of written end-to-end tests that must pass (not line coverage)",
|
|
604
615
|
"minimum": 0,
|
|
605
|
-
"maximum": 100
|
|
606
|
-
"default": 100
|
|
607
|
-
}
|
|
608
|
-
},
|
|
609
|
-
"additionalProperties": false
|
|
610
|
-
},
|
|
611
|
-
"tddEnforcement": {
|
|
612
|
-
"type": "string",
|
|
613
|
-
"description": "TDD enforcement level: strict blocks GREEN without RED, warn shows warning, off disables",
|
|
614
|
-
"enum": ["strict", "warn", "off"],
|
|
615
|
-
"default": "warn"
|
|
616
|
-
},
|
|
617
|
-
"playwright": {
|
|
618
|
-
"type": "object",
|
|
619
|
-
"description": "Playwright browser automation configuration for dual-mode (CLI vs MCP)",
|
|
620
|
-
"properties": {
|
|
621
|
-
"preferCli": {
|
|
622
|
-
"type": "boolean",
|
|
623
|
-
"description": "Prefer @playwright/cli over MCP plugin for automation tasks (98% token reduction). Set false to always use MCP.",
|
|
624
|
-
"default": true
|
|
625
|
-
},
|
|
626
|
-
"cliFlags": {
|
|
627
|
-
"type": "array",
|
|
628
|
-
"description": "Additional flags to pass to playwright-cli commands",
|
|
629
|
-
"items": {
|
|
630
|
-
"type": "string"
|
|
631
|
-
}
|
|
616
|
+
"maximum": 100
|
|
632
617
|
}
|
|
633
618
|
},
|
|
634
619
|
"additionalProperties": false
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<!-- SECTION:header required -->
|
|
2
2
|
# {PROJECT_NAME}
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
SpecWeave increments live in `.specweave/increments/NNNN-slug/spec.md`: Problem, Scope, Acceptance Criteria, Approach and Tasks. `ledger.jsonl` records claims and completions. Start with `specweave pickup`.
|
|
5
5
|
<!-- /SECTION -->
|
|
6
6
|
|
|
7
7
|
<!-- SECTION:loop required -->
|
|
8
8
|
## The loop
|
|
9
9
|
|
|
10
10
|
1. `specweave pickup`: applies the latest handoff, prints the open increment, next task and ACs, claims, branch, notes and memory.
|
|
11
|
-
2. New work needing ACs or handoff: `specweave create-increment "title"`, then fill spec.md.
|
|
11
|
+
2. New work needing ACs or handoff: `specweave create-increment "title"`, then fill spec.md. Ask only critical decisions, one at a time with a recommendation, and record them under `## Decisions` (sw-increment). If an open increment owns the files, add ACs and tasks there. Recommended for features, not required; to skip one run `specweave small-fix "<why>"`. Close what you open: its plan ends with "Verify and close NNNN".
|
|
12
12
|
3. `specweave task claim T-NN`, edit only that task's Files, commit as `NNNN: what changed`, then `specweave task done T-NN --run "<its Test>"`. `--line`/`--link` feed `specweave cards --md`.
|
|
13
13
|
4. When the last task is done or skipped, without asking: `specweave verify`, a fresh-context review (subagent or new session) for anything that ships, `specweave complete NNNN`. PR-shipped work needs `task done` first.
|
|
14
14
|
5. Stopping with tasks left, or switching tools: `specweave handoff --reason "<why>"`.
|
|
15
15
|
|
|
16
16
|
**Handoff.** When the user says "hand off", "out of tokens" or "switching accounts", or "[Usage limit reached" appears (outside SpecWithCode), run `specweave handoff --reason "<why>"`; tell them to say "pick up" in the other tool. "[Usage limit approaching" or usage heads-ups mean keep working; say so. When the user says "pick up", run `specweave pickup`; continue through step 4, passing any given id/title. Take the newest handoff if several; say which.
|
|
17
17
|
|
|
18
|
-
Tasks in spec.md: `### T-01 Title`, then `- AC: AC-01 | Files: src/a.ts, tests/e2e/a.test.ts | Test: npm test -- e2e/a`.
|
|
18
|
+
Tasks in spec.md: `### T-01 Title`, then `- AC: AC-01 | Files: src/a.ts, tests/e2e/a.test.ts | Test: npm test -- e2e/a`. ACs derive from done tasks. Notes: `specweave note "<text>"`. Skills: `.agents/skills/sw-*` and `.claude/skills/sw-*`; other tools: `npx vskill install anton-abyzov/specweave/sw-do`.
|
|
19
19
|
<!-- /SECTION -->
|
|
20
20
|
|
|
21
21
|
<!-- SECTION:rules required -->
|
|
@@ -24,8 +24,9 @@ Tasks in spec.md: `### T-01 Title`, then `- AC: AC-01 | Files: src/a.ts, tests/e
|
|
|
24
24
|
- Use headless Chrome/Playwright CLI for browser tests and automation: `headless: true`, `PWDEBUG=0`, `PLAYWRIGHT_HTML_OPEN=never`, HTML reports `open: 'never'`. Save captures to files; propagate to subagents. Before opening an essential visible browser, ask the user and wait for explicit approval. Headless failure is not approval.
|
|
25
25
|
- A task is done when its Test exits 0 and you have seen the real output. A Test checks the AC as users would (CLI, HTTP, UI, API); add unit tests only when asked or when config or conventions require them. Never skip, weaken or delete a test to pass, and never set a status by hand.
|
|
26
26
|
- One agent per branch/worktree: `git worktree add .worktrees/NNNN-<agent> -b inc/NNNN-<agent>` (never `../`). Claims older than 2h are stale. On `ledger.jsonl` conflicts keep both sides' lines.
|
|
27
|
-
-
|
|
27
|
+
- Commit durable decisions in spec.md Approach or one fact per file in `.specweave/memory/`, indexed in `MEMORY.md`, for all tools.
|
|
28
28
|
- Check a secret exists without printing it; never commit `.env*`.
|
|
29
|
+
- Honor project identity and licensing. Keep provenance and required notices; never infer license grants or history rewrites from branding changes.
|
|
29
30
|
- Without the CLI, append ledger lines yourself, one JSON object per line, UTF-8, LF: `{"t":"T-01","e":"claim","by":"<tool>@<host>","at":"<ISO time>"}` (`e` is claim, done, release, skip or block; `done` needs `"evidence":"<commit sha>"`, `skip` needs `"note":"<why>"`).
|
|
30
31
|
<!-- /SECTION -->
|
|
31
32
|
|
|
@@ -8,6 +8,7 @@ Everything shared by every tool is in AGENTS.md, imported above. Only Claude-spe
|
|
|
8
8
|
- Skills: `/sw-increment "title"`, `/sw-do`, `/sw-auto`, `/sw-review`, `/sw-done`, `/sw-handoff`, from `.claude/skills/`, so they load in cloud sessions too. With the `sw` plugin they are also `/sw:do` and so on.
|
|
9
9
|
- With the plugin, the SessionStart hook prints a short pickup; run `specweave pickup` for the next task's acceptance criteria.
|
|
10
10
|
- Use plan mode before writing a spec for anything bigger than a small fix.
|
|
11
|
+
- Follow AGENTS.md for product identity and licensing; preserve required third-party notices and accurate provenance.
|
|
11
12
|
<!-- /SECTION -->
|
|
12
13
|
|
|
13
14
|
<!-- SECTION:jev when="jev" -->
|