codymaster 4.1.0

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 (193) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +285 -0
  3. package/adapters/antigravity.js +15 -0
  4. package/adapters/claude-code.js +17 -0
  5. package/adapters/cursor.js +16 -0
  6. package/commands/bootstrap.md +49 -0
  7. package/commands/build.md +48 -0
  8. package/commands/content.md +48 -0
  9. package/commands/continuity.md +60 -0
  10. package/commands/debug.md +51 -0
  11. package/commands/demo.md +96 -0
  12. package/commands/deploy.md +51 -0
  13. package/commands/plan.md +42 -0
  14. package/commands/review.md +55 -0
  15. package/commands/track.md +46 -0
  16. package/commands/ux.md +46 -0
  17. package/dist/agent-dispatch.js +161 -0
  18. package/dist/chains/builtin.js +85 -0
  19. package/dist/continuity.js +385 -0
  20. package/dist/dashboard.js +926 -0
  21. package/dist/data.js +122 -0
  22. package/dist/index.js +2434 -0
  23. package/dist/judge.js +252 -0
  24. package/dist/parallel-dispatch.js +359 -0
  25. package/dist/parallel-quality.js +172 -0
  26. package/dist/skill-chain.js +258 -0
  27. package/install.sh +513 -0
  28. package/package.json +79 -0
  29. package/skills/.content-factory-state.json +132 -0
  30. package/skills/.git 2/logs/refs/heads/main +1 -0
  31. package/skills/.git 2/logs/refs/remotes/origin/main +1 -0
  32. package/skills/.git 2/objects/02/fb0956734b5f8ba3f918b7defd04a89cfe0076 +0 -0
  33. package/skills/.git 2/objects/08/1e129d75dc6feac6c02037272e6bd1a04e3324 +0 -0
  34. package/skills/.git 2/objects/0c/5393416f3c5e01c9a655a802bff0dd52f76f0a +0 -0
  35. package/skills/.git 2/objects/10/0b9be46978a946a77188f68be725098a122001 +0 -0
  36. package/skills/.git 2/objects/10/cf041167fc9843610eb3d90259ef3396315fdc +0 -0
  37. package/skills/.git 2/objects/12/5e19538dd6e1338ffe74f6c4c165b00435bf48 +0 -0
  38. package/skills/.git 2/objects/16/a9b9d0088d5c1347628b45a2620b479d8ad57c +0 -0
  39. package/skills/.git 2/objects/17/8c2a9ef93c33ae4eec9d58e82321f9229843a1 +0 -0
  40. package/skills/.git 2/objects/25/397ae41d09104d763bdcac2695209d85cdea89 +0 -0
  41. package/skills/.git 2/objects/2f/a836b7947f2d458e1f639788bf4bb0983a3305 +0 -0
  42. package/skills/.git 2/objects/3a/baaaf0a1c0909c0828335791557125fba911e0 +0 -0
  43. package/skills/.git 2/objects/42/2924221b81f5ce3c4e4daac9a64a24f9b01f9a +0 -0
  44. package/skills/.git 2/objects/42/ec0ce707447dc11446a34c9995fb8533801731 +0 -0
  45. package/skills/.git 2/objects/46/e43ce92866d56ce74b1d750db307cfe6154a15 +0 -0
  46. package/skills/.git 2/objects/48/5e41b633c63f55b8277bcc59f44f67681f671a +0 -0
  47. package/skills/.git 2/objects/49/49c596a3a89fa240642acd95dd3258e261eb09 +0 -0
  48. package/skills/.git 2/objects/50/9d42d8412ef8eaf7f7e138476bac2e4d10ce60 +0 -0
  49. package/skills/.git 2/objects/55/0c8c389d981b463ef849aeb792d8be3ccb6ec8 +0 -0
  50. package/skills/.git 2/objects/5d/82d3b18410cdda3ace3677436f0cb599dbe2d2 +0 -0
  51. package/skills/.git 2/objects/60/0617c58e871a38b33bf29e282d132bb3c381ad +0 -0
  52. package/skills/.git 2/objects/6a/8369a99c687b7245c92ffaf0e0f0dab9014504 +0 -0
  53. package/skills/.git 2/objects/79/bea435d40ab531c1aaf6be0432c6a5b7aaed21 +0 -0
  54. package/skills/.git 2/objects/7e/5ebd79251c2f14e4aceb86c74b6b6daae6b500 +0 -0
  55. package/skills/.git 2/objects/81/98a822a60178d6d5023ddb3e222cddf048742e +0 -0
  56. package/skills/.git 2/objects/86/0a0e1943dfe53411d2e499a1f16f46a96ef758 +0 -0
  57. package/skills/.git 2/objects/86/971fb55fdc081fdbae52376f0f13e57a4e9b04 +0 -0
  58. package/skills/.git 2/objects/88/b89dd609a0a03f8d4fe8bfde20d5b8fc1d326d +0 -0
  59. package/skills/.git 2/objects/90/8737edb6b7809e32cc01590b4e08ba42a9d40d +0 -0
  60. package/skills/.git 2/objects/93/d5a8a9a7d4fb7f11491cb596a6880528725118 +0 -0
  61. package/skills/.git 2/objects/98/46a2ab81d0c3b3eb00ef88fc56989aa7e9f316 +0 -0
  62. package/skills/.git 2/objects/9b/d8dd1e49cf274eaf9c555f3ab39dce7af5715e +0 -0
  63. package/skills/.git 2/objects/a1/13329fb0cec96ae78b222d33a24c3b5bc7fa1f +0 -0
  64. package/skills/.git 2/objects/a9/e6effe626e8a3aea3a8fc3364b492191c6e7d0 +0 -0
  65. package/skills/.git 2/objects/ad/6de7e48d9782cca9353d1ff0aa1aab7fe1df85 +0 -0
  66. package/skills/.git 2/objects/af/54ae316f771ff692e299ffcd8bf2f06b413b59 +0 -0
  67. package/skills/.git 2/objects/b0/4cb8b0b00dad633e731c1472161419e738d674 +0 -0
  68. package/skills/.git 2/objects/b3/094abb0b9ed46419b269e4a4e36a459690e3b0 +0 -0
  69. package/skills/.git 2/objects/b9/435c5d4baac2cfc5c83009ddd27b46b60db5f1 +0 -0
  70. package/skills/.git 2/objects/ba/5da17dbaec5ec2dcfdfd126aead518d1171d5c +0 -0
  71. package/skills/.git 2/objects/c0/bf58703aa258ba5dd63083bebaec8f223d844c +0 -0
  72. package/skills/.git 2/objects/c4/701a34edf1fc1bad58ccc57bd03f9426acb59a +0 -0
  73. package/skills/.git 2/objects/c7/5ccce9a4e5cc74d9b3174550cf6d993ca43638 +0 -0
  74. package/skills/.git 2/objects/c7/710d59b5a35b0f1f0a0399386643a0bd94c929 +0 -0
  75. package/skills/.git 2/objects/d1/fe58237112e953e5fec52da22cf38e08be3df9 +5 -0
  76. package/skills/.git 2/objects/d2/2bbe9fd2f74c95bc5583e803f5e435f1e2cd86 +0 -0
  77. package/skills/.git 2/objects/d7/e72852ea2bff74581dbf247d400120086229f4 +0 -0
  78. package/skills/.git 2/objects/d8/d4c3b5553e4fd72807e1d4b49ef07d9ef3ac35 +0 -0
  79. package/skills/.git 2/objects/dc/75050c2876f6a02ae2a53a3c886f395b622977 +0 -0
  80. package/skills/.git 2/objects/ee/e8546f95acec500187c08a28a8b9ee02db0dec +0 -0
  81. package/skills/.git 2/objects/ef/263c059208b416c2146434f10cb2b9fabcba16 +0 -0
  82. package/skills/.git 2/objects/f3/ae597e84d9a59b88acd21c99bde2eaf686d785 +0 -0
  83. package/skills/.git 2/objects/f3/f6f5673c821d3d8e76fa267a9e882e7a5387ea +0 -0
  84. package/skills/.git 2/objects/f9/6e6d0ad02624dd11d5848594d056caef7a5e8b +0 -0
  85. package/skills/.git 2/objects/ff/278988fc1edf0db3abcf18de795f4cc0b4f3e1 +0 -0
  86. package/skills/.git 2/refs/heads/main +1 -0
  87. package/skills/.git 2/refs/remotes/origin/main +1 -0
  88. package/skills/.pytest_cache 2/v/cache/nodeids +76 -0
  89. package/skills/.pytest_cache 2/v/cache/stepwise +1 -0
  90. package/skills/_shared/helpers.md +123 -0
  91. package/skills/_shared/outputs-convention.md +24 -0
  92. package/skills/cm-ads-tracker/SKILL.md +109 -0
  93. package/skills/cm-ads-tracker/evals/evals.json +55 -0
  94. package/skills/cm-ads-tracker/references/gtm-architecture.md +321 -0
  95. package/skills/cm-ads-tracker/references/industry-events.md +294 -0
  96. package/skills/cm-ads-tracker/references/platforms-api.md +238 -0
  97. package/skills/cm-ads-tracker/templates/capi-payload.md +79 -0
  98. package/skills/cm-ads-tracker/templates/datalayer-push.js +104 -0
  99. package/skills/cm-ads-tracker/templates/gtm-variables.js +56 -0
  100. package/skills/cm-brainstorm-idea/SKILL.md +423 -0
  101. package/skills/cm-code-review/SKILL.md +151 -0
  102. package/skills/cm-content-factory/SKILL.md +416 -0
  103. package/skills/cm-continuity/SKILL.md +399 -0
  104. package/skills/cm-dashboard/SKILL.md +533 -0
  105. package/skills/cm-dashboard/ui/app.js +1270 -0
  106. package/skills/cm-dashboard/ui/index.html +206 -0
  107. package/skills/cm-dashboard/ui/style.css +440 -0
  108. package/skills/cm-debugging/SKILL.md +412 -0
  109. package/skills/cm-deep-search/SKILL.md +242 -0
  110. package/skills/cm-design-system/SKILL.md +97 -0
  111. package/skills/cm-design-system/resources/halo-modern.md +40 -0
  112. package/skills/cm-design-system/resources/lunaris-advanced.md +40 -0
  113. package/skills/cm-design-system/resources/nitro-enterprise.md +39 -0
  114. package/skills/cm-design-system/resources/shadcn-default.md +37 -0
  115. package/skills/cm-dockit/README.md +100 -0
  116. package/skills/cm-dockit/SKILL.md +302 -0
  117. package/skills/cm-dockit/index.html +443 -0
  118. package/skills/cm-dockit/package-lock.json +1850 -0
  119. package/skills/cm-dockit/package.json +14 -0
  120. package/skills/cm-dockit/prompts/analysis.md +34 -0
  121. package/skills/cm-dockit/prompts/api-reference.md +24 -0
  122. package/skills/cm-dockit/prompts/architecture.md +21 -0
  123. package/skills/cm-dockit/prompts/data-flow.md +20 -0
  124. package/skills/cm-dockit/prompts/database.md +21 -0
  125. package/skills/cm-dockit/prompts/deployment.md +22 -0
  126. package/skills/cm-dockit/prompts/flows.md +21 -0
  127. package/skills/cm-dockit/prompts/jtbd.md +20 -0
  128. package/skills/cm-dockit/prompts/personas.md +24 -0
  129. package/skills/cm-dockit/prompts/sop-modules.md +40 -0
  130. package/skills/cm-dockit/scripts/doc-gen.sh +121 -0
  131. package/skills/cm-dockit/scripts/dockit-dashboard.sh +142 -0
  132. package/skills/cm-dockit/scripts/dockit-runner.sh +607 -0
  133. package/skills/cm-dockit/scripts/dockit-task.sh +166 -0
  134. package/skills/cm-dockit/skills/analyze-codebase.md +174 -0
  135. package/skills/cm-dockit/skills/api-reference.md +237 -0
  136. package/skills/cm-dockit/skills/changelog-guide.md +195 -0
  137. package/skills/cm-dockit/skills/content-guidelines.md +190 -0
  138. package/skills/cm-dockit/skills/sop-guide.md +184 -0
  139. package/skills/cm-dockit/skills/tech-docs.md +287 -0
  140. package/skills/cm-dockit/templates/markdown/structure.md +60 -0
  141. package/skills/cm-dockit/templates/vitepress-premium/.vitepress/config.mts +110 -0
  142. package/skills/cm-dockit/templates/vitepress-premium/.vitepress/theme/custom.css +189 -0
  143. package/skills/cm-dockit/templates/vitepress-premium/.vitepress/theme/index.ts +4 -0
  144. package/skills/cm-dockit/templates/vitepress-premium/package.json +19 -0
  145. package/skills/cm-dockit/templates/vitepress-premium/tests/frontend.test.ts +45 -0
  146. package/skills/cm-dockit/tests/runner.test.ts +66 -0
  147. package/skills/cm-dockit/workflows/export-markdown.md +82 -0
  148. package/skills/cm-dockit/workflows/generate-docs.md +68 -0
  149. package/skills/cm-dockit/workflows/setup-vitepress.md +181 -0
  150. package/skills/cm-example/SKILL.md +26 -0
  151. package/skills/cm-execution/SKILL.md +268 -0
  152. package/skills/cm-git-worktrees/SKILL.md +164 -0
  153. package/skills/cm-how-it-work/SKILL.md +189 -0
  154. package/skills/cm-identity-guard/SKILL.md +412 -0
  155. package/skills/cm-jtbd/SKILL.md +98 -0
  156. package/skills/cm-planning/SKILL.md +130 -0
  157. package/skills/cm-project-bootstrap/SKILL.md +161 -0
  158. package/skills/cm-project-bootstrap/templates/AGENTS.md +42 -0
  159. package/skills/cm-project-bootstrap/templates/frontend-safety.test.js +51 -0
  160. package/skills/cm-project-bootstrap/templates/i18n-sync.test.js +38 -0
  161. package/skills/cm-project-bootstrap/templates/pr-template.md +12 -0
  162. package/skills/cm-project-bootstrap/templates/project-identity.json +29 -0
  163. package/skills/cm-project-bootstrap/templates/vitest.config.js +10 -0
  164. package/skills/cm-quality-gate/SKILL.md +218 -0
  165. package/skills/cm-readit/SKILL.md +289 -0
  166. package/skills/cm-readit/audio-player.md +206 -0
  167. package/skills/cm-readit/examples/blog-reader.js +352 -0
  168. package/skills/cm-readit/examples/voice-cro.js +390 -0
  169. package/skills/cm-readit/tts-engine.md +262 -0
  170. package/skills/cm-readit/ui-patterns.md +362 -0
  171. package/skills/cm-readit/voice-cro.md +223 -0
  172. package/skills/cm-safe-deploy/SKILL.md +120 -0
  173. package/skills/cm-safe-deploy/templates/deploy.sh +89 -0
  174. package/skills/cm-safe-i18n/SKILL.md +473 -0
  175. package/skills/cm-secret-shield/SKILL.md +580 -0
  176. package/skills/cm-skill-chain/SKILL.md +78 -0
  177. package/skills/cm-skill-index/SKILL.md +318 -0
  178. package/skills/cm-skill-mastery/SKILL.md +169 -0
  179. package/skills/cm-start/SKILL.md +65 -0
  180. package/skills/cm-status/SKILL.md +12 -0
  181. package/skills/cm-tdd/SKILL.md +370 -0
  182. package/skills/cm-terminal/SKILL.md +177 -0
  183. package/skills/cm-test-gate/SKILL.md +242 -0
  184. package/skills/cm-ui-preview/SKILL.md +291 -0
  185. package/skills/cm-ux-master/DESIGN_STANDARD_TEMPLATE.md +54 -0
  186. package/skills/cm-ux-master/SKILL.md +114 -0
  187. package/skills/cro-methodology/SKILL.md +98 -0
  188. package/skills/cro-methodology/references/COPYWRITING.md +178 -0
  189. package/skills/cro-methodology/references/OBJECTIONS.md +135 -0
  190. package/skills/cro-methodology/references/PERSUASION.md +158 -0
  191. package/skills/cro-methodology/references/RESEARCH.md +220 -0
  192. package/skills/cro-methodology/references/funnel-analysis.md +365 -0
  193. package/skills/cro-methodology/references/testing-methodology.md +330 -0
