ai-control-center 1.15.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 (154) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +584 -0
  3. package/bin/aicc.js +772 -0
  4. package/lib/actions/approve.js +71 -0
  5. package/lib/actions/assign-project.js +132 -0
  6. package/lib/actions/browser-test.js +64 -0
  7. package/lib/actions/cleanup.js +174 -0
  8. package/lib/actions/debug.js +298 -0
  9. package/lib/actions/deploy.js +1229 -0
  10. package/lib/actions/fix-bug.js +134 -0
  11. package/lib/actions/new-feature.js +255 -0
  12. package/lib/actions/reject.js +307 -0
  13. package/lib/actions/review.js +706 -0
  14. package/lib/actions/status.js +47 -0
  15. package/lib/agents/browser-qa-agent.js +611 -0
  16. package/lib/agents/payment-agent.js +116 -0
  17. package/lib/agents/suggestion-agent.js +88 -0
  18. package/lib/cli.js +303 -0
  19. package/lib/config.js +243 -0
  20. package/lib/hub/hub-server.js +440 -0
  21. package/lib/hub/project-poller.js +75 -0
  22. package/lib/hub/skill-registry.js +89 -0
  23. package/lib/hub/state-aggregator.js +204 -0
  24. package/lib/index.js +471 -0
  25. package/lib/init/doctor.js +523 -0
  26. package/lib/init/presets.js +222 -0
  27. package/lib/init/skill-fetcher.js +77 -0
  28. package/lib/init/wizard.js +973 -0
  29. package/lib/integrations/codex-runner.js +128 -0
  30. package/lib/integrations/github-actions.js +248 -0
  31. package/lib/integrations/github-reporter.js +229 -0
  32. package/lib/integrations/screenshot-store.js +102 -0
  33. package/lib/openclaw/bridge.js +650 -0
  34. package/lib/openclaw/generate-skill.js +235 -0
  35. package/lib/openclaw/openclaw.json +64 -0
  36. package/lib/orchestrator/autonomous-loop.js +429 -0
  37. package/lib/orchestrator/thread-triggers.js +63 -0
  38. package/lib/roleplay/agent-messenger.js +75 -0
  39. package/lib/roleplay/discussion-threads.js +303 -0
  40. package/lib/roleplay/health-monitor.js +121 -0
  41. package/lib/roleplay/pm-agent.js +513 -0
  42. package/lib/roleplay/roleplay-config.js +25 -0
  43. package/lib/roleplay/room.js +164 -0
  44. package/lib/shared/action-runner.js +2330 -0
  45. package/lib/shared/event-bus.js +185 -0
  46. package/lib/slack/bot.js +378 -0
  47. package/lib/telegram/bot.js +416 -0
  48. package/lib/telegram/commands.js +1267 -0
  49. package/lib/telegram/keyboards.js +113 -0
  50. package/lib/telegram/notifications.js +247 -0
  51. package/lib/twitch/bot.js +354 -0
  52. package/lib/twitch/commands.js +302 -0
  53. package/lib/twitch/notifications.js +63 -0
  54. package/lib/utils/achievements.js +191 -0
  55. package/lib/utils/activity-log.js +182 -0
  56. package/lib/utils/agent-leaderboard.js +119 -0
  57. package/lib/utils/audit-logger.js +232 -0
  58. package/lib/utils/codebase-context.js +288 -0
  59. package/lib/utils/codebase-indexer.js +381 -0
  60. package/lib/utils/config-schema.js +230 -0
  61. package/lib/utils/context-compressor.js +172 -0
  62. package/lib/utils/correlation.js +63 -0
  63. package/lib/utils/cost-tracker.js +423 -0
  64. package/lib/utils/cron-scheduler.js +53 -0
  65. package/lib/utils/db-adapter.js +293 -0
  66. package/lib/utils/display.js +272 -0
  67. package/lib/utils/errors.js +116 -0
  68. package/lib/utils/format.js +134 -0
  69. package/lib/utils/intent-engine.js +464 -0
  70. package/lib/utils/mcp-client.js +238 -0
  71. package/lib/utils/model-ab-test.js +164 -0
  72. package/lib/utils/notify.js +122 -0
  73. package/lib/utils/persona-loader.js +80 -0
  74. package/lib/utils/pipeline-lock.js +73 -0
  75. package/lib/utils/pipeline.js +214 -0
  76. package/lib/utils/plugin-runner.js +234 -0
  77. package/lib/utils/rate-limiter.js +84 -0
  78. package/lib/utils/rbac.js +74 -0
  79. package/lib/utils/runner.js +1809 -0
  80. package/lib/utils/security.js +191 -0
  81. package/lib/utils/self-healer.js +144 -0
  82. package/lib/utils/skill-loader.js +255 -0
  83. package/lib/utils/spinner.js +132 -0
  84. package/lib/utils/stage-queue.js +50 -0
  85. package/lib/utils/state-machine.js +89 -0
  86. package/lib/utils/status-bar.js +327 -0
  87. package/lib/utils/token-estimator.js +101 -0
  88. package/lib/utils/ux-analyzer.js +101 -0
  89. package/lib/utils/webhook-emitter.js +83 -0
  90. package/lib/web/public/css/styles.css +417 -0
  91. package/lib/web/public/dark-mode.js +44 -0
  92. package/lib/web/public/hub/kanban.html +206 -0
  93. package/lib/web/public/index.html +45 -0
  94. package/lib/web/public/js/app.js +71 -0
  95. package/lib/web/public/js/ask.js +110 -0
  96. package/lib/web/public/js/dashboard.js +165 -0
  97. package/lib/web/public/js/deploy.js +72 -0
  98. package/lib/web/public/js/feature.js +79 -0
  99. package/lib/web/public/js/health.js +65 -0
  100. package/lib/web/public/js/logs.js +93 -0
  101. package/lib/web/public/js/review.js +123 -0
  102. package/lib/web/public/js/ws-client.js +82 -0
  103. package/lib/web/public/office/css/office.css +678 -0
  104. package/lib/web/public/office/index.html +148 -0
  105. package/lib/web/public/office/js/achievements-ui.js +117 -0
  106. package/lib/web/public/office/js/character.js +1056 -0
  107. package/lib/web/public/office/js/chat-bubbles.js +177 -0
  108. package/lib/web/public/office/js/cost-overlay.js +123 -0
  109. package/lib/web/public/office/js/day-night.js +68 -0
  110. package/lib/web/public/office/js/effects.js +632 -0
  111. package/lib/web/public/office/js/engine.js +146 -0
  112. package/lib/web/public/office/js/feature-ticket.js +216 -0
  113. package/lib/web/public/office/js/hub-client.js +60 -0
  114. package/lib/web/public/office/js/main.js +1757 -0
  115. package/lib/web/public/office/js/office-layout.js +1524 -0
  116. package/lib/web/public/office/js/pathfinding.js +144 -0
  117. package/lib/web/public/office/js/pixel-sprites.js +1454 -0
  118. package/lib/web/public/office/js/progress-bars.js +117 -0
  119. package/lib/web/public/office/js/replay.js +191 -0
  120. package/lib/web/public/office/js/sound-effects.js +91 -0
  121. package/lib/web/public/office/js/sprite-renderer.js +211 -0
  122. package/lib/web/public/office/js/stamina-system.js +89 -0
  123. package/lib/web/public/office/js/ui.js +107 -0
  124. package/lib/web/public/onboarding/index.html +243 -0
  125. package/lib/web/public/timeline/index.html +195 -0
  126. package/lib/web/routes/api.js +499 -0
  127. package/lib/web/routes/logs.js +20 -0
  128. package/lib/web/routes/metrics.js +99 -0
  129. package/lib/web/server.js +183 -0
  130. package/lib/web/ws/handler.js +65 -0
  131. package/package.json +67 -0
  132. package/templates/agent-architect.md +69 -0
  133. package/templates/agent-gemini-pm.md +49 -0
  134. package/templates/agent-gemini-reviewer.md +52 -0
  135. package/templates/copilot-instructions.md +36 -0
  136. package/templates/pipelines/mobile.json +27 -0
  137. package/templates/pipelines/nodejs-api.json +27 -0
  138. package/templates/pipelines/python.json +27 -0
  139. package/templates/pipelines/react.json +27 -0
  140. package/templates/pipelines/salesforce.json +27 -0
  141. package/templates/role-gemini.md +97 -0
  142. package/templates/skill-architect.md +114 -0
  143. package/templates/skill-browser-qa.md +50 -0
  144. package/templates/skill-bug-from-qa.md +58 -0
  145. package/templates/skill-chatbot.md +93 -0
  146. package/templates/skill-implement.md +78 -0
  147. package/templates/skill-openclaw.md +174 -0
  148. package/templates/skill-payment.md +110 -0
  149. package/templates/skill-pm-spec.md +77 -0
  150. package/templates/skill-requirement-capture.md +97 -0
  151. package/templates/skill-review.md +108 -0
  152. package/templates/skill-reviewer-qa.md +44 -0
  153. package/templates/skill-suggestion.md +45 -0
  154. package/templates/skill-template.md +142 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AI Control Center Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,584 @@
