@namch/agent-assistant 1.3.0 → 1.3.2

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.
Files changed (142) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +3 -4
  3. package/agents/backend-engineer.md +3 -3
  4. package/agents/brainstormer.md +3 -3
  5. package/agents/business-analyst.md +3 -3
  6. package/agents/database-architect.md +3 -3
  7. package/agents/debugger.md +2 -2
  8. package/agents/designer.md +2 -2
  9. package/agents/devops-engineer.md +2 -2
  10. package/agents/docs-manager.md +23 -15
  11. package/agents/frontend-engineer.md +3 -3
  12. package/agents/game-engineer.md +3 -3
  13. package/agents/mobile-engineer.md +4 -4
  14. package/agents/performance-engineer.md +3 -3
  15. package/agents/planner.md +4 -4
  16. package/agents/project-manager.md +3 -3
  17. package/agents/researcher.md +3 -3
  18. package/agents/reviewer.md +3 -3
  19. package/agents/scouter.md +3 -3
  20. package/agents/security-engineer.md +3 -3
  21. package/agents/tech-lead.md +3 -3
  22. package/agents/tester.md +2 -2
  23. package/code-assistants/codex-assistant/CODEX.md +1 -2
  24. package/commands/ask/hard.md +1 -1
  25. package/commands/brainstorm/hard.md +1 -1
  26. package/commands/code/hard.md +1 -1
  27. package/commands/code.md +2 -7
  28. package/commands/cook/hard.md +1 -1
  29. package/commands/cook.md +1 -6
  30. package/commands/debug/hard.md +1 -1
  31. package/commands/debug.md +1 -6
  32. package/commands/design/hard.md +1 -1
  33. package/commands/design.md +1 -6
  34. package/commands/docs/audit.md +554 -78
  35. package/commands/docs/business.md +392 -76
  36. package/commands/docs/core.md +573 -74
  37. package/commands/docs.md +62 -61
  38. package/commands/fix/hard.md +1 -1
  39. package/commands/fix.md +1 -6
  40. package/commands/plan/hard.md +1 -1
  41. package/commands/plan.md +1 -6
  42. package/commands/report/fast.md +2 -2
  43. package/commands/report/hard.md +1 -1
  44. package/commands/report.md +2 -7
  45. package/commands/review/hard.md +1 -1
  46. package/commands/test/hard.md +1 -1
  47. package/commands/test.md +1 -6
  48. package/documents/HSOL-ASSESSMENT.md +6 -6
  49. package/documents/SMART-SKILL-ORCHESTRATION-BLUEPRINT.md +1 -1
  50. package/documents/business/business-features/00-index.md +101 -0
  51. package/documents/business/business-features/01-feature-inventory.md +341 -0
  52. package/documents/business/business-features/02-prioritization-moscow.md +148 -0
  53. package/documents/business/business-features/03-feature-specifications.md +511 -0
  54. package/documents/business/business-features/04-dependencies-and-release-sequencing.md +313 -0
  55. package/documents/business/business-features/05-success-metrics.md +290 -0
  56. package/documents/business/business-glossary/00-index.md +89 -0
  57. package/documents/business/business-glossary/01-canonical-terms.md +428 -0
  58. package/documents/business/business-glossary/02-synonyms-and-deprecated-terms.md +180 -0
  59. package/documents/business/business-glossary/03-domain-entities-and-events.md +395 -0
  60. package/documents/business/business-glossary/04-api-term-mapping.md +173 -0
  61. package/documents/business/business-prd/00-index.md +107 -0
  62. package/documents/business/business-prd/01-executive-summary.md +131 -0
  63. package/documents/business/business-prd/02-problem-goals-and-scope.md +204 -0
  64. package/documents/business/business-prd/03-stakeholders-and-requirements.md +210 -0
  65. package/documents/business/business-prd/04-acceptance-risks-assumptions.md +246 -0
  66. package/documents/business/business-workflows/00-index.md +107 -0
  67. package/documents/business/business-workflows/01-actor-map.md +303 -0
  68. package/documents/business/business-workflows/02-workflow-catalog.md +252 -0
  69. package/documents/business/business-workflows/03-detailed-workflows.md +641 -0
  70. package/documents/business/business-workflows/04-decision-rules-and-exceptions.md +216 -0
  71. package/documents/business/business-workflows/05-sla-and-handoffs.md +253 -0
  72. package/documents/knowledge-architecture/00-index.md +159 -0
  73. package/documents/knowledge-architecture/01-system-overview.md +240 -0
  74. package/documents/knowledge-architecture/02-components.md +419 -0
  75. package/documents/knowledge-architecture/03-data-flow.md +368 -0
  76. package/documents/knowledge-architecture/04-design-patterns.md +497 -0
  77. package/documents/knowledge-architecture/05-decisions.md +410 -0
  78. package/documents/knowledge-domain/00-index.md +251 -0
  79. package/documents/knowledge-domain/01-entities.md +582 -0
  80. package/documents/knowledge-domain/02-database-schema.md +138 -0
  81. package/documents/knowledge-domain/03-api-contracts.md +477 -0
  82. package/documents/knowledge-domain/04-business-rules.md +554 -0
  83. package/documents/knowledge-overview/00-index.md +107 -0
  84. package/documents/knowledge-overview/01-project-identity.md +162 -0
  85. package/documents/knowledge-overview/02-tech-stack.md +119 -0
  86. package/documents/knowledge-overview/03-features.md +232 -0
  87. package/documents/knowledge-overview/04-getting-started.md +394 -0
  88. package/documents/knowledge-source-base/00-index.md +107 -0
  89. package/documents/knowledge-source-base/01-directory-structure.md +312 -0
  90. package/documents/knowledge-source-base/02-entry-points.md +346 -0
  91. package/documents/knowledge-source-base/03-key-modules.md +581 -0
  92. package/documents/knowledge-source-base/04-configuration.md +467 -0
  93. package/documents/knowledge-standards/00-index.md +129 -0
  94. package/documents/knowledge-standards/01-code-style.md +161 -0
  95. package/documents/knowledge-standards/02-conventions.md +254 -0
  96. package/documents/knowledge-standards/03-git-workflow.md +228 -0
  97. package/documents/knowledge-standards/04-testing-standards.md +175 -0
  98. package/matrix-skills/_index.yaml +1 -1
  99. package/package.json +1 -1
  100. package/rules/AGENTS.md +1 -1
  101. package/rules/REFERENCE.md +18 -14
  102. package/rules/SKILLS.md +1 -1
  103. package/rules/TEAMS.md +1 -2
  104. package/skills/docs-audit/README.md +10 -8
  105. package/skills/docs-audit/SKILL.md +45 -41
  106. package/skills/docs-audit/references/scoring-framework.md +5 -5
  107. package/skills/docs-core/README.md +19 -14
  108. package/skills/docs-core/SKILL.md +189 -117
  109. package/skills/planning/references/codebase-understanding.md +5 -5
  110. package/code-assistants/codex-assistant/skills/agent-assistant-code-focus/SKILL.md +0 -18
  111. package/code-assistants/codex-assistant/skills/agent-assistant-code-focus/agents/openai.yaml +0 -4
  112. package/code-assistants/codex-assistant/skills/agent-assistant-cook-focus/SKILL.md +0 -18
  113. package/code-assistants/codex-assistant/skills/agent-assistant-cook-focus/agents/openai.yaml +0 -4
  114. package/code-assistants/codex-assistant/skills/agent-assistant-debug-focus/SKILL.md +0 -18
  115. package/code-assistants/codex-assistant/skills/agent-assistant-debug-focus/agents/openai.yaml +0 -4
  116. package/code-assistants/codex-assistant/skills/agent-assistant-design-focus/SKILL.md +0 -18
  117. package/code-assistants/codex-assistant/skills/agent-assistant-design-focus/agents/openai.yaml +0 -4
  118. package/code-assistants/codex-assistant/skills/agent-assistant-fix-focus/SKILL.md +0 -18
  119. package/code-assistants/codex-assistant/skills/agent-assistant-fix-focus/agents/openai.yaml +0 -4
  120. package/code-assistants/codex-assistant/skills/agent-assistant-plan-focus/SKILL.md +0 -18
  121. package/code-assistants/codex-assistant/skills/agent-assistant-plan-focus/agents/openai.yaml +0 -4
  122. package/code-assistants/codex-assistant/skills/agent-assistant-report-focus/SKILL.md +0 -18
  123. package/code-assistants/codex-assistant/skills/agent-assistant-report-focus/agents/openai.yaml +0 -4
  124. package/code-assistants/codex-assistant/skills/agent-assistant-test-focus/SKILL.md +0 -18
  125. package/code-assistants/codex-assistant/skills/agent-assistant-test-focus/agents/openai.yaml +0 -4
  126. package/commands/code/focus.md +0 -297
  127. package/commands/cook/focus.md +0 -209
  128. package/commands/debug/focus.md +0 -103
  129. package/commands/design/focus.md +0 -229
  130. package/commands/fix/focus.md +0 -145
  131. package/commands/plan/focus.md +0 -140
  132. package/commands/report/focus.md +0 -107
  133. package/commands/test/focus.md +0 -123
  134. package/documents/business/business-features.md +0 -894
  135. package/documents/business/business-glossary.md +0 -554
  136. package/documents/business/business-prd.md +0 -400
  137. package/documents/business/business-workflows.md +0 -713
  138. package/documents/knowledge-architecture.md +0 -621
  139. package/documents/knowledge-domain.md +0 -602
  140. package/documents/knowledge-overview.md +0 -316
  141. package/documents/knowledge-source-base.md +0 -581
  142. package/documents/knowledge-standards.md +0 -632
