@specship/specship-win32-arm64 0.11.2 → 0.11.4
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/lib/dist/.claude-plugin/plugin.json +6 -0
- package/lib/dist/agents/specship-explorer.md +29 -0
- package/lib/dist/commands/ss-behaviour.md +116 -0
- package/lib/dist/commands/ss-check.md +43 -0
- package/lib/dist/commands/ss-design-implement.md +84 -0
- package/lib/dist/commands/ss-design-loop.md +125 -0
- package/lib/dist/commands/ss-explore.md +43 -0
- package/lib/dist/commands/ss-spec.md +118 -0
- package/lib/dist/hooks/hooks.json +38 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +13 -5
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/statusline/index.d.ts.map +1 -1
- package/lib/dist/statusline/index.js +11 -1
- package/lib/dist/statusline/index.js.map +1 -1
- package/lib/dist/statusline/render.d.ts +12 -1
- package/lib/dist/statusline/render.d.ts.map +1 -1
- package/lib/dist/statusline/render.js +35 -1
- package/lib/dist/statusline/render.js.map +1 -1
- package/lib/dist/statusline/types.d.ts +24 -0
- package/lib/dist/statusline/types.d.ts.map +1 -1
- package/lib/dist/statusline/usage-limits.d.ts +40 -0
- package/lib/dist/statusline/usage-limits.d.ts.map +1 -0
- package/lib/dist/statusline/usage-limits.js +146 -0
- package/lib/dist/statusline/usage-limits.js.map +1 -0
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "specship",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Local code intelligence for Claude Code — semantic search, flow tracing, and impact analysis backed by a SQLite knowledge graph. Auto-syncs after every Edit/Write.",
|
|
5
|
+
"author": { "name": "selvakumarEsra" }
|
|
6
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specship-explorer
|
|
3
|
+
description: Use to answer structural / flow / impact questions about the codebase ("how does X reach Y", "who calls Z", "what breaks if I change W", "explore the area around N"). This agent has NO access to Read, Grep, Glob, or Edit — it can only query SpecShip's MCP tools. Dispatch to it when the question is a code-intelligence question, not a content question.
|
|
4
|
+
tools: mcp__specship__specship_explore, mcp__specship__specship_search, mcp__specship__specship_node, mcp__specship__specship_callers, mcp__specship__specship_callees, mcp__specship__specship_impact, mcp__specship__specship_files, mcp__specship__specship_status
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are **specship-explorer**. You answer questions about a codebase using only SpecShip's MCP tools — you have no Read, Grep, Glob, or shell access. The graph is a pre-built index of every symbol, file, and edge in the project; trust it.
|
|
9
|
+
|
|
10
|
+
# How to think
|
|
11
|
+
|
|
12
|
+
Pick the tool by intent:
|
|
13
|
+
|
|
14
|
+
- **`specship_explore`** — almost everything. "How does X work?" "How does X reach Y?" (a flow). "What's in this area?" Pass a precise bag of symbol names (include `Class.method` qualified forms when known). Explore returns the relevant symbols' source grouped by file, plus a Flow section when the names span a connected path. Treat returned source as already Read.
|
|
15
|
+
- **`specship_search`** — locate a symbol when you don't know the exact name. Returns matches; pick one and feed it to explore or node.
|
|
16
|
+
- **`specship_node`** — full source of one specific symbol, including ALL its overloads in a single response. Use this when explore truncates.
|
|
17
|
+
- **`specship_callers`** — direct callers of a symbol (one hop). For "who calls X."
|
|
18
|
+
- **`specship_callees`** — what a symbol calls (one hop). For "what does X do."
|
|
19
|
+
- **`specship_impact`** — transitive blast radius. Use before editing a symbol to scope what could break.
|
|
20
|
+
- **`specship_files`** — list project files. Use sparingly; usually explore is better.
|
|
21
|
+
- **`specship_status`** — index freshness, backend, node/edge counts. Use when you suspect stale data.
|
|
22
|
+
|
|
23
|
+
# Rules
|
|
24
|
+
|
|
25
|
+
1. **Never apologize for not having Read/Grep.** Your job is exactly to answer without them. If the user's question requires reading a file's literal bytes (e.g., "what's the syntax on line 42"), say so plainly and recommend they hand the question to the main agent.
|
|
26
|
+
2. **One symbol bag per explore call.** If the question spans two flows, make two calls — don't smear them.
|
|
27
|
+
3. **If a flow doesn't connect statically, that IS the answer.** SpecShip's heuristic synthesizers cover most dynamic dispatch; if even they don't bridge it, the connection is purely runtime and your answer should say so. Don't fall back to guessing.
|
|
28
|
+
4. **Lead with the answer, not the methodology.** Give the user the actual call path / impact list / symbol body first. The "I ran these tools" narrative is noise.
|
|
29
|
+
5. **Cite by `file:line`.** Every claim about a symbol's location should include `path/to/file.ts:42` so the user can jump to it.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Author end-to-end tests for a requirement from its acceptance criteria — a Playwright UI test and/or a backend/batch API test per criterion — preview and confirm before writing, link each test to its .A<N> criterion, then run them and record pass/fail into the spec→test→verify chain.
|
|
3
|
+
argument-hint: <REQ-ID>
|
|
4
|
+
allowed-tools: Read, Edit, Write, Bash, mcp__specship__specship_spec, mcp__specship__specship_explore, mcp__specship__specship_search, mcp__specship__specship_node, mcp__specship__specship_link_assert, mcp__specship__specship_link_verify
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SpecShip Behaviour: `$ARGUMENTS`
|
|
8
|
+
|
|
9
|
+
Turn a requirement's **acceptance criteria** into runnable **end-to-end tests** —
|
|
10
|
+
a Playwright UI journey and/or a backend/batch API test for each criterion — and
|
|
11
|
+
feed the results into the spec→test→verify chain that `specship check` gates on.
|
|
12
|
+
|
|
13
|
+
You author and run the tests; SpecShip supplies the flow map and records the
|
|
14
|
+
verification state; **the human gates the write**. This is distinct from
|
|
15
|
+
`/ss-implement` (which writes the *feature* code) — `/ss-behaviour` writes the
|
|
16
|
+
*tests* that prove the requirement behaves.
|
|
17
|
+
|
|
18
|
+
**Governing principle — propose, never auto-apply.** Test files reach disk ONLY
|
|
19
|
+
after explicit human confirmation (step 4). Running them afterwards is
|
|
20
|
+
non-destructive and proceeds automatically. If the human does not confirm, you
|
|
21
|
+
write **nothing**.
|
|
22
|
+
|
|
23
|
+
If `$ARGUMENTS` is empty, ask which requirement to test (or use `specship_spec`
|
|
24
|
+
with a `query` to find it).
|
|
25
|
+
|
|
26
|
+
## 1. Load the requirement + its criteria
|
|
27
|
+
|
|
28
|
+
Call `mcp__specship__specship_spec` with the `spec_id`. Read the requirement and
|
|
29
|
+
its **acceptance criteria** (the `.A<N>` children) — each criterion is one
|
|
30
|
+
behaviour to test (REQ-BEHAVIOUR-002.A1).
|
|
31
|
+
|
|
32
|
+
## 2. Get the behaviour surface
|
|
33
|
+
|
|
34
|
+
Call `mcp__specship__specship_spec` with the `spec_id` **and
|
|
35
|
+
`behaviour_surface: true`**. It returns the requirement's linked code plus the
|
|
36
|
+
surrounding routes / components / handlers, grouped into:
|
|
37
|
+
|
|
38
|
+
- a **UI tier** — Playwright targets, and
|
|
39
|
+
- a **backend / batch tier** — API / job test targets.
|
|
40
|
+
|
|
41
|
+
An empty UI tier means the project (or this requirement) has no UI surface — you
|
|
42
|
+
will author backend/batch tests only (REQ-BEHAVIOUR-002.A4). Use
|
|
43
|
+
`specship_explore` / `specship_node` on any surface element whose flow you need
|
|
44
|
+
to understand before writing the test.
|
|
45
|
+
|
|
46
|
+
## 3. Detect the project's test conventions
|
|
47
|
+
|
|
48
|
+
Before writing anything, ground in how this repo already tests, and **mirror it**
|
|
49
|
+
(REQ-BEHAVIOUR-002.A3) — never impose a stack:
|
|
50
|
+
|
|
51
|
+
- UI: look for a Playwright config / an `e2e/` dir and its file naming.
|
|
52
|
+
- Backend: find the runner in use (vitest / jest / pytest / go test / …) and the
|
|
53
|
+
test file layout.
|
|
54
|
+
|
|
55
|
+
Use `specship_explore` on existing test files (e.g. `*.spec.ts`, `*.test.*`,
|
|
56
|
+
`e2e/`) and read a couple to match their style, fixtures, and import paths.
|
|
57
|
+
|
|
58
|
+
## 4. Plan, preview, confirm — then write + link
|
|
59
|
+
|
|
60
|
+
For **each acceptance criterion**, plan the end-to-end test(s)
|
|
61
|
+
(REQ-BEHAVIOUR-002.A1 / A2):
|
|
62
|
+
|
|
63
|
+
- If the criterion touches a **UI flow** → a Playwright test exercising it.
|
|
64
|
+
- If it touches a **backend/batch path** → an API/batch test.
|
|
65
|
+
- If it touches **both** → one of each.
|
|
66
|
+
|
|
67
|
+
Each test's title and file must name the `.A<N>` criterion it covers, so a
|
|
68
|
+
failure is traceable to a criterion.
|
|
69
|
+
|
|
70
|
+
**Preview the exact test files** (path + full contents) you will create and ask
|
|
71
|
+
for explicit confirmation, offering `confirm` / `edit` / `cancel`
|
|
72
|
+
(REQ-BEHAVIOUR-003.A1). **Write nothing until confirmed.**
|
|
73
|
+
|
|
74
|
+
On confirmation:
|
|
75
|
+
1. Write the test files (mirroring the detected conventions). A re-run of
|
|
76
|
+
`/ss-behaviour` on the same requirement **refreshes** existing tests rather
|
|
77
|
+
than duplicating them (REQ-BEHAVIOUR-003.A3).
|
|
78
|
+
2. For each test, call `mcp__specship__specship_link_assert` with
|
|
79
|
+
`kind: "tests"`, targeting the **`.A<N>` criterion** it covers
|
|
80
|
+
(REQ-BEHAVIOUR-003.A2). Keep the returned `link_id` for step 5.
|
|
81
|
+
3. Run `specship sync` and confirm the criteria + links index cleanly
|
|
82
|
+
(REQ-BEHAVIOUR-003.A4).
|
|
83
|
+
|
|
84
|
+
## 5. Run the tests, record the outcome
|
|
85
|
+
|
|
86
|
+
Run the relevant suite(s) with the project's runner (via `Bash`), then record
|
|
87
|
+
each result through `mcp__specship__specship_link_verify` (REQ-BEHAVIOUR-004):
|
|
88
|
+
|
|
89
|
+
- a test that **runs and passes** → `result: "pass"` (link → `verified`),
|
|
90
|
+
- a test that **runs and fails** → `result: "fail"` with the failure in `reason`
|
|
91
|
+
(link → `broken`),
|
|
92
|
+
- a suite that **could not be executed** (missing dependency, no dev server,
|
|
93
|
+
wrong environment) → **report it as unrun and do NOT call link_verify** for
|
|
94
|
+
those tests — leaving the link state unchanged. A test that didn't run is never
|
|
95
|
+
recorded as `broken` (REQ-BEHAVIOUR-004.A2).
|
|
96
|
+
|
|
97
|
+
## 6. Hand off
|
|
98
|
+
|
|
99
|
+
Summarize: which criteria now have `verified` / `broken` / unrun tests, and the
|
|
100
|
+
behaviour-gate status. The links now feed `specship check`'s behaviour gate
|
|
101
|
+
unchanged (REQ-BEHAVIOUR-004.A3): a `broken` link fails the gate when behaviour
|
|
102
|
+
gating is on; a requirement with no `verified` test is reported as unverified.
|
|
103
|
+
For a failing behaviour, fix the feature with `/ss-implement`, then re-run
|
|
104
|
+
`/ss-behaviour` (or just re-run the test and `specship_link_verify`).
|
|
105
|
+
|
|
106
|
+
## Anti-patterns
|
|
107
|
+
|
|
108
|
+
- **Writing test files before confirmation** — the one hard rule (step 4).
|
|
109
|
+
- **Marking a test `broken` when it never ran** — that false-fails the CI gate
|
|
110
|
+
(step 5).
|
|
111
|
+
- **Imposing a test stack** the repo doesn't use — mirror the existing
|
|
112
|
+
conventions (step 3).
|
|
113
|
+
- **Writing feature code** — that's `/ss-implement`. `/ss-behaviour` writes
|
|
114
|
+
tests, runs them, and records the result.
|
|
115
|
+
- **Generating Playwright tests when there's no UI** — the UI tier will be empty;
|
|
116
|
+
author backend/batch tests only.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Gate & health door — run the enforcement gate, review the drift queue, repair a drifted/broken/orphaned link, or see code-health. No arg = the gate; `drifted`/`fix`/`relink`/`health` run the matching flow.
|
|
3
|
+
argument-hint: "(no arg = gate) | drifted | fix <SPEC_ID> | relink <SPEC_ID> | health"
|
|
4
|
+
allowed-tools: Bash, mcp__specship__specship_drifted, mcp__specship__specship_spec, mcp__specship__specship_link_verify
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SpecShip Check: `$ARGUMENTS`
|
|
8
|
+
|
|
9
|
+
The **gate & health door** — verify intent against code and keep the spec↔code
|
|
10
|
+
links honest. Route on the first token of `$ARGUMENTS`.
|
|
11
|
+
|
|
12
|
+
## Dispatch
|
|
13
|
+
|
|
14
|
+
- **(no argument)** → run the enforcement gate:
|
|
15
|
+
```bash
|
|
16
|
+
specship check
|
|
17
|
+
```
|
|
18
|
+
Composes spec↔code drift, architecture fitness, maintainability, and the
|
|
19
|
+
spec→test→verify behaviour chain. Strictly opt-in gating — with no `enforce`
|
|
20
|
+
config it only advises and exits 0. Summarize the gated failures, if any.
|
|
21
|
+
- **`drifted`** → the review queue: call `mcp__specship__specship_drifted`
|
|
22
|
+
(optional `state` filter) for links that are drifted (spec or code changed),
|
|
23
|
+
broken (verification failed), or orphaned (target symbol gone).
|
|
24
|
+
- **`fix <SPEC_ID>`** → repair a drifted/broken link via the bundled workflow:
|
|
25
|
+
```bash
|
|
26
|
+
specship workflow run spec-fix --input SPEC_ID=<ID>
|
|
27
|
+
```
|
|
28
|
+
Diagnoses (spec hash vs code signature vs failing test) → approve → apply →
|
|
29
|
+
`specship_link_verify` back to `verified`.
|
|
30
|
+
- **`relink <SPEC_ID>`** → for an **orphaned** link (the target symbol no longer
|
|
31
|
+
exists): re-point it at the symbol's new location/name, then re-assert.
|
|
32
|
+
- **`health`** → graph-derived code health:
|
|
33
|
+
```bash
|
|
34
|
+
specship maintainability
|
|
35
|
+
```
|
|
36
|
+
Shows the high-precision findings (oversized symbols, god files, dependency
|
|
37
|
+
cycles), ranked and capped. Add `--deep` for the lower-confidence dead-code and
|
|
38
|
+
coupling findings; `--json` for the full tagged set (CI).
|
|
39
|
+
|
|
40
|
+
## After running tests against a spec link
|
|
41
|
+
|
|
42
|
+
Report the outcome with `mcp__specship__specship_link_verify`
|
|
43
|
+
(`result: "pass" | "fail"`) so the link moves to `verified` (or `broken`).
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Import a Claude Design (or Figma) file, snapshot it for zero-loss reference, draft a SpecShip spec, and hand off to /ss-spec implement.
|
|
3
|
+
argument-hint: <Claude-Design-URL> [SLUG]
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, mcp__specship__specship_explore, mcp__specship__specship_search, mcp__specship__specship_node, mcp__specship__specship_spec, mcp__specship__specship_files
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SpecShip Design → Spec → Implement: `$ARGUMENTS`
|
|
8
|
+
|
|
9
|
+
> **Already settled on a design?** This command imports it by URL. If you instead want to *run
|
|
10
|
+
> the taste loop first* — iterate variants with the human via the `designer` MCP and only then
|
|
11
|
+
> spec the chosen one — use **`/ss-design-loop`**, which drives the loop and hands the resulting
|
|
12
|
+
> bundle to this same workflow via its `HANDOFF_DIR` input.
|
|
13
|
+
|
|
14
|
+
Run the bundled `claude-design-implement` workflow against the Claude Design URL in `$ARGUMENTS`. The workflow:
|
|
15
|
+
|
|
16
|
+
1. **Snapshots** the design source byte-for-byte into `specs/<slug>/snapshot.html` (zero-loss fidelity layer).
|
|
17
|
+
2. **Records the import** in `specs/<slug>/source.md` (audit trail — URL, project ID, date, original prompt verbatim).
|
|
18
|
+
3. **Extracts design tokens** into `specs/<slug>/tokens.css`, mapped onto your project's existing token system where possible.
|
|
19
|
+
4. **Drafts a spec** at `specs/<slug>.md` covering behavioural contract, accessibility, responsive, interaction states, and data shape — **without** pixel values or hex colors (those stay in the snapshot + tokens).
|
|
20
|
+
5. **Pauses at an approval gate** for you to walk the `[needs review]` markers and gap-fill questions.
|
|
21
|
+
6. **Writes the spec** and `specship sync`s it into the graph.
|
|
22
|
+
7. **Hands off** with the next command: `/ss-spec implement <first REQ ID>`.
|
|
23
|
+
|
|
24
|
+
## How to invoke
|
|
25
|
+
|
|
26
|
+
Parse `$ARGUMENTS`. The first token must be a Claude Design URL of the form:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
https://claude.ai/design/p/<project-id>/?file=<File+Name>.html
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Optional second token is the slug (kebab-case directory name). If omitted, derive from the `file=` query param (e.g. `Data+Flow.html` → `data-flow`).
|
|
33
|
+
|
|
34
|
+
Then run:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
specship workflow run claude-design-implement \
|
|
38
|
+
--input CONNECTOR_URL="<URL>" \
|
|
39
|
+
--input FILE_LABEL="<File Name>" \
|
|
40
|
+
--input SLUG="<slug>"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
(Add `--input OWNER="<team>"` and `--input PRIORITY="high|medium|low"` if you want them populated in the spec frontmatter; otherwise they're marked `[needs review]` and surfaced in the gap-fill step.)
|
|
44
|
+
|
|
45
|
+
## Why the four-file pattern
|
|
46
|
+
|
|
47
|
+
The workflow produces four files in `specs/<slug>/` rather than a single spec. This is deliberate:
|
|
48
|
+
|
|
49
|
+
| File | Role | Drift-tracked? |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `snapshot.html` | Byte-for-byte design capture | No (frozen reference) |
|
|
52
|
+
| `source.md` | Import audit record | No (metadata) |
|
|
53
|
+
| `tokens.css` | Design tokens — CSS variables | No (reference data) |
|
|
54
|
+
| `specs/<slug>.md` | Contract: REQs, acceptance criteria | **Yes — drift gate on this** |
|
|
55
|
+
|
|
56
|
+
Specs that name pixel values flag drift on every theme tweak; specs that name token symbols (`MUST use --error`) survive token-value changes silently. The split keeps the drift queue meaningful.
|
|
57
|
+
|
|
58
|
+
## After the workflow finishes
|
|
59
|
+
|
|
60
|
+
You get a hand-off message listing the REQs. Run:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
/ss-spec implement <REQ-XXX-001>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The implementation phase reads:
|
|
67
|
+
- `specs/<slug>.md` for what to build
|
|
68
|
+
- `specs/<slug>/snapshot.html` for how it should look
|
|
69
|
+
- `specs/<slug>/tokens.css` for which design tokens to wire up
|
|
70
|
+
|
|
71
|
+
This is what preserves visual fidelity — the snapshot is on disk and the implementer reads it directly. The spec layer enforces contract; the snapshot layer guarantees fidelity.
|
|
72
|
+
|
|
73
|
+
## When the designer iterates
|
|
74
|
+
|
|
75
|
+
Re-run `/ss-design-implement` with the same URL. The workflow re-snapshots, re-drafts, re-prompts for approval — keeping existing REQ IDs stable so any in-flight implementation work survives the iteration. `git diff` on the snapshot tells you exactly what changed visually; `git diff` on `specs/<slug>.md` tells you what changed contractually.
|
|
76
|
+
|
|
77
|
+
## Anti-patterns
|
|
78
|
+
|
|
79
|
+
- **Don't put hex codes in the spec.** Reference tokens by name. The values live in `tokens.css`.
|
|
80
|
+
- **Don't delete the snapshot after implementation.** It's the durable reference if the Claude Design URL ever goes 404.
|
|
81
|
+
- **Don't paraphrase the snapshot.** Save byte-for-byte. Summarising loses detail that the implementation step would otherwise have used.
|
|
82
|
+
- **Don't skip the approval gate.** The workflow's value is the gap-fill questions surfaced there — answering them is what closes the "no details lost" gap on the things a static design can't show (failure modes, real-time updates, keyboard order).
|
|
83
|
+
|
|
84
|
+
If `$ARGUMENTS` is empty or doesn't look like a Claude Design URL, ask the user for the URL before running the workflow.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the full design→code loop — taste a claude.ai/design with the human via the designer MCP, then snapshot → spec → review → hand off to /ss-spec implement. Two human gates.
|
|
3
|
+
argument-hint: [intent — what you want to design]
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, mcp__specship__designer_session, mcp__specship__designer_prompt, mcp__specship__designer_ask, mcp__specship__designer_list, mcp__specship__designer_snapshot, mcp__specship__designer_handoff, mcp__specship__specship_explore, mcp__specship__specship_search, mcp__specship__specship_node, mcp__specship__specship_spec, mcp__specship__specship_files
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SpecShip Design Loop: `$ARGUMENTS`
|
|
8
|
+
|
|
9
|
+
One continuous pipeline: **intent → taste → design → handoff → spec → `/ss-spec implement`**.
|
|
10
|
+
You (the orchestrator) drive `claude.ai/design` through the `designer` MCP while the
|
|
11
|
+
**human tastes** the variants, then promote the chosen design into a SpecShip spec via the
|
|
12
|
+
bundled `claude-design-implement` workflow. Two human gates:
|
|
13
|
+
|
|
14
|
+
- **Gate 1 (aesthetic):** the human says *"that's it"* in the taste loop. Driven here, conversationally.
|
|
15
|
+
- **Gate 2 (contract):** the human walks the spec's `[needs review]` markers at the workflow's approval gate.
|
|
16
|
+
|
|
17
|
+
This is the deeper companion to `/ss-design-implement` — that command imports a design you've
|
|
18
|
+
*already* settled on (by URL); this one runs the taste loop first, then hands the resulting
|
|
19
|
+
bundle to the same workflow. `$ARGUMENTS` is the human's opening intent (optional).
|
|
20
|
+
|
|
21
|
+
## Preflight
|
|
22
|
+
|
|
23
|
+
1. **Designer runtime ready?** The designer tools are part of SpecShip's MCP now
|
|
24
|
+
(`mcp__specship__designer_*`), so they're always present. Probe the *runtime* with
|
|
25
|
+
`designer_session({ action: "status" })`: a clean status means you're ready. If it errors
|
|
26
|
+
with "CDP not up" or "Not signed in", the one-time Chrome setup hasn't run — tell the human to
|
|
27
|
+
run `designer setup` (creates the debug-Chrome profile + login) and stop. Do NOT fall back to a
|
|
28
|
+
blind fetch; the taste loop needs the live browser.
|
|
29
|
+
2. **SpecShip initialized?** `specship status` should succeed. If not, `specship init -i` first.
|
|
30
|
+
|
|
31
|
+
## Phase A — Taste loop (Gate 1)
|
|
32
|
+
|
|
33
|
+
Follow the **`designer-loop` skill** (`~/.claude/skills/designer-loop/SKILL.md`) — it is the
|
|
34
|
+
authority on this loop. The condensed version, if the skill isn't installed:
|
|
35
|
+
|
|
36
|
+
> The human is the designer; Claude Design has taste; you are translation + plumbing. Don't
|
|
37
|
+
> propose your own variants, don't interview about aesthetics — scope questions only.
|
|
38
|
+
|
|
39
|
+
1. **Read the room — capabilities drive the design.** Before relaying any intent, survey the
|
|
40
|
+
target repo for what it actually *does* and feed that into the prompt verbatim. Use
|
|
41
|
+
`specship_explore` / `specship_search` to pull: entities + their fields, operations /
|
|
42
|
+
endpoints, states (loading / empty / error / success), failure modes, hard constraints
|
|
43
|
+
(auth, rate limits), and existing design tokens. The human's intent tells Claude *how*; the
|
|
44
|
+
codebase tells it *what*. Transfer capability facts unabridged — summarizing is filtering.
|
|
45
|
+
2. **Create / resume the session.** `designer_session({ key: "<slug>", action: "create",
|
|
46
|
+
name: "<seed intent>", fidelity: "highfi" })`. Reuse a stable `key` derived from the intent
|
|
47
|
+
so parallel loops don't collide.
|
|
48
|
+
3. **Relay a minimal, faithful prompt.** `designer_prompt({ key, prompt })` — intent +
|
|
49
|
+
capability facts; let Claude's taste make the aesthetic calls. Ask for the variant shape you
|
|
50
|
+
want ("3 full-page files", "states as toggles") and lock any hard brand tokens explicitly.
|
|
51
|
+
4. **Hand the human the URL** returned in `url`. That live surface has working tweak sliders and
|
|
52
|
+
the variant switcher — it is the default taste path. Ask *"what do you think?"*, not
|
|
53
|
+
"accept or reject?".
|
|
54
|
+
5. **Interpret + iterate.** Translate each reaction into the next `designer_prompt` (or a cheap
|
|
55
|
+
`designer_ask` to consult Claude on a small adjustment). Repeat 3–4 until the human says
|
|
56
|
+
**"that's it."** Capture their final reaction verbatim — it goes in the record.
|
|
57
|
+
|
|
58
|
+
Stay in the loop until Gate 1 is explicitly passed. "Almost" is not "yes."
|
|
59
|
+
|
|
60
|
+
## Bridge — promote the chosen design
|
|
61
|
+
|
|
62
|
+
1. `designer_handoff({ key, openFile: "<chosen variant>.html" })`. This fetches the project
|
|
63
|
+
export zip into `./artifacts/<key>/handoff-<ts>/` — `project/*` (all variants + assets) plus
|
|
64
|
+
`decision-record.md` (the verbatim transcript + the human's final reaction). Note the
|
|
65
|
+
**absolute path** of that `handoff-<ts>/` directory and the **chosen variant filename**.
|
|
66
|
+
2. Derive `FILE_LABEL` (human label) and `SLUG` (kebab-case) from the chosen file / intent. If
|
|
67
|
+
the slug is ambiguous, ask the human — one scope question, not an interview.
|
|
68
|
+
|
|
69
|
+
## Phase B — Spec pipeline (Gate 2)
|
|
70
|
+
|
|
71
|
+
Run the bundled workflow against the bundle on disk (no re-fetch, no CDP):
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
specship workflow run claude-design-implement \
|
|
75
|
+
--input HANDOFF_DIR="<absolute path to handoff-<ts>/>" \
|
|
76
|
+
--input CHOSEN_FILE="<chosen variant>.html" \
|
|
77
|
+
--input FILE_LABEL="<File Label>" \
|
|
78
|
+
--input SLUG="<slug>" \
|
|
79
|
+
--json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
(Add `--input OWNER="<team>"` / `--input PRIORITY="high|medium|low"` to populate frontmatter;
|
|
83
|
+
otherwise they default to empty and surface as `[needs review]`.)
|
|
84
|
+
|
|
85
|
+
The workflow runs headless to its approval gate, then **pauses** (status `paused`). It:
|
|
86
|
+
snapshots `project/<chosen>.html` byte-for-byte into `specs/<slug>/snapshot.html`, folds
|
|
87
|
+
`decision-record.md` into `specs/<slug>/source.md`, extracts `specs/<slug>/tokens.css`, and
|
|
88
|
+
drafts the spec.
|
|
89
|
+
|
|
90
|
+
**At the pause (Gate 2):** read the run's approval message / the drafted spec artifact, present
|
|
91
|
+
it to the human, and walk the `[needs review]` markers + gap-fill questions together. Then:
|
|
92
|
+
|
|
93
|
+
- **Approve:** `specship workflow approve <runId> --comment "<gap-fill answers>"` then
|
|
94
|
+
`specship workflow resume <runId>`. The answers are captured into the spec.
|
|
95
|
+
- **Needs changes:** collect the feedback and re-run the workflow (a reject cancels the run;
|
|
96
|
+
existing REQ IDs are preserved across re-imports, so in-flight work survives).
|
|
97
|
+
|
|
98
|
+
## Phase C — Hand off to implementation
|
|
99
|
+
|
|
100
|
+
When the workflow completes it prints the bridge message. Relay it to the human:
|
|
101
|
+
- the spec path `specs/<slug>.md` and its REQ IDs,
|
|
102
|
+
- the reference files (`snapshot.html`, `tokens.css`, `source.md`),
|
|
103
|
+
- the exact next step: **`/ss-spec implement <first REQ ID>`**.
|
|
104
|
+
|
|
105
|
+
Remind them: the implementer reads `snapshot.html` for visual fidelity — the spec is
|
|
106
|
+
contract-only.
|
|
107
|
+
|
|
108
|
+
## Anti-patterns
|
|
109
|
+
|
|
110
|
+
- **Skipping the capability survey.** Designing before reading what the repo *does* produces
|
|
111
|
+
designs that look good and don't fit. Phase A step 1 is load-bearing.
|
|
112
|
+
- **Proposing your own variants / interviewing about taste.** Claude Design proposes; you relay.
|
|
113
|
+
Scope questions only.
|
|
114
|
+
- **Auto-promoting.** Don't `designer_handoff` on every iteration — only once Gate 1 passes.
|
|
115
|
+
- **Re-fetching in the workflow.** Always pass `HANDOFF_DIR` (the bundle you just fetched), never
|
|
116
|
+
`CONNECTOR_URL` — that re-drives Chrome from a headless subprocess and is fragile. The URL path
|
|
117
|
+
is what `/ss-design-implement` is for.
|
|
118
|
+
- **Putting hex/pixels in the spec.** Reference tokens by name; values live in `tokens.css`.
|
|
119
|
+
- **Skipping Gate 2.** The gap-fill questions are where the static design's blind spots (failure
|
|
120
|
+
modes, real-time updates, keyboard order) get closed.
|
|
121
|
+
|
|
122
|
+
If `designer_session` errors with a CDP / sign-in problem, stop and route the human to
|
|
123
|
+
`designer setup` (debug-Chrome profile + login) — this command cannot run the taste loop without
|
|
124
|
+
the live browser. To import a design you've already settled on by URL, use
|
|
125
|
+
`/ss-design-implement <url>` instead.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Reads door — explore a codebase region, trace a flow, or get a change's blast radius. Name the symbols you care about; for a flow name both ends; for impact ask "what breaks if I change X".
|
|
3
|
+
argument-hint: <symbols | flow from→to | "impact of X">
|
|
4
|
+
allowed-tools: mcp__specship__specship_explore, mcp__specship__specship_node, mcp__specship__specship_search, mcp__specship__specship_callers, mcp__specship__specship_callees, mcp__specship__specship_impact
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SpecShip Explore: `$ARGUMENTS`
|
|
8
|
+
|
|
9
|
+
The **reads door** — one entry for every "understand the code" question. Pick the
|
|
10
|
+
behaviour from what `$ARGUMENTS` describes; you do not need a separate command.
|
|
11
|
+
|
|
12
|
+
## With no arguments — a flow worth trying first
|
|
13
|
+
|
|
14
|
+
When `$ARGUMENTS` is empty, first run `specship starter-prompt`. If it prints a
|
|
15
|
+
line, surface it to the user as **"A flow worth trying in this repo: `<line>`"** —
|
|
16
|
+
a concrete starter question they can ask to see retrieval in action — then show
|
|
17
|
+
the guidance below. If it prints nothing, just show the guidance below. (It
|
|
18
|
+
deliberately prints nothing once you've already used retrieval this session.)
|
|
19
|
+
|
|
20
|
+
## Explore an area / "how does X work" (default)
|
|
21
|
+
|
|
22
|
+
Call `mcp__specship__specship_explore` with `$ARGUMENTS` as a bag of symbol names
|
|
23
|
+
(include `Class.method` qualified forms when given). It returns the relevant
|
|
24
|
+
symbols' source grouped by file, plus any flow it can synthesize between them.
|
|
25
|
+
Treat the returned source as already Read — do NOT re-Read files. If a god-file
|
|
26
|
+
truncates, run `specship_explore` again with a tighter symbol bag rather than
|
|
27
|
+
reaching for Read. For one symbol's full body (or an overloaded name), call
|
|
28
|
+
`mcp__specship__specship_node` — it returns every overload in one call.
|
|
29
|
+
|
|
30
|
+
## Trace a flow — "how does X reach Y / the path from X to Y"
|
|
31
|
+
|
|
32
|
+
Call `specship_explore` naming the symbols that span the flow (e.g.
|
|
33
|
+
`mutateElement renderScene`). It surfaces the call path among them, riding
|
|
34
|
+
dynamic-dispatch hops (callbacks, React re-render, JSX children) that grep can't
|
|
35
|
+
follow. Use `specship_search` first if you only have a partial name.
|
|
36
|
+
|
|
37
|
+
## Blast radius — "what breaks if I change X"
|
|
38
|
+
|
|
39
|
+
`mcp__specship__specship_impact` on the symbol for the transitive dependents;
|
|
40
|
+
`specship_callers` / `specship_callees` for one hop in either direction.
|
|
41
|
+
|
|
42
|
+
The index is kept fresh automatically; force a re-index with the `specship sync`
|
|
43
|
+
CLI if a recent edit isn't reflected yet.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Intent door — view, author, fast-path, implement, review, or extend a spec. No arg = the spec funnel; a SPEC_ID = that spec's detail; `new`/`fast`/`implement`/`review`/`triage`/`behaviour`/`domain` run the matching flow.
|
|
3
|
+
argument-hint: "<SPEC_ID> | new <desc> | fast <desc> | implement <ID> | review <ID> | triage <prompt> | behaviour <ID> | domain"
|
|
4
|
+
allowed-tools: Read, Edit, Write, Bash, mcp__specship__specship_spec, mcp__specship__specship_node, mcp__specship__specship_explore, mcp__specship__specship_search, mcp__specship__specship_link_assert, mcp__specship__specship_link_verify
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SpecShip Spec: `$ARGUMENTS`
|
|
8
|
+
|
|
9
|
+
The **intent door** — one entry for the whole spec lifecycle. Route on the first
|
|
10
|
+
token of `$ARGUMENTS`; everything the old `ss-spec*` / `ss-implement` / `ss-triage`
|
|
11
|
+
/ `ss-behaviour` / `ss-domain` commands did is reachable here, with no capability
|
|
12
|
+
lost.
|
|
13
|
+
|
|
14
|
+
## Dispatch
|
|
15
|
+
|
|
16
|
+
- **(no argument)** → call `mcp__specship__specship_spec` with no `spec_id`: the
|
|
17
|
+
project's spec lifecycle funnel (brainstormed ideas → specs → implemented).
|
|
18
|
+
- **a bare `SPEC_ID`** (e.g. `REQ-AUTH-005`) → call `specship_spec` with that
|
|
19
|
+
`spec_id`: the body, parent/siblings, and linked code with state. Use this
|
|
20
|
+
before Read-ing the spec file. Jump into linked code via `specship_node`; if
|
|
21
|
+
nothing is linked yet, `specship_explore` on terms from the spec's title.
|
|
22
|
+
- **`new <description>`** → the full, gated authoring loop (see *Author* below).
|
|
23
|
+
Use when the design isn't settled.
|
|
24
|
+
- **`fast <description>`** → the **fast-path** (see below).
|
|
25
|
+
- **`implement <SPEC_ID>`** → run the bundled workflow:
|
|
26
|
+
`specship workflow run spec-implement --input SPEC_ID=<ID>` (plan → approve →
|
|
27
|
+
implement → verify → link, in an isolated worktree).
|
|
28
|
+
- **`review <SPEC_ID>`** → a read-only rubric pass (see *Review* below); no edits.
|
|
29
|
+
- **`triage <prompt>`** → the triage flow (route a bug / error / one-line
|
|
30
|
+
enhancement to the existing spec it belongs to and append to it): see below.
|
|
31
|
+
- **`behaviour <SPEC_ID>`** → author + run E2E tests from the requirement's
|
|
32
|
+
acceptance criteria; see below.
|
|
33
|
+
- **`domain`** → capture a human-confirmed domain fact; see below.
|
|
34
|
+
|
|
35
|
+
## Author (`new <description>`)
|
|
36
|
+
|
|
37
|
+
The gated authoring loop, run conversationally — diverge, then formalize. Write
|
|
38
|
+
NOTHING to disk until the human explicitly confirms.
|
|
39
|
+
|
|
40
|
+
1. **Scope + ground.** Confirm it's one feature area (refuse "spec the whole
|
|
41
|
+
app"). Call `specship_explore` on terms from the description to find where
|
|
42
|
+
similar features live and which files the work will touch.
|
|
43
|
+
2. **Diverge.** Propose 2–3 distinct approaches with trade-offs, lead with a
|
|
44
|
+
recommendation, and clarify the things the graph can't tell you (UX, edge
|
|
45
|
+
cases, non-goals) **one question at a time**. Iterate until the direction is
|
|
46
|
+
settled.
|
|
47
|
+
3. **Draft + write.** On confirmation, `Write` `specs/<slug>.md` in the
|
|
48
|
+
`spec-author` format: frontmatter (id/title/owner/priority), `<!-- id: -->`
|
|
49
|
+
markers above every heading, an RFC-2119 keyword per requirement title, one
|
|
50
|
+
concern per requirement, `## Acceptance` with `.A<N>` bullets (happy +
|
|
51
|
+
failure). Mark genuinely-unknowable points `[needs review]`.
|
|
52
|
+
4. **Hand off:** `specship sync`, then `/ss-spec review <ID>` and
|
|
53
|
+
`/ss-spec implement <ID>`.
|
|
54
|
+
|
|
55
|
+
(If a richer authoring skill — e.g. `spec-author` — is available in this
|
|
56
|
+
environment, prefer it; this inline flow is the always-present fallback.)
|
|
57
|
+
|
|
58
|
+
## Review (`review <SPEC_ID>`)
|
|
59
|
+
|
|
60
|
+
Read-only — do NOT modify the file. Fetch the spec (`specship_spec`), verify each
|
|
61
|
+
`implementations:` path exists (`specship_node`), then walk the rubric and output
|
|
62
|
+
a numbered findings list grouped **STRUCTURAL** (embedded id markers, no stranded
|
|
63
|
+
ids, unique ids, valid frontmatter, valid `implementations:`), **QUALITY**
|
|
64
|
+
(RFC-2119 keywords, no weasel words, no implementation leak, testable acceptance,
|
|
65
|
+
one concern per REQ, failure-path coverage), **HYGIENE** (owner/priority set, no
|
|
66
|
+
stale `[needs review]`/TODO). End with a one-line verdict.
|
|
67
|
+
|
|
68
|
+
## Fast-path (`fast <description>`)
|
|
69
|
+
|
|
70
|
+
For a solo dev who wants to record intent and move, **without** the brainstorm /
|
|
71
|
+
gap-question interview (REQ-DOORS-002):
|
|
72
|
+
|
|
73
|
+
1. Ground briefly with `specship_explore` on terms from the description (one call).
|
|
74
|
+
2. Draft a complete spec in memory following the `spec-author` format — frontmatter
|
|
75
|
+
(id/title/owner/priority), `<!-- id: -->` markers above every heading, an
|
|
76
|
+
RFC-2119 keyword per requirement, `## Acceptance` with `.A<N>` bullets (happy +
|
|
77
|
+
failure). Pick sensible defaults instead of asking; mark only genuinely
|
|
78
|
+
unknowable points `[needs review]`.
|
|
79
|
+
3. `Write` it to `specs/<slug>.md` and tell the user the path.
|
|
80
|
+
4. Hand off: `specship sync`, then `/ss-spec implement <ID>` when ready.
|
|
81
|
+
|
|
82
|
+
The fast-path still produces a well-formed spec that indexes cleanly and is ready
|
|
83
|
+
for implementation + linking — it trades the interview for speed, not correctness.
|
|
84
|
+
|
|
85
|
+
## Triage (`triage <prompt>`)
|
|
86
|
+
|
|
87
|
+
Classify the input (bug / error log / enhancement). Retrieve candidates: prose →
|
|
88
|
+
`specship_spec` with a `query`; an error log → parse the `file:line`/symbol →
|
|
89
|
+
`specship_explore`/`specship_node` → the owning requirement. Present the ranked
|
|
90
|
+
match + recommended target. **Preview the exact diff → confirm** (offer edit /
|
|
91
|
+
new-spec / cancel), then append a new requirement (new concern) or a new `.A<N>`
|
|
92
|
+
acceptance criterion (a regression an existing requirement should have covered),
|
|
93
|
+
auto-deriving the next collision-checked id, and `specship_link_assert` it. When
|
|
94
|
+
nothing clears the match floor, say so and offer `/ss-spec new` instead — never
|
|
95
|
+
auto-create. Write nothing until confirmed.
|
|
96
|
+
|
|
97
|
+
## Behaviour tests (`behaviour <SPEC_ID>`)
|
|
98
|
+
|
|
99
|
+
Pull the requirement's acceptance criteria and its behaviour surface
|
|
100
|
+
(`specship_spec` with `spec_id` + `behaviour_surface: true` → UI tier / backend
|
|
101
|
+
tier). For **each** acceptance criterion, author a Playwright test when a UI
|
|
102
|
+
exists and/or a backend test, mirroring the repo's existing test conventions.
|
|
103
|
+
**Preview the files → confirm → write**, then `specship_link_assert … kind:tests`
|
|
104
|
+
at the `.A<N>`, run the suite, and `specship_link_verify` each (pass→verified,
|
|
105
|
+
fail→broken; a suite that can't run is reported unrun, never marked broken).
|
|
106
|
+
|
|
107
|
+
## Domain fact (`domain`)
|
|
108
|
+
|
|
109
|
+
Run `specship domain-gaps --json` for the real undocumented entities/specs, ask
|
|
110
|
+
targeted per-type questions, and **only on explicit confirmation** `Write` a
|
|
111
|
+
`domain`-kind fact under `specs/domain/` (frontmatter `id: DOM-<AREA>-NNN`,
|
|
112
|
+
`type:` one of term/rule/decision/constraint, linked via `depends_on`/`parent_id`).
|
|
113
|
+
Then `specship sync`.
|
|
114
|
+
|
|
115
|
+
## After editing code for a spec
|
|
116
|
+
|
|
117
|
+
Call `mcp__specship__specship_link_assert` before reporting done — idempotent, and
|
|
118
|
+
it supersedes the `// @implements REQ-X` comment backstop.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Edit|Write|MultiEdit",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "specship sync --quiet",
|
|
10
|
+
"async": true
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"SessionStart": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "startup|resume",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "specship sync --quiet"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"UserPromptSubmit": [
|
|
27
|
+
{
|
|
28
|
+
"matcher": "",
|
|
29
|
+
"hooks": [
|
|
30
|
+
{
|
|
31
|
+
"type": "command",
|
|
32
|
+
"command": "specship spec-nudge"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EACL,WAAW,EAGX,QAAQ,EACR,WAAW,EACZ,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EACL,WAAW,EAGX,QAAQ,EACR,WAAW,EACZ,MAAM,SAAS,CAAC;AAuajB;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAsBzE;AAgHD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAE9E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAE/E;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAoBjF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CA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AAC,CAOhF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAEzE;AAED,qCAAqC;AACrC,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAEvE;AAsBD,eAAO,MAAM,YAAY,EAAE,WAAoC,CAAC"}
|
|
@@ -124,13 +124,21 @@ function agentsDir(loc) {
|
|
|
124
124
|
return path.join(configDir(loc), 'agents');
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
127
|
+
* Resolve a plugin-asset path (`commands/`, `agents/`, …) the installer copies.
|
|
128
|
+
*
|
|
129
|
+
* In the **bundled** distribution only `dist/` ships, so `copy-assets` stages
|
|
130
|
+
* the asset dirs under `dist/` and we resolve `dist/<seg>` first — `__dirname`
|
|
131
|
+
* is `dist/installer/targets/` in the installed package, so `../../<seg>` →
|
|
132
|
+
* `dist/<seg>`. We fall back to the package/repo **root** (`../../../<seg>`) for
|
|
133
|
+
* the non-bundled package and for dev/test runs, where this file executes from
|
|
134
|
+
* `src/installer/targets/` and the assets live at the repo root. Without the
|
|
135
|
+
* dist-first lookup, a bundled install hits `ENOENT … /commands/ss-explore.md`
|
|
136
|
+
* (INSTALL-BUNDLE-ASSETS-DOC).
|
|
131
137
|
*/
|
|
132
138
|
function packageAssetPath(...segments) {
|
|
133
|
-
|
|
139
|
+
const fromDist = path.join(__dirname, '..', '..', ...segments);
|
|
140
|
+
const fromRoot = path.join(__dirname, '..', '..', '..', ...segments);
|
|
141
|
+
return fs.existsSync(fromDist) ? fromDist : fromRoot;
|
|
134
142
|
}
|
|
135
143
|
// Slash commands are a small set of progressive DOORS (WORKFLOW-DOORS-DOC),
|
|
136
144
|
// split into two TIERS (INSTALL-WEDGE-DOC, REQ-WEDGE-001.A3). The retrieval door
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../src/installer/targets/claude.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAibH,sCAsBC;AAsHD,gDAEC;AAOD,kDAEC;AAED,sDAoBC;AAQD,0CAIC;AAGD,oDAEC;AASD,oDAgBC;AAOD,sDAWC;AAWD,0DAIC;AAcD,0CAEC;AAQD,8CAEC;AAsDD,0CAEC;AASD,8DAIC;AAGD,gEAIC;AAeD,oDAGC;AAWD,oEAOC;AAMD,gDAEC;AAQD,sDAEC;AAGD,kDAEC;AAx0BD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAQzB,qCAQkB;AAClB,oEAMkC;AAElC,SAAS,SAAS,CAAC,GAAa;IAC9B,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC;QACpC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC;AACD,SAAS,WAAW,CAAC,GAAa;IAChC,kEAAkE;IAClE,kEAAkE;IAClE,kEAAkE;IAClE,OAAO,GAAG,KAAK,QAAQ;QACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC;QACzC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;AAC5C,CAAC;AACD;;;;;;GAMG;AACH,SAAS,kBAAkB;IACzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAA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IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAC3C,CAAC;IACD,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAC/D,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjB,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACxC,CAAC;AAEY,QAAA,YAAY,GAAgB,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/statusline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/statusline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAgCzC;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,UAAyB,GAAG,MAAM,CA6BvF"}
|
|
@@ -53,6 +53,7 @@ const directory_1 = require("../directory");
|
|
|
53
53
|
const cache_1 = require("./cache");
|
|
54
54
|
const session_marker_1 = require("./session-marker");
|
|
55
55
|
const active_run_1 = require("./active-run");
|
|
56
|
+
const usage_limits_1 = require("./usage-limits");
|
|
56
57
|
const render_1 = require("./render");
|
|
57
58
|
__exportStar(require("./types"), exports);
|
|
58
59
|
var cache_2 = require("./cache");
|
|
@@ -114,14 +115,23 @@ function buildSegment(rawStdin, noColor = !!process.env.NO_COLOR) {
|
|
|
114
115
|
catch {
|
|
115
116
|
root = null;
|
|
116
117
|
}
|
|
118
|
+
// Usage limits are account-wide (not per-project), so resolve them regardless
|
|
119
|
+
// of whether we found a SpecShip project. Primary source is Claude's own
|
|
120
|
+
// status-line `rate_limits` on stdin (real, includes reset times); an external
|
|
121
|
+
// file is an optional override for setups where stdin lacks them. `now`
|
|
122
|
+
// formats reset times in local time.
|
|
123
|
+
const usage = (0, usage_limits_1.usageFromStatuslineInput)(rawStdin) ?? (0, usage_limits_1.readUsageLimits)();
|
|
124
|
+
const now = Date.now();
|
|
117
125
|
if (!root) {
|
|
118
126
|
// No SpecShip project here — render the idle degraded line.
|
|
119
|
-
return (0, render_1.renderSegment)({ cache: null, marker: null, run: null, noColor });
|
|
127
|
+
return (0, render_1.renderSegment)({ cache: null, marker: null, run: null, usage, now, noColor });
|
|
120
128
|
}
|
|
121
129
|
return (0, render_1.renderSegment)({
|
|
122
130
|
cache: (0, cache_1.readStatuslineCache)(root),
|
|
123
131
|
marker: (0, session_marker_1.readSessionMarker)(root),
|
|
124
132
|
run: (0, active_run_1.readActiveRun)(root),
|
|
133
|
+
usage,
|
|
134
|
+
now,
|
|
125
135
|
noColor,
|
|
126
136
|
});
|
|
127
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/statusline/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/statusline/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDH,oCA6BC;AAlFD,uCAAyB;AACzB,2CAA6B;AAC7B,4CAA4C;AAC5C,mCAA8C;AAC9C,qDAAqD;AACrD,6CAA6C;AAC7C,iDAA2E;AAC3E,qCAAyC;AAEzC,0CAAwB;AACxB,iCAA+C;AAAtC,6GAAA,oBAAoB,OAAA;AAE7B,mDAA8E;AAArE,6GAAA,WAAW,OAAA;AAAE,4GAAA,UAAU,OAAA;AAAE,mHAAA,iBAAiB,OAAA;AACnD,2CAA6E;AAApE,4GAAA,cAAc,OAAA;AAAE,4GAAA,cAAc,OAAA;AAAE,2GAAA,aAAa,OAAA;AACtD,mCAAyC;AAAhC,uGAAA,aAAa,OAAA;AAEtB;;;;;GAKG;AACH,SAAS,uBAAuB,CAAC,QAAgB;IAC/C,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;IACtC,OAAO,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC;YACH,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,wBAAY,CAAC,CAAC;gBAAE,OAAO,OAAO,CAAC;QACtE,CAAC;QAAC,MAAM,CAAC;YACP,kCAAkC;QACpC,CAAC;QACD,IAAI,OAAO,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAClC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED,2EAA2E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AAI,CAAC;QACxB,KAAK;QACL,GAAG;QACH,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -9,11 +9,22 @@
|
|
|
9
9
|
* tokens/cost "saved" figure. The call count is the only usage signal, framed
|
|
10
10
|
* as "N calls" — what specship was asked, not a fabricated counterfactual.
|
|
11
11
|
*/
|
|
12
|
-
import { StatuslineCache, SessionMarker, ActiveRun } from './types';
|
|
12
|
+
import { StatuslineCache, SessionMarker, ActiveRun, UsageLimits } from './types';
|
|
13
13
|
export interface RenderInput {
|
|
14
14
|
cache: StatuslineCache | null;
|
|
15
15
|
marker: SessionMarker | null;
|
|
16
16
|
run: ActiveRun | null;
|
|
17
|
+
/**
|
|
18
|
+
* Real Claude Code usage limits from the external usage file (REQ-STATUSLINE-008),
|
|
19
|
+
* or null/undefined to omit the usage sub-segment entirely. SpecShip never
|
|
20
|
+
* estimates these — null in, nothing rendered.
|
|
21
|
+
*/
|
|
22
|
+
usage?: UsageLimits | null;
|
|
23
|
+
/**
|
|
24
|
+
* Current time (ms epoch) used ONLY to format `usage` reset times in local
|
|
25
|
+
* time; keeps this function pure (no clock). Required when `usage` is present.
|
|
26
|
+
*/
|
|
27
|
+
now?: number;
|
|
17
28
|
/** When true, emit no ANSI escapes. */
|
|
18
29
|
noColor: boolean;
|
|
19
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/statusline/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/statusline/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEjF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7B,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAC;CAClB;AA+CD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAmDxD"}
|
|
@@ -12,6 +12,28 @@
|
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.renderSegment = renderSegment;
|
|
15
|
+
/** A 5-cell art-deco bar (`❮▰▱❯`) depicting `pct` (0-100) capacity used. */
|
|
16
|
+
function bar(pct) {
|
|
17
|
+
const cells = 5;
|
|
18
|
+
const filled = Math.max(0, Math.min(cells, Math.round((pct / 100) * cells)));
|
|
19
|
+
return `❮${'▰'.repeat(filled)}${'▱'.repeat(cells - filled)}❯`;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Format a reset instant in the machine's local timezone: time-only when it
|
|
23
|
+
* falls on the same local day as `now` (e.g. `(4pm)`), date + time otherwise
|
|
24
|
+
* (e.g. `(6/29, 2pm)`). Minutes shown only when non-zero.
|
|
25
|
+
*/
|
|
26
|
+
function formatReset(resetMs, nowMs) {
|
|
27
|
+
const r = new Date(resetMs);
|
|
28
|
+
const n = new Date(nowMs);
|
|
29
|
+
const h = r.getHours();
|
|
30
|
+
const m = r.getMinutes();
|
|
31
|
+
const ampm = h < 12 ? 'am' : 'pm';
|
|
32
|
+
const h12 = h % 12 || 12;
|
|
33
|
+
const time = m === 0 ? `${h12}${ampm}` : `${h12}:${String(m).padStart(2, '0')}${ampm}`;
|
|
34
|
+
const sameDay = r.getFullYear() === n.getFullYear() && r.getMonth() === n.getMonth() && r.getDate() === n.getDate();
|
|
35
|
+
return sameDay ? `(${time})` : `(${r.getMonth() + 1}/${r.getDate()}, ${time})`;
|
|
36
|
+
}
|
|
15
37
|
const ESC = '\u001b';
|
|
16
38
|
// ANSI 256-color palette — the gold deco family, matching the bars.
|
|
17
39
|
const COLOR = {
|
|
@@ -35,7 +57,7 @@ function paint(noColor, code, s) {
|
|
|
35
57
|
* a minimal `◈ specship … ◈` when caches are absent rather than erroring.
|
|
36
58
|
*/
|
|
37
59
|
function renderSegment(input) {
|
|
38
|
-
const { cache, marker, run, noColor } = input;
|
|
60
|
+
const { cache, marker, run, usage, now, noColor } = input;
|
|
39
61
|
const c = (code, s) => paint(noColor, code, s);
|
|
40
62
|
const orn = c(COLOR.orn, '◈');
|
|
41
63
|
const sep = c(COLOR.frame, ' ◆ ');
|
|
@@ -67,6 +89,18 @@ function renderSegment(input) {
|
|
|
67
89
|
const label = run.specId ? `${run.specId}·${run.status}` : run.status;
|
|
68
90
|
parts.push(c(COLOR.run, label));
|
|
69
91
|
}
|
|
92
|
+
// Usage-limit sub-segment (REQ-STATUSLINE-008) — ONLY for windows with real
|
|
93
|
+
// numbers; SpecShip never estimates. `now` formats reset times in local time.
|
|
94
|
+
if (usage && now != null) {
|
|
95
|
+
const win = (label, w) => {
|
|
96
|
+
if (!w)
|
|
97
|
+
return;
|
|
98
|
+
const reset = Number.isFinite(w.resetAt) ? ` ${formatReset(w.resetAt, now)}` : '';
|
|
99
|
+
parts.push(c(COLOR.calls, `${label} ${bar(w.pctUsed)} ${Math.round(w.pctUsed)}%${reset}`));
|
|
100
|
+
};
|
|
101
|
+
win('5h', usage.session);
|
|
102
|
+
win('7d', usage.weekly);
|
|
103
|
+
}
|
|
70
104
|
return `${orn} ${brand}${sep}${parts.join(sep)} ${orn}`;
|
|
71
105
|
}
|
|
72
106
|
//# sourceMappingURL=render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/statusline/render.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/statusline/render.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAwEH,sCAmDC;AApGD,4EAA4E;AAC5E,SAAS,GAAG,CAAC,GAAW;IACtB,MAAM,KAAK,GAAG,CAAC,CAAC;IAChB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7E,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC;AAChE,CAAC;AAED;;;;GAIG;AACH,SAAS,WAAW,CAAC,OAAe,EAAE,KAAa;IACjD,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5B,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IACvB,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAClC,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAA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AK,EAAE,CAAC,CAAC,CAAC;QAC7F,CAAC,CAAC;QACF,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACzB,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,GAAG,GAAG,IAAI,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -54,6 +54,30 @@ export interface SessionMarker {
|
|
|
54
54
|
/** ms epoch of the most recent call, or null before the first call. */
|
|
55
55
|
lastAt: number | null;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* A single rolling-window usage limit, as written by the external usage tool
|
|
59
|
+
* (REQ-STATUSLINE-008). SpecShip never computes these — it reflects the file.
|
|
60
|
+
*/
|
|
61
|
+
export interface UsageWindow {
|
|
62
|
+
/** 0-100, percent of this window's capacity consumed (Claude's `used_percentage`). */
|
|
63
|
+
pctUsed: number;
|
|
64
|
+
/** ms epoch when this window resets (from `resets_at` epoch-s / the file's ISO `resetAt`). */
|
|
65
|
+
resetAt: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Validated usage-limit data. The primary source is Claude Code's status-line
|
|
69
|
+
* stdin `rate_limits` object; an external file (`$SPECSHIP_USAGE_FILE` /
|
|
70
|
+
* `~/.specship/usage-limits.json`) is an optional override. Either window may be
|
|
71
|
+
* independently absent (the docs note `five_hour`/`seven_day` can each be
|
|
72
|
+
* missing); a window is `null` when its data isn't present. The whole object is
|
|
73
|
+
* null when neither window is available, and the segment omits the sub-segment.
|
|
74
|
+
*/
|
|
75
|
+
export interface UsageLimits {
|
|
76
|
+
/** The 5-hour rolling session window, or null when absent. */
|
|
77
|
+
session: UsageWindow | null;
|
|
78
|
+
/** The weekly (7-day) window, or null when absent. */
|
|
79
|
+
weekly: UsageWindow | null;
|
|
80
|
+
}
|
|
57
81
|
/** The active (or most recent) workflow run for the project. */
|
|
58
82
|
export interface ActiveRun {
|
|
59
83
|
v: 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/statusline/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,CAAC,EAAE,CAAC,CAAC;IACL,yDAAyD;IACzD,WAAW,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,+EAA+E;AAC/E,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,CAAC,CAAC;IACL,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,uEAAuE;IACvE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,gEAAgE;AAChE,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,CAAC,CAAC;IACL,8DAA8D;IAC9D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,wFAAwF;IACxF,MAAM,EAAE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DAA8D;IAC9D,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,sDAAsD;IACtD,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;CAC5B;AAED,gEAAgE;AAChE,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,CAAC,CAAC;IACL,8DAA8D;IAC9D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Usage-limit reader (REQ-STATUSLINE-008).
|
|
3
|
+
*
|
|
4
|
+
* The PRIMARY source is Claude Code's status-line stdin `rate_limits` object,
|
|
5
|
+
* which carries real per-window `used_percentage` and `resets_at` (Unix epoch
|
|
6
|
+
* seconds) for `five_hour` and `seven_day` (Pro/Max only, after the first API
|
|
7
|
+
* response; windows independently optional) — see `usageFromStatuslineInput`.
|
|
8
|
+
*
|
|
9
|
+
* An external file (`$SPECSHIP_USAGE_FILE` / `~/.specship/usage-limits.json`) is
|
|
10
|
+
* an OPTIONAL override read by `readUsageLimits`, for setups where the stdin
|
|
11
|
+
* `rate_limits` aren't present.
|
|
12
|
+
*
|
|
13
|
+
* Either way SpecShip never estimates: a window with no real data is null and
|
|
14
|
+
* the segment omits it. Read path only — bounded reads, no database, no
|
|
15
|
+
* subprocess, no network (same budget as REQ-STATUSLINE-002).
|
|
16
|
+
*/
|
|
17
|
+
import { UsageLimits } from './types';
|
|
18
|
+
/**
|
|
19
|
+
* Parse Claude Code's status-line stdin JSON into usage limits. Maps each
|
|
20
|
+
* window's `used_percentage` to percent-REMAINING and `resets_at` (epoch
|
|
21
|
+
* seconds) to ms. Returns null when `rate_limits` is absent or unparseable;
|
|
22
|
+
* either window may be independently null.
|
|
23
|
+
*/
|
|
24
|
+
export declare function usageFromStatuslineInput(raw: string): UsageLimits | null;
|
|
25
|
+
export interface ReadUsageOptions {
|
|
26
|
+
/** Override the file path (defaults to `$SPECSHIP_USAGE_FILE` or `~/.specship/usage-limits.json`). */
|
|
27
|
+
file?: string;
|
|
28
|
+
/** Current time in ms epoch (defaults to `Date.now()`); injectable for tests. */
|
|
29
|
+
now?: number;
|
|
30
|
+
/** Freshness window in ms (defaults to 15 minutes). */
|
|
31
|
+
freshnessMs?: number;
|
|
32
|
+
}
|
|
33
|
+
/** The well-known usage file an external tool writes. */
|
|
34
|
+
export declare function usageFilePath(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Read + validate the usage file. Returns validated, fresh limits, or null when
|
|
37
|
+
* the data is not real (absent / unreadable / bad JSON / missing field / stale).
|
|
38
|
+
*/
|
|
39
|
+
export declare function readUsageLimits(opts?: ReadUsageOptions): UsageLimits | null;
|
|
40
|
+
//# sourceMappingURL=usage-limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-limits.d.ts","sourceRoot":"","sources":["../../src/statusline/usage-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,EAAE,WAAW,EAAe,MAAM,SAAS,CAAC;AAEnD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAcxE;AAiBD,MAAM,WAAW,gBAAgB;IAC/B,sGAAsG;IACtG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,yDAAyD;AACzD,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAYD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,GAAE,gBAAqB,GAAG,WAAW,GAAG,IAAI,CA4B/E"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Usage-limit reader (REQ-STATUSLINE-008).
|
|
4
|
+
*
|
|
5
|
+
* The PRIMARY source is Claude Code's status-line stdin `rate_limits` object,
|
|
6
|
+
* which carries real per-window `used_percentage` and `resets_at` (Unix epoch
|
|
7
|
+
* seconds) for `five_hour` and `seven_day` (Pro/Max only, after the first API
|
|
8
|
+
* response; windows independently optional) — see `usageFromStatuslineInput`.
|
|
9
|
+
*
|
|
10
|
+
* An external file (`$SPECSHIP_USAGE_FILE` / `~/.specship/usage-limits.json`) is
|
|
11
|
+
* an OPTIONAL override read by `readUsageLimits`, for setups where the stdin
|
|
12
|
+
* `rate_limits` aren't present.
|
|
13
|
+
*
|
|
14
|
+
* Either way SpecShip never estimates: a window with no real data is null and
|
|
15
|
+
* the segment omits it. Read path only — bounded reads, no database, no
|
|
16
|
+
* subprocess, no network (same budget as REQ-STATUSLINE-002).
|
|
17
|
+
*/
|
|
18
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
22
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23
|
+
}
|
|
24
|
+
Object.defineProperty(o, k2, desc);
|
|
25
|
+
}) : (function(o, m, k, k2) {
|
|
26
|
+
if (k2 === undefined) k2 = k;
|
|
27
|
+
o[k2] = m[k];
|
|
28
|
+
}));
|
|
29
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
30
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
31
|
+
}) : function(o, v) {
|
|
32
|
+
o["default"] = v;
|
|
33
|
+
});
|
|
34
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
35
|
+
var ownKeys = function(o) {
|
|
36
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
37
|
+
var ar = [];
|
|
38
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
39
|
+
return ar;
|
|
40
|
+
};
|
|
41
|
+
return ownKeys(o);
|
|
42
|
+
};
|
|
43
|
+
return function (mod) {
|
|
44
|
+
if (mod && mod.__esModule) return mod;
|
|
45
|
+
var result = {};
|
|
46
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
47
|
+
__setModuleDefault(result, mod);
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
50
|
+
})();
|
|
51
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
+
exports.usageFromStatuslineInput = usageFromStatuslineInput;
|
|
53
|
+
exports.usageFilePath = usageFilePath;
|
|
54
|
+
exports.readUsageLimits = readUsageLimits;
|
|
55
|
+
const fs = __importStar(require("fs"));
|
|
56
|
+
const os = __importStar(require("os"));
|
|
57
|
+
const path = __importStar(require("path"));
|
|
58
|
+
/**
|
|
59
|
+
* Parse Claude Code's status-line stdin JSON into usage limits. Maps each
|
|
60
|
+
* window's `used_percentage` to percent-REMAINING and `resets_at` (epoch
|
|
61
|
+
* seconds) to ms. Returns null when `rate_limits` is absent or unparseable;
|
|
62
|
+
* either window may be independently null.
|
|
63
|
+
*/
|
|
64
|
+
function usageFromStatuslineInput(raw) {
|
|
65
|
+
let json;
|
|
66
|
+
try {
|
|
67
|
+
json = JSON.parse(raw);
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const rl = json.rate_limits;
|
|
73
|
+
if (!rl || typeof rl !== 'object')
|
|
74
|
+
return null;
|
|
75
|
+
const rec = rl;
|
|
76
|
+
const session = windowFromRateLimit(rec.five_hour);
|
|
77
|
+
const weekly = windowFromRateLimit(rec.seven_day);
|
|
78
|
+
if (!session && !weekly)
|
|
79
|
+
return null;
|
|
80
|
+
return { session, weekly };
|
|
81
|
+
}
|
|
82
|
+
/** One `rate_limits.{five_hour,seven_day}` entry → a remaining-capacity window. */
|
|
83
|
+
function windowFromRateLimit(w) {
|
|
84
|
+
if (!w || typeof w !== 'object')
|
|
85
|
+
return null;
|
|
86
|
+
const rec = w;
|
|
87
|
+
const used = rec.used_percentage;
|
|
88
|
+
if (typeof used !== 'number' || !Number.isFinite(used))
|
|
89
|
+
return null;
|
|
90
|
+
const pctUsed = Math.max(0, Math.min(100, used));
|
|
91
|
+
// resets_at is Unix epoch SECONDS; may be absent → NaN (bar shows, reset omitted).
|
|
92
|
+
const resetAt = typeof rec.resets_at === 'number' && Number.isFinite(rec.resets_at) ? rec.resets_at * 1000 : NaN;
|
|
93
|
+
return { pctUsed, resetAt };
|
|
94
|
+
}
|
|
95
|
+
/** Default freshness window: data older than this is treated as not-real. */
|
|
96
|
+
const DEFAULT_FRESHNESS_MS = 15 * 60 * 1000;
|
|
97
|
+
/** The well-known usage file an external tool writes. */
|
|
98
|
+
function usageFilePath() {
|
|
99
|
+
return process.env.SPECSHIP_USAGE_FILE || path.join(os.homedir(), '.specship', 'usage-limits.json');
|
|
100
|
+
}
|
|
101
|
+
function parseWindow(w) {
|
|
102
|
+
if (!w || typeof w !== 'object')
|
|
103
|
+
return null;
|
|
104
|
+
const rec = w;
|
|
105
|
+
const pct = rec.pctUsed;
|
|
106
|
+
if (typeof pct !== 'number' || !Number.isFinite(pct) || pct < 0 || pct > 100)
|
|
107
|
+
return null;
|
|
108
|
+
const reset = typeof rec.resetAt === 'string' ? Date.parse(rec.resetAt) : NaN;
|
|
109
|
+
if (!Number.isFinite(reset))
|
|
110
|
+
return null;
|
|
111
|
+
return { pctUsed: pct, resetAt: reset };
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Read + validate the usage file. Returns validated, fresh limits, or null when
|
|
115
|
+
* the data is not real (absent / unreadable / bad JSON / missing field / stale).
|
|
116
|
+
*/
|
|
117
|
+
function readUsageLimits(opts = {}) {
|
|
118
|
+
const file = opts.file ?? usageFilePath();
|
|
119
|
+
const now = opts.now ?? Date.now();
|
|
120
|
+
const freshnessMs = opts.freshnessMs ?? DEFAULT_FRESHNESS_MS;
|
|
121
|
+
let raw;
|
|
122
|
+
try {
|
|
123
|
+
raw = fs.readFileSync(file, 'utf8');
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return null; // absent / unreadable
|
|
127
|
+
}
|
|
128
|
+
let json;
|
|
129
|
+
try {
|
|
130
|
+
json = JSON.parse(raw);
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
return null; // not valid JSON
|
|
134
|
+
}
|
|
135
|
+
const updated = typeof json.updatedAt === 'string' ? Date.parse(json.updatedAt) : NaN;
|
|
136
|
+
if (!Number.isFinite(updated))
|
|
137
|
+
return null;
|
|
138
|
+
if (now - updated > freshnessMs)
|
|
139
|
+
return null; // stale
|
|
140
|
+
const session = parseWindow(json.session);
|
|
141
|
+
const weekly = parseWindow(json.weekly);
|
|
142
|
+
if (!session || !weekly)
|
|
143
|
+
return null; // incomplete
|
|
144
|
+
return { session, weekly };
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=usage-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-limits.js","sourceRoot":"","sources":["../../src/statusline/usage-limits.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaH,4DAcC;AA2BD,sCAEC;AAgBD,0CA4BC;AAlGD,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAG7B;;;;;GAKG;AACH,SAAgB,wBAAwB,CAAC,GAAW;IAClD,IAAI,IAA6B,CAAC;IAClC,IAAI,CAAC;QACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;I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,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,CAAC,sBAAsB;IACrC,CAAC;IAED,IAAI,IAA6B,CAAC;IAClC,IAAI,CAAC;QACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,CAAC,iBAAiB;IAChC,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACtF,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,IAAI,GAAG,GAAG,OAAO,GAAG,WAAW;QAAE,OAAO,IAAI,CAAC,CAAC,QAAQ;IAEtD,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC,CAAC,aAAa;IAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC"}
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@specship/specship",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"description": "Supercharge Claude Code with semantic code intelligence. 94% fewer tool calls • 77% faster exploration • 100% local.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"build:server": "node scripts/build-server-bundle.mjs",
|
|
23
23
|
"build:web": "node scripts/build-web-bundle.mjs",
|
|
24
24
|
"preuninstall": "node dist/bin/uninstall.js",
|
|
25
|
-
"copy-assets": "node -e \"const fs=require('fs');fs.mkdirSync('dist/db',{recursive:true});fs.copyFileSync('src/db/schema.sql','dist/db/schema.sql');fs.mkdirSync('dist/extraction/wasm',{recursive:true});fs.readdirSync('src/extraction/wasm').filter(f=>f.endsWith('.wasm')).forEach(f=>fs.copyFileSync('src/extraction/wasm/'+f,'dist/extraction/wasm/'+f));try{fs.mkdirSync('dist/workflows/defaults',{recursive:true});fs.readdirSync('src/workflows/defaults').filter(f=>/\\.ya?ml$/i.test(f)).forEach(f=>fs.copyFileSync('src/workflows/defaults/'+f,'dist/workflows/defaults/'+f))}catch(e){}\"",
|
|
25
|
+
"copy-assets": "node -e \"const fs=require('fs');fs.mkdirSync('dist/db',{recursive:true});fs.copyFileSync('src/db/schema.sql','dist/db/schema.sql');fs.mkdirSync('dist/extraction/wasm',{recursive:true});fs.readdirSync('src/extraction/wasm').filter(f=>f.endsWith('.wasm')).forEach(f=>fs.copyFileSync('src/extraction/wasm/'+f,'dist/extraction/wasm/'+f));try{fs.mkdirSync('dist/workflows/defaults',{recursive:true});fs.readdirSync('src/workflows/defaults').filter(f=>/\\.ya?ml$/i.test(f)).forEach(f=>fs.copyFileSync('src/workflows/defaults/'+f,'dist/workflows/defaults/'+f))}catch(e){};['commands','agents','hooks','.claude-plugin'].forEach(d=>{try{fs.cpSync(d,'dist/'+d,{recursive:true})}catch(e){}})\"",
|
|
26
26
|
"dev": "tsc --watch",
|
|
27
27
|
"cli": "npm run build && node dist/bin/specship.js",
|
|
28
28
|
"test": "vitest run",
|