1
+ <p align="center">
2
+ <br />
3
+ <strong>ai-control-center</strong>
4
+ <br />
5
+ Multi-AI orchestration control center for any project
6
+ <br />
7
+ <br />
8
+ <a href="https://www.npmjs.com/package/ai-control-center"><img src="https://img.shields.io/npm/v/ai-control-center.svg" alt="npm version"></a>
9
+ <a href="https://www.npmjs.com/package/ai-control-center"><img src="https://img.shields.io/npm/dm/ai-control-center.svg" alt="npm downloads"></a>
10
+ <a href="https://github.com/nicholasgriffintn/ai-control-center/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/ai-control-center.svg" alt="license"></a>
11
+ <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/ai-control-center.svg" alt="node version"></a>
12
+ </p>
13
+
14
+ ---
15
+
16
+ A terminal CLI, web dashboard, Telegram bot, Twitch bot, and OpenClaw gateway that orchestrates multiple AI agents (Claude, Copilot, Gemini, Ollama) through a structured feature pipeline with **skill-driven AI behavior** at every stage. Works with **any project type** — Salesforce, Node.js, Python, Swift, Go, and more.
17
+
18
+ ## Highlights
19
+
20
+ - **OpenClaw skill engine** — stage-specific skills guide AI behavior for requirement capture, PM spec, architecture, implementation, and code review
21
+ - **Terminal menu** — interactive CLI with real-time pipeline status
22
+ - **Web dashboard** — Express + WebSocket SPA with deploy, review, AI chat, and pixel-art office visualizer
23
+ - **Telegram & Twitch bots** — remote pipeline control + push notifications + AI chat + `/` command suggestions
24
+ - **Multi-Agent roleplay** — PM agent autonomously orchestrates the team, posts in-chat as each agent persona, handles failures and provider switching
25
+ - **Multi-AI routing** — Claude → Copilot → Gemini → Ollama fallback chain with circuit breakers and auto-downgrade
26
+ - **Smart notifications** — deduplicated stage updates, task-aware progress bars for implementation, pipeline cancellation on `/reset`
27
+ - **Fully configurable** — one `aicc.config.js` drives everything (stages, deploy, review, models, skills, roleplay)
28
+ - **Works with any stack** — no assumptions about language, framework, or deployment target
29
+
30
+ ## Install
31
+
32
+ ```sh
33
+ # Global
34
+ npm install -g ai-control-center
35
+
36
+ # Local dev dependency
37
+ npm install ai-control-center --save-dev
38
+
39
+ # One-shot init
40
+ npx ai-control-center init
41
+ ```
42
+
43
+ ## Quick Start
44
+
45
+ ```sh
46
+ aicc init # 1. Initialize — creates aicc.config.js
47
+ aicc # 2. Launch interactive terminal menu
48
+ aicc start # 3. Start all services (web + telegram + twitch)
49
+ aicc openclaw # 4. Generate OpenClaw skills for all pipeline stages
50
+ aicc doctor # 5. Health check + auto-repair
51
+ ```
52
+
53
+ ## How It Works
54
+
55
+ ```
56
+ ┌─────────────────────────────────────────────────────────────────────────────┐
57
+ │ USER CHANNELS │
58
+ │ │
59
+ │ Telegram WhatsApp Slack Discord Web Dashboard CLI Terminal │
60
+ └──────┬──────────┬─────────┬─────────┬──────────────┬──────────────┬────────┘
61
+ │ │ │ │ │ │
62
+ └──────────┴─────────┴─────────┘ │ │
63
+ │ │ │
64
+ ┌────────▼────────┐ │ │
65
+ │ OpenClaw │ │ │
66
+ │ Gateway │ │ │
67
+ │ :18789 (WS) │ │ │
68
+ │ │ │ │
69
+ │ • AI Skills │ │ │
70
+ │ • Multi-channel │ │ │
71
+ │ • Cron jobs │ │ │
72
+ │ • Sessions │ │ │
73
+ └────────┬────────┘ │ │
74
+ │ WebSocket │ │
75
+ ┌────────▼────────┐ │ │
76
+ │ AICC Bridge │ │ │
77
+ │ (bridge.js) │ │ │
78
+ │ │ │ │
79
+ │ • Event forward │ │ │
80
+ │ • Command exec │ │ │
81
+ │ • Tool exposure │ │ │
82
+ │ • Skill inject │ │ │
83
+ └────────┬────────┘ │ │
84
+ │ │ │
85
+ ┌───────────────┴─────────────────────────────┴──────────────┘
86
+
87
+ ┌──────▼──────────────────────────────────────────────────────────────┐
88
+ │ AICC ENGINE │
89
+ │ │
90
+ │ ┌──────────────┐ ┌──────────────┐ ┌─────────────────────┐ │
91
+ │ │ Action Runner │ │ Event Bus │ │ Skill Loader │ │
92
+ │ │ (orchestrator)│◀─▶│ (status.json │ │ (3-source priority, │ │
93
+ │ │ │ │ watcher) │ │ stage injection) │ │
94
+ │ └──────┬───────┘ └──────────────┘ └─────────────────────┘ │
95
+ │ │ │
96
+ │ ┌──────▼───────────────────────────────────────────────────┐ │
97
+ │ │ Runner (AI Router) │ │
98
+ │ │ pipeline[] drives stage routing │ │
99
+ │ └──────┬───────────┬───────────┬───────────┬──────────────┘ │
100
+ │ │ │ │ │ │
101
+ │ ┌────▼───┐ ┌────▼───┐ ┌────▼───┐ ┌────▼───┐ │
102
+ │ │Copilot │ │ Claude │ │ Gemini │ │ Ollama │ │
103
+ │ │ CLI │ │ Code │ │ CLI │ │ (local)│ │
104
+ │ └────────┘ └────────┘ └────────┘ └────────┘ │
105
+ │ PM, Arch, Implement Fallback Last resort │
106
+ │ Review, provider (offline) │
107
+ │ Deploy │
108
+ └─────────────────────────────────────────────────────────────────────┘
109
+
110
+
111
+ Feature Pipeline Flow (each stage guided by OpenClaw skills):
112
+
113
+ ┌──────┐ ┌────┐ ┌──────┐ ┌─────────┐ ┌──────┐ ┌──────┐ ┌────────┐
114
+ │ User │───▶│ PM │───▶│ Arch │───▶│Implement│───▶│Review│───▶│Approve│───▶│ Deploy │
115
+ │ idea │ │spec│ │design│ │ code │ │ code │ │/reject│ │ ship │
116
+ └──────┘ └────┘ └──────┘ └─────────┘ └──────┘ └──────┘ └────────┘
117
+ ▲ copilot copilot claude copilot human copilot
118
+ │ (sonnet) (sonnet) (sonnet) (sonnet) (sonnet)
119
+ │ ▲ ▲ ▲ ▲
120
+ via OpenClaw │ │ │ │
121
+ (any channel) └──────────┴───────────┴──────────────┘
122
+ OpenClaw skills injected at each stage:
123
+ SPEC skill → ARCH skill → IMPL skill → REVIEW skill
124
+
125
+ Each stage produces a document:
126
+ SPEC.md → ARCH.md → TASKS.md → REVIEW.md
127
+
128
+
129
+ On failure at any stage:
130
+ Primary ──fail──▶ Fallback 1 ──fail──▶ Fallback 2 ──fail──▶ Circuit Open
131
+ e.g. e.g. e.g. (wait 5 min,
132
+ copilot gemini ollama then retry)
133
+ ```
134
+
135
+ ## OpenClaw Skills
136
+
137
+ OpenClaw is the AI skill engine that powers every pipeline stage. Running `aicc openclaw` generates 6 stage-specific skills that guide each AI agent's behavior:
138
+
139
+ ```
140
+ Skills — injected into AI prompts at each pipeline stage
141
+
142
+ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐
143
+ │ Requirement│ │ PM Spec │ │ Architect │ │ Implement │ │ Review │
144
+ │ Capture │ │ Skill │ │ Skill │ │ Skill │ │ Skill │
145
+ │ │ │ │ │ │ │ │ │ │
146
+ │ Analyze │ │ User │ │ Design │ │ Coding │ │ Structured│
147
+ │ raw input, │ │ stories, │ │ arch doc, │ │ standards,│ │ verdict, │
148
+ │ ask missing│ │ criteria, │ │ task list,│ │ tests, │ │ checklist,│
149
+ │ info, │ │ risks, │ │ exact │ │ security │ │ blockers │
150
+ │ confirm │ │ priority │ │ file paths│ │ rules │ │ vs warns │
151
+ └──────┬─────┘ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
152
+ │ │ │ │ │
153
+ ▼ ▼ ▼ ▼ ▼
154
+ [User Input] [PM Agent] [Architect] [Coder] [Reviewer]
155
+ stage:capture stage:spec stage:arch stage:impl stage:review
156
+ ```
157
+
158
+ **Skill loading priority** (first match wins):
159
+
160
+ | Priority | Location | Description |
161
+ |----------|----------|-------------|
162
+ | 1 (highest) | `.ai-workflow/skills/` | Project-local overrides |
163
+ | 2 | `~/.openclaw/skills/<project>/` | OpenClaw directory (generated by `aicc openclaw`) |
164
+ | 3 | `~/.aicc/skills/` | Global user fallback |
165
+
166
+ **Generated skill files:**
167
+
168
+ | File | Stage | What it does |
169
+ |------|-------|-------------|
170
+ | `SKILL.md` | — | PM Agent persona, cron monitoring, session config |
171
+ | `SKILL-requirement-capture.md` | `capture` | Analyze raw user input, ask clarifying questions, confirm before submit |
172
+ | `SKILL-pm-spec.md` | `spec` | Write structured PM spec with user stories, acceptance criteria, risks |
173
+ | `SKILL-architect.md` | `arch` | Design architecture doc + implementation task list with exact file paths |
174
+ | `SKILL-implement.md` | `impl` | Code implementation following architecture, with tests and security rules |
175
+ | `SKILL-review.md` | `review` | Structured code review with verdict, blockers vs warnings, checklist |
176
+
177
+ Skills are injected via `injectSkills(prompt, 'stage')` — the system loads all matching skills and appends their content to the AI prompt before execution.
178
+
179
+ **OpenClaw bridge features:**
180
+
181
+ - **Event forwarding**: AICC pipeline events → OpenClaw Gateway → all channels
182
+ - **Bidirectional commands**: Users on any channel can invoke AICC commands via OpenClaw
183
+ - **Tool exposure**: AICC tools (status, feature, deploy, etc.) registered as OpenClaw tools
184
+ - **Cron monitoring**: Pipeline health checks (2min active, 5min stall, 30min idle)
185
+ - **Stage document injection**: On stage transitions, output docs are sent to OpenClaw session
186
+
187
+ ## Configuration
188
+
189
+ The init wizard creates `aicc.config.js` at your project root:
190
+
191
+ ```js
192
+ export default {
193
+ name: 'my-project',
194
+ description: 'A full-stack web application',
195
+ workflowDir: '.ai-workflow',
196
+ envPrefix: 'MYPROJ',
197
+
198
+ deploy: { command: 'npm run deploy', options: [] },
199
+ review: { extensions: ['.js', '.ts'], sourceDir: 'src/' },
200
+ web: { port: 3847 },
201
+
202
+ roleplay: {
203
+ enabled: true,
204
+ verbosity: 'normal', // 'quiet' | 'normal' | 'verbose'
205
+ pmPersonality: 'professional', // 'professional' | 'casual' | 'funny'
206
+ agentChat: true,
207
+ progressUpdates: true,
208
+ progressInterval: 180000, // 3 min between PM "still working" updates
209
+ maxReviewCycles: 3,
210
+ autoDeployOnApproval: false,
211
+ openclawBridge: true, // enable OpenClaw WebSocket bridge
212
+ },
213
+
214
+ // Each line = one stage. Change provider/model to switch instantly.
215
+ pipeline: [
216
+ { stage: 'chat', provider: 'openclaw', model: 'auto', fallbacks: ['copilot:claude-haiku-4.5'] },
217
+ { stage: 'pm', provider: 'copilot', model: 'claude-sonnet-4.6', fallbacks: ['gemini:gemini-2.5-pro', 'ollama'] },
218
+ { stage: 'architect', provider: 'copilot', model: 'claude-sonnet-4.6', fallbacks: ['gemini:gemini-2.5-pro', 'ollama'] },
219
+ { stage: 'implement', provider: 'claude', model: 'claude-sonnet-4-6', fallbacks: ['copilot:claude-sonnet-4.6', 'ollama'] },
220
+ { stage: 'review', provider: 'copilot', model: 'claude-sonnet-4.6', fallbacks: ['gemini:gemini-2.5-pro', 'ollama'] },
221
+ { stage: 'deploy', provider: 'copilot', model: 'claude-sonnet-4.6', fallbacks: ['gemini:gemini-2.5-pro', 'ollama'] },
222
+ ],
223
+
224
+ ollama: { model: 'llama3.1', baseUrl: 'http://localhost:11434' },
225
+ };
226
+ ```
227
+
228
+ **To switch a model**, just change the `model` value for that stage. No other config needed.
229
+
230
+ **Providers**: `openclaw` (OpenClaw gateway), `copilot` (GitHub Copilot CLI), `claude` (Claude Code CLI), `gemini` (Gemini CLI), `ollama` (local).
231
+
232
+ **Fallback format**: `'provider:model'` or just `'provider'` (uses default model). On primary failure, tries each fallback in order.
233
+
234
+ ### Config Reference
235
+
236
+ | Property | Type | Default | Description |
237
+ |----------|------|---------|-------------|
238
+ | `name` | `string` | — | Project name (shown in header, dashboard, bot) |
239
+ | `description` | `string` | — | Short project description |
240
+ | `workflowDir` | `string` | `.ai-workflow` | Directory for pipeline state files |
241
+ | `envPrefix` | `string` | `AICC` | Prefix for environment variables |
242
+ | `deploy.command` | `string` | `null` | Shell command to run on deploy (if `null`, deploy marks feature as done without running anything) |
243
+ | `deploy.options` | `array` | `[]` | Deploy option presets `{ name, value }` |
244
+ | `review.extensions` | `string[]` | `['.js','.ts','.py','.go']` | File extensions to include in code reviews |
245
+ | `review.sourceDir` | `string` | `src/` | Source directory for git diffs |
246
+ | `web.port` | `number` | `3847` | Web dashboard port |
247
+ | `roleplay.enabled` | `boolean` | `true` | Enable multi-agent chat room |
248
+ | `roleplay.verbosity` | `string` | `normal` | `quiet`, `normal`, `verbose` |
249
+ | `roleplay.pmPersonality` | `string` | `professional` | PM agent tone |
250
+ | `roleplay.maxReviewCycles` | `number` | `3` | Auto-approve after N review loops |
251
+ | `roleplay.autoDeployOnApproval` | `boolean` | `false` | Auto-deploy when review passes |
252
+ | `roleplay.openclawBridge` | `boolean` | `true` | Enable OpenClaw WebSocket bridge |
253
+ | `pipeline` | `array` | See above | Array of `{ stage, provider, model, fallbacks }` entries |
254
+ | `ollama.model` | `string` | `llama3.1` | Default Ollama model |
255
+ | `ollama.baseUrl` | `string` | `http://localhost:11434` | Ollama server endpoint |
256
+
257
+ ## CLI Commands
258
+
259
+ ```
260
+ aicc Launch interactive terminal menu
261
+ aicc init Set up a new project (creates aicc.config.js)
262
+ aicc start Start all services (web + telegram + twitch + openclaw bridge)
263
+ aicc web Start the web dashboard
264
+ aicc telegram Start the Telegram bot
265
+ aicc twitch Start the Twitch bot
266
+ aicc openclaw Generate OpenClaw skills for all pipeline stages
267
+ aicc doctor Health check + auto-repair (validates skills, dirs, tools)
268
+ aicc events Stream pipeline events as NDJSON (for scripting)
269
+ aicc status Show pipeline status (JSON)
270
+ aicc health Show health check (JSON)
271
+ aicc feature "desc" Create a new feature
272
+ aicc deploy Deploy to target
273
+ aicc approve Approve current feature
274
+ aicc reject "reason" Reject with feedback
275
+ aicc review Get latest review
276
+ aicc logs Show recent logs
277
+ aicc cleanup Archive workflow files
278
+ aicc reset Abandon current feature
279
+ aicc --version Show version
280
+ aicc --help Show this help
281
+ ```
282
+
283
+ ## Multi-Agent Roleplay
284
+
285
+ When `roleplay.enabled = true`, the PM agent becomes an **autonomous orchestrator** that runs the entire pipeline and communicates with the team in a shared chat room — visible in Telegram, Slack, WebSocket, and the Office Visualizer.
286
+
287
+ ```
288
+ CEO (you): /feature Add user notification system
289
+
290
+ 📝 PM is writing the feature spec...
291
+ ⏳ PM spec in progress... (2min elapsed)
292
+ 📝 Spec complete
293
+ 🏗 Architect is designing the architecture...
294
+ 🏗 Architecture + tasks complete
295
+ ⚡ Coder is implementing...
296
+ [█████████░░░░░░░░░░░] 45% (4/9 tasks)
297
+ 🔨 Working on: TASK-005: Add PushAdapter module
298
+ ✅ TASK-004: Create notification schema
299
+ ⚡ Implementation complete
300
+ 🔍 Reviewer is reviewing implementation... (cycle 1/3)
301
+ 🔍 Review cycle 1/3: APPROVED
302
+ ✅ Feature approved — deploying now...
303
+ 🚀 Deployment complete! Feature shipped! 🎉
304
+ ```
305
+
306
+ **PM Authority** — the PM is an employee with authority, not an assistant:
307
+
308
+ | PM Acts Alone | PM Informs You After | PM Asks You |
309
+ |--------------|---------------------|-------------|
310
+ | Switch AI providers when rate-limited | Had to switch providers mid-stage | Feature is truly ambiguous |
311
+ | Retry failed stages (up to 5 attempts) | Used Ollama as fallback | Deploy to production |
312
+ | Kill hung processes and restart | Review loop exceeded 3 cycles | All providers down >30 min |
313
+ | Break review loops after 3 cycles | Stage took longer than estimated | Budget limit reached |
314
+ | Auto-resume when providers recover | — | — |
315
+
316
+ Set `roleplay.enabled = false` to disable — the system behaves as a direct pipeline with no chat messages.
317
+
318
+ ## Project Structure
319
+
320
+ ```
321
+ your-project/
322
+ ├── aicc.config.js # Project configuration
323
+ ├── GEMINI.md # Gemini role instructions
324
+ ├── .env # Secrets (Telegram tokens, AI mode)
325
+
326
+ ├── .ai-workflow/ # Pipeline state (auto-managed)
327
+ │ ├── status.json # Current pipeline status
328
+ │ ├── model-bans.json # Rate-limit / capacity bans with TTL
329
+ │ ├── circuit-breakers.json # Provider health state
330
+ │ ├── costs.jsonl # Token usage log
331
+ │ ├── skills/ # Project-local skill overrides (highest priority)
332
+ │ ├── inbox/ # Feature requests
333
+ │ ├── specs/ # PM specifications (SPEC-*.md)
334
+ │ ├── architecture/ # Architecture documents (ARCH-*.md)
335
+ │ ├── tasks/ # Implementation tasks (TASKS-*.md)
336
+ │ ├── reviews/ # Code review reports (REVIEW-*.md)
337
+ │ ├── checkpoints/ # Per-stage checkpoints (SHA-256 integrity)
338
+ │ ├── sessions/ # AI conversation session IDs
339
+ │ └── logs/ # Activity logs
340
+
341
+ ├── .claude/
342
+ │ ├── skills/ # Legacy AI skill prompt templates
343
+ │ └── agents/ # Claude Code agent definitions
344
+
345
+ └── .github/
346
+ └── copilot-instructions.md # Copilot CLI project context
347
+
348
+ ~/.openclaw/skills/<project>/ # OpenClaw skills (generated by `aicc openclaw`)
349
+ ├── SKILL.md # PM Agent persona + cron config
350
+ ├── SKILL-requirement-capture.md
351
+ ├── SKILL-pm-spec.md
352
+ ├── SKILL-architect.md
353
+ ├── SKILL-implement.md
354
+ └── SKILL-review.md
355
+ ```
356
+
357
+ ## Telegram Bot
358
+
359
+ ```sh
360
+ # Set credentials in .env
361
+ MYPROJ_TELEGRAM_TOKEN=your_bot_token
362
+ MYPROJ_TELEGRAM_CHAT_ID=your_chat_id
363
+ MYPROJ_TELEGRAM_ALLOWED_IDS=user_id_1,user_id_2
364
+
365
+ # Start
366
+ aicc telegram
367
+ ```
368
+
369
+ Typing `/` in Telegram shows all available commands with descriptions (auto-registered via `setMyCommands`).
370
+
371
+ | Command | Description |
372
+ |---------|-------------|
373
+ | `/feature <desc>` | Submit a new feature |
374
+ | `/bug <desc>` | Report and fix a bug |
375
+ | `/status` | Pipeline status |
376
+ | `/review` | Trigger code review |
377
+ | `/approve` | Approve current feature |
378
+ | `/reject <reason>` | Reject with reason |
379
+ | `/implement` | Trigger Coder implementation |
380
+ | `/deploy` | Deploy to environment |
381
+ | `/health` | System health check |
382
+ | `/logs` | View session logs |
383
+ | `/docs` | Browse pipeline documents |
384
+ | `/costs` | AI usage & cost summary |
385
+ | `/leaderboard` | AI model performance |
386
+ | `/audit` | Recent audit log |
387
+ | `/autopilot` | Toggle auto-pilot mode |
388
+ | `/reset` | Reset / abandon feature |
389
+ | `/cleanup` | Clean up workspace |
390
+ | `/retry` | Retry from checkpoint |
391
+ | `/ask <question>` | Ask AI a question |
392
+ | `/aimode` | View/toggle AI mode |
393
+ | `/dryrun` | Pipeline dry run |
394
+ | `/menu` | Show main menu buttons |
395
+ | *(plain text)* | When roleplay is on: talks to PM agent |
396
+
397
+ When OpenClaw bridge is active, the built-in Telegram bot is skipped to avoid conflicts — OpenClaw handles all channels.
398
+
399
+ ## Twitch Bot
400
+
401
+ ```sh
402
+ MYPROJ_TWITCH_CHANNEL=your_channel
403
+ MYPROJ_TWITCH_ACCESS_TOKEN=your_oauth_token
404
+ MYPROJ_TWITCH_CLIENT_ID=your_client_id
405
+ MYPROJ_TWITCH_ALLOWED_IDS=twitch_user_id_1
406
+
407
+ aicc twitch
408
+ ```
409
+
410
+ Commands use `!` prefix: `!status`, `!feature <desc>`, `!review`, `!deploy`, `!approve`, `!reject <reason>`, `!ai <question>`.
411
+
412
+ ## Web Dashboard
413
+
414
+ ```sh
415
+ aicc web
416
+ # => http://localhost:3847
417
+ ```
418
+
419
+ Real-time dashboard with WebSocket updates:
420
+ - Pipeline status with stage visualization
421
+ - Feature creation and management
422
+ - Code review viewer with verdict display
423
+ - Deploy controls with live output
424
+ - Log viewer with session history
425
+ - AI chat for project questions
426
+ - **AI Office Visualizer** — pixel-art RPG canvas with animated agent characters (PM, Architect, Coder, Reviewer, Deployer), A* pathfinding, day/night cycle, chat bubbles, sound effects, feature ticket handoff animations with delivery tracking, work state indicators (📝 On it!, 📐 Designing..., 🔍 Reviewing..., 🚀 Deploying!), bug battle animations, and real-time pipeline stage sync
427
+
428
+ ## Hub Server
429
+
430
+ The hub aggregates status from multiple AICC-powered projects into a single dashboard:
431
+
432
+ ```sh
433
+ aicc hub
434
+ # => http://localhost:3850/office/
435
+ ```
436
+
437
+ - **Real-time WebSocket subscriptions** to each project's `/ws` for instant status updates
438
+ - **Health polling** as a fallback with configurable interval
439
+ - **Office Visualizer** at `/office/` — multi-project pixel-art view with all characters and pipelines
440
+ - **REST API** at `/api/projects` — aggregated project states, health, and summary
441
+
442
+ Configure in `aicc.config.js`:
443
+
444
+ ```js
445
+ hub: {
446
+ port: 3850,
447
+ projects: [
448
+ { name: 'MyApp', url: 'http://localhost:3847', icon: '🎯' },
449
+ { name: 'Backend', url: 'http://localhost:3848', icon: '⚙️' },
450
+ ],
451
+ },
452
+ ```
453
+
454
+ ## Environment Variables
455
+
456
+ All variables use the configured prefix (default: `AICC`).
457
+
458
+ | Variable | Required | Description |
459
+ |----------|----------|-------------|
460
+ | `{PREFIX}_AI_MODE` | No | `hybrid` (default), `cloud`, `local` |
461
+ | `{PREFIX}_TELEGRAM_TOKEN` | For Telegram | Bot token from @BotFather |
462
+ | `{PREFIX}_TELEGRAM_CHAT_ID` | For notifications | Your chat ID |
463
+ | `{PREFIX}_TELEGRAM_ALLOWED_IDS` | For security | Comma-separated user ID whitelist |
464
+ | `{PREFIX}_TWITCH_CHANNEL` | For Twitch | Channel name |
465
+ | `{PREFIX}_TWITCH_ACCESS_TOKEN` | For Twitch | OAuth token |
466
+ | `{PREFIX}_TWITCH_CLIENT_ID` | For Twitch | Client ID |
467
+ | `{PREFIX}_TWITCH_ALLOWED_IDS` | For security | Comma-separated user ID whitelist |
468
+ | `{PREFIX}_WEB_PORT` | No | Override web dashboard port |
469
+ | `GEMINI_MODEL` | No | Override Gemini model |
470
+ | `CLAUDE_MODEL` | No | Override Claude Code model (hyphen format) |
471
+ | `COPILOT_MODEL` | No | Override Copilot model (period format) |
472
+ | `OLLAMA_MODEL` | No | Override Ollama model |
473
+ | `OLLAMA_BASE_URL` | No | Ollama API endpoint |
474
+
475
+ ## Examples
476
+
477
+ ### Claude Code Max
478
+
479
+ ```js
480
+ export default {
481
+ name: 'my-project',
482
+ envPrefix: 'MYPROJ',
483
+ roleplay: { enabled: true, verbosity: 'normal' },
484
+ pipeline: [
485
+ { stage: 'chat', provider: 'openclaw', model: 'auto', fallbacks: ['copilot:claude-haiku-4.5'] },
486
+ { stage: 'pm', provider: 'copilot', model: 'claude-sonnet-4.6', fallbacks: ['gemini:gemini-2.5-pro', 'ollama'] },
487
+ { stage: 'architect', provider: 'copilot', model: 'claude-opus-4.6', fallbacks: ['gemini:gemini-2.5-pro', 'ollama'] },
488
+ { stage: 'implement', provider: 'claude', model: 'claude-sonnet-4-6', fallbacks: ['copilot:claude-sonnet-4.6', 'ollama'] },
489
+ { stage: 'review', provider: 'copilot', model: 'claude-sonnet-4.6', fallbacks: ['gemini:gemini-2.5-pro', 'ollama'] },
490
+ { stage: 'deploy', provider: 'copilot', model: 'claude-sonnet-4.6', fallbacks: ['gemini:gemini-2.5-pro', 'ollama'] },
491
+ ],
492
+ };
493
+ ```
494
+
495
+ ### Salesforce
496
+
497
+ ```js
498
+ export default {
499
+ name: 'xConnector',
500
+ envPrefix: 'XCONN',
501
+ deploy: {
502
+ command: 'sf project deploy start',
503
+ options: [
504
+ { name: 'Run Tests', value: '--test-level RunLocalTests' },
505
+ { name: 'No Tests', value: '--test-level NoTestRun' },
506
+ ],
507
+ },
508
+ review: { extensions: ['.cls', '.js', '.html', '.xml', '.css'], sourceDir: 'force-app/' },
509
+ };
510
+ ```
511
+
512
+ ### Node.js API
513
+
514
+ ```js
515
+ export default {
516
+ name: 'my-api',
517
+ envPrefix: 'MYAPI',
518
+ deploy: { command: 'npm run deploy' },
519
+ review: { extensions: ['.ts', '.tsx', '.js', '.jsx'], sourceDir: 'src/' },
520
+ };
521
+ ```
522
+
523
+ ## Programmatic API
524
+
525
+ ```js
526
+ import { loadConfig, getConfig } from 'ai-control-center/config';
527
+ import { getStatusData, runNewFeature, runDeploy } from 'ai-control-center/actions';
528
+ import { getStatus, updateStatus } from 'ai-control-center/pipeline';
529
+
530
+ await loadConfig();
531
+ const status = getStatusData();
532
+ console.log(`Stage: ${status.stage}`);
533
+ ```
534
+
535
+ ## Prerequisites
536
+
537
+ **Required:** Node.js >= 18, Git
538
+
539
+ **Optional (at least one AI CLI recommended):**
540
+ - [Claude Code](https://claude.ai/code) — primary for `implement` stage
541
+ - [GitHub Copilot CLI](https://docs.github.com/en/copilot) — PM, architecture, review
542
+ - [Gemini CLI](https://ai.google.dev/gemini-api/docs/cli) — fallback for all stages
543
+ - [Ollama](https://ollama.com) — local AI fallback
544
+ - [OpenClaw](https://openclaw.dev) — AI skill engine + multi-channel gateway (optional)
545
+
546
+ ## FAQ
547
+
548
+ <details>
549
+ <summary><strong>Do I need all the AI CLIs installed?</strong></summary>
550
+
551
+ No. The control center works with whichever tools you have. You need at least one AI CLI for the pipeline to work; Ollama can serve as a fully local fallback.
552
+ </details>
553
+
554
+ <details>
555
+ <summary><strong>What is OpenClaw?</strong></summary>
556
+
557
+ [OpenClaw](https://openclaw.dev) is a self-hosted AI gateway. AICC leverages OpenClaw's **skill system** as its primary feature — `aicc openclaw` generates 6 stage-specific skills that guide each AI agent's behavior throughout the pipeline. Skills are loaded from `~/.openclaw/skills/<project>/` and injected into AI prompts at each stage. OpenClaw also bridges messaging channels (Telegram, WhatsApp, Slack, Discord) to the pipeline.
558
+ </details>
559
+
560
+ <details>
561
+ <summary><strong>How does provider failover work?</strong></summary>
562
+
563
+ Each `pipeline[]` entry has a primary `provider:model` and optional `fallbacks`. On rate limits, the system waits and retries. On capacity exhaustion, it moves to the next fallback. Circuit breakers prevent hammering a broken provider.
564
+ </details>
565
+
566
+ <details>
567
+ <summary><strong>Can I customize AI behavior per stage?</strong></summary>
568
+
569
+ Yes. Edit skill files in `.ai-workflow/skills/` (project-local, highest priority) or `~/.openclaw/skills/<project>/` (generated by `aicc openclaw`). Skills are markdown files with YAML frontmatter that define how each AI agent should behave — what to analyze, what format to output, what rules to follow.
570
+ </details>
571
+
572
+ <details>
573
+ <summary><strong>Can I use this with a monorepo?</strong></summary>
574
+
575
+ Yes. Place `aicc.config.js` at your monorepo root. Set `review.sourceDir` to the relevant subdirectory.
576
+ </details>
577
+
578
+ ## Contributing
579
+
580
+ Contributions are welcome. Please open an issue first to discuss what you'd like to change.
581
+
582
+ ## License
583
+
584
+ [MIT](LICENSE)