aiox-core 5.0.7 → 5.0.8

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 (191) hide show
  1. package/.aiox-core/cli/commands/pro/buyer.js +379 -0
  2. package/.aiox-core/cli/commands/pro/index.js +191 -52
  3. package/.aiox-core/cli/commands/validate/index.js +2 -0
  4. package/.aiox-core/core/code-intel/helpers/dev-helper.js +1 -1
  5. package/.aiox-core/core/code-intel/helpers/devops-helper.js +0 -1
  6. package/.aiox-core/core/code-intel/helpers/planning-helper.js +1 -1
  7. package/.aiox-core/core/code-intel/helpers/qa-helper.js +2 -2
  8. package/.aiox-core/core/config/schemas/framework-config.schema.json +1 -0
  9. package/.aiox-core/core/config/template-overrides.js +1 -1
  10. package/.aiox-core/core/doctor/checks/ide-sync.js +81 -25
  11. package/.aiox-core/core/doctor/checks/rules-files.js +0 -1
  12. package/.aiox-core/core/doctor/checks/skills-count.js +83 -15
  13. package/.aiox-core/core/graph-dashboard/cli.js +1 -2
  14. package/.aiox-core/core/graph-dashboard/data-sources/code-intel-source.js +1 -1
  15. package/.aiox-core/core/ids/layer-classifier.js +1 -1
  16. package/.aiox-core/core/pro/pro-updater.js +578 -0
  17. package/.aiox-core/core/synapse/context/context-tracker.js +107 -9
  18. package/.aiox-core/core/synapse/layers/layer-processor.js +1 -1
  19. package/.aiox-core/core-config.yaml +15 -1
  20. package/.aiox-core/data/capability-detection.js +15 -15
  21. package/.aiox-core/data/entity-registry.yaml +18 -2
  22. package/.aiox-core/data/registry-update-log.jsonl +5 -0
  23. package/.aiox-core/data/tok3-token-comparison.js +0 -4
  24. package/.aiox-core/data/tool-search-validation.js +1 -1
  25. package/.aiox-core/development/agents/aiox-master.md +44 -6
  26. package/.aiox-core/development/agents/data-engineer.md +4 -4
  27. package/.aiox-core/development/agents/devops.md +52 -2
  28. package/.aiox-core/development/agents/po.md +1 -1
  29. package/.aiox-core/development/agents/qa.md +5 -11
  30. package/.aiox-core/development/agents/sm.md +3 -3
  31. package/.aiox-core/development/agents/ux-design-expert.md +1 -1
  32. package/.aiox-core/development/scripts/unified-activation-pipeline.js +29 -3
  33. package/.aiox-core/development/tasks/dev-develop-story.md +46 -7
  34. package/.aiox-core/development/tasks/devops-pro-access-grant.md +93 -0
  35. package/.aiox-core/development/tasks/devops-pro-activate.md +42 -0
  36. package/.aiox-core/development/tasks/devops-pro-check-access.md +34 -0
  37. package/.aiox-core/development/tasks/devops-pro-request-reset.md +34 -0
  38. package/.aiox-core/development/tasks/devops-pro-resend-verification.md +32 -0
  39. package/.aiox-core/development/tasks/devops-pro-reset-password.md +36 -0
  40. package/.aiox-core/development/tasks/devops-pro-validate-login.md +36 -0
  41. package/.aiox-core/development/tasks/devops-pro-verify-status.md +33 -0
  42. package/.aiox-core/development/tasks/qa-gate.md +54 -4
  43. package/.aiox-core/development/tasks/validate-next-story.md +39 -2
  44. package/.aiox-core/framework-config.yaml +1 -0
  45. package/.aiox-core/infrastructure/scripts/codex-skills-sync/README.md +69 -0
  46. package/.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js +727 -0
  47. package/.aiox-core/infrastructure/scripts/codex-skills-sync/index.js +10 -0
  48. package/.aiox-core/infrastructure/scripts/codex-skills-sync/validate.js +65 -4
  49. package/.aiox-core/infrastructure/scripts/generate-settings-json.js +29 -4
  50. package/.aiox-core/infrastructure/scripts/ide-sync/agent-parser.js +4 -0
  51. package/.aiox-core/infrastructure/scripts/ide-sync/index.js +67 -7
  52. package/.aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js +145 -3
  53. package/.aiox-core/infrastructure/scripts/repair-agent-references.js +263 -0
  54. package/.aiox-core/infrastructure/scripts/validate-claude-integration.js +60 -8
  55. package/.aiox-core/infrastructure/scripts/validate-paths.js +13 -0
  56. package/.aiox-core/install-manifest.yaml +134 -82
  57. package/.aiox-core/utils/filters/index.js +2 -1
  58. package/.claude/commands/AIOX/agents/aiox-master.md +21 -0
  59. package/.claude/commands/AIOX/agents/analyst.md +21 -0
  60. package/.claude/commands/AIOX/agents/architect.md +21 -0
  61. package/.claude/commands/AIOX/agents/data-engineer.md +21 -0
  62. package/.claude/commands/AIOX/agents/dev.md +21 -0
  63. package/.claude/commands/AIOX/agents/devops.md +21 -0
  64. package/.claude/commands/AIOX/agents/pm.md +21 -0
  65. package/.claude/commands/AIOX/agents/po.md +21 -0
  66. package/.claude/commands/AIOX/agents/qa.md +21 -0
  67. package/.claude/commands/AIOX/agents/sm.md +21 -0
  68. package/.claude/commands/AIOX/agents/squad-creator.md +21 -0
  69. package/.claude/commands/AIOX/agents/ux-design-expert.md +21 -0
  70. package/.claude/commands/AIOX/scripts/agent-config-loader.js +624 -0
  71. package/.claude/commands/AIOX/scripts/generate-greeting.js +160 -0
  72. package/.claude/commands/AIOX/scripts/greeting-builder.js +866 -0
  73. package/.claude/commands/AIOX/scripts/session-context-loader.js +286 -0
  74. package/.claude/commands/AIOX/stories/story-6.1.4.md +1404 -0
  75. package/.claude/commands/cohort-squad/agents/cohort-manager.md +156 -0
  76. package/.claude/commands/design-system/agents/brad-frost.md +1097 -0
  77. package/.claude/commands/design-system/agents/dan-mall.md +857 -0
  78. package/.claude/commands/design-system/agents/dave-malouf.md +2272 -0
  79. package/.claude/commands/design-system/agents/design-chief.md +102 -0
  80. package/.claude/commands/design-system/agents/nano-banana-generator.md +162 -0
  81. package/.claude/commands/greet.md +101 -0
  82. package/.claude/commands/synapse/manager.md +75 -0
  83. package/.claude/commands/synapse/tasks/add-rule.md +94 -0
  84. package/.claude/commands/synapse/tasks/create-command.md +109 -0
  85. package/.claude/commands/synapse/tasks/create-domain.md +127 -0
  86. package/.claude/commands/synapse/tasks/diagnose-synapse.md +245 -0
  87. package/.claude/commands/synapse/tasks/edit-rule.md +109 -0
  88. package/.claude/commands/synapse/tasks/suggest-domain.md +116 -0
  89. package/.claude/commands/synapse/tasks/toggle-domain.md +83 -0
  90. package/.claude/commands/synapse/templates/domain-template +8 -0
  91. package/.claude/commands/synapse/templates/manifest-entry-template +4 -0
  92. package/.claude/commands/synapse/utils/manifest-parser-reference.md +134 -0
  93. package/.claude/hooks/precompact-session-digest.cjs +2 -2
  94. package/.claude/skills/AIOX/agents/aiox-master/SKILL.md +511 -0
  95. package/.claude/skills/AIOX/agents/analyst/SKILL.md +281 -0
  96. package/.claude/skills/AIOX/agents/architect/SKILL.md +482 -0
  97. package/.claude/skills/AIOX/agents/data-engineer/SKILL.md +503 -0
  98. package/.claude/skills/AIOX/agents/dev/SKILL.md +568 -0
  99. package/.claude/skills/AIOX/agents/devops/SKILL.md +597 -0
  100. package/.claude/skills/AIOX/agents/pm/SKILL.md +385 -0
  101. package/.claude/skills/AIOX/agents/po/SKILL.md +343 -0
  102. package/.claude/skills/AIOX/agents/qa/SKILL.md +451 -0
  103. package/.claude/skills/AIOX/agents/sm/SKILL.md +295 -0
  104. package/.claude/skills/AIOX/agents/squad-creator/SKILL.md +352 -0
  105. package/.claude/skills/AIOX/agents/ux-design-expert/SKILL.md +503 -0
  106. package/.claude/skills/architect-first/SKILL.md +275 -0
  107. package/.claude/skills/architect-first/assets/architecture-template.md +505 -0
  108. package/.claude/skills/architect-first/assets/config-template.yaml +351 -0
  109. package/.claude/skills/architect-first/references/architecture-checklist.md +216 -0
  110. package/.claude/skills/architect-first/references/pre-implementation-checklist.md +119 -0
  111. package/.claude/skills/architect-first/references/stop-rules-guide.md +291 -0
  112. package/.claude/skills/architect-first/references/testing-strategy-guide.md +477 -0
  113. package/.claude/skills/architect-first/scripts/architecture_validator.py +490 -0
  114. package/.claude/skills/architect-first/scripts/check_coupling.py +306 -0
  115. package/.claude/skills/architect-first/scripts/validate_risk_mitigation.py +382 -0
  116. package/.claude/skills/checklist-runner/SKILL.md +113 -0
  117. package/.claude/skills/clone-mind.md +329 -0
  118. package/.claude/skills/coderabbit-review/SKILL.md +106 -0
  119. package/.claude/skills/course-generation-workflow.md +76 -0
  120. package/.claude/skills/enhance-workflow.md +466 -0
  121. package/.claude/skills/mcp-builder/LICENSE.txt +202 -0
  122. package/.claude/skills/mcp-builder/SKILL.md +328 -0
  123. package/.claude/skills/mcp-builder/reference/evaluation.md +602 -0
  124. package/.claude/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
  125. package/.claude/skills/mcp-builder/reference/node_mcp_server.md +916 -0
  126. package/.claude/skills/mcp-builder/reference/python_mcp_server.md +752 -0
  127. package/.claude/skills/mcp-builder/scripts/connections.py +151 -0
  128. package/.claude/skills/mcp-builder/scripts/evaluation.py +373 -0
  129. package/.claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  130. package/.claude/skills/mcp-builder/scripts/requirements.txt +2 -0
  131. package/.claude/skills/ralph.md +181 -0
  132. package/.claude/skills/skill-creator/LICENSE.txt +202 -0
  133. package/.claude/skills/skill-creator/SKILL.md +209 -0
  134. package/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
  135. package/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
  136. package/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  137. package/.claude/skills/squad.md +301 -0
  138. package/.claude/skills/synapse/SKILL.md +132 -0
  139. package/.claude/skills/synapse/assets/README.md +50 -0
  140. package/.claude/skills/synapse/references/brackets.md +100 -0
  141. package/.claude/skills/synapse/references/commands.md +118 -0
  142. package/.claude/skills/synapse/references/domains.md +126 -0
  143. package/.claude/skills/synapse/references/layers.md +186 -0
  144. package/.claude/skills/synapse/references/manifest.md +142 -0
  145. package/.claude/skills/tech-search/SKILL.md +431 -0
  146. package/.claude/skills/tech-search/prompts/page-extract.md +133 -0
  147. package/README.en.md +2 -2
  148. package/README.md +8 -2
  149. package/bin/aiox.js +55 -4
  150. package/bin/utils/framework-guard.js +4 -2
  151. package/bin/utils/pro-detector.js +119 -28
  152. package/bin/utils/validate-publish.js +6 -6
  153. package/docs/aiox-agent-flows/devops-system.md +18 -0
  154. package/docs/aiox-workflows/README.md +1 -0
  155. package/docs/aiox-workflows/pro-access-grant-workflow.md +218 -0
  156. package/docs/guides/pro/access-grant-ops-playbook.md +370 -0
  157. package/docs/guides/pro/install-gate-setup.md +12 -6
  158. package/docs/guides/pro/squad-creator-handoff-pro-access-ops.md +134 -0
  159. package/docs/guides/supabase-ops-handoff.md +768 -0
  160. package/package.json +12 -1
  161. package/packages/aiox-pro-cli/bin/aiox-pro.js +33 -12
  162. package/packages/installer/src/config/configure-environment.js +118 -50
  163. package/packages/installer/src/installer/aiox-core-installer.js +124 -27
  164. package/packages/installer/src/installer/brownfield-upgrader.js +66 -9
  165. package/packages/installer/src/installer/dependency-installer.js +4 -0
  166. package/packages/installer/src/pro/pro-scaffolder.js +5 -5
  167. package/packages/installer/src/updater/index.js +151 -10
  168. package/packages/installer/src/wizard/ide-config-generator.js +73 -7
  169. package/packages/installer/src/wizard/index.js +119 -31
  170. package/packages/installer/src/wizard/pro-setup.js +118 -47
  171. package/packages/installer/src/wizard/validation/validators/dependency-validator.js +32 -25
  172. package/packages/installer/src/wizard/validation/validators/file-structure-validator.js +26 -0
  173. package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +84 -1
  174. package/packages/installer/tests/unit/claude-md-template-v5/claude-md-template-v5.test.js +1 -1
  175. package/packages/installer/tests/unit/doctor/doctor-checks.test.js +85 -19
  176. package/packages/installer/tests/unit/entity-registry-bootstrap.test.js +4 -4
  177. package/packages/installer/tests/unit/generate-settings-json/generate-settings-json.test.js +5 -5
  178. package/packages/installer/tests/unit/ide-sync-integration/ide-sync-integration.test.js +4 -4
  179. package/packages/installer/tests/unit/merger/yaml-merger.test.js +11 -11
  180. package/pro/README.md +12 -1
  181. package/pro/license/index.js +3 -11
  182. package/pro/license/license-api.js +25 -0
  183. package/pro/license/license-cache.js +135 -31
  184. package/pro/license/license-crypto.js +59 -3
  185. package/pro/package.json +5 -4
  186. package/pro/squads/README.md +16 -16
  187. package/pro/squads/index.js +1 -1
  188. package/scripts/e2e/installed-skills-smoke.js +264 -0
  189. package/scripts/package-synapse.js +3 -3
  190. package/scripts/validate-package-completeness.js +8 -11
  191. package/.aiox-core/lib/build.json +0 -1
