ai-spector 0.3.4 → 0.3.6
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/README.md +32 -21
- package/assets/themes/airbnb/DESIGN.md +246 -0
- package/assets/themes/airbnb/SUMMARY.md +7 -0
- package/assets/themes/airtable/DESIGN.md +89 -0
- package/assets/themes/airtable/SUMMARY.md +7 -0
- package/assets/themes/apple/DESIGN.md +313 -0
- package/assets/themes/apple/SUMMARY.md +7 -0
- package/assets/themes/binance/DESIGN.md +345 -0
- package/assets/themes/binance/SUMMARY.md +7 -0
- package/assets/themes/bmw/DESIGN.md +180 -0
- package/assets/themes/bmw/SUMMARY.md +7 -0
- package/assets/themes/bugatti/DESIGN.md +268 -0
- package/assets/themes/bugatti/SUMMARY.md +7 -0
- package/assets/themes/cal/DESIGN.md +259 -0
- package/assets/themes/cal/SUMMARY.md +7 -0
- package/assets/themes/claude/DESIGN.md +312 -0
- package/assets/themes/claude/SUMMARY.md +7 -0
- package/assets/themes/clay/DESIGN.md +304 -0
- package/assets/themes/clay/SUMMARY.md +7 -0
- package/assets/themes/clickhouse/DESIGN.md +281 -0
- package/assets/themes/clickhouse/SUMMARY.md +7 -0
- package/assets/themes/cohere/DESIGN.md +266 -0
- package/assets/themes/cohere/SUMMARY.md +7 -0
- package/assets/themes/coinbase/DESIGN.md +129 -0
- package/assets/themes/coinbase/SUMMARY.md +7 -0
- package/assets/themes/composio/DESIGN.md +307 -0
- package/assets/themes/composio/SUMMARY.md +7 -0
- package/assets/themes/cursor/DESIGN.md +309 -0
- package/assets/themes/cursor/SUMMARY.md +7 -0
- package/assets/themes/elevenlabs/DESIGN.md +265 -0
- package/assets/themes/elevenlabs/SUMMARY.md +7 -0
- package/assets/themes/expo/DESIGN.md +281 -0
- package/assets/themes/expo/SUMMARY.md +7 -0
- package/assets/themes/ferrari/DESIGN.md +314 -0
- package/assets/themes/ferrari/SUMMARY.md +7 -0
- package/assets/themes/framer/DESIGN.md +246 -0
- package/assets/themes/framer/SUMMARY.md +7 -0
- package/assets/themes/hashicorp/DESIGN.md +278 -0
- package/assets/themes/hashicorp/SUMMARY.md +7 -0
- package/assets/themes/ibm/DESIGN.md +332 -0
- package/assets/themes/ibm/SUMMARY.md +7 -0
- package/assets/themes/intercom/DESIGN.md +146 -0
- package/assets/themes/intercom/SUMMARY.md +7 -0
- package/assets/themes/kraken/DESIGN.md +125 -0
- package/assets/themes/kraken/SUMMARY.md +7 -0
- package/assets/themes/lamborghini/DESIGN.md +288 -0
- package/assets/themes/lamborghini/SUMMARY.md +7 -0
- package/assets/themes/linear.app/DESIGN.md +367 -0
- package/assets/themes/linear.app/SUMMARY.md +7 -0
- package/assets/themes/lovable/DESIGN.md +298 -0
- package/assets/themes/lovable/SUMMARY.md +7 -0
- package/assets/themes/meta/DESIGN.md +366 -0
- package/assets/themes/meta/SUMMARY.md +7 -0
- package/assets/themes/minimax/DESIGN.md +257 -0
- package/assets/themes/minimax/SUMMARY.md +7 -0
- package/assets/themes/mintlify/DESIGN.md +326 -0
- package/assets/themes/mintlify/SUMMARY.md +7 -0
- package/assets/themes/miro/DESIGN.md +108 -0
- package/assets/themes/miro/SUMMARY.md +7 -0
- package/assets/themes/mistral.ai/DESIGN.md +261 -0
- package/assets/themes/mistral.ai/SUMMARY.md +7 -0
- package/assets/themes/mongodb/DESIGN.md +266 -0
- package/assets/themes/mongodb/SUMMARY.md +7 -0
- package/assets/themes/nike/DESIGN.md +363 -0
- package/assets/themes/nike/SUMMARY.md +7 -0
- package/assets/themes/notion/DESIGN.md +309 -0
- package/assets/themes/notion/SUMMARY.md +7 -0
- package/assets/themes/nvidia/DESIGN.md +293 -0
- package/assets/themes/nvidia/SUMMARY.md +7 -0
- package/assets/themes/ollama/DESIGN.md +267 -0
- package/assets/themes/ollama/SUMMARY.md +7 -0
- package/assets/themes/opencode.ai/DESIGN.md +281 -0
- package/assets/themes/opencode.ai/SUMMARY.md +7 -0
- package/assets/themes/pinterest/DESIGN.md +230 -0
- package/assets/themes/pinterest/SUMMARY.md +7 -0
- package/assets/themes/playstation/DESIGN.md +364 -0
- package/assets/themes/playstation/SUMMARY.md +7 -0
- package/assets/themes/posthog/DESIGN.md +256 -0
- package/assets/themes/posthog/SUMMARY.md +7 -0
- package/assets/themes/raycast/DESIGN.md +268 -0
- package/assets/themes/raycast/SUMMARY.md +7 -0
- package/assets/themes/renault/DESIGN.md +311 -0
- package/assets/themes/renault/SUMMARY.md +7 -0
- package/assets/themes/replicate/DESIGN.md +261 -0
- package/assets/themes/replicate/SUMMARY.md +7 -0
- package/assets/themes/resend/DESIGN.md +303 -0
- package/assets/themes/resend/SUMMARY.md +7 -0
- package/assets/themes/revolut/DESIGN.md +185 -0
- package/assets/themes/revolut/SUMMARY.md +7 -0
- package/assets/themes/runwayml/DESIGN.md +244 -0
- package/assets/themes/runwayml/SUMMARY.md +7 -0
- package/assets/themes/sanity/DESIGN.md +357 -0
- package/assets/themes/sanity/SUMMARY.md +7 -0
- package/assets/themes/sentry/DESIGN.md +262 -0
- package/assets/themes/sentry/SUMMARY.md +7 -0
- package/assets/themes/shopify/DESIGN.md +350 -0
- package/assets/themes/shopify/SUMMARY.md +7 -0
- package/assets/themes/spacex/DESIGN.md +194 -0
- package/assets/themes/spacex/SUMMARY.md +7 -0
- package/assets/themes/spotify/DESIGN.md +246 -0
- package/assets/themes/spotify/SUMMARY.md +7 -0
- package/assets/themes/stripe/DESIGN.md +322 -0
- package/assets/themes/stripe/SUMMARY.md +7 -0
- package/assets/themes/supabase/DESIGN.md +255 -0
- package/assets/themes/supabase/SUMMARY.md +7 -0
- package/assets/themes/superhuman/DESIGN.md +252 -0
- package/assets/themes/superhuman/SUMMARY.md +7 -0
- package/assets/themes/tesla/DESIGN.md +286 -0
- package/assets/themes/tesla/SUMMARY.md +7 -0
- package/assets/themes/theverge/DESIGN.md +339 -0
- package/assets/themes/theverge/SUMMARY.md +7 -0
- package/assets/themes/together.ai/DESIGN.md +263 -0
- package/assets/themes/together.ai/SUMMARY.md +7 -0
- package/assets/themes/uber/DESIGN.md +295 -0
- package/assets/themes/uber/SUMMARY.md +7 -0
- package/assets/themes/vercel/DESIGN.md +310 -0
- package/assets/themes/vercel/SUMMARY.md +7 -0
- package/assets/themes/voltagent/DESIGN.md +323 -0
- package/assets/themes/voltagent/SUMMARY.md +7 -0
- package/assets/themes/warp/DESIGN.md +253 -0
- package/assets/themes/warp/SUMMARY.md +7 -0
- package/assets/themes/webflow/DESIGN.md +92 -0
- package/assets/themes/webflow/SUMMARY.md +7 -0
- package/assets/themes/wired/DESIGN.md +278 -0
- package/assets/themes/wired/SUMMARY.md +7 -0
- package/assets/themes/wise/DESIGN.md +173 -0
- package/assets/themes/wise/SUMMARY.md +7 -0
- package/assets/themes/x.ai/DESIGN.md +257 -0
- package/assets/themes/x.ai/SUMMARY.md +7 -0
- package/assets/themes/zapier/DESIGN.md +328 -0
- package/assets/themes/zapier/SUMMARY.md +7 -0
- package/dist/cli.js +65 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze.d.ts +1 -1
- package/dist/commands/analyze.js +3 -3
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/prototype.d.ts +26 -0
- package/dist/commands/prototype.d.ts.map +1 -0
- package/dist/commands/prototype.js +147 -0
- package/dist/commands/prototype.js.map +1 -0
- package/dist/commands/sync-cursor.d.ts +1 -1
- package/dist/commands/sync-cursor.js +2 -2
- package/dist/commands/sync-cursor.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +1 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/config/load.d.ts +3 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +7 -0
- package/dist/config/load.js.map +1 -1
- package/dist/prototype/build-manifest.d.ts +18 -0
- package/dist/prototype/build-manifest.d.ts.map +1 -0
- package/dist/prototype/build-manifest.js +79 -0
- package/dist/prototype/build-manifest.js.map +1 -0
- package/dist/prototype/config.d.ts +7 -0
- package/dist/prototype/config.d.ts.map +1 -0
- package/dist/prototype/config.js +35 -0
- package/dist/prototype/config.js.map +1 -0
- package/dist/prototype/parse-screen-index.d.ts +10 -0
- package/dist/prototype/parse-screen-index.d.ts.map +1 -0
- package/dist/prototype/parse-screen-index.js +96 -0
- package/dist/prototype/parse-screen-index.js.map +1 -0
- package/dist/prototype/themes.d.ts +6 -0
- package/dist/prototype/themes.d.ts.map +1 -0
- package/dist/prototype/themes.js +55 -0
- package/dist/prototype/themes.js.map +1 -0
- package/dist/prototype/types.d.ts +49 -0
- package/dist/prototype/types.d.ts.map +1 -0
- package/dist/prototype/types.js +2 -0
- package/dist/prototype/types.js.map +1 -0
- package/dist/prototype/validate.d.ts +16 -0
- package/dist/prototype/validate.d.ts.map +1 -0
- package/dist/prototype/validate.js +82 -0
- package/dist/prototype/validate.js.map +1 -0
- package/package.json +2 -1
- package/scaffold/.ai-spector/.docflow/config/prototype.config.json +10 -0
- package/scaffold/cursor/WORKFLOW.md +63 -0
- package/scaffold/cursor/commands/_cli-failures.md +3 -149
- package/scaffold/cursor/commands/_workflow.md +7 -6
- package/scaffold/cursor/skills/README.md +34 -0
- package/scaffold/cursor/skills/_skill-router.md +33 -14
- package/scaffold/cursor/skills/ai-spector/SKILL.md +31 -30
- package/scaffold/cursor/skills/ai-spector/references/cli-failures.md +214 -0
- package/scaffold/cursor/{commands/_generate-graph.md → skills/ai-spector/references/generate-graph.md} +6 -5
- package/scaffold/cursor/skills/ai-spector/references/generate-workflow.md +120 -0
- package/scaffold/cursor/{commands/_graph.md → skills/ai-spector/references/graph.md} +3 -3
- package/scaffold/cursor/{commands/_prerequisites.md → skills/ai-spector/references/prerequisites.md} +3 -3
- package/scaffold/cursor/skills/ai-spector/references/project-conventions.md +27 -0
- package/scaffold/cursor/skills/ai-spector-generate/SKILL.md +13 -33
- package/scaffold/cursor/skills/ai-spector-generate-basic-design/SKILL.md +33 -0
- package/scaffold/cursor/skills/ai-spector-generate-basic-design/references/runbook.md +83 -0
- package/scaffold/cursor/skills/ai-spector-generate-detail-design/SKILL.md +32 -0
- package/scaffold/cursor/skills/ai-spector-generate-detail-design/references/runbook.md +60 -0
- package/scaffold/cursor/skills/ai-spector-generate-prototype/SKILL.md +33 -0
- package/scaffold/cursor/skills/ai-spector-generate-prototype/references/runbook.md +93 -0
- package/scaffold/cursor/skills/ai-spector-generate-srs/SKILL.md +35 -0
- package/scaffold/cursor/skills/ai-spector-generate-srs/references/runbook.md +69 -0
- package/scaffold/cursor/skills/ai-spector-graph/SKILL.md +33 -26
- package/scaffold/cursor/{commands → skills/ai-spector-graph/references}/analyze.md +7 -7
- package/scaffold/cursor/skills/ai-spector-graph/references/graph-commands.md +18 -0
- package/scaffold/cursor/{commands → skills/ai-spector-graph/references}/impact.md +3 -3
- package/scaffold/cursor/{commands → skills/ai-spector-graph/references}/index.md +2 -2
- package/scaffold/cursor/{commands → skills/ai-spector-graph/references}/link-graph.md +2 -2
- package/scaffold/cursor/{commands → skills/ai-spector-graph/references}/summary.md +1 -1
- package/scaffold/cursor/{commands → skills/ai-spector-graph/references}/sync-graph.md +2 -2
- package/scaffold/cursor/{commands → skills/ai-spector-graph/references}/validate-graph.md +3 -3
- package/scaffold/cursor/{commands → skills/ai-spector-graph/references}/visualize-graph.md +2 -2
- package/scaffold/cursor/skills/ai-spector-resolve-comments/SKILL.md +18 -29
- package/scaffold/cursor/{commands/resolve-comments.md → skills/ai-spector-resolve-comments/references/runbook.md} +2 -2
- package/scaffold/docs/data-source/README.md +2 -2
- package/scaffold/prototype/CLAUDE.md +7 -0
- package/scaffold/prototype/README.md +32 -0
- package/scaffold/prototype/manifest.json +6 -0
- package/scaffold/prototype/screen-map.json +6 -0
- package/scaffold/prototype/src/.gitkeep +0 -0
- package/scaffold/cursor/commands/generate-basic-design.md +0 -165
- package/scaffold/cursor/commands/generate-detail-design.md +0 -19
- package/scaffold/cursor/commands/generate-srs.md +0 -183
- package/scaffold/cursor/commands/graph-impact.md +0 -5
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# /generate-detail-design
|
|
2
|
-
|
|
3
|
-
Detail design via graph context. **User runs this command;** agent runs CLI. Graph-first: [_generate-graph.md](./_generate-graph.md). On CLI failure: [_cli-failures.md](./_cli-failures.md).
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
Graph validates; SRS minimum exists.
|
|
8
|
-
|
|
9
|
-
## Required Behavior
|
|
10
|
-
|
|
11
|
-
1. `ai-spector graph validate`
|
|
12
|
-
2. Seed: `feature` id or detail `document` node.
|
|
13
|
-
3. `ai-spector graph query <seed> --direction both --depth 3 --json`
|
|
14
|
-
4. Load SRS + basic-design paths from `projectionPaths` only.
|
|
15
|
-
5. Generate; update graph; `ai-spector graph validate`.
|
|
16
|
-
|
|
17
|
-
## If blocked
|
|
18
|
-
|
|
19
|
-
Failed validate/query → [_cli-failures.md](./_cli-failures.md). Do not read all of `docs/` manually when CLI failed.
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
# /generate-srs
|
|
2
|
-
|
|
3
|
-
Generate SRS markdown **from the traceability graph** — carefully, in DAG order, ingesting each file back into the graph.
|
|
4
|
-
|
|
5
|
-
**User runs this command;** the agent runs CLI. Shared graph-first rules: [**_generate-graph.md**](./_generate-graph.md).
|
|
6
|
-
|
|
7
|
-
## Philosophy
|
|
8
|
-
|
|
9
|
-
- **Accuracy over speed** — full graph context before every write; ingest before the next wave.
|
|
10
|
-
- **Graph in, graph out** — query neighbors + dependencies before; `rendersTo` + `dependsOn` after.
|
|
11
|
-
- **Parallel when safe** — targets in the **same DAG wave** (no `dependsOn` between them) may be generated in one batch; never skip query/ingest per file.
|
|
12
|
-
|
|
13
|
-
## Usage — three ways to choose targets
|
|
14
|
-
|
|
15
|
-
| Case | User says | Agent behavior |
|
|
16
|
-
|------|-----------|----------------|
|
|
17
|
-
| **1 — All (default)** | `/generate-srs` | Plan **every** DAG node (respect `good` / skip unless regen requested). Full wave walk. |
|
|
18
|
-
| **2 — Explicit files** | `/generate-srs docs/srs/3-use-cases.md` or `/generate-srs file1.md file2.md` | Map paths → DAG nodes → seeds. Add **DAG dependencies** not on disk yet. Batch only within same wave. |
|
|
19
|
-
| **3 — Request in words** | `/generate-srs general use case chapter and features` | Resolve intent → proposed file list → **confirm with user** → then same as case 2. **Do not generate until user approves.** |
|
|
20
|
-
|
|
21
|
-
Arguments after the command are either **file paths** (case 2) or a **free-text request** (case 3). If mixed, treat paths as explicit and text as request.
|
|
22
|
-
|
|
23
|
-
## Case 3 — resolve request and confirm (mandatory)
|
|
24
|
-
|
|
25
|
-
1. Parse the user’s words against `dag.srs.json`, `dag.srs.graph-seeds.json`, and graph domain nodes (`useCase`, `feature`).
|
|
26
|
-
2. Build a **proposed scope** table:
|
|
27
|
-
|
|
28
|
-
| # | DAG id | Output path | Seed | Reason matched | Also generate deps? |
|
|
29
|
-
|---|--------|-------------|------|----------------|---------------------|
|
|
30
|
-
| 1 | `srs.use-cases` | `docs/srs/3-use-cases.md` | `doc.srs.3-use-cases` | “use case chapter” | yes — `srs.introduction`, `srs.overall-description` if missing |
|
|
31
|
-
|
|
32
|
-
3. Include **dependency closure**: any DAG `dependsOn` ancestor that is `missing_file` / `missing_content` must be listed (generated first in earlier waves) unless user says to skip deps.
|
|
33
|
-
4. Ask explicitly:
|
|
34
|
-
|
|
35
|
-
```text
|
|
36
|
-
I plan to generate the following (N files, waves X–Y). Dependencies marked “prerequisite” run first.
|
|
37
|
-
Reply **yes** to proceed, **no** to cancel, or edit the list (e.g. “skip introduction”, “add 5-data-requirements”).
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
5. **Stop** if the user does not confirm. Do not write SRS files on assumption.
|
|
41
|
-
6. If the request is ambiguous (e.g. “features” = list only vs all F-xx detail files), ask one clarifying question **before** the confirmation table.
|
|
42
|
-
|
|
43
|
-
### Intent → DAG hints (not exhaustive)
|
|
44
|
-
|
|
45
|
-
| User phrase (examples) | Typical DAG / outputs |
|
|
46
|
-
|------------------------|------------------------|
|
|
47
|
-
| introduction, purpose, scope | `srs.introduction` |
|
|
48
|
-
| overall, actors, users, §2 | `srs.overall-description` |
|
|
49
|
-
| use case(s), UC, §3, chapter 3 | `srs.use-cases` (+ optional `UC-xx` detail if “all UC details”) |
|
|
50
|
-
| feature list, §4.2, system features | `srs.features-list` |
|
|
51
|
-
| feature detail, per feature, F-xx | `srs.feature-details` (`F-01`, … from graph) |
|
|
52
|
-
| data, entities, §5 | `srs.data-requirements` |
|
|
53
|
-
| interfaces, API, §6 | `srs.external-interfaces` |
|
|
54
|
-
| NFR, quality, §7 | `srs.quality-attributes` |
|
|
55
|
-
| i18n, localization, §8 | `srs.internationalization` |
|
|
56
|
-
| legal, compliance, §9 | `srs.other-requirements` |
|
|
57
|
-
| “everything” / no filter | Case 1 — full DAG |
|
|
58
|
-
|
|
59
|
-
## Prerequisites
|
|
60
|
-
|
|
61
|
-
`workflow.dependencies.json` → `generate-srs`. Requires merged graph (`/analyze`), passing **`ai-spector graph validate`**.
|
|
62
|
-
|
|
63
|
-
Config:
|
|
64
|
-
|
|
65
|
-
- `dag.srs.json` — generation order + `dependsOn`
|
|
66
|
-
- `dag.srs.graph-seeds.json` — DAG id → `doc.srs.*` graph seed
|
|
67
|
-
- `completeness-rules.srs.json` — quality checks
|
|
68
|
-
|
|
69
|
-
## Required behavior
|
|
70
|
-
|
|
71
|
-
### 1. Gate
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
ai-spector graph validate
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Stop if errors — [_cli-failures.md](./_cli-failures.md).
|
|
78
|
-
|
|
79
|
-
### 2. Plan (graph + DAG)
|
|
80
|
-
|
|
81
|
-
1. **Select targets** using Usage case 1, 2, or 3 above. For case 3, run § “confirm” first.
|
|
82
|
-
2. Topological sort **selected** nodes plus any required dependency ancestors.
|
|
83
|
-
3. Map each node with `dag.srs.graph-seeds.json` → `targetSeedId` (`doc.srs.*` or `UC-xx` / `F-xx` for per-domain).
|
|
84
|
-
4. Classify disk: `good` | `missing_content` | `missing_file` — do not overwrite `good` unless user asked to regenerate (explicit path or confirmed scope).
|
|
85
|
-
5. Group into **waves** (see _generate-graph.md § Waves). Present final wave table (cases 1–2: brief; case 3: already confirmed).
|
|
86
|
-
|
|
87
|
-
### 3. Per wave, then per target
|
|
88
|
-
|
|
89
|
-
For **each wave** in order:
|
|
90
|
-
|
|
91
|
-
1. All targets in this wave may run **in parallel** only if they do not depend on each other (true by wave definition).
|
|
92
|
-
2. For **each** target in the wave (parallel or serial):
|
|
93
|
-
|
|
94
|
-
#### 3a. Load context (CLI)
|
|
95
|
-
|
|
96
|
-
Per [_generate-graph.md](./_generate-graph.md):
|
|
97
|
-
|
|
98
|
-
- `graph query` each **DAG dependency** that should already exist (depth 2, include `rendersTo`).
|
|
99
|
-
- `graph query` **target** seed (depth **4**, full generate edge set).
|
|
100
|
-
- `graph impact <targetSeedId> --json` when replacing or ambiguous scope.
|
|
101
|
-
|
|
102
|
-
Read **only** paths from `projectionPaths` plus targeted `docs/data-source/**` for gaps.
|
|
103
|
-
|
|
104
|
-
#### 3b. Write one file
|
|
105
|
-
|
|
106
|
-
- Read the DAG `template` file under **`.ai-spector/templates/`** (e.g. `.ai-spector/templates/srs/1-introduction.md`). Missing folder → user must run `npx ai-spector init`.
|
|
107
|
-
- Content must match graph: UC list from `listedIn` on `useCase` nodes; features from `feature` + `satisfies`.
|
|
108
|
-
- No fabricated requirements.
|
|
109
|
-
|
|
110
|
-
#### 3c. Ingest into graph (mandatory before next wave)
|
|
111
|
-
|
|
112
|
-
After each file **or** once per wave (combine all edges in one patch):
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
ai-spector graph merge .ai-spector/.docflow/extract/projection-patch.json
|
|
116
|
-
ai-spector graph validate
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Do not start the **next wave** until validate passes.
|
|
120
|
-
|
|
121
|
-
Patch must include at minimum:
|
|
122
|
-
|
|
123
|
-
- `rendersTo` — `from`: document id, `to`: actual file path
|
|
124
|
-
- `dependsOn` — `from`: downstream doc id, `to`: each upstream doc id from DAG (same generation wave)
|
|
125
|
-
|
|
126
|
-
Example for `srs.use-cases` → `doc.srs.3-use-cases`:
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"version": 1,
|
|
131
|
-
"nodes": [],
|
|
132
|
-
"edges": [
|
|
133
|
-
{ "type": "rendersTo", "from": "doc.srs.3-use-cases", "to": "docs/srs/3-use-cases.md" },
|
|
134
|
-
{ "type": "dependsOn", "from": "doc.srs.3-use-cases", "to": "doc.srs.1-introduction" },
|
|
135
|
-
{ "type": "dependsOn", "from": "doc.srs.3-use-cases", "to": "doc.srs.2-overall-description" }
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**Forbidden:** finishing without `rendersTo` on all generated documents; skipping merge between **waves**; batching targets from different waves (e.g. use-cases + features-list together).
|
|
141
|
-
|
|
142
|
-
#### 3d. Log
|
|
143
|
-
|
|
144
|
-
Append to `.ai-spector/.docflow/logs/generate-srs.log` (create if needed): timestamp, seed, path, validate OK.
|
|
145
|
-
|
|
146
|
-
### 4. Finish
|
|
147
|
-
|
|
148
|
-
- Final `ai-spector graph validate`.
|
|
149
|
-
- **Refresh indexes and semantic graph** (parses UC/F/actor ids from generated markdown + updates Graphify on changed paths):
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
ai-spector index
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
`index` also adds **per-domain detail** `document` nodes (`doc.srs.uc-UC-01`, `doc.srs.f-F-01`, …) plus **`section` nodes** parsed from each detail file’s headings. **`definedIn`** links each UC/F to those sections (e.g. Overview, Main flow); **`rendersTo`** still points at the markdown path. Per-file `graph merge` patches are still required for list chapters (`3-use-cases.md`, `4-system-features.md`) and `dependsOn`; without them, validate may warn on missing `rendersTo` from template `doc.srs.*` nodes.
|
|
156
|
-
|
|
157
|
-
Use `ai-spector index --force-graphify` if Graphify storage should rebuild even when file hashes are unchanged.
|
|
158
|
-
- Optional: `/visualize-graph` for user review.
|
|
159
|
-
- Suggest `/summary srs` only after graph ingest is complete.
|
|
160
|
-
|
|
161
|
-
## Waves (reference)
|
|
162
|
-
|
|
163
|
-
| Wave | DAG examples | Seed type |
|
|
164
|
-
|------|----------------|-----------|
|
|
165
|
-
| 0 | `srs.introduction`, `srs.overall-description` | `doc.srs.*` |
|
|
166
|
-
| 1 | `srs.use-cases` | `doc.srs.3-use-cases` + domain queries for §3.2 |
|
|
167
|
-
| 2 | `srs.features-list` | `doc.srs.4-system-features` |
|
|
168
|
-
| 3 | `srs.feature-details` | `F-xx` per file |
|
|
169
|
-
| 4 | data, interfaces, NFR chapters | `doc.srs.5-*` … with deps via `dependsOn` queries |
|
|
170
|
-
|
|
171
|
-
## Guardrails
|
|
172
|
-
|
|
173
|
-
- **Parallel only within a wave** — never across waves; never when A `dependsOn` B in the DAG.
|
|
174
|
-
- **Every target** gets its own `graph query` + dependency queries before write (parallel OK).
|
|
175
|
-
- **Every wave** ends with `graph merge` + `graph validate` before the next wave.
|
|
176
|
-
- On `graph query` / `merge` / `validate` failure → stop per _cli-failures.md.
|
|
177
|
-
- Prefer graph `nodes`/`edges` over `knowledge.json` for generation text.
|
|
178
|
-
|
|
179
|
-
## If blocked
|
|
180
|
-
|
|
181
|
-
[_cli-failures.md](./_cli-failures.md). User re-runs **`/generate-srs`** after fixes.
|
|
182
|
-
|
|
183
|
-
Common fix: run `/analyze` if domain nodes missing; run ingest merge if downstream query returns empty `rendersTo` for dependencies.
|