ai-spector 0.4.3 → 0.4.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/package.json +1 -1
- package/scaffold/cursor/skills/README.md +0 -1
- package/scaffold/cursor/skills/_skill-router.md +2 -4
- package/scaffold/cursor/skills/ai-spector/SKILL.md +1 -2
- package/scaffold/cursor/skills/ai-spector/references/generate-graph.md +4 -4
- package/scaffold/cursor/skills/ai-spector/references/generate-workflow.md +1 -1
- package/scaffold/cursor/skills/ai-spector/references/project-conventions.md +0 -1
- package/scaffold/cursor/skills/ai-spector-generate/SKILL.md +3 -7
- package/scaffold/cursor/skills/ai-spector-generate-basic-design/SKILL.md +1 -1
- package/scaffold/cursor/skills/ai-spector-generate-basic-design/references/runbook.md +1 -1
- package/scaffold/cursor/skills/ai-spector-generate-prototype/SKILL.md +2 -2
- package/scaffold/cursor/skills/ai-spector-generate-prototype/references/prototype-graph-context.md +1 -1
- package/scaffold/cursor/skills/ai-spector-generate-prototype/references/runbook.md +4 -2
- package/scaffold/cursor/skills/ai-spector-generate-prototype/references/theme-picker.md +2 -0
- package/scaffold/cursor/skills/ai-spector-generate-srs/SKILL.md +1 -1
- package/scaffold/cursor/skills/ai-spector-graph/SKILL.md +1 -2
- package/scaffold/cursor/skills/ai-spector-generate-detail-design/SKILL.md +0 -31
- package/scaffold/cursor/skills/ai-spector-generate-detail-design/references/runbook.md +0 -60
package/package.json
CHANGED
|
@@ -14,7 +14,6 @@ Enable **every** folder under `.cursor/skills/` in Cursor (Settings → Rules
|
|
|
14
14
|
| Analyze, index, validate graph, impact, visualize | `ai-spector-graph` |
|
|
15
15
|
| SRS / requirements | `ai-spector-generate-srs` |
|
|
16
16
|
| Screens, APIs, DB basic design | `ai-spector-generate-basic-design` |
|
|
17
|
-
| Detail / implementation design | `ai-spector-generate-detail-design` |
|
|
18
17
|
| HTML prototype | `ai-spector-generate-prototype` |
|
|
19
18
|
| Review comments | `ai-spector-resolve-comments` |
|
|
20
19
|
| Unsure | `ai-spector` (core) |
|
|
@@ -6,7 +6,7 @@ Agents use this when intent is ambiguous.
|
|
|
6
6
|
|
|
7
7
|
1. **File context** — `paths` in skill frontmatter (e.g. `prototype/**` → prototype skill).
|
|
8
8
|
2. **Natural language** — match skill `description`; then read that skill’s `references/` runbook.
|
|
9
|
-
3. **Still unclear** — `ai-spector` core + one question (graph vs SRS vs basic design vs
|
|
9
|
+
3. **Still unclear** — `ai-spector` core + one question (graph vs SRS vs basic design vs prototype vs comments).
|
|
10
10
|
|
|
11
11
|
## Task → skill → runbook
|
|
12
12
|
|
|
@@ -22,8 +22,7 @@ Agents use this when intent is ambiguous.
|
|
|
22
22
|
| doc summaries | `ai-spector-graph` | `references/summary.md` |
|
|
23
23
|
| SRS, use cases, features, requirements | `ai-spector-generate-srs` | `references/runbook.md` |
|
|
24
24
|
| screens, APIs, wireframes, basic design | `ai-spector-generate-basic-design` | `references/runbook.md` |
|
|
25
|
-
|
|
|
26
|
-
| HTML prototype | “HTML prototype”, “mockup screens”, “prototype with stripe theme” | `ai-spector-generate-prototype` | `references/runbook.md`, `references/theme-picker.md` |
|
|
25
|
+
| HTML prototype | `ai-spector-generate-prototype` | `references/runbook.md` |
|
|
27
26
|
| review comments, C-001, inbox | `ai-spector-resolve-comments` | `references/runbook.md` |
|
|
28
27
|
| “generate docs” (no layer named) | `ai-spector-generate` | route to one skill above |
|
|
29
28
|
|
|
@@ -34,7 +33,6 @@ Shared: [ai-spector/references/cli-failures.md](./ai-spector/references/cli-fail
|
|
|
34
33
|
```text
|
|
35
34
|
analyze → validate graph → generate SRS → index
|
|
36
35
|
→ generate basic design → index
|
|
37
|
-
→ generate detail design
|
|
38
36
|
→ prototype setup → generate HTML screens
|
|
39
37
|
```
|
|
40
38
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Provides shared rules for AI Spector docflow projects: CLI failure handling, traceability graph path,
|
|
5
5
|
and routing to task skills. Use when the user mentions ai-spector, docflow, or .ai-spector but the
|
|
6
6
|
task is unclear, or for init and project layout. Do not use when the user clearly wants SRS,
|
|
7
|
-
basic design,
|
|
7
|
+
basic design, HTML prototype, graph operations, or comment resolution — use the
|
|
8
8
|
matching task skill instead.
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -36,7 +36,6 @@ When `ai-spector` exits non-zero, required `--json` is invalid, or a required MC
|
|
|
36
36
|
| Analyze, index, validate, impact, visualize | `ai-spector-graph` |
|
|
37
37
|
| SRS | `ai-spector-generate-srs` |
|
|
38
38
|
| Basic design | `ai-spector-generate-basic-design` |
|
|
39
|
-
| Detail design | `ai-spector-generate-detail-design` |
|
|
40
39
|
| Prototype | `ai-spector-generate-prototype` |
|
|
41
40
|
| Comments | `ai-spector-resolve-comments` |
|
|
42
41
|
| “Generate docs” (vague) | `ai-spector-generate` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Graph-first generation (shared)
|
|
2
2
|
|
|
3
|
-
Used by **SRS
|
|
3
|
+
Used by **SRS** and **basic design** generation skills.
|
|
4
4
|
|
|
5
5
|
| Orchestration (scope, confirm, wave checklist, finish) | [generate-workflow.md](./generate-workflow.md) |
|
|
6
6
|
| Per-command DAG + intent tables | each skill's `references/runbook.md` |
|
|
@@ -71,9 +71,9 @@ ai-spector graph impact <targetSeedId> --change content_change --json
|
|
|
71
71
|
### D. Write
|
|
72
72
|
|
|
73
73
|
- Read template from `.ai-spector/templates/` (DAG `template` field). If missing → stop and ask user to run `npx ai-spector init`.
|
|
74
|
-
- **Before filling the template**,
|
|
75
|
-
- SRS targets →
|
|
76
|
-
- Basic design targets →
|
|
74
|
+
- **Before filling the template**, load the matching context section for this doc type:
|
|
75
|
+
- SRS targets → `srs-context/<section>.md` (see SRS runbook for the table)
|
|
76
|
+
- Basic design targets → `bd-context/<doc-type>.md` (see BD runbook for the table)
|
|
77
77
|
- Prototype screens → [prototype-graph-context.md](../../ai-spector-generate-prototype/references/prototype-graph-context.md)
|
|
78
78
|
- Fill for this target only; keep all required headings; replace placeholders with graph-backed content.
|
|
79
79
|
- Cross-check every UC/F reference against `nodes` from query JSON.
|
|
@@ -16,7 +16,6 @@ Missing templates → `npx ai-spector init --force`.
|
|
|
16
16
|
| Source input | `docs/data-source/` |
|
|
17
17
|
| SRS | `docs/srs/` |
|
|
18
18
|
| Basic design | `docs/basic-design/` |
|
|
19
|
-
| Detail design | `docs/detail-design/` |
|
|
20
19
|
| HTML prototype | `prototype/src/` |
|
|
21
20
|
|
|
22
21
|
## Document language
|
|
@@ -2,20 +2,16 @@
|
|
|
2
2
|
name: ai-spector-generate
|
|
3
3
|
description: >-
|
|
4
4
|
Routes ambiguous document-generation requests to the correct AI Spector layer skill (SRS, basic
|
|
5
|
-
design,
|
|
6
|
-
|
|
7
|
-
detail design, or prototype HTML.
|
|
5
|
+
design, or HTML prototype). Use only when the user says generate docs or generate requirements
|
|
6
|
+
without naming a layer. Do not use when the request clearly targets SRS, screens, APIs, or prototype HTML.
|
|
8
7
|
---
|
|
9
8
|
|
|
10
9
|
# AI Spector — Generate (router)
|
|
11
10
|
|
|
12
|
-
Ask one question or infer from context, then **switch skill** and read that skill
|
|
11
|
+
Ask one question or infer from context, then **switch skill** and read that skill's runbook:
|
|
13
12
|
|
|
14
13
|
| Layer | Skill |
|
|
15
14
|
|-------|-------|
|
|
16
15
|
| Requirements / SRS | `ai-spector-generate-srs` |
|
|
17
16
|
| Screens, APIs, DB | `ai-spector-generate-basic-design` |
|
|
18
|
-
| Implementation detail | `ai-spector-generate-detail-design` |
|
|
19
17
|
| HTML mockups | `ai-spector-generate-prototype` |
|
|
20
|
-
|
|
21
|
-
**Core:** [../ai-spector/SKILL.md](../ai-spector/SKILL.md) · **Pipeline:** [../../WORKFLOW.md](../../WORKFLOW.md)
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Generates or updates basic design documents from the traceability graph and SRS: screen list and
|
|
5
5
|
screen details, API list and endpoint details, database design under docs/basic-design/. Use when
|
|
6
6
|
the user asks for basic design, wireframes, screen map, API design, ERD, or list-screens.md. Do not
|
|
7
|
-
use for SRS-only work,
|
|
7
|
+
use for SRS-only work, HTML prototype, or graph analyze/index without doc generation.
|
|
8
8
|
paths:
|
|
9
9
|
- "docs/basic-design/**"
|
|
10
10
|
- ".ai-spector/templates/basic_design/**"
|
|
@@ -89,7 +89,7 @@ Execution checklist: [generate-workflow.md](../../ai-spector/references/generate
|
|
|
89
89
|
## Finish
|
|
90
90
|
|
|
91
91
|
- Last wave already ran validate + index → final validate only; else run both again.
|
|
92
|
-
- Suggest **`/summary basic-design`**
|
|
92
|
+
- Suggest **`/summary basic-design`** when workflow lists it.
|
|
93
93
|
|
|
94
94
|
Log: `.ai-spector/.docflow/logs/generate-basic-design.log`.
|
|
95
95
|
|
|
@@ -5,7 +5,7 @@ description: >-
|
|
|
5
5
|
Use when the user asks for HTML prototype, screen mockups, or prototype/src files. When no theme is
|
|
6
6
|
stored, recommends 3 best-fit themes from project context, opens preview samples in the browser,
|
|
7
7
|
and waits for the user to choose before setup. Uses stored preference on subsequent runs. Do not use
|
|
8
|
-
for markdown SRS/basic
|
|
8
|
+
for markdown SRS/basic design only, or graph operations without HTML output.
|
|
9
9
|
paths:
|
|
10
10
|
- "prototype/**"
|
|
11
11
|
---
|
|
@@ -20,7 +20,7 @@ paths:
|
|
|
20
20
|
| Situation | Load |
|
|
21
21
|
|---|---|
|
|
22
22
|
| Language not set | [../ai-spector/references/language-picker.md](../ai-spector/references/language-picker.md) |
|
|
23
|
-
| No theme stored | [references/theme-picker.md](references/theme-picker.md) |
|
|
23
|
+
| No theme stored — **must confirm before setup** | [references/theme-picker.md](references/theme-picker.md) |
|
|
24
24
|
| No basic auth stored | [references/auth-picker.md](references/auth-picker.md) |
|
|
25
25
|
| Before writing each screen HTML | [references/prototype-graph-context.md](references/prototype-graph-context.md) |
|
|
26
26
|
| Run of 5+ screens | [../ai-spector/references/context-management.md](../ai-spector/references/context-management.md) |
|
package/scaffold/cursor/skills/ai-spector-generate-prototype/references/prototype-graph-context.md
CHANGED
|
@@ -36,7 +36,7 @@ ai-spector graph query F-<n> --direction both --depth 3 --edges CONTEXT --json
|
|
|
36
36
|
|
|
37
37
|
Extract:
|
|
38
38
|
- **Functional requirements** listed under the feature → must-have UI behaviours
|
|
39
|
-
- **Field definitions** (`rendersTo` →
|
|
39
|
+
- **Field definitions** (`rendersTo` → docs if present)
|
|
40
40
|
- **Business rules** (validation, conditional visibility, permissions)
|
|
41
41
|
- **Actor** that performs / views this feature → drives role-based UI variants
|
|
42
42
|
|
|
@@ -53,14 +53,16 @@ ai-spector prototype auth --from-config
|
|
|
53
53
|
3. `prototype/manifest.json` → `themeName` (non-empty)
|
|
54
54
|
4. `.ai-spector/.docflow/config/prototype.config.json` → `defaultTheme`
|
|
55
55
|
|
|
56
|
-
**If no stored theme is found** and the user did **not** name one in this request, run the **[theme picker](theme-picker.md)
|
|
56
|
+
**If no stored theme is found** and the user did **not** name one in this request, run the **[theme picker](theme-picker.md)**.
|
|
57
|
+
|
|
58
|
+
> **Do not auto-select.** Using project context to guess a theme and proceeding without a user reply is wrong — even if the rationale seems obvious. The agent's job is to recommend, not decide.
|
|
57
59
|
|
|
58
60
|
Summary of the picker:
|
|
59
61
|
|
|
60
62
|
1. Read project context (SRS, list-screens §1, knowledge, data-source).
|
|
61
63
|
2. `ai-spector prototype themes --json` — pick **3 best-fit** themes with one-line rationale each.
|
|
62
64
|
3. `ai-spector prototype preview <name> --open` for all 3 — user compares in the browser.
|
|
63
|
-
4. Post a numbered table; **wait for user
|
|
65
|
+
4. Post a numbered table; **stop and wait for user reply** — a number, a name, or “use that one” — before running any further command.
|
|
64
66
|
|
|
65
67
|
Once the user confirms (or named a theme upfront), proceed with setup; the choice is persisted and will not be asked again.
|
|
66
68
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Theme picker — recommend, preview, confirm
|
|
2
2
|
|
|
3
|
+
> **Hard rule: never auto-select a theme.** Inferring from project context is allowed only to produce 3 *recommendations*. The user must explicitly choose (by number, name, or "use that one") before `prototype setup` runs. Auto-picking and explaining the choice afterward is not acceptable.
|
|
4
|
+
|
|
3
5
|
When **no theme is stored** and the user did **not** name one in this request, run this flow **before** `prototype setup`. Do not generate HTML until the user confirms a theme.
|
|
4
6
|
|
|
5
7
|
Skip this flow when:
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Generates or updates the System Requirements Specification from the traceability graph and
|
|
5
5
|
docs/data-source context. Use when the user asks to generate or update SRS, requirements, use cases
|
|
6
6
|
(UC-xx), features (F-xx), or files under docs/srs/. Do not use for basic design screens/APIs,
|
|
7
|
-
|
|
7
|
+
HTML prototype, or graph-only analyze/index tasks.
|
|
8
8
|
paths:
|
|
9
9
|
- "docs/srs/**"
|
|
10
10
|
- ".ai-spector/templates/srs/**"
|
|
@@ -4,8 +4,7 @@ description: >-
|
|
|
4
4
|
Runs AI Spector traceability graph operations: analyze data-source, index refresh, graph validate,
|
|
5
5
|
impact and regen scope, visualize, semantic link-graph, knowledge.json. Use when
|
|
6
6
|
the user asks to analyze sources, refresh or validate the graph, see impact of changes, visualize
|
|
7
|
-
traceability, or re-index after edits. Do not use for writing SRS, basic design,
|
|
8
|
-
HTML prototype content.
|
|
7
|
+
traceability, or re-index after edits. Do not use for writing SRS, basic design, or HTML prototype content.
|
|
9
8
|
paths:
|
|
10
9
|
- ".ai-spector/graph/**"
|
|
11
10
|
- ".ai-spector/.docflow/**"
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-spector-generate-detail-design
|
|
3
|
-
description: >-
|
|
4
|
-
Generates or updates detail design and implementation specification documents under
|
|
5
|
-
docs/detail-design/ from the traceability graph, SRS, and basic design. Use when the user asks for
|
|
6
|
-
detail design, feature detail docs, or implementation specs. Do not use for SRS, basic design screens,
|
|
7
|
-
or HTML prototype.
|
|
8
|
-
paths:
|
|
9
|
-
- "docs/detail-design/**"
|
|
10
|
-
- ".ai-spector/templates/detail_design/**"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Generate Detail Design
|
|
14
|
-
|
|
15
|
-
## Load at start
|
|
16
|
-
1. [references/runbook.md](references/runbook.md)
|
|
17
|
-
2. [../ai-spector/references/generate-workflow.md](../ai-spector/references/generate-workflow.md)
|
|
18
|
-
|
|
19
|
-
## Load when needed
|
|
20
|
-
|
|
21
|
-
| Situation | Load |
|
|
22
|
-
|---|---|
|
|
23
|
-
| Language not set | [../ai-spector/references/language-picker.md](../ai-spector/references/language-picker.md) |
|
|
24
|
-
| Graph queries / merge | [../ai-spector/references/generate-graph.md](../ai-spector/references/generate-graph.md) |
|
|
25
|
-
| CLI fails | [../ai-spector/references/cli-failures.md](../ai-spector/references/cli-failures.md) |
|
|
26
|
-
| Run of 5+ files | [../ai-spector/references/context-management.md](../ai-spector/references/context-management.md) |
|
|
27
|
-
|
|
28
|
-
## On CLI failure
|
|
29
|
-
Pause. Report full output. Offer fix + retry. Details in cli-failures.md.
|
|
30
|
-
|
|
31
|
-
"detail design", "implementation spec", "feature detail for F-03" → this skill.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Generate detail design
|
|
2
|
-
|
|
3
|
-
Generate detail design markdown **from the traceability graph**, SRS, and basic design.
|
|
4
|
-
|
|
5
|
-
**User runs this command;** the agent runs CLI.
|
|
6
|
-
|
|
7
|
-
| Shared workflow | Document |
|
|
8
|
-
|-----------------|----------|
|
|
9
|
-
| Scope cases, waves, merge, guardrails | [generate-workflow.md](../../ai-spector/references/generate-workflow.md) |
|
|
10
|
-
| Graph query + ingest | [generate-graph.md](../../ai-spector/references/generate-graph.md) |
|
|
11
|
-
|
|
12
|
-
## Prerequisites
|
|
13
|
-
|
|
14
|
-
- `ai-spector graph validate` passes
|
|
15
|
-
- SRS + basic design minimum on disk (`workflow.dependencies.json` → `generate-detail-design`)
|
|
16
|
-
|
|
17
|
-
## Config
|
|
18
|
-
|
|
19
|
-
- `dag.detail-design.json`
|
|
20
|
-
- `dag.detail-design.graph-seeds.json` (if present)
|
|
21
|
-
- `completeness-rules.detail-design.json`
|
|
22
|
-
|
|
23
|
-
Templates: `.ai-spector/templates/detail_design/`
|
|
24
|
-
|
|
25
|
-
## Intent → DAG hints
|
|
26
|
-
|
|
27
|
-
Use `dag.detail-design.json` + graph `feature` nodes. Common phrases:
|
|
28
|
-
|
|
29
|
-
| User phrase | Typical outputs |
|
|
30
|
-
|-------------|-----------------|
|
|
31
|
-
| feature detail, implementation spec | per-feature files under `docs/detail-design/` |
|
|
32
|
-
| architecture overview, deployment, error handling | shared chapters per DAG |
|
|
33
|
-
| one feature, checkout | that feature’s detail doc only — case 2 |
|
|
34
|
-
|
|
35
|
-
Case 3 confirmation: [generate-workflow.md](../../ai-spector/references/generate-workflow.md) § Case 3.
|
|
36
|
-
|
|
37
|
-
## Required behavior
|
|
38
|
-
|
|
39
|
-
Follow [generate-workflow.md](../../ai-spector/references/generate-workflow.md) (plan → waves → per-target query/write/merge/validate).
|
|
40
|
-
|
|
41
|
-
1. **Gate** — `ai-spector graph validate`
|
|
42
|
-
2. **Plan** — load `dag.detail-design.json`; build waves; map seeds from graph-seeds config
|
|
43
|
-
3. **Per target** — seed = `feature` id or detail `document` node:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
ai-spector graph query <seed> --direction both --depth 3 --json
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
4. Load SRS + basic-design paths from `projectionPaths` only (no full `docs/` glob)
|
|
50
|
-
5. Read template; write; merge `rendersTo` + `dependsOn`; validate per wave
|
|
51
|
-
6. **Finish** — `ai-spector index` if command scope touched many files; suggest `/summary` when workflow lists it
|
|
52
|
-
|
|
53
|
-
## Guardrails
|
|
54
|
-
|
|
55
|
-
- Same wave / merge / validate rules as [generate-workflow.md](../../ai-spector/references/generate-workflow.md)
|
|
56
|
-
- Do not read all of `docs/` manually when CLI failed — [cli-failures.md](../../ai-spector/references/cli-failures.md)
|
|
57
|
-
|
|
58
|
-
## If blocked
|
|
59
|
-
|
|
60
|
-
Fix validate/query errors; ensure basic design exists. Re-run **`/generate-detail-design`**.
|