Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .claude/agents/architect.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ memory: project

## Repo Context

stagecraft-cli is one Rust binary named `stagecraft` with two faces: CLI subcommands for humans and an MCP server (stdio) for agents, both calling the Stagecraft control plane's API under the same identity and JSON shapes. spec-spine is an installed CLI tool that governs the repo: a typed, hash-verifiable authority ledger over the spec corpus. It is a dependency, not source code you edit.
statecraft-cli is one Rust binary named `statecraft` with two faces: CLI subcommands for humans and an MCP server (stdio) for agents, both calling the Statecraft control plane's API under the same identity and JSON shapes. spec-spine is an installed CLI tool that governs the repo: a typed, hash-verifiable authority ledger over the spec corpus. It is a dependency, not source code you edit.

| Surface | Path | Notes |
|---------|------|-------|
| Spec corpus | `specs/NNN-slug/spec.md` | Markdown + YAML frontmatter, the authoritative design record; specs 002-005 are the ordered build backlog (crate scaffold, auth + API client, governance verbs, MCP server) |
| Code | `Cargo.toml`, `src/` (clap command tree; planned by spec 002, pre-code today) | The single `stagecraft` binary the specs govern |
| Code | `Cargo.toml`, `src/` (clap command tree; planned by spec 002, pre-code today) | The single `statecraft` binary the specs govern |
| Standard | `standards/spec/{constitution.md,contract.md,templates/}` | Durable principles, normative contract, spec template |
| Derived | `.derived/` | Committed compiler output (registry, index), read only through the binary |

Expand All @@ -56,7 +56,7 @@ Read the request or task document. Identify which surfaces are affected.
For each proposed change, check:

- Does a spec already exist? If not, should one be authored first?
- Does the approach align with the spec's stated design and constraints? `specs/001-cli-mcp-thesis/spec.md` holds the decided constraints (binary name `stagecraft`, Rust, stdio MCP, Apache-2.0, rustls only, no TUI).
- Does the approach align with the spec's stated design and constraints? `specs/001-cli-mcp-thesis/spec.md` holds the decided constraints (binary name `statecraft`, Rust, stdio MCP, Apache-2.0, rustls only, no TUI).
- Are the spec's `depends_on` specs implemented, per the backlog protocol? If a cross-repo dependency or operator prerequisite is missing, the plan must stop and report exactly what is needed, never mock around it.
- Are there relationship edges (`establishes`, `extends`, `refines`, `supersedes`, `amends`, `depends_on`) the change must respect or extend?
- Will the change require recompiling the registry or refreshing the codebase index?
Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mutation: read-only

## Repo Context

stagecraft-cli is one Rust binary named `stagecraft` with two faces: CLI subcommands (clap command tree) and an MCP server over stdio. spec-spine is an installed CLI tool that governs the spec corpus. It is a dependency, not source code you edit.
statecraft-cli is one Rust binary named `statecraft` with two faces: CLI subcommands (clap command tree) and an MCP server over stdio. spec-spine is an installed CLI tool that governs the spec corpus. It is a dependency, not source code you edit.

| Surface | Path | Tech |
|---------|------|------|
Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/implementer.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mutation: read-write

## Repo Context

stagecraft-cli is one Rust binary named `stagecraft` (CLI subcommands + MCP server over stdio). spec-spine is an installed CLI tool that governs the spec corpus. It is a dependency, not source code you edit.
statecraft-cli is one Rust binary named `statecraft` (CLI subcommands + MCP server over stdio). spec-spine is an installed CLI tool that governs the spec corpus. It is a dependency, not source code you edit.

| Surface | Path | Build / verify |
|---------|------|----------------|
Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ memory: project

## Repo Context

stagecraft-cli is one Rust binary named `stagecraft` (CLI subcommands + MCP server over stdio) calling the Stagecraft control plane's API. spec-spine is an installed CLI tool that governs the spec corpus. It is a dependency, not source code you edit.
statecraft-cli is one Rust binary named `statecraft` (CLI subcommands + MCP server over stdio) calling the Statecraft control plane's API. spec-spine is an installed CLI tool that governs the spec corpus. It is a dependency, not source code you edit.

