Skip to content

Commit a54aa2f

Browse files
docs: update CLAUDE.md and README for spec-tree plugin and CI/CD
- Deprecate spx spec/spx spx CLI domains in favor of spec-tree plugin - Replace spx:understanding-spx/managing-spx skill refs with spec-tree:* skills - Document CI/CD pipeline (OIDC Trusted Publishing, Sigstore provenance) - Add publishing instructions to README - Update architecture tree to reflect current src/ layout - Bump to 0.1.6
1 parent 518a1e1 commit a54aa2f

4 files changed

Lines changed: 97 additions & 136 deletions

File tree

CLAUDE.md

Lines changed: 33 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -6,57 +6,41 @@
66

77
---
88

9-
## 🚨 MIGRATION IN PROGRESS: specs/ → spx/
9+
## Spec Management
1010

11-
**We are migrating from the legacy `specs/` framework to the CODE Framework in `spx/`.**
11+
### Deprecated: `spx spec` and `spx spx` commands
1212

13-
| Directory | System | Status |
14-
| --------- | -------------- | ------------------------------------------------------- |
15-
| `spx/` | CODE Framework | **Primary** - use for all new work |
16-
| `specs/` | Legacy | **Frozen** - do not modify unless explicitly instructed |
13+
The `spec` and `spx` CLI domains are **deprecated** and will be removed. They are replaced by the **spec-tree** plugin, which provides the same functionality as Claude Code skills.
1714

18-
**Key differences:**
15+
### Current: spec-tree plugin (skill-only)
1916

20-
| Aspect | Legacy (`specs/`) | CODE Framework (`spx/`) |
21-
| --------------- | -------------------------------- | ----------------------------- |
22-
| Test location | Graduate to global `tests/` | Stay in container `tests/` |
23-
| Status tracking | `DONE.md` in container | `outcomes.yaml` ledger |
24-
| Philosophy | Task-driven (backlog/doing/done) | Outcome-driven, durable specs |
17+
The **spec-tree** plugin (`outcomeeng/claude/plugins/spec-tree`) is the active system for managing specification trees. It provides seven skills:
2518

26-
**Migration tracking:** Each migrated container has an `SPX-MIGRATION.md` file documenting reverse-graduation of tests.
19+
| Skill | Purpose |
20+
| ---------------------------- | -------------------------------------------------------------- |
21+
| `/spec-tree:understanding` | Load methodology foundation (node types, ordering, assertions) |
22+
| `/spec-tree:contextualizing` | Load context for a specific work item (walks tree to target) |
23+
| `/spec-tree:authoring` | Create specs, ADRs, PDRs, enablers, outcomes |
24+
| `/spec-tree:decomposing` | Break nodes into children with proper ordering |
25+
| `/spec-tree:testing` | Manage spec-test lock file lifecycle |
26+
| `/spec-tree:refactoring` | Restructure the spec tree (move, consolidate, extract) |
27+
| `/spec-tree:aligning` | Review for gaps, contradictions, and consistency |
2728

28-
**Primary guide for new work:** [`spx/CLAUDE.md`](spx/CLAUDE.md)
29+
### Legacy: `specs/` directory
30+
31+
The `specs/` directory uses the legacy task-driven system (backlog/doing/done with `DONE.md`). It is **frozen** — do not modify unless explicitly instructed.
2932

3033
---
3134

3235
## BSP Numbers
3336