@@ -0,0 +1,102 @@
1
+ # design-chief
2
+
3
+ > Design System Orchestrator
4
+ > Routes requests inside DS scope and delegates out-of-scope work to specialized squads.
5
+
6
+ ```yaml
7
+ metadata:
8
+ version: "2.0.0"
9
+ tier: orchestrator
10
+ created: "2026-02-16"
11
+ updated: "2026-02-17"
12
+ squad_source: "squads/design"
13
+
14
+ agent:
15
+ name: "Design Chief"
16
+ id: "design-chief"
17
+ title: "Design System Orchestrator"
18
+ icon: "🎯"
19
+ tier: orchestrator
20
+ whenToUse: |
21
+ Use when you need triage, routing, orchestration, or sequencing of design-system work.
22
+ Not for direct implementation of brand/logo/photo/video work.
23
+
24
+ persona:
25
+ role: "Design System Orchestrator"
26
+ style: "Direct, structured, dependency-aware"
27
+ identity: "Routes to the right specialist and enforces scope boundaries"
28
+ focus: "Correct routing, low-risk execution, predictable outcomes"
29
+
30
+ routing_matrix:
31
+ in_scope:
32
+ design_system:
33
+ keywords: ["design system", "component", "token", "atomic", "registry", "metadata", "mcp", "dtcg", "agentic", "motion", "fluent"]
34
+ route_to: "@brad-frost"
35
+ accessibility:
36
+ keywords: ["a11y", "wcag", "aria", "contrast", "focus order"]
37
+ route_to: "@brad-frost"
38
+ designops:
39
+ keywords: ["designops", "maturity", "process", "scaling", "governance", "tooling"]
40
+ route_to: "@dave-malouf"
41
+ adoption:
42
+ keywords: ["buy-in", "stakeholder", "pitch", "adoption", "sell design system"]
43
+ route_to: "@dan-mall"
44
+
45
+ out_of_scope:
46
+ brand_logo:
47
+ keywords: ["brand", "marca", "logo", "identidade", "pricing", "positioning"]
48
+ route_to: "/Brand"
49
+ note: "Handled by squads/brand"
50
+ content_visual:
51
+ keywords: ["thumbnail", "youtube", "photo", "fotografia", "video", "editing", "color grading"]
52
+ route_to: "/ContentVisual"
53
+ note: "Handled by squads/content-visual"
54
+
55
+ commands:
56
+ - "*help"
57
+ - "*triage {request}"
58
+ - "*route {request}"
59
+ - "*review-plan {deliverable_type}"
60
+ - "*handoff {target_squad_or_agent}"
61
+ - "*exit"
62
+
63
+ dependencies:
64
+ tasks:
65
+ - design-triage.md
66
+ - design-review-orchestration.md
67
+ - ds-parallelization-gate.md
68
+ checklists:
69
+ - design-handoff-checklist.md
70
+ - ds-a11y-release-gate-checklist.md
71
+ protocols:
72
+ - handoff.md
73
+ data:
74
+ - internal-quality-chain.yaml
75
+ workflows:
76
+ - audit-only.yaml
77
+ - brownfield-complete.yaml
78
+ - greenfield-new.yaml
79
+ - agentic-readiness.yaml
80
+ - dtcg-tokens-governance.yaml
81
+ - motion-quality.yaml
82
+
83
+ rules:
84
+ - "Always classify request as IN_SCOPE or OUT_OF_SCOPE first"
85
+ - "Never execute out-of-scope work inside squads/design"
86
+ - "When out-of-scope, route to /Brand or /ContentVisual with context"
87
+ - "For DS work, enforce dependency analysis before parallelization"
88
+ - "For CI, keep deterministic checks blocking and semantic checks advisory"
89
+ - "Before concluding DS deliverables, run internal-quality-chain required commands and block completion on failure"
90
+ - "Internal-first, not internal-only: external tools are allowed when internal coverage is insufficient and rationale is documented"
91
+
92
+ handoff_template: |
93
+ handoff:
94
+ from: "@design-chief"
95
+ to: "{target}"
96
+ reason: "{routing_reason}"
97
+ context:
98
+ objective: "{objective}"
99
+ constraints: ["{constraint_1}"]
100
+ artifacts: ["{artifact_path}"]
101
+ next_steps: ["{next_step_1}"]
102
+ ```
@@ -0,0 +1,162 @@
1
+ ---
2
+ name: nano-banana-generator
3
+ description: |
4
+ Nano Banana Generator - AI Image Generation Specialist.
5
+ Uses Google's Gemini models (Nano Banana) via OpenRouter for image generation.
6
+ Structured prompts (SCDS), iterative refinement (PRIO), batch variations (BATCH).
7
+ model: sonnet
8
+ tools:
9
+ - Read
10
+ - Grep
11
+ - Glob
12
+ - Write
13
+ - Edit
14
+ - Bash
15
+ - WebSearch
16
+ - WebFetch
17
+ permissionMode: bypassPermissions
18
+ memory: project
19
+ ---
20
+
21
+ # Nano Banana Generator - Autonomous Agent
22
+
23
+ You are an autonomous AI Image Generation specialist spawned to execute a specific mission.
24
+
25
+ ```yaml
26
+ metadata:
27
+ version: "2.0.0"
28
+ tier: 1
29
+ created: "2026-02-16"
30
+ squad_source: "squads/design"
31
+
32
+ agent:
33
+ name: "Nano Banana Generator"
34
+ id: "nano-banana-generator"
35
+ title: "Visual Utility Specialist"
36
+ icon: "🖼️"
37
+ tier: 1
38
+ whenToUse: |
39
+ Use for design visual utility generation and prompt-to-image workflows
40
+ routed by the Design squad.
41
+ ```
42
+
43
+ ## 1. Persona Loading
44
+
45
+ Read `.claude/agents/nano-banana-generator.md` and adopt the persona of **Nano Banana Generator**.
46
+ - Use technical, precise, creative style
47
+ - SKIP the greeting flow entirely — go straight to work
48
+
49
+ ## 2. Context Loading (mandatory)
50
+
51
+ Before starting your mission, load:
52
+
53
+ 1. **Git Status**: `git status --short` + `git log --oneline -5`
54
+ 2. **Gotchas**: Read `.aiox/gotchas.json` (filter for Design, Image, AI-relevant)
55
+ 3. **Technical Preferences**: Read `.aiox-core/data/technical-preferences.md`
56
+ 4. **Project Config**: Read `.aiox-core/core-config.yaml`
57
+
58
+ Do NOT display context loading — just absorb and proceed.
59
+
60
+ ## 3. Mission Router
61
+
62
+ Parse `## Mission:` from your spawn prompt and match:
63
+
64
+ | Mission Keyword | Task File | Action |
65
+ |----------------|-----------|--------|
66
+ | `generate` / `gerar` / `imagem` | `image-generate.md` | Generate image |
67
+ | `concept` / `conceito` | `image-concept.md` | Develop visual concept |
68
+ | `refine` / `refinar` / `improve` | `prompt-refine.md` | Refine prompt |
69
+ | `upscale` / `4k` / `2k` | `image-upscale.md` | Upscale resolution |
70
+ | `batch` / `variations` | `image-batch.md` | Generate variations |
71
+ | `style-guide` | `style-guide-create.md` | Create style reference |
72
+
73
+ **Path resolution**:
74
+ - Tasks at `squads/design/tasks/`
75
+ - Data at `squads/design/data/`
76
+
77
+ ### Execution:
78
+ 1. Read the COMPLETE task file (no partial reads)
79
+ 2. Read ALL extra resources listed
80
+ 3. Execute ALL steps following the workflow
81
+
82
+ ## 4. Core Frameworks
83
+
84
+ ### SCDS - Structured Creative Direction System
85
+ ```
86
+ [SUBJECT]: Main focus of the image
87
+ [SETTING]: Environment, time, atmosphere
88
+ [STYLE]: Visual style, mood, aesthetic
89
+ [TECHNICAL]: Aspect ratio, resolution, special needs
90
+ ```
91
+
92
+ ### PRIO - Prompt Refinement & Iteration Optimization
93
+ 1. Result Analysis → What worked/didn't
94
+ 2. Variable Isolation → What to change
95
+ 3. Variation Generation → 3-5 options
96
+ 4. Best-of Selection → Document learnings
97
+
98
+ ### BATCH - Bulk Artistic Testing & Comparison Hub
99
+ 1. Core Prompt Lock → Base that doesn't change
100
+ 2. Variation Axes → Style, color, composition, mood
101
+ 3. Batch Execution → Generate all systematically
102
+ 4. Curation & Presentation → Top 3-5 with rationale
103
+
104
+ ## 5. API Reference
105
+
106
+ ### OpenRouter Nano Banana
107
+
108
+ **Models:**
109
+ - `google/gemini-2.5-flash-image` - Fast, efficient
110
+ - `google/gemini-3-pro-image-preview` - Best quality, text rendering
111
+
112
+ **Request Format:**
113
+ ```json
114
+ {
115
+ "model": "google/gemini-2.5-flash-image",
116
+ "messages": [{"role": "user", "content": "{prompt}"}],
117
+ "modalities": ["image", "text"],
118
+ "image_config": {
119
+ "aspect_ratio": "16:9",
120
+ "image_size": "2K"
121
+ }
122
+ }
123
+ ```
124
+
125
+ **Aspect Ratios:** 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3
126
+ **Resolutions:** 1K, 2K, 4K
127
+
128
+ ## 6. Quality Standards
129
+
130
+ - NEVER generate without structured SCDS prompt
131
+ - ALWAYS specify aspect ratio and resolution
132
+ - ALWAYS include negative prompt
133
+ - NEVER present single option - generate variations
134
+ - ALWAYS get user approval before generation
135
+
136
+ ## 7. Handoff Protocol
137
+
138
+ When passing work:
139
+
140
+ ```
141
+ ## HANDOFF: @nano-banana-generator → @{to_agent}
142
+
143
+ **Project:** {project_name}
144
+ **Phase Completed:** Image generation
145
+
146
+ **Deliverables:**
147
+ - Generated image: {path}
148
+ - Prompt used: {prompt}
149
+ - Metadata: {specs}
150
+
151
+ **Context for Next Phase:**
152
+ {context_summary}
153
+ ```
154
+
155
+ ## 8. Constraints
156
+
157
+ - NEVER generate without user approval of prompt
158
+ - NEVER skip SCDS structuring for vague inputs
159
+ - NEVER ignore aspect ratio requirements
160
+ - NEVER commit to git (the lead handles git)
161
+ - ALWAYS document prompts for reproducibility
162
+ - ALWAYS offer variations, not single options
@@ -0,0 +1,101 @@
1
+ # greet
2
+
3
+ Generate contextual agent greeting using GreetingBuilder infrastructure.
4
+
5
+ ---
6
+
7
+ ## What This Command Does
8
+
9
+ When activated, this command:
10
+ 1. Loads the GreetingBuilder module from `.aiox-core/development/scripts/greeting-builder.js`
11
+ 2. Extracts agent definition from the calling agent (name, icon, persona_profile, commands)
12
+ 3. Analyzes conversation history to detect session type (new/existing/workflow)
13
+ 4. Generates intelligent greeting based on:
14
+ - Session type (shows full/quick/key commands accordingly)
15
+ - Git configuration status (shows warning if not configured)
16
+ - Project status (branch, modifications, recent commits)
17
+ - Workflow patterns (suggests next steps if in recurring workflow)
18
+ 5. Returns formatted greeting string for agent to display
19
+
20
+ ---
21
+
22
+ ## Execution
23
+
24
+ Execute the greeting builder and return the formatted greeting:
25
+
26
+ ```javascript
27
+ const GreetingBuilder = require('./.aiox-core/development/scripts/greeting-builder');
28
+ const builder = new GreetingBuilder();
29
+
30
+ // Extract agent definition from current agent context
31
+ const agent = {
32
+ name: agentDefinition.name,
33
+ id: agentDefinition.id,
34
+ icon: agentDefinition.icon,
35
+ title: agentDefinition.title,
36
+ persona_profile: agentDefinition.persona_profile,
37
+ persona: agentDefinition.persona,
38
+ commands: agentDefinition.commands
39
+ };
40
+
41
+ // Build greeting with conversation history
42
+ const greeting = await builder.buildGreeting(agent, {
43
+ conversationHistory: conversationHistory || []
44
+ });
45
+
46
+ // Return greeting for display
47
+ return greeting;
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Fallback Behavior
53
+
54
+ If greeting generation fails (timeout, error, module not found):
55
+ ```
56
+ {agent.icon} {agent.name} ready
57
+
58
+ Type `*help` for available commands.
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Performance
64
+
65
+ - Target: < 150ms (enforced by GreetingBuilder timeout protection)
66
+ - Git check: Cached (5min TTL) for performance
67
+ - Context analysis: ~20ms average
68
+ - Total overhead: < 100ms typical, < 150ms hard limit
69
+
70
+ ---
71
+
72
+ ## Usage in Agent Activation
73
+
74
+ Agents call this command in STEP 3 of activation-instructions:
75
+
76
+ ```yaml
77
+ activation-instructions:
78
+ - STEP 1: Read THIS ENTIRE FILE
79
+ - STEP 2: Adopt persona defined in 'agent' and 'persona' sections
80
+ - STEP 3: Execute /greet slash command to generate contextual greeting
81
+ - STEP 4: Display the greeting returned by /greet command
82
+ - STEP 5: HALT and await user input
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Architecture
88
+
89
+ This follows **ADR-001: Agent Greeting Execution Pattern**:
90
+ - **YAML** = Declarative configuration (agent definitions)
91
+ - **Slash Command** = Execution layer (this file)
92
+ - **JavaScript** = Business logic (greeting-builder.js)
93
+
94
+ Industry alignment: Microsoft Copilot Security, Julep AI, Mastra patterns
95
+
96
+ ---
97
+
98
+ **Created:** 2025-11-16
99
+ **ADR:** ADR-001
100
+ **Story:** 6.1.2.5 - Contextual Agent Load Integration
101
+ **Tests:** 27/27 passing (greeting-builder.test.js)
@@ -0,0 +1,75 @@
1
+ # SYNAPSE Manager
2
+
3
+ CRUD command router for managing SYNAPSE domains, rules, and star-commands.
4
+
5
+ ---
6
+
7
+ ## What This Command Does
8
+
9
+ When the user requests a SYNAPSE management operation (create domain, add rule, edit rule, toggle domain, create command, or suggest domain), this manager identifies the sub-command and dispatches to the appropriate task file.
10
+
11
+ ---
12
+
13
+ ## Sub-Command Detection
14
+
15
+ Analyze the user's request and match to one of these operations:
16
+
17
+ | Intent Keywords | Sub-Command | Task File |
18
+ |-----------------|-------------|-----------|
19
+ | "create domain", "new domain", "add domain" | **create** | `.claude/commands/synapse/tasks/create-domain.md` |
20
+ | "add rule", "new rule", "append rule" | **add** | `.claude/commands/synapse/tasks/add-rule.md` |
21
+ | "edit rule", "change rule", "remove rule", "delete rule", "update rule" | **edit** | `.claude/commands/synapse/tasks/edit-rule.md` |
22
+ | "toggle domain", "enable domain", "disable domain", "activate", "deactivate" | **toggle** | `.claude/commands/synapse/tasks/toggle-domain.md` |
23
+ | "create command", "add command", "new command", "new star-command" | **add-command** | `.claude/commands/synapse/tasks/create-command.md` |
24
+ | "suggest domain", "which domain", "where should", "best domain for" | **suggest** | `.claude/commands/synapse/tasks/suggest-domain.md` |
25
+
26
+ ---
27
+
28
+ ## Execution
29
+
30
+ 1. **Parse the user's request** to identify the sub-command from the table above.
31
+ 2. **Extract parameters** from the request (domain name, rule text, index, keywords, etc.).
32
+ 3. **Read and follow** the corresponding task file from `.claude/commands/synapse/tasks/`.
33
+ 4. **If no sub-command is clear**, show the help output below.
34
+
35
+ ---
36
+
37
+ ## Help Output
38
+
39
+ If the user's intent is unclear or they ask for help, display:
40
+
41
+ ```
42
+ SYNAPSE Manager - Domain & Rule Management
43
+
44
+ Available operations:
45
+
46
+ create <domain-name> Create a new domain + manifest entry
47
+ add <domain-name> "<rule>" Add a rule to an existing domain
48
+ edit <domain-name> <index> Edit or remove a rule by index
49
+ toggle <domain-name> Toggle domain active/inactive
50
+ add-command <command-name> Create a new star-command
51
+ suggest "<rule text>" Suggest the best domain for a rule
52
+
53
+ Examples:
54
+ *synapse create my-custom-rules
55
+ *synapse add agent-dev "Always write tests first"
56
+ *synapse edit agent-dev 3
57
+ *synapse toggle agent-dev
58
+ *synapse add-command review
59
+ *synapse suggest "Use kebab-case for files"
60
+
61
+ Reference: .claude/commands/synapse/utils/manifest-parser-reference.md
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Error Handling
67
+
68
+ - **No `.synapse/` directory found:** Inform the user that SYNAPSE is not initialized. Domain content files must be created first (SYN-8).
69
+ - **No `.synapse/manifest` found:** Same as above — manifest is required for all operations.
70
+ - **Unknown sub-command:** Show the help output above.
71
+
72
+ ---
73
+
74
+ *SYNAPSE Manager — Router for CRUD operations on `.synapse/` content.*
75
+ *Source: SYNAPSE-HOOK-SKILL-COMMAND-ANALYSIS.md section 2.3 (C1)*
@@ -0,0 +1,94 @@
1
+ # Add Rule
2
+
3
+ Adds a new rule to an existing SYNAPSE domain file.
4
+
5
+ ---
6
+
7
+ ## Purpose
8
+
9
+ Append a new rule to a domain file in `.synapse/`, auto-incrementing the rule index to maintain a valid KEY=VALUE sequence.
10
+
11
+ ---
12
+
13
+ ## Prerequisites
14
+
15
+ - `.synapse/manifest` exists
16
+ - Target domain exists in manifest AND as a file in `.synapse/`
17
+
18
+ ---
19
+
20
+ ## Parameters
21
+
22
+ | Parameter | Required | Description |
23
+ |-----------|----------|-------------|
24
+ | `domain-name` | Yes | Existing domain name (kebab-case) |
25
+ | `rule-text` | Yes | The rule text to add |
26
+
27
+ ---
28
+
29
+ ## Steps
30
+
31
+ ### Step 1: Validate Domain Exists
32
+
33
+ 1. Derive the domain key: `my-domain` -> `MY_DOMAIN`
34
+ 2. Read `.synapse/manifest` and check that `{DOMAIN_KEY}_STATE` exists
35
+ 3. Check that `.synapse/{domain-name}` file exists on disk
36
+
37
+ If domain not found in manifest: `Error: Domain "{domain-name}" not found in manifest. Use "create" to create it first.`
38
+
39
+ If domain file not found: `Error: Domain file ".synapse/{domain-name}" not found on disk. Manifest entry exists but file is missing.`
40
+
41
+ ### Step 2: Find Next Rule Index
42
+
43
+ Read the domain file `.synapse/{domain-name}` and find all existing rules matching the pattern `{DOMAIN_KEY}_RULE_{N}=`.
44
+
45
+ Count the number of matching rules. The new rule index is `count(matching_rules)`.
46
+
47
+ This ensures sequential indices with no gaps (e.g., if rules 0 and 2 exist but 1 was deleted, there are 2 rules, so the next index is 2 — which re-fills gaps).
48
+
49
+ If no rules exist yet, start at `0`.
50
+
51
+ ### Step 3: Append Rule
52
+
53
+ Append the new rule line to the domain file:
54
+
55
+ ```
56
+ {DOMAIN_KEY}_RULE_{NEXT_INDEX}={rule-text}
57
+ ```
58
+
59
+ Ensure there is a newline before the new rule if the file does not end with one.
60
+
61
+ ### Step 4: Confirm
62
+
63
+ Display confirmation:
64
+ ```
65
+ Added rule to {domain-name}:
66
+ {DOMAIN_KEY}_RULE_{NEXT_INDEX}={rule-text}
67
+
68
+ Domain now has {TOTAL} rules.
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Validation
74
+
75
+ - [ ] Domain exists in both manifest and filesystem before adding
76
+ - [ ] Rule index auto-incremented correctly (no gaps, no duplicates)
77
+ - [ ] Rule line follows `{DOMAIN_KEY}_RULE_{N}=text` format
78
+ - [ ] Domain file remains parseable after addition
79
+
80
+ ---
81
+
82
+ ## Error Handling
83
+
84
+ | Error | Message |
85
+ |-------|---------|
86
+ | Domain not in manifest | `Error: Domain "{name}" not found in manifest. Use "create" to create it first.` |
87
+ | Domain file missing | `Error: Domain file ".synapse/{name}" not found on disk.` |
88
+ | Empty rule text | `Error: Rule text cannot be empty.` |
89
+ | Manifest not found | `Error: .synapse/manifest not found. SYNAPSE must be initialized first.` |
90
+
91
+ ---
92
+
93
+ *Add Rule — SYNAPSE CRUD Command C3*
94
+ *Source: SYNAPSE-HOOK-SKILL-COMMAND-ANALYSIS.md section 2.3*
@@ -0,0 +1,109 @@
1
+ # Create Command
2
+
3
+ Creates a new star-command block in the SYNAPSE commands domain file.
4
+
5
+ ---
6
+
7
+ ## Purpose
8
+
9
+ Add a new star-command definition to `.synapse/commands`, allowing users to define custom commands that the SYNAPSE engine's L7 layer will detect and process.
10
+
11
+ ---
12
+
13
+ ## Prerequisites
14
+
15
+ - `.synapse/commands` file exists
16
+ - User provides a command name and at least one rule
17
+
18
+ ---
19
+
20
+ ## Parameters
21
+
22
+ | Parameter | Required | Description |
23
+ |-----------|----------|-------------|
24
+ | `command-name` | Yes | Star-command name without `*` prefix (e.g., `review`) |
25
+ | `rules` | Yes | One or more instruction rules for the command (at least 1) |
26
+
27
+ ---
28
+
29
+ ## Steps
30
+
31
+ ### Step 1: Validate Command Name
32
+
33
+ - Command name must be lowercase kebab-case (e.g., `review`, `quick-fix`)
34
+ - Allowed characters: `a-z`, `0-9`, `-`
35
+ - Must NOT start or end with `-`
36
+ - Must NOT be empty
37
+
38
+ If invalid: `Error: Command name must be lowercase kebab-case (e.g., "review"). Got: "{name}"`
39
+
40
+ ### Step 2: Check for Duplicates
41
+
42
+ Read `.synapse/commands` and check if a block header `[*{command-name}]` already exists.
43
+
44
+ If it exists: `Error: Star-command "*{command-name}" already exists in .synapse/commands. Edit the file directly to modify it.`
45
+
46
+ ### Step 3: Derive Command Key
47
+
48
+ Convert the command name to uppercase for rule keys:
49
+ - `review` -> `CMD_REVIEW`
50
+ - `quick-fix` -> `CMD_QUICK_FIX`
51
+
52
+ Full key prefix: `COMMANDS_{CMD_KEY}`
53
+
54
+ ### Step 4: Append Command Block
55
+
56
+ Append the new command block to `.synapse/commands`:
57
+
58
+ ```ini
59
+
60
+ [*{command-name}] COMMAND:
61
+ COMMANDS_{CMD_KEY}_0={first-rule}
62
+ COMMANDS_{CMD_KEY}_1={second-rule}
63
+ ```
64
+
65
+ - Add a blank line before the block for readability
66
+ - Each rule is indexed starting from 0
67
+ - At least 1 rule is required
68
+
69
+ ### Step 5: Validate
70
+
71
+ - Verify at least 1 rule was provided
72
+ - Read back `.synapse/commands` and verify the block header exists
73
+ - Verify rule lines follow `COMMANDS_{CMD_KEY}_{N}=text` format
74
+
75
+ ### Step 6: Confirm
76
+
77
+ ```
78
+ Created star-command "*{command-name}" with {count} rules.
79
+
80
+ The SYNAPSE engine's L7 layer will detect "*{command-name}" in user prompts
81
+ and inject the associated rules into the context.
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Validation
87
+
88
+ - [ ] Command name is valid kebab-case
89
+ - [ ] No duplicate command in `.synapse/commands`
90
+ - [ ] At least 1 rule provided
91
+ - [ ] Block header follows `[*{name}] COMMAND:` format
92
+ - [ ] Rule keys follow `COMMANDS_{CMD_KEY}_{N}=text` format
93
+ - [ ] `.synapse/commands` remains parseable after addition
94
+
95
+ ---
96
+
97
+ ## Error Handling
98
+
99
+ | Error | Message |
100
+ |-------|---------|
101
+ | Invalid name | `Error: Command name must be lowercase kebab-case (e.g., "review"). Got: "{name}"` |
102
+ | Duplicate command | `Error: Star-command "*{name}" already exists in .synapse/commands.` |
103
+ | No rules provided | `Error: At least one rule is required for a star-command.` |
104
+ | Commands file missing | `Error: .synapse/commands not found. SYNAPSE must be initialized first (SYN-8).` |
105
+
106
+ ---
107
+
108
+ *Create Command — SYNAPSE CRUD Command C6*
109
+ *Source: SYNAPSE-HOOK-SKILL-COMMAND-ANALYSIS.md section 2.3, DESIGN-SYNAPSE-ENGINE.md section 15*