@vpxa/aikit 0.1.67 → 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
|
@@ -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
|
|
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
|