@@ -0,0 +1,175 @@
1
+ # Agent Assistant — Testing Standards
2
+
3
+ > **Purpose**: Test file organization, test runner usage, coverage status, test categories, and an honest assessment of what exists versus what is missing
4
+ > **Parent**: [00-index.md](./00-index.md)
5
+ > **Last Updated**: 2026-03-26
6
+ > **Generated By**: docs-core skill
7
+
8
+ ---
9
+
10
+ ## Test Runner
11
+
12
+ Agent Assistant uses the **Node.js built-in test runner** (`node:test`), available since Node.js 18. No external test framework (Jest, Mocha, Vitest, AVA) is installed.
13
+
14
+ ### Test Command
15
+
16
+ ```json
17
+ {
18
+ "test": "node --test cli/*.test.js"
19
+ }
20
+ ```
21
+
22
+ Run via:
23
+ ```bash
24
+ npm test
25
+ ```
26
+
27
+ This executes all files matching the glob `cli/*.test.js` using Node.js built-in `--test` flag.
28
+
29
+ ---
30
+
31
+ ## Test File Organization
32
+
33
+ ### File Location and Naming
34
+
35
+ | Convention | Value |
36
+ |-----------|-------|
37
+ | Test directory | `cli/` (co-located with source) |
38
+ | File pattern | `*.test.js` |
39
+ | Module system | CommonJS (`require`) |
40
+ | Current test files | `cli/install.test.js.example` (example only, not active) |
41
+
42
+ Tests are co-located with their source files in the `cli/` directory. There is no separate `test/`, `__tests__/`, or `spec/` directory.
43
+
44
+ ### Example Test File Structure
45
+
46
+ The project includes one example test file at `cli/install.test.js.example`. It demonstrates the intended test structure:
47
+
48
+ ```javascript
49
+ const { test, describe } = require('node:test');
50
+ const assert = require('node:assert');
51
+ const fs = require('node:fs');
52
+ const path = require('node:path');
53
+ const os = require('node:os');
54
+
55
+ describe('CLI Installer', () => {
56
+ describe('ensureDir()', () => {
57
+ test('should create directory if it does not exist', () => {
58
+ // test body
59
+ });
60
+
61
+ test('should not throw if directory already exists', () => {
62
+ // test body
63
+ });
64
+ });
65
+
66
+ describe('copyWithReplace()', () => {
67
+ test('should copy files with text replacements', () => {
68
+ // test body
69
+ });
70
+ });
71
+ });
72
+ ```
73
+
74
+ ### Test Naming Conventions (from example)
75
+
76
+ | Element | Convention | Example |
77
+ |---------|-----------|---------|
78
+ | `describe` blocks | Function/module name + `()` | `'ensureDir()'`, `'copyWithReplace()'` |
79
+ | `test` blocks | `'should ...'` format | `'should create directory if it does not exist'` |
80
+ | Top-level `describe` | Module name | `'CLI Installer'` |
81
+ | Assertion library | `node:assert` (strict) | `assert.ok()`, `assert.doesNotThrow()` |
82
+
83
+ ---
84
+
85
+ ## Test Categories
86
+
87
+ ### What Exists
88
+
89
+ | Category | Status | Details |
90
+ |----------|--------|---------|
91
+ | Unit test example | Example file only | `cli/install.test.js.example` — not renamed, not executed by `npm test` |
92
+ | Syntax check | Active | `npm run lint` runs `node --check cli/install.js` to validate JavaScript syntax |
93
+
94
+ ### What is Missing
95
+
96
+ | Category | Status | Notes |
97
+ |----------|--------|-------|
98
+ | Active unit tests | Not present | Example file has `.example` extension; tests are placeholder stubs with `assert.ok(true, 'Test placeholder')` |
99
+ | Function exports for testing | Not present | `cli/install.js` does not export internal functions; the example test file notes this as a blocker: "requires exporting them from install.js" |
100
+ | Integration tests | Not present | No tests for the full install/uninstall CLI flow |
101
+ | End-to-end tests | Not present | No tests that simulate real platform installation |
102
+ | Web tests | Not present | No test configuration in `web/` (no Vitest, no React Testing Library) |
103
+ | Test coverage tool | Not configured | No nyc, c8, istanbul, or `--experimental-test-coverage` flag |
104
+ | Coverage thresholds | Not configured | No minimum coverage requirements |
105
+ | Test CI integration | Not configured | No CI/CD pipeline to run tests automatically |
106
+ | Snapshot tests | Not present | No snapshot testing for any content type |
107
+ | Markdown/YAML validation tests | Not present | No tests to validate agent/command file schemas |
108
+ | Linting as test | Partial | `node --check` validates syntax but not code quality |
109
+
110
+ ---
111
+
112
+ ## Test Command Reference
113
+
114
+ | Command | What It Does | Status |
115
+ |---------|-------------|--------|
116
+ | `npm test` | Runs `node --test cli/*.test.js` | Active (but no `.test.js` files exist — only `.test.js.example`) |
117
+ | `npm run lint` | Runs `node --check cli/install.js` | Active — validates JS syntax |
118
+ | `npm run lint:md` | Echoes a suggestion to run markdownlint | Advisory only (does not execute linting) |
119
+
120
+ ### Running the Example Test
121
+
122
+ To activate the example test:
123
+
124
+ ```bash
125
+ # 1. Rename the example file
126
+ mv cli/install.test.js.example cli/install.test.js
127
+
128
+ # 2. Run tests
129
+ npm test
130
+ ```
131
+
132
+ The test will pass because all assertions are placeholders (`assert.ok(true, 'Test placeholder')`). Actual test implementation requires exporting functions from `cli/install.js`.
133
+
134
+ ---
135
+
136
+ ## Node.js Built-in Test Runner Reference
137
+
138
+ The project targets Node.js >=18.0.0. Key `node:test` APIs used in the example:
139
+
140
+ | API | Import | Purpose |
141
+ |-----|--------|---------|
142
+ | `test()` | `require('node:test')` | Define a test case |
143
+ | `describe()` | `require('node:test')` | Group related tests |
144
+ | `assert.ok()` | `require('node:assert')` | Assert truthy value |
145
+ | `assert.doesNotThrow()` | `require('node:assert')` | Assert no exception thrown |
146
+
147
+ Additional `node:assert` methods available but not used in the example: `strictEqual`, `deepStrictEqual`, `throws`, `rejects`, `match`.
148
+
149
+ The `--test` CLI flag auto-discovers and runs files matching the provided glob pattern. No configuration file is needed.
150
+
151
+ ---
152
+
153
+ ## Gaps Summary
154
+
155
+ | Gap | Severity | Blocker |
156
+ |-----|----------|---------|
157
+ | No active test files (only `.example`) | High | Tests do not run in current state |
158
+ | Internal functions not exported | High | Cannot unit test `ensureDir`, `copyWithReplace`, etc. without refactoring `install.js` |
159
+ | No coverage tooling | Medium | No way to measure what is tested |
160
+ | No web tests | Medium | React components in `web/` have no test setup |
161
+ | No schema validation tests | Low | Agent/command YAML frontmatter is not validated programmatically |
162
+ | No CI test execution | Medium | Tests are never run automatically |
163
+
164
+ ---
165
+
166
+ ## Evidence Sources
167
+
168
+ | Source | Path |
169
+ |--------|------|
170
+ | Package manifest (test script) | [../../package.json](../../package.json) |
171
+ | Example test file | [../../cli/install.test.js.example](../../cli/install.test.js.example) |
172
+ | CLI source (no exports) | [../../cli/install.js](../../cli/install.js) |
173
+ | Lint script (syntax check) | [../../package.json](../../package.json) — `scripts.lint` |
174
+ | Lint:md script (advisory) | [../../package.json](../../package.json) — `scripts.lint:md` |
175
+ | Node.js engine requirement | [../../package.json](../../package.json) — `engines.node` |
@@ -56,7 +56,7 @@ hsol:
56
56
  cache_ttl_seconds: 3600