3437
- BSP stands for Binary Space Partitioning.
35-
- BSP numbers are only sibling-unique. Always use the complete path `capability-NN/feature-NN/story-NN` and `capability-NN/feature-NN/adr-NN` etc. when interacting with the user, creating handoff documents or otherwise referring to artifcats within the `specs/` and `spx/` directories.
36-
37-
---
38-
39-
### Finding Work
40-
41-
**Rule**: Lower BSP number = higher priority. Complete `21-*.feature` before `32-*.feature`.
42-
43-
> **Note:** The `spx spec` and `spx spx` domain commands are not yet implemented. Use skills or manual inspection to find work items.
44-
45-
```bash
46-
# These commands do NOT work yet:
47-
# spx spec status
48-
# spx spec next
49-
50-
# Instead, use skills:
51-
/spx:understanding-spx # Load context for a work item
52-
/spx:managing-spx # Find next work item, create specs
53-
```
54-
55-
Full CODE Framework rules: [`spx/CLAUDE.md`](spx/CLAUDE.md)
38+
- BSP numbers are only sibling-unique. Always use the complete path `capability-NN/feature-NN/story-NN` and `capability-NN/feature-NN/adr-NN` etc. when interacting with the user, creating handoff documents or otherwise referring to artifacts within the `specs/` and `spx/` directories.
39+
- Lower BSP number = higher priority. Complete `21-*.feature` before `32-*.feature`.
5640

5741
---
5842

59-
## 🚨 VALIDATION GATE (MANDATORY BEFORE COMMIT)
43+
## Validation Gate (Mandatory Before Commit)
6044

6145
**NEVER commit without passing validation.** This is *non-negotiable*.
6246

@@ -111,26 +95,6 @@ All validation runs through `spx validation` subcommands. Use pnpm scripts or ca
11195

11296
---
11397

114-
## Finding Work Items
115-
116-
> **Note:** The `spx spec` and `spx spx` domain commands are not yet implemented.
117-
118-
**For now, use skills to find and understand work:**
119-
120-
```bash
121-
/spx:managing-spx # Ask "what's next?" - finds next work item by hierarchy (capability -> feature -> story) and then by BSP order
122-
/spx:understanding-spx # Load full context for a specific work item
123-
```
124-
125-
**Or inspect the `spx/` directory manually:**
126-
127-
- Lower BSP number = higher priority
128-
- Check `outcomes.yaml` for status (missing = unknown, has entries = check if tests pass)
129-
130-
**For CODE Framework details**: Read [`spx/CLAUDE.md`](spx/CLAUDE.md)
131-
132-
---
133-
13498
## Session Management
13599

136100
Use `spx session` to manage work handoffs between agent contexts.
@@ -220,10 +184,11 @@ Commands output XML-style tags for easy parsing by automation tools:
220184

221185
## Technical Stack
222186

223-
- **Language**: TypeScript
224-
- **Build**: tsup
187+
- **Language**: TypeScript (ESM)
188+
- **Build**: tsup (esbuild-based)
225189
- **Testing**: Vitest
226190
- **CLI**: Commander.js
191+
- **CI/CD**: GitHub Actions with OIDC Trusted Publishing and Sigstore provenance
227192

228193
## Development
229194

@@ -236,8 +201,15 @@ Use `pnpm run` scripts (e.g. `pnpm run validate`, `pnpm test`) for development
236201
```
237202
src/
238203
├── commands/ # CLI command implementations
239-
│ ├── validation/ # spx validation subcommands
240-
│ └── session/ # spx session subcommands
204+
│ ├── claude/ # spx claude subcommands (deprecated)
205+
│ ├── session/ # spx session subcommands
206+
│ ├── spec/ # spx spec subcommands (deprecated)
207+
│ └── validation/ # spx validation subcommands
208+
├── domains/ # Domain routers
209+
│ ├── claude/ # (deprecated)
210+
│ ├── session/
211+
│ ├── spec/ # (deprecated)
212+
│ └── validation/
241213
├── validation/ # Lint, typecheck, circular dep logic
242214
├── session/ # Session lifecycle and storage
243215
├── config/ # Configuration loading
@@ -246,25 +218,6 @@ src/
246218
├── status/ # Status state machine
247219
├── reporter/ # Output formatting
248220
├── tree/ # Hierarchical tree building
221+
├── precommit/ # Pre-commit hook orchestration
249222
└── lib/ # Shared utilities
250223
```
251-
252-
### Status Determination
253-
254-
**CODE Framework (`spx/`)** - status via `outcomes.yaml` ledger:
255-
256-
| State | Condition | Required Action |
257-
| --------- | ---------------------------------- | ------------------------------- |
258-
| Unknown | Test Files links don't resolve | Write tests |
259-
| Pending | Tests exist, not all passing | Fix code or fix tests |
260-
| Stale | Spec or test blob changed | Re-commit with `spx spx commit` |
261-
| Passing | All tests pass, blobs unchanged | None—potential realized |
262-
| Regressed | Was passing, now fails, blobs same | Investigate and fix |
263-
264-
**Legacy (`specs/`)** - status via `tests/` directory:
265-
266-
| State | Condition |
267-
| ----------- | ----------------------------------- |
268-
| OPEN | Missing or empty `tests/` directory |
269-
| IN PROGRESS | `tests/` has files but no `DONE.md` |
270-
| DONE | `tests/DONE.md` exists |