@@ -0,0 +1,66 @@
1
+ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
2
+ import { execSync } from 'child_process';
3
+ import * as fs from 'fs';
4
+ import * as path from 'path';
5
+ import * as os from 'os';
6
+
7
+ // Test the backend Bash Runner (dockit-runner.sh)
8
+
9
+ describe('CM DocKit Runner (Backend Scripts)', () => {
10
+ let tempProjectDir: string;
11
+ let dockitRunnerPath: string;
12
+
13
+ beforeAll(() => {
14
+ // Create a temporary mock project
15
+ tempProjectDir = fs.mkdtempSync(path.join(os.tmpdir(), 'dockit-test-'));
16
+ dockitRunnerPath = path.resolve(__dirname, '../scripts/dockit-runner.sh');
17
+ // Ensure scripts have execute permission
18
+ execSync(`chmod +x ${dockitRunnerPath}`);
19
+ });
20
+
21
+ afterAll(() => {
22
+ // Cleanup
23
+ fs.rmSync(tempProjectDir, { recursive: true, force: true });
24
+ });
25
+
26
+ it('should plan tasks correctly via dry-run and initialize progress file', () => {
27
+ // Run the script in dry-run mode
28
+ const cmd = `bash ${dockitRunnerPath} -p ${tempProjectDir} -t all --dry-run`;
29
+ let output = '';
30
+ try {
31
+ output = execSync(cmd, { encoding: 'utf-8' });
32
+ } catch (e: any) {
33
+ output = e.stdout || e.message;
34
+ }
35
+
36
+ // Verify execution output contains plans
37
+ expect(output).toContain('Task Plan (dry-run)');
38
+ expect(output).toContain('Total: 12 tasks'); // Expecting 12 planned tasks for type=all
39
+
40
+ // Verify that the _progress.json file was created during initialization
41
+ const progressFile = path.join(tempProjectDir, 'docs', '_progress.json');
42
+ expect(fs.existsSync(progressFile)).toBe(true);
43
+
44
+ // Verify JSON structure and DAG paths
45
+ const progressData = JSON.parse(fs.readFileSync(progressFile, 'utf-8'));
46
+ expect(progressData).toHaveProperty('tasks');
47
+ expect(Array.isArray(progressData.tasks)).toBe(true);
48
+
49
+ const tasks = progressData.tasks;
50
+
51
+ // 1. Initial Analysis Task
52
+ const analysisTask = tasks.find((t: any) => t.id === 'analysis');
53
+ expect(analysisTask).toBeDefined();
54
+ expect(analysisTask.depends_on).toBe(null); // Phase 0
55
+
56
+ // 2. Tech Architecture Tasks depend on analysis
57
+ const archTask = tasks.find((t: any) => t.id === 'architecture');
58
+ expect(archTask).toBeDefined();
59
+ expect(archTask.depends_on).toBe('analysis');
60
+
61
+ // 3. SOP Tasks depend on analysis (or personas)
62
+ const sopTask = tasks.find((t: any) => t.id === 'sop-index');
63
+ expect(sopTask).toBeDefined();
64
+ expect(sopTask.depends_on).toBe('personas'); // when type=all
65
+ });
66
+ });
@@ -0,0 +1,82 @@
1
+ ---
2
+ description: "Export generated documentation as clean Markdown files with proper folder structure."
3
+ ---
4
+
5
+ # Export Markdown Workflow
6
+
7
+ Export documentation as plain Markdown with a clean folder structure.
8
+
9
+ ## Steps
10
+
11
+ ### 1. Ensure Directory Structure
12
+
13
+ // turbo
14
+ Create the following structure in `[project_root]/docs/`:
15
+
16
+ ```
17
+ docs/
18
+ ├── README.md ← Index/landing page
19
+ ├── _analysis.md ← Codebase analysis (internal)
20
+ ├── architecture.md ← System architecture
21
+ ├── database.md ← Database schema
22
+ ├── deployment.md ← Deployment guide
23
+ ├── data-flow.md ← Data flow diagrams
24
+ ├── sop/
25
+ │ ├── index.md ← SOP overview
26
+ │ └── [module].md ← One per feature
27
+ └── api/
28
+ ├── index.md ← API overview
29
+ └── [resource].md ← One per resource
30
+ ```
31
+
32
+ ### 2. Generate README.md (Index)
33
+
34
+ Create `docs/README.md`:
35
+
36
+ ```markdown
37
+ # [Project Name] — Documentation
38
+
39
+ ## 📐 Technical Documentation
40
+ - [Architecture](./architecture.md)
41
+ - [Database](./database.md)
42
+ - [Deployment](./deployment.md)
43
+ - [Data Flow](./data-flow.md)
44
+
45
+ ## 📋 SOP — User Guides
46
+ - [Overview](./sop/index.md)
47
+ - [List of all SOPs by module]
48
+
49
+ ## 🔌 API Reference
50
+ - [Overview](./api/index.md)
51
+ - [List of all API docs by resource]
52
+
53
+ ---
54
+
55
+ > Generated by **Doc-Kit** for Google Antigravity
56
+ > Last updated: [date]
57
+ ```
58
+
59
+ ### 3. Clean Up
60
+
61
+ - Remove `_analysis.md` from final output (it's internal)
62
+ - Ensure all Markdown files have YAML frontmatter with `title` and `description`
63
+ - Verify all relative links between files work
64
+ - Check Mermaid syntax is valid
65
+
66
+ ### 4. Summary
67
+
68
+ Report to user:
69
+ ```
70
+ ✅ Documentation generated successfully!
71
+
72
+ 📁 Location: [project_root]/docs/
73
+ 📄 Files: [count] files generated
74
+ 📝 Format: Markdown
75
+
76
+ To view:
77
+ - Open docs/README.md in any Markdown viewer
78
+ - Or use: npx serve docs/
79
+
80
+ To convert to website later:
81
+ - Run /doc-kit and choose 'vitepress' format
82
+ ```
@@ -0,0 +1,68 @@
1
+ ---
2
+ description: "Generate documentation from codebase analysis. Interactive CLI: choose doc type (tech/sop/api/all) and format (markdown/vitepress)."
3
+ ---
4
+
5
+ # Generate Documentation Workflow
6
+
7
+ Main workflow to generate documentation from code analysis.
8
+
9
+ ## Prerequisites
10
+
11
+ - Source code path must be accessible
12
+ - Node.js 18+ (if choosing VitePress format)
13
+
14
+ ## Workflow
15
+
16
+ ### Step 1: Choose Document Type
17
+
18
+ Ask the user which type of documentation to generate:
19
+
20
+ - **tech** — Technical system documentation (architecture, database, deployment, data flow)
21
+ - **sop** — SOP user guides (step-by-step, troubleshooting, FAQ)
22
+ - **api** — API reference (endpoints, schemas, examples)
23
+ - **all** — Generate all of the above
24
+
25
+ ### Step 2: Choose Output Format
26
+
27
+ Ask the user which output format:
28
+
29
+ - **markdown** — Plain Markdown files in `docs/` folder. Simple, portable, works anywhere.
30
+ - **vitepress** — Premium VitePress static site. Beautiful, searchable, built-in Mermaid, deployable.
31
+
32
+ ### Step 3: Specify Source Code Path
33
+
34
+ Ask for the absolute path to the project root directory.
35
+
36
+ ### Step 4: Run Analysis
37
+
38
+ // turbo
39
+ Read the skill file at `skills/cm-dockit/skills/analyze-codebase.md` and follow its procedure to analyze the codebase.
40
+
41
+ Save output to `[project_root]/docs/analysis.md`.
42
+
43
+ ### Step 5: Generate Documents
44
+
45
+ Based on the chosen type, read the corresponding skill file and follow its procedure:
46
+
47
+ - **tech**: Read `skills/cm-dockit/skills/tech-docs.md`
48
+ - **sop**: Read `skills/cm-dockit/skills/sop-guide.md`
49
+ - **api**: Read `skills/cm-dockit/skills/api-reference.md`
50
+ - **all**: Read and execute all three sequentially
51
+
52
+ ### Step 6: Export
53
+
54
+ Based on the chosen format:
55
+
56
+ **If markdown:**
57
+ Read `skills/cm-dockit/workflows/export-markdown.md` and follow its procedure.
58
+
59
+ **If vitepress:**
60
+ Read `skills/cm-dockit/workflows/setup-vitepress.md` and follow its procedure.
61
+
62
+ ### Step 7: Summary
63
+
64
+ Present to user:
65
+ - ✅ List of all generated files
66
+ - 📁 Output directory location
67
+ - 🚀 How to view/serve the docs
68
+ - 📝 Suggestions for customization
@@ -0,0 +1,181 @@
1
+ ---
2
+ description: "Scaffold a premium VitePress site from generated documentation files."
3
+ ---
4
+
5
+ # Setup VitePress — Premium Workflow
6
+
7
+ Create a professional VitePress static site from the generated documentation.
8
+
9
+ ## Prerequisites
10
+
11
+ - Node.js 18+
12
+ - Generated docs in `[project_root]/docs/`
13
+
14
+ ## Steps
15
+
16
+ ### 1. Scaffold Premium Boilerplate
17
+
18
+ // turbo
19
+ ```bash
20
+ cd [project_root]
21
+ # Copy the entire robust boilerplate (includes package.json, tests, and .vitepress)
22
+ cp -r ~/.gemini/antigravity/skills/cm-dockit/templates/vitepress-premium docs-site
23
+
24
+ # Install dependencies
25
+ cd docs-site
26
+ npm install
27
+ ```
28
+
29
+ > **Note:** The new boilerplate is configured with `srcDir: '../docs'`. This means VitePress will automatically read your generated Markdown from `[project_root]/docs/` without needing to copy them into `docs-site/`! This prevents duplicate files and sync issues.
30
+
31
+ ### 2. Verify Output & Run Test Gate
32
+
33
+ // turbo
34
+ ```bash
35
+ cd [project_root]/docs-site
36
+ # Run the automated frontend testing gate to verify config and dependencies
37
+ npm run test:gate
38
+ ```
39
+
40
+ > **Important:** If `test:gate` fails, the `config.mts` or Markdown frontmatter may have syntax errors. Fix them before proceeding.
41
+
42
+ ### 3. Customize Configuration
43
+
44
+ Edit `docs-site/.vitepress/config.mts`:
45
+
46
+ Replace all `[PLACEHOLDER]` values:
47
+ - `[Project Name]` → actual project name
48
+ - Update `sitemap.hostname` for deployment target
49
+ - Add social links (GitHub, etc.)
50
+
51
+ ### 4. Generate Sidebar
52
+
53
+ Update the `sidebar` in `docs-site/.vitepress/config.mts` based on actual docs structure.
54
+
55
+ **Method:** Scan `docs-site/` and build sidebar config:
56
+
57
+ ```typescript
58
+ sidebar: [
59
+ {
60
+ text: 'Overview',
61
+ items: [
62
+ { text: 'Introduction', link: '/' },
63
+ ],
64
+ },
65
+ {
66
+ text: 'Architecture & Technical',
67
+ items: [
68
+ // List actual filenames found in docs-site/
69
+ // e.g., { text: 'Architecture', link: '/architecture' },
70
+ // e.g., { text: 'Database', link: '/database' },
71
+ ],
72
+ },
73
+ {
74
+ text: 'User Guides',
75
+ items: [
76
+ // Auto-populate from docs-site/sop/*.md
77
+ ],
78
+ },
79
+ {
80
+ text: 'API Reference',
81
+ items: [
82
+ // Auto-populate from docs-site/api/*.md
83
+ ],
84
+ },
85
+ ],
86
+ ```
87
+
88
+ > **Important:** VitePress sidebar `link` values are file paths without `.md` extension.
89
+ > Example: `architecture.md` → `link: '/architecture'`
90
+
91
+ ### 5. Build & Verify
92
+
93
+ // turbo
94
+ ```bash
95
+ cd docs-site
96
+ npm run build 2>&1 | tee build.log
97
+ ```
98
+
99
+ **Expected:** Build completes with exit code 0. Check `build.log` for warnings.
100
+
101
+ **Common build errors and fixes:**
102
+
103
+ | Error | Cause | Fix |
104
+ |-------|-------|-----|
105
+ | `dead link found` | Broken relative link | Fix link path |
106
+ | `sidebar item not found` | Wrong link in sidebar config | Match actual filenames |
107
+ | `YAML parse error` | Invalid frontmatter | Fix YAML syntax |
108
+
109
+ > **Note:** VitePress uses pure markdown — no MDX escaping issues!
110
+ > Characters like `<`, `{`, `}` work normally in markdown content.
111
+
112
+ ### 6. Preview
113
+
114
+ ```bash
115
+ cd docs-site
116
+ npm run dev -- --port 3000
117
+ ```
118
+
119
+ Open `http://localhost:3000` to preview.
120
+
121
+ **Verify checklist:**
122
+ - [ ] Mermaid diagrams render correctly ← **CRITICAL**
123
+ - [ ] Dark/light mode toggle works
124
+ - [ ] Sidebar navigation works
125
+ - [ ] Search works (type `/` to focus)
126
+ - [ ] Admonitions (:::tip, :::warning) display correctly
127
+ - [ ] `<details>` sections expand/collapse
128
+ - [ ] Mobile responsive (hamburger menu)
129
+
130
+ ### 7. Post-Setup Optimizations (Optional)
131
+
132
+ #### Code Groups (Multi-platform examples)
133
+
134
+ VitePress has built-in code groups (replaces Docusaurus Tabs):
135
+
136
+ ```md
137
+ ::: code-group
138
+
139
+ ```bash [npm]
140
+ npm install myapp
141
+ ```
142
+
143
+ ```bash [yarn]
144
+ yarn add myapp
145
+ ```
146
+
147
+ ```bash [pnpm]
148
+ pnpm add myapp
149
+ ```
150
+
151
+ :::
152
+ ```
153
+
154
+ #### Deploy to GitHub Pages
155
+
156
+ ```bash
157
+ # Add to package.json scripts:
158
+ # "docs:build": "vitepress build",
159
+ # "docs:preview": "vitepress preview"
160
+
161
+ # Build and deploy
162
+ cd docs-site
163
+ npx vitepress build
164
+ # Output is in .vitepress/dist/
165
+ ```
166
+
167
+ #### Deploy to Cloudflare Pages
168
+
169
+ ```bash
170
+ # Build command: npx vitepress build
171
+ # Build output directory: .vitepress/dist
172
+ # Node.js version: 18
173
+ ```
174
+
175
+ #### Deploy to Vercel
176
+
177
+ ```bash
178
+ # Framework Preset: VitePress
179
+ # Build command: npx vitepress build
180
+ # Output directory: .vitepress/dist
181
+ ```
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: cm-example
3
+ description: A template demonstrating the universal format compatible with Antigravity, Claude, Cursor, and OpenClaw.
4
+ version: 1.0.0
5
+ platforms:
6
+ - all
7
+ ---
8
+
9
+ # Universal Skill Example
10
+
11
+ This skill demonstrates the unified format that `omni-agent` will compile into platform-specific configurations.
12
+
13
+ ## The Instructions
14
+ When the user asks for "universal hello world", output a greeting in 3 different languages.
15
+
16
+ ## Sub-agent Instructions
17
+ > [!NOTE]
18
+ > Used by platforms that support recursive agents (like Antigravity / OpenFang).
19
+ 1. Subagent A: Translate into French.
20
+ 2. Subagent B: Translate into Spanish.
21
+ 3. Subagent C: Translate into Japanese.
22
+
23
+ ## Context Injection
24
+ Inject these variables into the prompt context when compiling:
25
+ `{{ workspace_root }}`
26
+ `{{ current_branch }}`
@@ -0,0 +1,268 @@
1
+ ---
2
+ name: cm-execution
3
+ description: "Use when executing implementation plans — choose mode: batch execution with checkpoints, subagent-per-task, or parallel dispatch for independent problems."
4
+ ---
5
+
6
+ # Execution — Execute Plans at Scale
7
+
8
+ > **Role: Lead Developer** — You execute implementation plans systematically with quality gates at every checkpoint.
9
+
10
+ > **Three modes, one skill.** Choose based on task structure.
11
+
12
+ ## Step 0: Load Working Memory (MANDATORY)
13
+
14
+ Per `_shared/helpers.md#Load-Working-Memory`
15
+
16
+ After EACH completed task: Per `_shared/helpers.md#Update-Continuity`
17
+
18
+ ### Pre-flight: Skill Coverage Audit
19
+
20
+ Before choosing execution mode, scan plan tasks for technology keywords:
21
+
22
+ ```
23
+ 1. Extract technologies/frameworks/tools from ALL task descriptions
24
+ 2. Cross-reference with cm-skill-index Layer 1 triggers
25
+ 3. Check installed external skills: npx skills list
26
+ 4. If gap found → trigger Discovery Loop (cm-skill-mastery Part C)
27
+ → npx skills find "{keyword}" → review → ask user → install
28
+ 5. Log any installations to .cm-skills-log.json
29
+ 6. Only proceed to Mode Selection after all gaps resolved
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Mode Selection
35
+
36
+ ```
37
+ Have a plan with independent tasks?
38
+ ├── Need SPEED + QUALITY on 3+ tasks?
39
+ │ └── YES → Mode E: TRIZ-Parallel ⚡ (recommended)
40
+ ├── Stay in this session?
41
+ │ ├── YES → Mode B: Subagent-Driven
42
+ │ └── NO → Mode A: Batch Execution
43
+ └── Multiple independent failures/problems?
44
+ └── YES → Mode C: Parallel Dispatch
45
+ ```
46
+
47
+ | Mode | When | Strategy |
48
+ |------|------|----------|
49
+ | **A: Batch** | Plan with checkpoints | Execute 3 tasks → report → feedback → next batch |
50
+ | **B: Subagent** | Plan with independent tasks, same session | Fresh subagent per task + 2-stage review |
51
+ | **C: Parallel** | 2+ independent problems | One agent per problem domain |
52
+ | **E: TRIZ-Parallel** ⚡ | 3+ independent tasks, need speed + quality | Dependency-aware parallel dispatch with per-agent quality gates |
53
+
54
+ ---
55
+
56
+ ## Mode A: Batch Execution
57
+
58
+ ### Process
59
+ 1. **Load plan** → review critically → raise concerns
60
+ 2. **Execute batch** (default: 3 tasks)
61
+ - Mark in_progress → follow steps → verify → mark complete
62
+ 3. **Report** → show what was done + verification output
63
+ 4. **Continue** → apply feedback → next batch
64
+ 5. **Complete** → use `cm-code-review` to finish
65
+
66
+ ### Rules
67
+ - Follow plan steps exactly
68
+ - Don't skip verifications
69
+ - Between batches: report and wait
70
+ - Stop when blocked, don't guess
71
+
72
+ ---
73
+
74
+ ## Mode B: Subagent-Driven Development
75
+
76
+ ### Process
77
+ 1. **Read plan** → extract ALL tasks with full text
78
+ 2. **Per task:**
79
+ - Dispatch implementer subagent with full task text
80
+ - Answer subagent questions if any
81
+ - Subagent implements, tests, commits, self-reviews
82
+ - Dispatch spec reviewer → confirm matches spec
83
+ - Dispatch code quality reviewer → confirm quality
84
+ - If issues → implementer fixes → re-review → repeat
85
+ 3. **After all tasks** → final code review → `cm-code-review`
86
+
87
+ ### Prompt Template (Implementer)
88
+ ```markdown
89
+ Implement [TASK_NAME]:
90
+
91
+ [Full task text from plan]
92
+
93
+ Context: [Where this fits in the project]
94
+
95
+ Rules:
96
+ - Follow TDD (cm-tdd)
97
+ - Commit when done
98
+ - Self-review before reporting
99
+ - Ask questions if unclear
100
+
101
+ Return: Summary of what you did + test results
102
+ ```
103
+
104
+ ### Red Flags
105
+ - Never start on main/master without consent
106
+ - Never skip reviews (spec OR quality)
107
+ - Never dispatch parallel implementers (conflicts)
108
+ - Never accept "close enough" on spec compliance
109
+
110
+ ---
111
+
112
+ ## Mode C: Parallel Dispatch
113
+
114
+ ### When
115
+ - 3+ test files failing with different root causes
116
+ - Multiple subsystems broken independently
117
+ - Each problem doesn't need context from others
118
+
119
+ ### Process
120
+ 1. **Group failures** by independent domain
121
+ 2. **Create focused agent prompt** per domain:
122
+ - Specific scope (one file/subsystem)
123
+ - Clear goal
124
+ - Constraints (don't change other code)
125
+ - Expected output format
126
+ 3. **Dispatch in parallel**
127
+ 4. **Review + integrate** → verify no conflicts → run full suite
128
+
129
+ ### Common Mistakes
130
+ - ❌ Too broad: "Fix all the tests"
131
+ - ✅ Specific: "Fix agent-tool-abort.test.ts"
132
+ - ❌ No context: "Fix the race condition"
133
+ - ✅ Context: Paste error messages + test names
134
+
135
+ ---
136
+
137
+ ## Mode D: Autonomous RARV
138
+
139
+ > **Self-driving execution.** Tasks flow through Reason → Act → Reflect → Verify automatically.
140
+
141
+ ### When
142
+ - User runs `/cm-start` with a goal
143
+ - `cm-tasks.json` exists with backlog items
144
+ - You want continuous autonomous execution
145
+
146
+ ### Process (RARV Cycle)
147
+
148
+ ```
149
+ LOOP until backlog empty or user interrupts:
150
+ 1. REASON → Read cm-tasks.json → pick highest-priority backlog task
151
+ Update task status to "in_progress"
152
+ Log: { phase: "REASON", message: "Selected: <title>" }
153
+
154
+ 2. ACT → Execute using the task's assigned CM skill
155
+ (cm-tdd, cm-debugging, cm-safe-deploy, etc.)
156
+ Log: { phase: "ACT", message: "<what was done>" }
157
+
158
+ 3. REFLECT → Update cm-tasks.json with results
159
+ Log: { phase: "REFLECT", message: "<outcome summary>" }
160
+
161
+ 4. VERIFY → Run tests/checks (cm-quality-gate)
162
+ If PASS → status = "done", completed_at = now()
163
+ If FAIL → rarv_cycles++, log error, retry from REASON
164
+ If rarv_cycles >= 2 → attempt Skill Discovery Fallback:
165
+ → npx skills find "{task keywords}"
166
+ → If skill found + user approves → install, reset rarv_cycles = 0, retry
167
+ → If NOT found → rarv_cycles >= 3 → status = "blocked"
168
+ Log: { phase: "VERIFY", message: "✅ passed" or "❌ <error>" }
169
+
170
+ 5. NEXT → Recalculate stats, pick next task
171
+ ```
172
+
173
+ ### cm-tasks.json Update Protocol
174
+
175
+ After EVERY phase, you MUST:
176
+ 1. Read current `cm-tasks.json`
177
+ 2. Find the active task by `id`
178
+ 3. Update `status`, `logs[]`, timestamps
179
+ 4. Recalculate `stats` object:
180
+ ```
181
+ stats.total = tasks.length
182
+ stats.done = tasks.filter(t => t.status === 'done').length
183
+ stats.in_progress = tasks.filter(t => t.status === 'in_progress').length
184
+ stats.blocked = tasks.filter(t => t.status === 'blocked').length
185
+ stats.backlog = tasks.filter(t => t.status === 'backlog').length
186
+ stats.rarv_cycles_total = tasks.reduce((sum, t) => sum + (t.rarv_cycles || 0), 0)
187
+ ```
188
+ 5. Set `updated` to current ISO timestamp
189
+ 6. Write back to `cm-tasks.json`
190
+
191
+ ### Rules
192
+ - **Max 3 retries** per task before marking "blocked"
193
+ - **Always log** — the dashboard reads logs in real-time
194
+ - **Don't batch-skip** — execute one task at a time through full RARV
195
+ - **Respect interrupts** — if user sends a message, pause and respond
196
+
197
+ ---
198
+
199
+ ## Mode E: TRIZ-Parallel ⚡
200
+
201
+ > **Speed AND quality.** 6 TRIZ principles resolve the contradiction.
202
+
203
+ ### When
204
+ - 3+ tasks that can potentially run in parallel
205
+ - Speed is important but quality cannot be sacrificed
206
+ - Tasks are well-defined with clear file scope
207
+ - You need to maximize throughput without merge conflicts
208
+
209
+ ### TRIZ Principles Applied
210
+
211
+ | # | Principle | How Applied |
212
+ |---|-----------|-------------|
213
+ | **#1** | Segmentation | Tasks split by file-dependency graph → only truly independent tasks run together |
214
+ | **#3** | Local Quality | Each agent runs its own mini quality gate (syntax + tests) before reporting |
215
+ | **#10** | Prior Action | Pre-flight check scans for file overlaps BEFORE dispatch |
216
+ | **#15** | Dynamicity | Batch size adapts: starts at 2, scales up after clean runs, down after conflicts |
217
+ | **#18** | Feedback | Real-time conflict detection via shared ledger of modified files |
218
+ | **#40** | Composite | Each agent = implementer + tester + reviewer (3 roles in 1) |
219
+
220
+ ### Process
221
+
222
+ ```
223
+ 1. ANALYZE → Extract file dependencies from task descriptions
224
+ 2. GRAPH → Build dependency graph, group into independent batches
225
+ 3. ADAPT → Read parallel history, compute optimal batch size
226
+ 4. PRE-FLIGHT → Check conflict ledger for overlaps with running agents
227
+ 5. DISPATCH → Send batch to agents with quality contracts
228
+ 6. MONITOR → Each agent reports modified files → detect conflicts
229
+ 7. VERIFY → Each agent runs mini quality gate before reporting done
230
+ 8. RECORD → Update parallel history for future batch sizing
231
+ ```
232
+
233
+ ### Rules
234
+ - **Never dispatch conflicting tasks** — pre-flight must pass
235
+ - **Each agent must self-validate** — no "trust me it works"
236
+ - **Adaptive sizing is mandatory** — don't hardcode batch sizes
237
+ - **File scope is enforced** — agents must not modify files outside their scope
238
+ - **Conflict = halt** — stop further dispatch until conflict is resolved
239
+
240
+ ### Common Mistakes
241
+ - ❌ "All tasks are independent" → Always run dependency analysis first
242
+ - ❌ "Skip pre-flight, save time" → Pre-flight prevents wasted agent work
243
+ - ❌ "Batch size 5 for everything" → Start at 2, let the system adapt
244
+ - ❌ "One task failed, continue anyway" → Fix before next batch
245
+
246
+ ---
247
+
248
+ ## Integration
249
+
250
+ | Skill | When |
251
+ |-------|------|
252
+ | `cm-git-worktrees` | REQUIRED: isolated workspace before starting |
253
+ | `cm-planning` | Creates the plan this skill executes |
254
+ | `cm-code-review` | Complete development after all tasks |
255
+ | `cm-tdd` | Subagents follow TDD for each task |
256
+ | `cm-quality-gate` | VERIFY phase uses this for validation |
257
+ | `cm-ui-preview` | RECOMMENDED: Preview UI on Google Stitch before implementing frontend tasks |
258
+
259
+ ### Workflows
260
+ | Command | Purpose |
261
+ |---------|---------|
262
+ | `/cm-start` | Create tasks + launch RARV + open dashboard |
263
+ | `/cm-status` | Quick terminal progress summary |
264
+ | `/cm-dashboard` | Open browser dashboard |
265
+
266
+ ## The Bottom Line
267
+
268
+ **Choose your mode. Execute systematically. Review at every checkpoint.**