@vpxa/aikit 0.1.66 → 0.1.68

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpxa/aikit",
3
- "version": "0.1.66",
3
+ "version": "0.1.68",
4
4
  "type": "module",
5
5
  "description": "Local-first AI developer toolkit — knowledge base, code analysis, context management, and developer tools for LLM agents",
6
6
  "license": "MIT",
@@ -65,7 +65,9 @@ Run `forge_ground({ task, root_path: "." })` to:
65
65
 
66
66
  **Auto-upgrade check**: If `forge_ground` reveals contract-type unknowns or security concerns not caught by initial `forge_classify`, recommend tier upgrade.
67
67
 
68
- ### 6. Produce `design-decisions.md`
68
+ ### 6. Write `{{artifacts_path}}/design-decisions.md` to disk
69
+
70
+ **You MUST create this file on disk** using `create_file` or equivalent — do not just present content in chat.
69
71
 
70
72
  ```markdown
71
73
  ## Design Decisions
@@ -122,9 +124,13 @@ After user approves:
122
124
 
123
125
  **Do NOT call `flow_step`** — let the Orchestrator advance the flow.
124
126
 
127
+ ## Outputs
128
+
129
+ Write `{{artifacts_path}}/design-decisions.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat. This file is a prerequisite for the next step.
130
+
125
131
  ## Produces
126
132
 
127
- - `design-decisions.md` — FORGE tier, approach, key decisions, constraints, risks
133
+ - `{{artifacts_path}}/design-decisions.md` — FORGE tier, approach, key decisions, constraints, risks
128
134
 
129
135
  ## Agents
130
136
 
@@ -153,6 +159,14 @@ Load these skills BEFORE executing this step:
153
159
  - Artifact content and summaries → present with structured layout
154
160
  - Only use plain text for brief confirmations and simple questions
155
161
 
162
+ ## Completion Criteria
163
+
164
+ - [ ] `{{artifacts_path}}/design-decisions.md` written to disk (NOT just presented in chat)
165
+ - [ ] FORGE tier determined and documented
166
+ - [ ] Brainstorming session completed (for Standard+ tier)
167
+ - [ ] Key design decisions documented with rationale
168
+ - [ ] User approval received (🛑 MANDATORY STOP)
169
+
156
170
  ## Knowledge Capture
157
171
 
158
172
  Before completing this step, persist important findings using `remember()`:
@@ -38,7 +38,9 @@ Execute all tasks from the breakdown, dispatching implementation agents in batch
38
38
 
39
39
  ## Outputs
40
40
 
41
- Produce `{{artifacts_path}}/progress.md` with:
41
+ Write `{{artifacts_path}}/progress.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat.
42
+
43
+ Template:
42
44
 
43
45
  ```markdown
44
46
  # Execution Progress: <feature title>
@@ -38,7 +38,9 @@ Translate the specification into a concrete, phased implementation plan with arc
38
38
 
39
39
  ## Outputs
40
40
 
41
- Produce `{{artifacts_path}}/plan.md` with:
41
+ Write `{{artifacts_path}}/plan.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat.
42
+
43
+ Template:
42
44
 
43
45
  ```markdown
44
46
  # Implementation Plan: <feature title>
@@ -36,7 +36,9 @@ Transform a vague or broad feature request into a precise, testable specificatio
36
36
 
37
37
  ## Outputs
38
38
 
39
- Produce `{{artifacts_path}}/spec.md` with:
39
+ Write `{{artifacts_path}}/spec.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat.
40
+
41
+ Template:
40
42
 
41
43
  ```markdown
42
44
  # Specification: <feature title>
@@ -35,7 +35,9 @@ Decompose the implementation plan into small, atomic tasks that agents can execu
35
35
 
36
36
  ## Outputs
37
37
 
38
- Produce `{{artifacts_path}}/tasks.md` with:
38
+ Write `{{artifacts_path}}/tasks.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat.
39
+
40
+ Template:
39
41
 
40
42
  ```markdown
41
43
  # Task Breakdown: <feature title>
@@ -44,7 +44,9 @@ Perform thorough multi-perspective validation of all changes through parallel du
44
44
 
45
45
  ## Outputs
46
46
 
47
- Produce `{{artifacts_path}}/verify-report.md` with:
47
+ Write `{{artifacts_path}}/verify-report.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat.
48
+
49
+ Template:
48
50
 
49
51
  ```markdown
50
52
  # Verification Report: <feature title>
@@ -38,7 +38,9 @@ If any prerequisites are missing or incomplete:
38
38
 
39
39
  ## Outputs
40
40
 
41
- Produce `{{artifacts_path}}/assessment.md` with:
41
+ Write `{{artifacts_path}}/assessment.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat.
42
+
43
+ Template:
42
44
 
43
45
  ```markdown