README.md

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ Developer CLI for code validation and session management.
1111
- **Unified validation**: Run ESLint, TypeScript, and circular dependency checks through a single command
1212
- **Session management**: Queue, claim, and hand off work between agents
1313
- **Multiple formats**: Text, JSON output for CI and automation
14+
- **Secure publishing**: OIDC Trusted Publishing with Sigstore provenance via GitHub Actions
1415

1516
All commands are domain-scoped (e.g., `spx validation`, `spx session`) and support `--quiet` and `--json` flags for CI and automation.
1617

1718
## Installation
1819

1920
```bash
20-
pnpm add -g @outcomeeng/spx
21+
npm install -g @outcomeeng/spx
2122
```
2223

2324
### From Source
@@ -62,20 +63,12 @@ priority: high
6263
---
6364
# Implement feature X
6465
EOF
65-
# Output:
66-
# Created handoff session <HANDOFF_ID>2026-01-15_08-30-00</HANDOFF_ID>
67-
# <SESSION_FILE>/path/to/.spx/sessions/todo/2026-01-15_08-30-00.md</SESSION_FILE>
68-
69-
# Or create empty session and edit the file directly
70-
spx session handoff
71-
# Then edit the <SESSION_FILE> path returned
7266

7367
# List all sessions
7468
spx session list
7569

7670
# Claim the highest priority session
7771
spx session pickup --auto
78-
# Output: Claimed session <PICKUP_ID>2026-01-15_08-30-00</PICKUP_ID>
7972