| Surface | Path | Key concerns |
|---------|------|--------------|
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/init/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Claude Code, Codex CLI, Cursor, Copilot, and any future agent).
`## ` heading exclusive. That section is the step list.
2. Execute the protocol described there, using parallel tool calls wherever
steps are independent.
3. Emit a structured `## initialized: stagecraft-cli` summary: the lifecycle
3. Emit a structured `## initialized: statecraft-cli` summary: the lifecycle
counts reported by `spec-spine registry status-report --json
--nonzero-only` and the next pending spec in the 002-005 build backlog.

Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ad-hoc parsing of `.derived/**/*.json` (see

### 1. Verify the Rust toolchain

This repo builds one Rust binary (`stagecraft`, spec 002). Check the
This repo builds one Rust binary (`statecraft`, spec 002). Check the
toolchain the gates need:

```bash
Expand Down Expand Up @@ -68,7 +68,7 @@ re-check. Do not parse `.derived/**/*.json` directly to "verify" success.
Report exactly:

```
## setup: stagecraft-cli
## setup: statecraft-cli

**Toolchain:** {cargo <version> / missing}
**Install:** {ok / failed at <step>}
Expand Down
2 changes: 1 addition & 1 deletion .derived/codebase-index/by-package/stagecraft-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"package": {
"edition": "2021",
"kind": "rust-bin",
"name": "stagecraft-cli",
"name": "statecraft-cli",
"path": "",
"specRef": "002-crate-scaffold",
"version": "0.1.0"
Expand Down
4 changes: 2 additions & 2 deletions .derived/codebase-index/by-spec/003-auth-api-client.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ownership": true,
"sourceField": "establishes",
"unit": {
"id": "stagecraft_cli::api",
"id": "statecraft_cli::api",
"kind": "symbol"
}
},
Expand All @@ -40,7 +40,7 @@
"ownership": true,
"sourceField": "establishes",
"unit": {
"id": "stagecraft_cli::auth",
"id": "statecraft_cli::auth",
"kind": "symbol"
}
}
Expand Down
2 changes: 1 addition & 1 deletion .derived/codebase-index/by-spec/004-governance-verbs.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ownership": true,
"sourceField": "establishes",
"unit": {
"id": "stagecraft_cli::verbs",
"id": "statecraft_cli::verbs",
"kind": "symbol"
}
}
Expand Down
2 changes: 1 addition & 1 deletion .derived/codebase-index/by-spec/005-mcp-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ownership": true,
"sourceField": "establishes",
"unit": {
"id": "stagecraft_cli::mcp",
"id": "statecraft_cli::mcp",
"kind": "symbol"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ownership": true,
"sourceField": "establishes",
"unit": {
"id": "stagecraft_cli::verbs::template",
"id": "statecraft_cli::verbs::template",
"kind": "symbol"
}
}
Expand Down
6 changes: 3 additions & 3 deletions .derived/spec-registry/by-spec/001-cli-mcp-thesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"id": "001-cli-mcp-thesis",
"implementation": "pending",
"sectionHeadings": [
"001: stagecraft-cli thesis",
"001: statecraft-cli thesis",
"1. Purpose",
"2. Decided constraints",
"3. Territory",
"4. Out of scope"
],
"specPath": "specs/001-cli-mcp-thesis/spec.md",
"status": "approved",
"summary": "The successor to OPC (the retired Tauri desktop cockpit): a single binary named stagecraft that exposes the platform's governance verbs twice, as CLI subcommands for humans and as an MCP server for agents. The MCP face is the product's genuinely unique surface: any agent (Claude Code first) operates natively under Stagecraft governance, requesting approvals, checking spec-code coupling, and triggering factory stages. This is milestone M4 in the Stagecraft ladder; the spec records the thesis and the decided constraints so the repo is born governed ahead of its build.\n",
"title": "stagecraft-cli: one binary, two faces (CLI verbs + MCP server)"
"summary": "The successor to OPC (the retired Tauri desktop cockpit): a single binary named statecraft that exposes the platform's governance verbs twice, as CLI subcommands for humans and as an MCP server for agents. The MCP face is the product's genuinely unique surface: any agent (Claude Code first) operates natively under Statecraft governance, requesting approvals, checking spec-code coupling, and triggering factory stages. This is milestone M4 in the Statecraft ladder; the spec records the thesis and the decided constraints so the repo is born governed ahead of its build.\n",
"title": "statecraft-cli: one binary, two faces (CLI verbs + MCP server)"
},
"shardHash": "a58ad16200ff335e20b8daa248e375284e48b2c62b668b75ce5f9cbb211f4862",
"specVersion": "1.1.0"
Expand Down
4 changes: 2 additions & 2 deletions .derived/spec-registry/by-spec/002-crate-scaffold.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
],
"specPath": "specs/002-crate-scaffold/spec.md",
"status": "approved",
"summary": "The Rust crate for the single binary named stagecraft: clap-based command tree, layered configuration (flags > env > config file), structured output discipline (human tables on TTY, JSON with --output json), and a CI workflow (fmt, clippy -D warnings, test, release build). No network calls yet; spec 003 adds auth and the API client. After this spec, `cargo install --path .` yields a binary whose skeleton every later verb hangs off.\n",
"title": "The stagecraft binary: crate scaffold, config, CI"
"summary": "The Rust crate for the single binary named statecraft: clap-based command tree, layered configuration (flags > env > config file), structured output discipline (human tables on TTY, JSON with --output json), and a CI workflow (fmt, clippy -D warnings, test, release build). No network calls yet; spec 003 adds auth and the API client. After this spec, `cargo install --path .` yields a binary whose skeleton every later verb hangs off.\n",
"title": "The statecraft binary: crate scaffold, config, CI"
},
"shardHash": "8576aef9f1f550842270168da67a5fc80a2c886fdbecac54781f3963a854f3d2",
"specVersion": "1.1.0"
Expand Down
6 changes: 3 additions & 3 deletions .derived/spec-registry/by-spec/003-auth-api-client.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
],
"establishes": [
{
"id": "stagecraft_cli::api",
"id": "statecraft_cli::api",
"kind": "symbol"
},
{
"id": "stagecraft_cli::auth",
"id": "statecraft_cli::auth",
"kind": "symbol"
}
],
Expand All @@ -27,7 +27,7 @@
],
"specPath": "specs/003-auth-api-client/spec.md",
"status": "approved",
"summary": "The binary learns to authenticate against a Stagecraft control plane and speak its API. Auth v1 is a browser-assisted session-cookie handoff (the control plane's chassis auth is cookie based, and the embedded rauthy exposes OIDC; the exact mechanism is DECIDE-AT-IMPLEMENTATION between OAuth device-flow-style polling and a localhost callback, constrained below). Tokens/cookies are stored in a 0600 credentials file, never in the config file. An api module gives every later verb a typed, authenticated request path with consistent error mapping.\n",
"summary": "The binary learns to authenticate against a Statecraft control plane and speak its API. Auth v1 is a browser-assisted session-cookie handoff (the control plane's chassis auth is cookie based, and the embedded rauthy exposes OIDC; the exact mechanism is DECIDE-AT-IMPLEMENTATION between OAuth device-flow-style polling and a localhost callback, constrained below). Tokens/cookies are stored in a 0600 credentials file, never in the config file. An api module gives every later verb a typed, authenticated request path with consistent error mapping.\n",
"title": "Auth + control-plane API client"
},
"shardHash": "46b6c05e0ca45e03fc21761df69431c89464e6a11e5e9088c4f76bf97e65cd59",
Expand Down
4 changes: 2 additions & 2 deletions .derived/spec-registry/by-spec/004-governance-verbs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"establishes": [
{
"id": "stagecraft_cli::verbs",
"id": "statecraft_cli::verbs",
"kind": "symbol"
}
],
Expand All @@ -27,7 +27,7 @@
],
"specPath": "specs/004-governance-verbs/spec.md",
"status": "approved",
"summary": "The CLI face becomes useful: the stub commands from spec 002 gain real implementations over the API client, mirroring the control plane's tenants (stagecraft spec 004), factory (spec 005), and fleet (spec 006) services. Every verb has a stable JSON output shape, because spec 005 exposes these same verbs as MCP tools and the JSON is the shared contract between both faces.\n",
"summary": "The CLI face becomes useful: the stub commands from spec 002 gain real implementations over the API client, mirroring the control plane's tenants (statecraft spec 004), factory (spec 005), and fleet (spec 006) services. Every verb has a stable JSON output shape, because spec 005 exposes these same verbs as MCP tools and the JSON is the shared contract between both faces.\n",
"title": "Governance verbs v1: tenants, stamps, fleet"
},
"shardHash": "c8282f2410f0072e4a10578af7d13cff12921806b154d05fe5144ef07cd12148",
Expand Down
6 changes: 3 additions & 3 deletions .derived/spec-registry/by-spec/005-mcp-server.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"establishes": [
{
"id": "stagecraft_cli::mcp",
"id": "statecraft_cli::mcp",
"kind": "symbol"
}
],
Expand All @@ -22,8 +22,8 @@
],
"specPath": "specs/005-mcp-server/spec.md",
"status": "approved",
"summary": "Milestone M4's core: `stagecraft mcp` runs a Model Context Protocol server over stdio exposing the governance verbs as tools, so a coding agent (Claude Code first) operates under Stagecraft governance natively: listing tenants, launching and watching stamps, inspecting and operating fleets, all with the same auth, the same guards, and the same JSON shapes as the CLI face. The MCP face is not a privileged side door: it calls the identical verb layer from spec 004, and destructive guards (explicit posture, confirm-name) pass through to the agent verbatim.\n",
"title": "The MCP face: stagecraft mcp (stdio server)"
"summary": "Milestone M4's core: `statecraft mcp` runs a Model Context Protocol server over stdio exposing the governance verbs as tools, so a coding agent (Claude Code first) operates under Statecraft governance natively: listing tenants, launching and watching stamps, inspecting and operating fleets, all with the same auth, the same guards, and the same JSON shapes as the CLI face. The MCP face is not a privileged side door: it calls the identical verb layer from spec 004, and destructive guards (explicit posture, confirm-name) pass through to the agent verbatim.\n",
"title": "The MCP face: statecraft mcp (stdio server)"
},
"shardHash": "3b2d09c65623c532afd2e5329891a969ea1f4efe279772974e0bf832a6220252",
"specVersion": "1.1.0"
Expand Down
6 changes: 3 additions & 3 deletions .derived/spec-registry/by-spec/006-template-upgrade-verb.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"establishes": [
{
"id": "stagecraft_cli::verbs::template",
"id": "statecraft_cli::verbs::template",
"kind": "symbol"
}
],
Expand All @@ -22,8 +22,8 @@
],
"specPath": "specs/006-template-upgrade-verb/spec.md",
"status": "approved",
"summary": "The upgrade half of the 2026-07-14 packaging decision: templates stay small because the chassis ships as versioned npm packages (enrahitu spec 018), and upgrading a stamped app is a verb, not a migration project. `stagecraft template upgrade`, run in a stamped app checkout, reads template.toml, bumps the chassis package pins, applies template-shipped codemods, runs the contract verify verb, and commits on a branch. The CLI orchestrates; all structure knowledge stays in the template and its packages. This verb is the boundary that keeps the CLI from ever becoming a build daemon.\n",
"title": "stagecraft template upgrade: chassis upgrades as a governed verb"
"summary": "The upgrade half of the 2026-07-14 packaging decision: templates stay small because the chassis ships as versioned npm packages (enrahitu spec 018), and upgrading a stamped app is a verb, not a migration project. `statecraft template upgrade`, run in a stamped app checkout, reads template.toml, bumps the chassis package pins, applies template-shipped codemods, runs the contract verify verb, and commits on a branch. The CLI orchestrates; all structure knowledge stays in the template and its packages. This verb is the boundary that keeps the CLI from ever becoming a build daemon.\n",
"title": "statecraft template upgrade: chassis upgrades as a governed verb"
},
"shardHash": "5c1f7935e130ca8d1a42dfe060bf18f01e8a19f24be733760bc9d37cfc98f646",
"specVersion": "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spec-spine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fetch-depth: 0 # full history so the gate can diff the merge base
- name: Install spec-spine (prebuilt, pinned)
run: |
curl -fsSL https://raw.githubusercontent.com/stagecraft-ing/spec-spine/main/install.sh | \
curl -fsSL https://raw.githubusercontent.com/statecrafting/spec-spine/main/install.sh | \
SPEC_SPINE_VERSION=v0.10.0 SPEC_SPINE_BIN_DIR="$HOME/.local/bin" sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- run: spec-spine compile
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AGENTS.md: stagecraft-cli
# AGENTS.md: statecraft-cli