44
46
  # Assessment: <task title>
@@ -18,13 +18,14 @@ Classify the task into one of these categories:
18
18
  | **Refactor** | Code cleanup, rename, restructure, no behavior change | → **Auto-skip** to next step |
19
19
  | **Small feature** | New behavior, new endpoint, new component, UI change | → Run **Quick Design** below |
20
20
 
21
- **If the task is a bug fix or refactor**, produce a minimal `design-decisions.md`:
21
+ **If the task is a bug fix or refactor**, write `{{artifacts_path}}/design-decisions.md` to disk:
22
22
  ```markdown
23
23
  ## Design Decisions
24
24
  - **Task type**: Bug fix / Refactor
25
25
  - **Design gate**: Auto-skipped — no design work needed
26
26
  - **Proceed to**: Assessment
27
27
  ```
28
+ **You MUST create this file on disk** at the exact `{{artifacts_path}}/design-decisions.md` path — do not just present the content in chat.
28
29
  Then report `DONE` to the Orchestrator so the flow advances.
29
30
 
30
31
  ### 2. Quick Design (Small Features Only)
@@ -39,7 +40,7 @@ For small features that need minimal design:
39
40
  3. **Decision Protocol** (if technical decisions exist) — Delegate to 2-4 Researcher agents in parallel:
40
41
  - Each researcher evaluates a different approach
41
42
  - Synthesize findings into a recommendation
42
- 4. **Produce `design-decisions.md`**:
43
+ 4. **Write `{{artifacts_path}}/design-decisions.md`** to disk:
43
44
 
44
45
  ```markdown
45
46
  ## Design Decisions
@@ -66,9 +67,13 @@ When complete, report status:
66
67
 
67
68
  **Do NOT call `flow_step`** — let the Orchestrator advance the flow.
68
69
 
70
+ ## Outputs
71
+
72
+ Write `{{artifacts_path}}/design-decisions.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat. This file is a prerequisite for the next step.
73
+
69
74
  ## Produces
70
75
 
71
- - `design-decisions.md` — Task classification, FORGE tier, key design decisions
76
+ - `{{artifacts_path}}/design-decisions.md` — Task classification, FORGE tier, key design decisions
72
77
 
73
78
  ## Agents
74
79
 
@@ -96,6 +101,10 @@ Load these skills BEFORE executing this step:
96
101
 
97
102
  ## Completion Criteria
98
103
 
104
+ - [ ] `{{artifacts_path}}/design-decisions.md` written to disk (NOT just presented in chat)
105
+ - [ ] FORGE tier determined (for small features)
106
+ - [ ] Key design decisions documented
107
+
99
108
  ## Knowledge Capture
100
109
 
101
110
  Before completing this step, persist important findings using `remember()`:
@@ -39,7 +39,9 @@ If any prerequisites are missing or incomplete:
39
39
 
40
40
  ## Outputs
41
41
 
42
- Produce `{{artifacts_path}}/progress.md` with:
42
+ Write `{{artifacts_path}}/progress.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat.
43
+
44
+ Template:
43
45
 
44
46
  ```markdown
45
47
  # Implementation Progress: <task title>
@@ -42,7 +42,9 @@ If any prerequisites are missing or incomplete:
42
42
 
43
43
  ## Outputs
44
44
 
45
- Produce `{{artifacts_path}}/verify-report.md` with:
45
+ Write `{{artifacts_path}}/verify-report.md` to disk. **You MUST create this file** using `create_file` or equivalent — do not just present content in chat.
46
+
47
+ Template:
46
48
 
47
49
  ```markdown
48
50
  # Verification Report: <task title>
@@ -484,6 +484,24 @@ Keep diagrams under 15 elements. Split complex architectures into multiple focus
484
484
  **Element Ordering:**
485
485
  Elements appear in the order they are defined. Reorder statements to adjust layout.
486
486
 
487
+ ### Special Characters
488
+
489
+ Node labels and subgraph titles containing `@`, `/`, `#`, or other special characters must be quoted:
490
+
491
+ ```mermaid
492
+ %% WRONG — will break parsing
493
+ subgraph @scope/package
494
+ NodeA[@scope/lib]
495
+ end
496
+
497
+ %% CORRECT — quoted labels
498
+ subgraph ScopePkg["@scope/package"]
499
+ NodeA["@scope/lib"]
500
+ end
501
+ ```
502
+
503
+ Use plain alphanumeric strings for node IDs (aliases). Put display names with special characters inside `["..."]`.
504
+
487
505
  ### Alternative Tools
488
506
 
489
507
  For features Mermaid doesn't support, consider:
@@ -206,6 +206,22 @@ How to confirm it worked.
206
206
  Common issues and solutions.