57
57
  async_threshold: 0.8 # Matrix fitness above this skips discovery
58
58
  # Only run dynamic discovery (find-skills) for these variants; "fast" skips discovery so fast stays fast
59
- apply_for_variants: ["hard", "focus"]
59
+ apply_for_variants: ["hard", "team"]
60
60
 
61
61
  # Fitness scoring weights
62
62
  fitness_weights:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namch/agent-assistant",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Multi-agent orchestration framework for AI coding assistants (Cursor, Copilot, Antigravity, Claude Code, Codex) with Hybrid Skill Orchestration Layer (HSOL).",
5
5
  "main": "cli/install.js",
6
6
  "bin": {
package/rules/AGENTS.md CHANGED
@@ -142,7 +142,7 @@ result:
142
142
 
143
143
  | When | Use |
144
144
  |------|-----|
145
- | Standard `:fast`, `:hard`, `:focus` variants | Single agent per phase |
145
+ | Standard `:fast`, `:hard` variants | Single agent per phase |
146
146
  | `:team` variant | Golden Triangle per phase |
147
147
  | User explicitly requests team review/collaboration | `:team` variant |
148
148
  | Maximum quality with adversarial debate is priority | `:team` variant |
@@ -8,19 +8,19 @@
8
8
 
9
9
  | Command | Router | Variants |
10
10
  |---------|--------|----------|
11
- | `/cook` | `cook.md` | `fast`, `hard`, `focus` |
12
- | `/fix` | `fix.md` | `fast`, `hard`, `focus` |
13
- | `/plan` | `plan.md` | `fast`, `hard`, `focus` |
14
- | `/debug` | `debug.md` | `fast`, `hard`, `focus` |
15
- | `/test` | `test.md` | `fast`, `hard`, `focus` |
11
+ | `/cook` | `cook.md` | `fast`, `hard`, `team` |
12
+ | `/fix` | `fix.md` | `fast`, `hard`, `team` |
13
+ | `/plan` | `plan.md` | `fast`, `hard`, `team` |
14
+ | `/debug` | `debug.md` | `fast`, `hard`, `team` |
15
+ | `/test` | `test.md` | `fast`, `hard`, `team` |
16
16
  | `/review` | `review.md` | `fast`, `hard` |
17
17
  | `/docs` | `docs.md` | `core`, `business`, `audit` |
18
- | `/design` | `design.md` | `fast`, `hard`, `focus` |
18
+ | `/design` | `design.md` | `fast`, `hard`, `team` |
19
19
  | `/deploy` | `deploy.md` | `check`, `preview`, `production`, `rollback` |
20
- | `/report` | `report.md` | `fast`, `hard`, `focus` |
20
+ | `/report` | `report.md` | `fast`, `hard`, `team` |
21
21
  | `/brainstorm` | `brainstorm.md` | `fast`, `hard` |
22
22
  | `/ask` | `ask.md` | `fast`, `hard` |
23
- | `/code` | `code.md` | `fast`, `hard`, `focus` |
23
+ | `/code` | `code.md` | `fast`, `hard`, `team` |
24
24
 
25
25
  ---
26
26
 
@@ -105,14 +105,18 @@ performance-engineer: ./reports/{topic}/performance/{component}/00-index.md + se
105
105
 
106
106
  ---
107
107
 
108
- ## DOCUMENTATION PATHS (from /docs:core)
108
+ ## DOCUMENTATION PATHS (from /docs:core v2.0 — folder-based)
109
109
 
110
110
  ```yaml
111
- overview: ./documents/knowledge-overview.md
112
- architecture: ./documents/knowledge-architecture.md
113
- domain: ./documents/knowledge-domain.md
114
- source-base: ./documents/knowledge-source-base.md
115
- standards: ./documents/knowledge-standards.md
111
+ # Each knowledge area is now a FOLDER with 00-index.md + sub-files
112
+ overview: ./documents/knowledge-overview/00-index.md # + 01~04 sub-files
113
+ architecture: ./documents/knowledge-architecture/00-index.md # + 01~05 sub-files
114
+ domain: ./documents/knowledge-domain/00-index.md # + 01~04 sub-files
115
+ source-base: ./documents/knowledge-source-base/00-index.md # + 01~04 sub-files
116
+ standards: ./documents/knowledge-standards/00-index.md # + 01~04 sub-files
117
+
118
+ # To get full context: read 00-index.md first, then load specific sub-files
119
+ # To get quick overview: read only 00-index.md files
116
120
  ```
117
121
 
118
122
  ---
package/rules/SKILLS.md CHANGED
@@ -61,7 +61,7 @@ Dynamic skills: trust = 0.3 - 1.0 (based on history)
61
61
  | Variant | Discovery |
62
62
  |---------|----------|
63
63
  | `fast` | **Skip** — use matrix only |
64
- | `hard`, `focus` | Check matrix fitness, may trigger discovery |
64
+ | `hard`, `team` | Check matrix fitness, may trigger discovery |
65
65
 
66
66
  ### By Matrix Fitness
67
67
 
package/rules/TEAMS.md CHANGED
@@ -415,7 +415,7 @@ IS task complex with multiple concerns (security + performance + correctness)?
415
415
  ├─ YES → :team (Golden Triangle)
416
416
  └─ NO
417
417
  IS task simple and single-domain?
418
- ├─ YES → Single-agent variant (:fast, :hard, :focus)
418
+ ├─ YES → Single-agent variant (:fast, :hard, :team)
419
419
  └─ NO → Single-agent variant with manual review step
420
420
  ```
421
421
 
@@ -425,7 +425,6 @@ IS task complex with multiple concerns (security + performance + correctness)?
425
425
  |---------|----------------|--------|------|
426
426
  | `:fast` | Single agent | 1 | Speed priority, simple tasks |
427
427
  | `:hard` | Single agent | 1 | Standard quality, focused tasks |
428
- | `:focus` | Single agent | 1 | Clean execution, noise reduction |
429
428
  | `:team` | Golden Triangle | 3 | Maximum quality, adversarial review, complex tasks |
430
429
 
431
430
  **⛔ Do NOT use `:team` for**:
@@ -7,15 +7,16 @@ Documentation can look complete while hiding major risk: unverified controls, pr
7
7
  ## What it generates
8
8
  Docs Audit manages these mandatory outputs in the audit directory:
9
9
 
10
- - documents/audit/audit-security.md
11
- - documents/audit/audit-compliance.md
12
- - documents/audit/audit-dataflow.md
13
- - documents/audit/audit-recommendations.md
10
+ - documents/audit/audit-security/ (00-index.md + 01~04)
11
+ - documents/audit/audit-compliance/ (00-index.md + 01~04)
12
+ - documents/audit/audit-dataflow/ (00-index.md + 01~04)
13
+ - documents/audit/audit-recommendations/ (00-index.md + 01~04)
14
14
 
15
15
  Mode behavior:
16
16
 
17
- - CREATE: produce missing audit documents from scratch.
18
- - UPDATE: refresh existing audit files with current evidence, preserving valid context.
17
+ - CREATE: produce missing audit folders from scratch.
18
+ - UPDATE: refresh existing audit folders with current evidence, preserving valid context.
19
+ - MIGRATE: convert legacy flat `audit-*.md` files into folder-based structure.
19
20
 
20
21
  ## Core capabilities
21
22
  - Scans audit surface using skills/docs-audit/scripts/scan-audit-surface.sh.
@@ -46,12 +47,13 @@ Mode behavior:
46
47
  - Existing files in documents/audit/
47
48
 
48
49
  ## Quality gates / Definition of Done
49
- - All four mandatory audit documents exist and are up to date.
50
+ - All four mandatory audit folders exist with 00-index.md and sub-files.
50
51
  - Major claims are explicitly tagged as Verified, Partial, or Unknown.
51
52
  - Scoring is strict, justified, and free from inflated confidence.
52
53
  - Findings include severity, rationale, and evidence references.
53
54
  - Recommendations are prioritized and realistically actionable.
54
- - Cross-file consistency is maintained for finding IDs and severity logic.
55
+ - Cross-folder consistency is maintained for finding IDs and severity logic.
56
+ - Each 00-index.md contains a strict score section.
55
57
 
56
58
  ## Typical use cases
57
59
  - Produce a baseline security and compliance audit package.
@@ -13,9 +13,10 @@ metadata:
13
13
 
14
14
  This skill replaces the workflow in `commands/docs/audit.md` with a reusable, self-contained audit documentation engine.
15
15
 
16
- It supports two modes:
17
- - `CREATE`: generate missing audit documents from scratch.
18
- - `UPDATE`: refresh existing audit documents without discarding still-valid context.
16
+ It supports three modes:
17
+ - `CREATE`: generate missing audit folders from scratch.
18
+ - `UPDATE`: refresh existing audit folders without discarding still-valid context.
19
+ - `MIGRATE`: convert legacy flat `audit-*.md` files into folder-based structure.
19
20
 
20
21
  All generated files under `./documents/` must be written in English only.
21
22
 
@@ -45,21 +46,21 @@ Visual clarity bars:
45
46
 
46
47
  ## Deliverables
47
48
 
48
- | # | File | Purpose |
49
+ | # | Folder | Purpose |
49
50
  |---|---|---|
50
- | 1 | `./documents/audit/audit-security.md` | Security assessment, attack surface, findings, and risk summary |
51
- | 2 | `./documents/audit/audit-compliance.md` | Compliance posture, control mapping, and verification gaps |
52
- | 3 | `./documents/audit/audit-dataflow.md` | Data flow map, trust boundaries, privacy posture, and sensitive-data handling |
53
- | 4 | `./documents/audit/audit-recommendations.md` | Prioritized remediation roadmap, score uplift plan, and implementation guidance |
51
+ | 1 | `./documents/audit/audit-security/` | Security assessment, attack surface, findings, and risk summary (00-index + 01~04) |
52
+ | 2 | `./documents/audit/audit-compliance/` | Compliance posture, control mapping, and verification gaps (00-index + 01~04) |
53
+ | 3 | `./documents/audit/audit-dataflow/` | Data flow map, trust boundaries, privacy posture, and sensitive-data handling (00-index + 01~04) |
54
+ | 4 | `./documents/audit/audit-recommendations/` | Prioritized remediation roadmap, score uplift plan, and implementation guidance (00-index + 01~04) |
54
55
 
55
56
  Failure condition:
56
- - If fewer than 4 files are produced, execution is incomplete.
57
+ - If fewer than 4 folders are produced with their sub-files, execution is incomplete.
57
58
 
58
- Per-file standard (mandatory):
59
- - `audit-security.md`: vulnerabilities identified, OWASP checklist complete, risk assessment complete.
60
- - `audit-compliance.md`: control coverage matrix, compliance gap register, evidence-state rigor.
61
- - `audit-dataflow.md`: trust boundaries + sensitive data paths + privacy posture.
62
- - `audit-recommendations.md`: prioritized and actionable remediation roadmap linked to finding IDs.
59
+ Per-folder standard (mandatory):
60
+ - `audit-security/`: vulnerabilities identified, OWASP checklist complete, risk assessment complete.
61
+ - `audit-compliance/`: control coverage matrix, compliance gap register, evidence-state rigor.
62
+ - `audit-dataflow/`: trust boundaries + sensitive data paths + privacy posture.
63
+ - `audit-recommendations/`: prioritized and actionable remediation roadmap linked to finding IDs.
63
64
 
64
65
  ## Required References
65
66
 
@@ -83,22 +84,23 @@ Before analysis begins:
83
84
  4. If `./documents/templates/` or `./documents/templates/audit/` exists, treat it as legacy output and ignore it as a template source.
84
85
  5. Do not create or persist template copies under `./documents/templates/`.
85
86
  6. If legacy template copies are present, remove them before continuing.
86
- 7. Check which of the 4 audit files already exist.
87
- 8. Determine per-file mode:
88
- - missing file -> `CREATE`
89
- - existing file -> `UPDATE`
87
+ 7. Check which of the 4 audit folders already exist.
88
+ 8. Determine per-folder mode:
89
+ - folder exists with sub-files -> `UPDATE`
90
+ - flat file exists (legacy `audit-*.md`) -> `MIGRATE`
91
+ - neither exists -> `CREATE`
90
92
  9. Record execution plan before writing.
91
93
 
92
94
  Output format:
93
95
 
94
96
  ```markdown
95
97
  ## Docs-Audit Execution Plan
96
- | File | Status | Mode |
97
- |------|--------|------|
98
- | audit-security.md | Exists / Missing | UPDATE / CREATE |
99
- | audit-compliance.md | Exists / Missing | UPDATE / CREATE |
100
- | audit-dataflow.md | Exists / Missing | UPDATE / CREATE |
101
- | audit-recommendations.md | Exists / Missing | UPDATE / CREATE |
98
+ | Folder | Status | Mode |
99
+ |--------|--------|------|
100
+ | audit-security/ | Exists / Missing / Legacy flat file | UPDATE / CREATE / MIGRATE |
101
+ | audit-compliance/ | Exists / Missing / Legacy flat file | UPDATE / CREATE / MIGRATE |
102
+ | audit-dataflow/ | Exists / Missing / Legacy flat file | UPDATE / CREATE / MIGRATE |
103
+ | audit-recommendations/ | Exists / Missing / Legacy flat file | UPDATE / CREATE / MIGRATE |
102
104
  ```
103
105
 
104
106
  ### Step 1: Hybrid Audit Reconnaissance
@@ -252,24 +254,25 @@ Mapping rules:
252
254
 
253
255
  Verify all of the following before completion:
254
256
 
255
- | Check | audit-security | audit-compliance | audit-dataflow | audit-recommendations |
257
+ | Check | audit-security/ | audit-compliance/ | audit-dataflow/ | audit-recommendations/ |
256
258
  |---|---|---|---|---|
257
- | File exists | □ | □ | □ | □ |
258
- | TOC present | □ | □ | □ | □ |
259
+ | Folder exists with 00-index + sub-files | □ | □ | □ | □ |
260
+ | TOC present in 00-index.md | □ | □ | □ | □ |
259
261
  | English only | □ | □ | □ | □ |
260
262
  | Evidence sources present | □ | □ | □ | □ |
261
- | Known gaps present | □ | □ | □ | □ |
262
- | Final strict score present | □ | □ | □ | □ |
263
+ | Known gaps present in 00-index.md | □ | □ | □ | □ |
264
+ | Strict score in 00-index.md | □ | □ | □ | □ |
263
265
  | No TODO/TBD placeholders | □ | □ | □ | □ |
264
266
  | No unresolved {placeholder} markers | □ | □ | □ | □ |
265
267
  | Claims backed by evidence | □ | □ | □ | □ |
266
268
  | Score rationale present | □ | □ | □ | □ |
269
+ | Finding IDs consistent cross-folder | □ | □ | □ | □ |
267
270
 
268
271
  Additional quality gates:
269
- - `audit-security.md` must contain at least one attack-surface view and one findings table.
270
- - `audit-compliance.md` must contain at least one control-mapping table.
271
- - `audit-dataflow.md` must contain at least one data-flow or trust-boundary diagram.
272
- - `audit-recommendations.md` must contain a prioritized remediation matrix.
272
+ - `audit-security/` must contain at least one attack-surface view and one findings table.
273
+ - `audit-compliance/` must contain at least one control-mapping table.
274
+ - `audit-dataflow/` must contain at least one data-flow or trust-boundary diagram.
275
+ - `audit-recommendations/` must contain a prioritized remediation matrix and score uplift plan.
273
276
 
274
277
  ### Step 8: Completion Report
275
278
 
@@ -278,12 +281,12 @@ Provide a concise final report:
278
281
  ```markdown
279
282
  ## Docs-Audit Complete
280
283
 
281
- | File | Mode | Status |
284
+ | Folder | Mode | Status |
282
285
  |---|---|---|
283
- | ./documents/audit/audit-security.md | CREATE/UPDATE | ✅ |
284
- | ./documents/audit/audit-compliance.md | CREATE/UPDATE | ✅ |
285
- | ./documents/audit/audit-dataflow.md | CREATE/UPDATE | ✅ |
286
- | ./documents/audit/audit-recommendations.md | CREATE/UPDATE | ✅ |
286
+ | ./documents/audit/audit-security/ | CREATE/UPDATE/MIGRATE | ✅ |
287
+ | ./documents/audit/audit-compliance/ | CREATE/UPDATE/MIGRATE | ✅ |
288
+ | ./documents/audit/audit-dataflow/ | CREATE/UPDATE/MIGRATE | ✅ |
289
+ | ./documents/audit/audit-recommendations/ | CREATE/UPDATE/MIGRATE | ✅ |
287
290
 
288
291
  ### Score Summary
289
292
  - Security posture: {score}
@@ -308,8 +311,9 @@ Provide a concise final report:
308
311
  The skill is not complete if it produces shallow summaries.
309
312
 
310
313
  It is complete only when:
311
- - all 4 files exist
312
- - each file is evidence-driven
313
- - each file contains a strict score section
314
+ - all 4 folders exist with 00-index.md + sub-files
315
+ - each folder is evidence-driven
316
+ - each 00-index.md contains a strict score section
317
+ - finding IDs are consistent across folders
314
318
  - the package is materially as rigorous as `docs-core`
315
319
  - recommendations are actionable enough for engineering planning
@@ -103,12 +103,12 @@ Apply a cap when one or more blockers exist.
103
103
 
104
104
  Recommended weighted roll-up:
105
105
 
106
- | File | Weight |
106
+ | Folder | Weight |
107
107
  | --- | --- |
108
- | audit-security.md | 35 |
109
- | audit-compliance.md | 25 |
110
- | audit-dataflow.md | 20 |
111
- | audit-recommendations.md | 20 |
108
+ | audit-security/ | 35 |
109
+ | audit-compliance/ | 25 |
110
+ | audit-dataflow/ | 20 |
111
+ | audit-recommendations/ | 20 |
112
112
 
113
113
  Rules:
114
114
  - If any individual file is below 50, overall maturity cannot exceed `D`.
@@ -5,33 +5,36 @@ Build and maintain the five foundational project knowledge documents with eviden
5
5
  Most repositories have fragmented knowledge: setup steps in one place, architecture in another, and business rules buried in code. Docs Core creates and maintains a single high-quality documentation baseline so onboarding is faster, decisions are safer, and changes are easier to reason about.
6
6
 
7
7
  ## What it generates
8
- Docs Core manages these mandatory outputs in the documents directory:
8
+ Docs Core manages these mandatory output **folders** in the documents directory:
9
9
 
10
- - documents/knowledge-overview.md
11
- - documents/knowledge-architecture.md
12
- - documents/knowledge-domain.md
13
- - documents/knowledge-source-base.md
14
- - documents/knowledge-standards.md
10
+ - documents/knowledge-overview/ (00-index.md + numbered sub-files)
11
+ - documents/knowledge-architecture/ (00-index.md + numbered sub-files)
12
+ - documents/knowledge-domain/ (00-index.md + numbered sub-files)
13
+ - documents/knowledge-source-base/ (00-index.md + numbered sub-files)
14
+ - documents/knowledge-standards/ (00-index.md + numbered sub-files)
15
+
16
+ Each folder contains `00-index.md` (summary + TOC) and numbered sub-files (`01-...md`, `02-...md`, etc.).
15
17
 
16
18
  Mode behavior:
17
19
 
18
- - CREATE: generate missing documents from scratch.
19
- - UPDATE: enrich existing documents with new evidence while preserving valid context.
20
+ - CREATE: generate missing knowledge folders from scratch.
21
+ - UPDATE: enrich existing folder sub-files with new evidence while preserving valid context.
22
+ - MIGRATE: convert legacy flat files (v1.0) to folder-based structure (v2.0).
20
23
 
21
24
  ## Core capabilities
22
25
  - Runs a structured repository scan using skills/docs-core/scripts/scan-project.sh.
23
- - Produces or updates all five mandatory knowledge documents.
26
+ - Produces or updates all five mandatory knowledge folders (00-index.md + sub-files each).
24
27
  - Uses hybrid reconnaissance: script output plus targeted file reading and pattern search.
25
28
  - Builds evidence-backed content instead of speculative summaries.
26
29
  - Preserves still-valid legacy context in UPDATE mode.
27
30
  - Enforces consistency across architecture, domain, source-base, and standards docs.
28
31
 
29
32
  ## Workflow summary
30
- 1. Validate document targets and determine CREATE or UPDATE per file.
33
+ 1. Validate folder targets and determine CREATE, UPDATE, or MIGRATE per knowledge area.
31
34
  2. Scan project structure, stack signals, entry points, and core modules.
32
35
  3. Build an evidence ledger for architecture, domain, standards, and source map claims.
33
- 4. Draft or update each document using the correct template and required sections.
34
- 5. Verify quality gates across all five outputs before completion.
36
+ 4. For each folder: write 00-index.md, then numbered sub-files using templates.
37
+ 5. Verify quality gates across all five folders (25+ files) before completion.
35
38
 
36
39
  ## Inputs and evidence sources
37
40
  - skills/docs-core/SKILL.md
@@ -46,8 +49,10 @@ Mode behavior:
46
49
  - Existing files in documents/
47
50
 
48
51
  ## Quality gates / Definition of Done
49
- - All five mandatory documents exist and are internally consistent.
50
- - Each file includes practical, onboarding-ready content rather than generic prose.
52
+ - All five mandatory knowledge folders exist with 00-index.md + sub-files.
53
+ - Each sub-file includes practical, onboarding-ready content rather than generic prose.
54
+ - 00-index.md TOC in each folder matches actual sub-files.
55
+ - No sub-file exceeds ~300 lines (split when needed).
51
56
  - Claims are traceable to repository evidence.
52
57
  - No placeholder text, unresolved TODOs, or unsupported assumptions.
53
58
  - Required sections (such as table of contents, evidence sources, known gaps) are present where specified by the workflow.