8073
# Release session back to queue
8174
spx session release
@@ -87,10 +80,14 @@ spx session show <session-id>
8780
spx session delete <session-id>
8881
```
8982

90-
Sessions are stored in `.spx/sessions/` with priority-based ordering (high medium low) and FIFO within the same priority. Commands output parseable `<PICKUP_ID>`, `<HANDOFF_ID>`, and `<SESSION_FILE>` tags for automation.
83+
Sessions are stored in `.spx/sessions/` with priority-based ordering (high > medium > low) and FIFO within the same priority. Commands output parseable `<PICKUP_ID>`, `<HANDOFF_ID>`, and `<SESSION_FILE>` tags for automation.
9184

9285
See [Session Recipes](docs/how-to/session/common-tasks.md) for detailed usage patterns.
9386

87+
### Spec Management (deprecated)
88+
89+
The `spx spec` and `spx spx` CLI domains are **deprecated**. Spec tree management has moved to the **spec-tree** Claude Code plugin, available at [`outcomeeng/claude/plugins/spec-tree`](https://github.com/simonheimlicher/spx-claude). The plugin provides skills for understanding, authoring, decomposing, contextualizing, testing, refactoring, and aligning specification trees.
90+
9491
## Development
9592

9693
### Setup
@@ -128,21 +125,39 @@ pnpm run knip # Unused code detection
128125

129126
The `pnpm run` scripts use `node bin/spx.js` internally, so they work without a global link. Once linked, you can also use `spx validation all` etc. directly.
130127

128+
## CI/CD
129+
130+
The project uses GitHub Actions for continuous integration and publishing:
131+
132+
- **CI** (`ci.yml`) — Runs validate, test, and build on Node 22 and 24 for every push to `main` and every pull request. Includes dependency review to block PRs introducing vulnerable dependencies.
133+
- **Publish** (`publish.yml`) — Triggered by `v*` tags. Uses OIDC Trusted Publishing (no stored npm tokens) with Sigstore provenance attestation. Requires manual approval via the `npm-publish` GitHub Environment.
134+
- **Scorecard** (`scorecard.yml`) — Weekly OpenSSF Scorecard assessment, results published to the GitHub Security tab.
135+
136+
### Publishing a Release
137+
138+
1. Bump the version in `package.json`
139+
2. Commit and tag: `git tag vX.Y.Z`
140+
3. Push: `git push origin main && git push origin vX.Y.Z`
141+
4. Approve the deployment in the GitHub Actions `npm-publish` environment
142+
5. The package is published with provenance — verify with `npm audit signatures`
143+
131144
## Technical Stack
132145

133-
- **TypeScript** - Type-safe implementation
134-
- **Commander.js** - CLI framework
135-
- **Vitest** - Testing framework
136-
- **tsup** - Build tool
137-
- **ESLint 9** - Linting with flat config
146+
- **TypeScript** — Type-safe implementation (ESM)
147+
- **Commander.js** — CLI framework
148+
- **Vitest** — Testing framework
149+
- **tsup** — Build tool (esbuild-based)
150+
- **ESLint 9** — Linting with flat config
151+
- **GitHub Actions** — CI/CD with OIDC Trusted Publishing
138152

139153
## Architecture
140154

141155
```
142156
src/
143157
├── commands/ # CLI command implementations
144-
│ ├── validation/ # spx validation subcommands
145-
│ └── session/ # spx session subcommands
158+
│ ├── session/ # spx session subcommands
159+
│ └── validation/ # spx validation subcommands
160+
├── domains/ # Domain routers
146161
├── validation/ # Lint, typecheck, circular dep logic
147162
├── session/ # Session lifecycle and storage
148163
├── config/ # Configuration loading
@@ -151,6 +166,7 @@ src/
151166
├── status/ # Status state machine
152167
├── reporter/ # Output formatting
153168
├── tree/ # Hierarchical tree building
169+
├── precommit/ # Pre-commit hook orchestration
154170
└── lib/ # Shared utilities
155171
```
156172

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@outcomeeng/spx",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "Developer CLI for code validation and session management",
55
"type": "module",
66
"bin": {

spx/CLAUDE.md

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,20 @@
1-
# spx/ Directory Guide (CODE Framework)
1+
# spx/ Directory Guide (Spec Tree)
22

3-
This guide explains WHEN to invoke spx skills. It is a **router** that tells you which skill to use. The skills themselves contain the HOW (detailed procedures, templates, structure definitions).
3+
This guide explains the `spx/` directory structure and how to work with specification trees.
44

5-
---
6-
7-
## 🚨 DISAMBIGUATION: spx/ vs specs/
8-
9-
**Before proceeding, determine which system this project uses:**
10-
11-
| Directory | System | Skills to Use |
12-
| --------- | -------------- | --------------------------------------------------- |
13-
| `spx/` | CODE framework | `spx:understanding-spx`, `spx:managing-spx` |
14-
| `specs/` | Legacy | `specs:understanding-specs`, `specs:managing-specs` |
15-
16-
**If BOTH directories exist**: Ask the user which system they want to work with.
5+
Spec tree management is handled by the **spec-tree** Claude Code plugin (`outcomeeng/claude/plugins/spec-tree`). Use its skills for all spec operations:
176

18-
**If `specs/` exists**: Read `specs/CLAUDE.md` for legacy system guidance.
7+
| Skill | Purpose |
8+
| ---------------------------- | -------------------------------------------------------------- |
9+
| `/spec-tree:understanding` | Load methodology foundation (node types, ordering, assertions) |
10+
| `/spec-tree:contextualizing` | Load context for a specific work item |
11+
| `/spec-tree:authoring` | Create specs, ADRs, PDRs, enablers, outcomes |
12+
| `/spec-tree:decomposing` | Break nodes into children with proper ordering |
13+
| `/spec-tree:testing` | Manage spec-test lock file lifecycle |
14+
| `/spec-tree:refactoring` | Restructure the spec tree |
15+
| `/spec-tree:aligning` | Review for gaps, contradictions, and consistency |
1916

20-
**Fully qualified skill names** (required when both plugins are installed):
21-
22-
```bash
23-
# CODE framework spx/ projects
24-
/spx:understanding-spx
25-
/spx:managing-spx
26-
27-
# Legacy specs/ projects
28-
/specs:understanding-specs
29-
/specs:managing-specs
30-
```
17+
The `specs/` directory uses the legacy task-driven system and is **frozen**.
3118

3219
---
3320

@@ -126,7 +113,7 @@ tests:
126113

127114
## When to Invoke Skills
128115

129-
### Before Implementing ANY Work Item → `/spx:understanding-spx`
116+
### Before Implementing ANY Work Item → `/spec-tree:contextualizing`
130117

131118
**BLOCKING REQUIREMENT**
132119

@@ -136,30 +123,35 @@ tests:
136123
- User references a work item file
137124
- You're about to write implementation code
138125

139-
**What it does**: Loads complete context hierarchy (PRD → ADRs → capability → feature → story).
126+
**What it does**: Walks the tree from product root to target node, collecting ancestor specs and context.
140127

141-
### When Creating/Organizing Specs → `/spx:managing-spx`
128+
### When Creating/Organizing Specs → `/spec-tree:authoring`
142129

143130
**BLOCKING REQUIREMENT**
144131

145132
**Trigger conditions:**
146133

147134
- User says "create a PRD", "add an ADR", "create capability/feature/story"
148-
- User asks "what's next to work on?"
149-
- You need templates or BSP numbering rules
135+
- You need templates or ordering rules
136+
137+
**What it does**: Provides templates, sparse integer ordering, structure guidance.
138+
139+
### When Asking "What's Next?" → `/spec-tree:contextualizing`
150140

151-
**What it does**: Provides templates, BSP numbering, structure guidance.
141+
Use contextualizing to understand current state, then authoring or testing to act on it.
152142

153143
---
154144

155145
## Quick Reference: Skill Selection
156146

157-
| User Says... | Invoke | Do NOT |
158-
| -------------------- | ------------------------ | ---------------------- |
159-
| "Implement story-21" | `/spx:understanding-spx` | Read story.md directly |
160-
| "Create a PRD" | `/spx:managing-spx` | Search for templates |
161-
| "What's next?" | `/spx:managing-spx` | Grep for work items |
162-
| "Create a feature" | `/spx:managing-spx` | Calculate BSP yourself |
147+
| User Says... | Invoke | Do NOT |
148+
| ------------------------- | ---------------------------- | ---------------------- |
149+
| "Implement story-21" | `/spec-tree:contextualizing` | Read story.md directly |
150+
| "Create a PRD" | `/spec-tree:authoring` | Search for templates |
151+
| "What's next?" | `/spec-tree:contextualizing` | Grep for work items |
152+
| "Create a feature" | `/spec-tree:authoring` | Calculate BSP yourself |
153+
| "Break this down" | `/spec-tree:decomposing` | Guess child structure |
154+
| "Anything contradictory?" | `/spec-tree:aligning` | Skim specs manually |
163155

164156
---
165157

0 commit comments

Comments
 (0)