207
207
  ```
208
208
 
209
+ ### Decision Index Template (`docs/decisions/index.md`)
210
+
211
+ ```markdown
212
+ # Architecture Decision Record Index
213
+
214
+ This page is the ADR log for the project. IDs are assigned sequentially as decisions are recorded.
215
+
216
+ ## Index
217
+
218
+ | ID | Title | Status | Date | Source |
219
+ | --- | --- | --- | --- | --- |
220
+ | ADR-001 | {Decision title} | {Accepted/Proposed/Deprecated/Superseded} | {YYYY-MM-DD} | [{flow-topic}]({relative-path-to-flow-artifact}) |
221
+ ```
222
+
223
+ The **Source** column links to the flow artifact (typically `design.md` or `design-decisions.md`) where the decision was originally designed. Use the flow's run directory path relative to the index file location (e.g., `../../.flows/{topic}/{artifacts}/design.md`). If the decision was made outside a flow, use "Manual" or link to the relevant discussion.
224
+
209
225
  ### Reference Template (`docs/reference/{topic}.md`)
210
226
 
211
227
  ```markdown
@@ -229,6 +245,7 @@ Brief description of what this reference covers.
229
245
  - All ADRs live in `docs/decisions/`
230
246
  - When the docs-sync step detects an architecture decision was made during the flow, delegate to `adr-skill`
231
247
  - After `adr-skill` creates/updates an ADR, update `docs/decisions/index.md`
248
+ - Include the Source column linking to the flow artifact where the decision was designed.
232
249
  - Cross-reference ADRs from component docs where relevant
233
250
 
234
251
  ### `c4-architecture` Integration
@@ -237,6 +254,14 @@ Brief description of what this reference covers.
237
254
  - Use Mermaid format for docs files (not HTML) — markdown renders in GitHub
238
255
  - Reference diagrams from component docs
239
256
 
257
+ ### Mermaid Syntax Rules
258
+
259
+ When generating Mermaid diagrams in documentation:
260
+
261
+ - **Quote node labels containing special characters** — Names with `@`, `/`, or other special characters must be wrapped in double quotes inside square brackets: `subgraph Commons["@scope/package-name"]`, `NodeId["@org/lib"]`
262
+ - **Quote subgraph titles with special characters** — `subgraph Title["@scope/name"]` not `subgraph @scope/name`
263
+ - Node IDs (aliases) must not contain special characters — use plain alphanumeric IDs and put the display name in `["..."]`
264
+
240
265
  ## Project Knowledge Acquisition
241
266
 
242
267
  Produces seven populated documents in `docs/architecture/` covering everything needed to work effectively on the project — stack, structure, design, conventions, integrations, testing, and concerns.
@@ -431,7 +456,7 @@ docs/
431
456
  │ ├── overview.md ← From analyze_structure + analyze_dependencies + analyze_diagram
432
457
  │ └── components/ ← From analyze_symbols per major component
433
458
  ├── decisions/
434
- │ └── index.md ← ADR log (delegate to adr-skill)
459
+ │ └── index.md ← ADR log with Source column linking to flow artifacts
435
460
  ├── guides/
436
461
  │ └── testing.md ← From analyze_patterns test info
437
462
  └── reference/
@@ -483,6 +508,25 @@ Follow these rules when generating documentation content. Adapted from *The Elem
483
508
  - **No summary closers** — Do not end every paragraph by restating what it just said
484
509
  - **Consistent terminology** — Pick one term and use it throughout; do not alternate synonyms for variety
485
510
 
511
+ ## Link Rules
512
+
513
+ ### Relative Path Correctness
514
+
515
+ All links in generated docs must be correct relative to the file that contains them. Compute the path from the target doc's directory, not from the project root.
516
+
517
+ | Doc location | Link to `src/types/index.ts` | Link to `.flows/topic/artifacts/design.md` |
518
+ |---|---|---|
519
+ | `docs/README.md` | `../src/types/index.ts` | `../.flows/topic/artifacts/design.md` |
520
+ | `docs/architecture/overview.md` | `../../src/types/index.ts` | `../../.flows/topic/artifacts/design.md` |
521
+ | `docs/decisions/index.md` | `../../src/types/index.ts` | `../../.flows/topic/artifacts/design.md` |
522
+ | `docs/reference/api.md` | `../../src/types/index.ts` | `../../.flows/topic/artifacts/design.md` |
523
+
524
+ **Rules:**
525
+ 1. Count the directory depth from the doc file to `docs/`, then add `../` to reach the project root
526
+ 2. Verify every link target exists before writing it — use `find({ pattern })` if unsure
527
+ 3. Never use absolute paths in documentation — always relative
528
+ 4. Test links mentally: from `docs/architecture/overview.md`, `../../` reaches the project root
529
+
486
530
  ## Anti-Patterns
487
531
 
488
532
  ### Documentation Maintenance