This file is the cross-agent session-init protocol authority, read by
Claude Code, Codex CLI, Cursor, and GitHub Copilot via the AAIF/Linux
Expand Down
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# CLAUDE.md: stagecraft-cli
# CLAUDE.md: statecraft-cli

## Project Overview

The successor to OPC: one Rust binary named `stagecraft` with two
The successor to OPC: one Rust binary named `statecraft` with two
faces, CLI subcommands for humans and an MCP server (stdio) for
agents, both calling the Stagecraft control plane's API under the same
agents, both calling the Statecraft control plane's API under the same
identity, guards, and JSON shapes. Thesis and decided constraints:
`specs/001-cli-mcp-thesis/spec.md`. The build order is the spec
backlog: 002 crate scaffold, 003 auth + API client, 004 governance
Expand Down Expand Up @@ -37,7 +37,7 @@ spec-spine compile && spec-spine index && spec-spine lint
# after spec 002 lands:
cargo fmt --check && cargo clippy --all-targets -- -D warnings
cargo test
cargo build --release # target/release/stagecraft
cargo build --release # target/release/statecraft
```

## Key Conventions
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "stagecraft-cli"
name = "statecraft-cli"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
description = "Stagecraft governance verbs as CLI subcommands for humans and an MCP server for agents."
repository = "https://github.com/stagecraft-ing/stagecraft-cli"
description = "Statecraft governance verbs as CLI subcommands for humans and an MCP server for agents."
repository = "https://github.com/statecrafting/statecraft-cli"
readme = "README.md"

# spec-spine couples this crate's code paths to its owning spec.
[package.metadata.spec-spine]
spec = "002-crate-scaffold"

# One binary named `stagecraft` (spec 001: the OPC name retires).
# One binary named `statecraft` (spec 001: the OPC name retires).
[[bin]]
name = "stagecraft"
name = "statecraft"
path = "src/main.rs"

[dependencies]
Expand Down
Loading
Loading