aidevo 1.0.0-beta.1

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 (110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +431 -0
  3. package/dist/cli/commands/dashboard.d.ts +2 -0
  4. package/dist/cli/commands/dashboard.d.ts.map +1 -0
  5. package/dist/cli/commands/dashboard.js +70 -0
  6. package/dist/cli/commands/dashboard.js.map +1 -0
  7. package/dist/cli/commands/init.d.ts +2 -0
  8. package/dist/cli/commands/init.d.ts.map +1 -0
  9. package/dist/cli/commands/init.js +362 -0
  10. package/dist/cli/commands/init.js.map +1 -0
  11. package/dist/cli/commands/log.d.ts +2 -0
  12. package/dist/cli/commands/log.d.ts.map +1 -0
  13. package/dist/cli/commands/log.js +438 -0
  14. package/dist/cli/commands/log.js.map +1 -0
  15. package/dist/cli/commands/migrate.d.ts +2 -0
  16. package/dist/cli/commands/migrate.d.ts.map +1 -0
  17. package/dist/cli/commands/migrate.js +183 -0
  18. package/dist/cli/commands/migrate.js.map +1 -0
  19. package/dist/cli/commands/reindex.d.ts +10 -0
  20. package/dist/cli/commands/reindex.d.ts.map +1 -0
  21. package/dist/cli/commands/reindex.js +94 -0
  22. package/dist/cli/commands/reindex.js.map +1 -0
  23. package/dist/cli/commands/report.d.ts +2 -0
  24. package/dist/cli/commands/report.d.ts.map +1 -0
  25. package/dist/cli/commands/report.js +219 -0
  26. package/dist/cli/commands/report.js.map +1 -0
  27. package/dist/cli/commands/rules.d.ts +2 -0
  28. package/dist/cli/commands/rules.d.ts.map +1 -0
  29. package/dist/cli/commands/rules.js +143 -0
  30. package/dist/cli/commands/rules.js.map +1 -0
  31. package/dist/cli/commands/start.d.ts +2 -0
  32. package/dist/cli/commands/start.d.ts.map +1 -0
  33. package/dist/cli/commands/start.js +173 -0
  34. package/dist/cli/commands/start.js.map +1 -0
  35. package/dist/cli/commands/status.d.ts +2 -0
  36. package/dist/cli/commands/status.d.ts.map +1 -0
  37. package/dist/cli/commands/status.js +74 -0
  38. package/dist/cli/commands/status.js.map +1 -0
  39. package/dist/cli/commands/update.d.ts +2 -0
  40. package/dist/cli/commands/update.d.ts.map +1 -0
  41. package/dist/cli/commands/update.js +146 -0
  42. package/dist/cli/commands/update.js.map +1 -0
  43. package/dist/cli/index.d.ts +3 -0
  44. package/dist/cli/index.d.ts.map +1 -0
  45. package/dist/cli/index.js +85 -0
  46. package/dist/cli/index.js.map +1 -0
  47. package/dist/mcp/server.d.ts +10 -0
  48. package/dist/mcp/server.d.ts.map +1 -0
  49. package/dist/mcp/server.js +632 -0
  50. package/dist/mcp/server.js.map +1 -0
  51. package/dist/schemas/run-json.d.ts +252 -0
  52. package/dist/schemas/run-json.d.ts.map +1 -0
  53. package/dist/schemas/run-json.js +22 -0
  54. package/dist/schemas/run-json.js.map +1 -0
  55. package/dist/server/api.d.ts +24 -0
  56. package/dist/server/api.d.ts.map +1 -0
  57. package/dist/server/api.js +196 -0
  58. package/dist/server/api.js.map +1 -0
  59. package/dist/server/index.d.ts +2 -0
  60. package/dist/server/index.d.ts.map +1 -0
  61. package/dist/server/index.js +166 -0
  62. package/dist/server/index.js.map +1 -0
  63. package/dist/utils/display.d.ts +12 -0
  64. package/dist/utils/display.d.ts.map +1 -0
  65. package/dist/utils/display.js +52 -0
  66. package/dist/utils/display.js.map +1 -0
  67. package/dist/utils/fs.d.ts +9 -0
  68. package/dist/utils/fs.d.ts.map +1 -0
  69. package/dist/utils/fs.js +43 -0
  70. package/dist/utils/fs.js.map +1 -0
  71. package/dist/utils/git.d.ts +4 -0
  72. package/dist/utils/git.d.ts.map +1 -0
  73. package/dist/utils/git.js +18 -0
  74. package/dist/utils/git.js.map +1 -0
  75. package/dist/utils/paths.d.ts +25 -0
  76. package/dist/utils/paths.d.ts.map +1 -0
  77. package/dist/utils/paths.js +45 -0
  78. package/dist/utils/paths.js.map +1 -0
  79. package/dist/utils/rules.d.ts +44 -0
  80. package/dist/utils/rules.d.ts.map +1 -0
  81. package/dist/utils/rules.js +208 -0
  82. package/dist/utils/rules.js.map +1 -0
  83. package/dist/utils/run-data.d.ts +37 -0
  84. package/dist/utils/run-data.d.ts.map +1 -0
  85. package/dist/utils/run-data.js +353 -0
  86. package/dist/utils/run-data.js.map +1 -0
  87. package/dist/utils/tokens.d.ts +26 -0
  88. package/dist/utils/tokens.d.ts.map +1 -0
  89. package/dist/utils/tokens.js +173 -0
  90. package/dist/utils/tokens.js.map +1 -0
  91. package/package.json +48 -0
  92. package/src/assets/skills/audit.md +98 -0
  93. package/src/assets/skills/bug-fixer.md +48 -0
  94. package/src/assets/skills/code-generator.md +82 -0
  95. package/src/assets/skills/commit-code.md +67 -0
  96. package/src/assets/skills/dashboard-generator.md +65 -0
  97. package/src/assets/skills/dev-flower.md +85 -0
  98. package/src/assets/skills/deviation-recorder.md +89 -0
  99. package/src/assets/skills/docx-to-markdown.md +69 -0
  100. package/src/assets/skills/mcp-reviewer.md +43 -0
  101. package/src/assets/skills/requirement-analyzer.md +103 -0
  102. package/src/assets/skills/rules-evolver.md +48 -0
  103. package/src/assets/skills/self-reviewer.md +53 -0
  104. package/src/assets/skills/task-splitter.md +58 -0
  105. package/src/assets/skills/workflow-orchestrator.md +204 -0
  106. package/src/assets/templates/demo-run.json +910 -0
  107. package/src/assets/templates/run.json +63 -0
  108. package/src/dashboard/assets/index-BMygHuaU.js +111 -0
  109. package/src/dashboard/assets/index-BW0UZ6Es.css +1 -0
  110. package/src/dashboard/index.html +13 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wen Tao
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,431 @@
1
+ <div align="center">
2
+
3
+ # AIDevo
4
+
5
+ ### AI Development Observability Platform
6
+
7
+ **Vibe coding with receipts.**
8
+
9
+ AI writes more and more of your code — but what did it actually do?<br>
10
+ How many tasks did it complete? How many bugs did it introduce? How often did it deviate from your architecture?
11
+
12
+ AIDevOS gives you the answers.
13
+
14
+ [![npm version](https://img.shields.io/npm/v/aidevo?color=%230066ff&label=npm)](https://www.npmjs.com/package/aidevo)
15
+ [![license](https://img.shields.io/github/license/LWTlong/ai-dev-os?color=%23333)](./LICENSE)
16
+ [![node](https://img.shields.io/node/v/aidevo?color=%23339933)](https://nodejs.org)
17
+ [![tests](https://img.shields.io/badge/tests-82%20passed-brightgreen)](#testing)
18
+
19
+ [Quick Start](#quick-start) · [MCP Server](#mcp-server) · [How It Works](#how-it-works) · [Dashboard](#dashboard) · [Skills](#skills) · [CLI Reference](#cli-reference)
20
+
21
+ </div>
22
+
23
+ ---
24
+
25
+ ## The Problem
26
+
27
+ You're using Claude Code or Cursor to build features. The AI generates hundreds of lines of code. But at the end of the day:
28
+
29
+ - **You can't tell** how many of those lines were right the first time
30
+ - **You can't track** which architectural rules the AI keeps violating
31
+ - **You can't measure** whether the AI is actually saving you time
32
+ - **You can't prove** your AI-assisted productivity in reviews or reports
33
+ - **You can't compare** how different models perform on your codebase
34
+
35
+ All that development process data? **Gone.** Every single session.
36
+
37
+ ## The Solution
38
+
39
+ AIDevOS works in **two modes** — pick the one that fits your workflow:
40
+
41
+ | Mode | What you get | Setup effort |
42
+ |------|-------------|--------------|
43
+ | **Data Collection Only** (via MCP) | Full observability with zero workflow changes | Add one JSON config block |
44
+ | **Full Workflow** (MCP + Skills + Commands) | Observability + structured AI SOPs + self-improving rules | `npm install` + `aidevo init` |
45
+
46
+ **Most teams start with data collection.** Your AI tool calls MCP tools automatically as it works — you change nothing about how you code. When you're ready for structured workflows, upgrade to full mode.
47
+
48
+ ## Quick Start
49
+
50
+ ### Path A: Data Collection Only (Recommended)
51
+
52
+ Add the MCP server config to your AI tool and start working. That's it.
53
+
54
+ **Claude Code** — add to `.mcp.json` in your project root:
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "aidevo": {
60
+ "command": "npx",
61
+ "args": ["-y", "aidevo", "mcp"]
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ **Cursor** — add to `.cursor/mcp.json`:
68
+
69
+ ```json
70
+ {
71
+ "mcpServers": {
72
+ "aidevo": {
73
+ "command": "npx",
74
+ "args": ["-y", "aidevo", "mcp"]
75
+ }
76
+ }
77
+ }
78
+ ```
79
+
80
+ **VS Code Copilot** — add to `.vscode/mcp.json`:
81
+
82
+ ```json
83
+ {
84
+ "servers": {
85
+ "aidevo": {
86
+ "command": "npx",
87
+ "args": ["-y", "aidevo", "mcp"]
88
+ }
89
+ }
90
+ }
91
+ ```
92
+
93
+ **Windsurf** — add to `~/.codeium/windsurf/mcp_config.json`:
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "aidevo": {
99
+ "command": "npx",
100
+ "args": ["-y", "aidevo", "mcp"]
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ No `aidevo init` or `aidevo start` needed. The MCP server uses **lazy init** — it auto-creates `.aidevos/` and `run.json` on the first tool call.
107
+
108
+ Then view your data:
109
+
110
+ ```bash
111
+ npx aidevo dashboard
112
+ ```
113
+
114
+ Open `http://localhost:2375` — real-time dashboard with live updates.
115
+
116
+ ### Path B: Full Workflow
117
+
118
+ ```bash
119
+ # Install globally
120
+ npm install -g aidevo
121
+
122
+ # Initialize in your project (interactive setup)
123
+ cd your-project
124
+ aidevo init
125
+ ```
126
+
127
+ `aidevo init` now offers **mode selection**:
128
+
129
+ 1. **Data collection only** — sets up MCP config for your chosen AI tool(s)
130
+ 2. **Full workflow** — MCP config + 14 AI Skills + slash commands + project rules
131
+
132
+ Multi-tool support: select one or more AI tools (Claude Code, Cursor, VS Code Copilot, Windsurf) and AIDevOS writes the correct MCP config for each.
133
+
134
+ Then start building:
135
+
136
+ ```bash
137
+ # Create a new development run
138
+ aidevo start
139
+
140
+ # Place your PRD, then let AI take over
141
+ /workflow
142
+ ```
143
+
144
+ The AI will execute: **Requirement Analysis** -> *User Confirmation* -> **Task Decomposition** -> **Code Generation** -> **Self-Review** -> loop until done.
145
+
146
+ ## MCP Server
147
+
148
+ The MCP server is the primary data collection mechanism. Your AI tool calls these tools automatically as part of its normal workflow — no extra prompts or commands required.
149
+
150
+ ### 9 MCP Tools
151
+
152
+ | Tool | Description |
153
+ |------|-------------|
154
+ | `aidevos_task_start` | Mark a task as in-progress |
155
+ | `aidevos_task_done` | Mark a task as completed |
156
+ | `aidevos_log_bug` | Record a bug found during development |
157
+ | `aidevos_bug_fix` | Record a bug fix |
158
+ | `aidevos_log_review` | Log a self-review result (pass/fail) |
159
+ | `aidevos_log_deviation` | Record when AI output deviates from expectations |
160
+ | `aidevos_log_files` | Track file changes (added, modified, deleted) |
161
+ | `aidevos_highlight` | Capture notable achievements or milestones |
162
+ | `aidevos_status` | Return current run status as structured data |
163
+
164
+ ### MCP Prompts
165
+
166
+ The server exposes an `aidevos-guide` prompt that teaches your AI tool when and how to call each tool. AI tools that support MCP prompts will automatically understand the observability protocol.
167
+
168
+ ### Lazy Init
169
+
170
+ No manual setup required for data collection. On the first MCP tool call, the server will:
171
+
172
+ 1. Create `.aidevos/` if it doesn't exist
173
+ 2. Create `run.json` for the current branch and developer
174
+ 3. Start recording immediately
175
+
176
+ ### Token Auto-Collection
177
+
178
+ For **Claude Code** users, AIDevOS automatically reads Claude session files to collect token usage data:
179
+
180
+ - Token usage per task and per bug fix
181
+ - Breakdown: `input_tokens`, `output_tokens`, `cache_creation_input_tokens`, `cache_read_input_tokens`
182
+ - Aggregated totals at the run level
183
+
184
+ This enables accurate **ROI calculation** — you can see exactly how many tokens each task or bug fix consumed and correlate cost with output.
185
+
186
+ ## How It Works
187
+
188
+ AIDevOS is **not** an AI coding agent. It's an **observability layer** that standardizes how your existing AI tools work.
189
+
190
+ ```
191
+ ┌──────────────────────────────────────────────────────┐
192
+ │ Your IDE (Claude Code / Cursor / VS Code / Windsurf)│
193
+ │ │
194
+ │ ┌──────────┐ MCP calls ┌────────────────────┐ │
195
+ │ │ AI Agent ├────────────→│ AIDevOS MCP Server │ │
196
+ │ │ │ │ (9 tools) │ │
197
+ │ │ │ reads ┌──────────────────┐ │ │
198
+ │ │ ├────────────→│ .aidevos/skills/ │ │ │
199
+ │ │ │ │ (14 SOPs) │ │ │
200
+ │ └──────────┘ └───────┬──────────┘ │ │
201
+ └───────────────────────────┬───────┘──────────────┘
202
+
203
+
204
+ ┌─────────────┐
205
+ │ run.json │ <- Single source of truth
206
+ └──────┬──────┘
207
+
208
+ ┌───────────┼───────────┐
209
+ ▼ ▼ ▼
210
+ ┌──────────┐ ┌────────┐ ┌─────────┐
211
+ │Dashboard │ │Reports │ │Analysis │
212
+ │ (React) │ │ (.md) │ │ (JSON) │
213
+ └──────────┘ └────────┘ └─────────┘
214
+ ```
215
+
216
+ The **MCP path** (top arrow) is the primary data collection mechanism. Skills are optional and used only in full workflow mode.
217
+
218
+ ### Three-Layer Data Model
219
+
220
+ | Layer | File | Scope | Purpose |
221
+ |-------|------|-------|---------|
222
+ | **L0** | `run.json` | Per developer | Every task, bug, deviation, review, rule |
223
+ | **L1** | `requirement.json` | Per branch | Aggregated developer stats, module assignments |
224
+ | **L2** | `index.json` | Per project | Cross-branch overview for team leads |
225
+
226
+ ### The Self-Improving Loop
227
+
228
+ This is what makes AIDevOS different. It's not just tracking — it's **learning**.
229
+
230
+ ```
231
+ AI generates code
232
+
233
+
234
+ Self-review catches issues
235
+
236
+ ├── Pass -> next task
237
+
238
+ └── Fail -> fix -> record deviation
239
+
240
+
241
+ Is it a missing rule?
242
+
243
+ Yes ─────┤
244
+
245
+ Sediment as project rule
246
+
247
+
248
+ AI reads rules next time
249
+
250
+
251
+ Same mistake never happens again
252
+ ```
253
+
254
+ Over time, your `.aidevos/rules/` grows into a **project-specific AI knowledge base** that makes every subsequent development run more accurate.
255
+
256
+ ## Dashboard
257
+
258
+ Real-time visualization powered by React + ECharts with dark theme.
259
+
260
+ **Branch Detail View** — deep dive into a single development run:
261
+
262
+ - KPI cards: task completion, deviation rate, bug count, review pass rate, ROI
263
+ - Task timeline with stage breakdown
264
+ - Node time distribution (where did the AI spend time?)
265
+ - Bug severity distribution
266
+ - Review issue categories
267
+ - File change heatmap
268
+ - Token usage breakdown per task
269
+
270
+ **Project Overview** — team lead perspective across all branches:
271
+
272
+ - Requirement status ring chart
273
+ - Developer efficiency comparison
274
+ - Cross-branch totals and highlights
275
+
276
+ ```bash
277
+ aidevo dashboard # Default port 2375
278
+ aidevo dashboard --port 3000 # Custom port
279
+ ```
280
+
281
+ Dashboard updates in real-time via SSE — no refresh needed.
282
+
283
+ ## Skills
284
+
285
+ AIDevOS ships with **14 AI Skills** — structured SOPs that tell your AI tool exactly what to do and how to record it. Skills are used in **full workflow mode** and are optional for data-collection-only setups.
286
+
287
+ ### Workflow Skills (auto-orchestrated)
288
+
289
+ | Skill | Role | What it does |
290
+ |-------|------|-------------|
291
+ | `workflow-orchestrator` | Project Manager | Orchestrates the full loop, handles interruption recovery |
292
+ | `requirement-analyzer` | Architect | Analyzes PRD, generates `analysis.md`, waits for user confirmation |
293
+ | `task-splitter` | Tech Lead | Decomposes analysis into atomic, testable tasks |
294
+ | `code-generator` | Senior Engineer | Writes code strictly following tasks and project rules |
295
+ | `self-reviewer` | QA Lead | Reviews code against all project rules, pass or fail |
296
+ | `bug-fixer` | Debug Expert | Fixes bugs found during self-review |
297
+
298
+ ### Manual Skills (user-triggered)
299
+
300
+ | Skill | Command | When to use |
301
+ |-------|---------|-------------|
302
+ | `audit` | `/audit` | Scan your codebase to auto-generate project rules |
303
+ | `deviation-recorder` | `/deviation` | Record when AI output doesn't match expectations |
304
+ | `rules-evolver` | `/rules-evolver` | Evolve and maintain project rules from PR feedback |
305
+
306
+ ### Utility Skills
307
+
308
+ | Skill | Purpose |
309
+ |-------|---------|
310
+ | `dashboard-generator` | Generate dashboard configuration |
311
+ | `commit-code` | Git commit assistant |
312
+ | `docx-to-markdown` | Convert DOCX PRD files to Markdown |
313
+ | `mcp-reviewer` | External MCP-based code review |
314
+ | `dev-flower` | Development flow visualization |
315
+
316
+ ## Rules System
317
+
318
+ AIDevOS uses a **Registry + Generated Views** pattern for project rules:
319
+
320
+ ```
321
+ .aidevos/rules.json <- Source of truth (committed to git)
322
+ .aidevos/rules/*.md <- Auto-generated views (gitignored)
323
+ ```
324
+
325
+ - **Fingerprint dedup**: SHA256 hash prevents duplicate rules across parallel branches
326
+ - **Auto-merge**: `aidevo rules merge` resolves git conflicts by taking the union
327
+ - **Similarity detection**: `aidevo rules dedupe` finds near-duplicate rules via Jaccard similarity
328
+ - **Category system**: `component`, `api`, `style`, `i18n`, `architecture`, `state-management`, `routing`, `testing`, `process`, `general`
329
+
330
+ Rules are automatically rebuilt on every `aidevo start` and every rule sedimentation.
331
+
332
+ ## CLI Reference
333
+
334
+ | Command | Description |
335
+ |---------|-------------|
336
+ | `aidevo init` | Interactive project setup: mode selection (data collection / full workflow), multi-tool support |
337
+ | `aidevo start` | Create a new development run for current branch |
338
+ | `aidevo status` | Show current run status in terminal |
339
+ | `aidevo log <sub>` | Write structured data to run.json (12 subcommands) |
340
+ | `aidevo dashboard` | Launch real-time visualization dashboard |
341
+ | `aidevo mcp` | Start the MCP server (used in MCP config, not called directly) |
342
+ | `aidevo rules <sub>` | Manage rules registry (`build`, `dedupe`, `merge`, `list`) |
343
+ | `aidevo reindex` | Rebuild project-level index from all runs |
344
+ | `aidevo report` | Generate markdown performance report (`--scope me/team`) |
345
+ | `aidevo update` | Update all skills to latest version |
346
+ | `aidevo migrate` | Migrate old run.json format to current schema |
347
+
348
+ ### `aidevo log` Subcommands
349
+
350
+ ```bash
351
+ aidevo log task --title "Create API layer" --stage "Infrastructure" --prd-phase "PRD1"
352
+ aidevo log task-start --id TASK-01
353
+ aidevo log task-done --id TASK-01
354
+ aidevo log bug --title "Type mismatch" --severity high --source self-review
355
+ aidevo log bug-fix --id BUG-01 --fix "Fixed response type"
356
+ aidevo log deviation --title "Wrong component" --root-cause rule-missing --category component-usage
357
+ aidevo log review --task-id TASK-01 --result pass --scope "src/api/"
358
+ aidevo log rule --content "Use Drawer for detail views" --category component
359
+ aidevo log file --path "src/api/user.ts" --change-type modified --lines-added 50
360
+ aidevo log cost --tokens 125000 --stage "requirement-analysis"
361
+ aidevo log highlight --content "FCP reduced from 3.2s to 0.8s"
362
+ ```
363
+
364
+ All writes are validated against the schema. Invalid enum values or missing required fields are rejected with clear error messages.
365
+
366
+ ## Project Structure
367
+
368
+ ```
369
+ your-project/
370
+ ├── .mcp.json # MCP server config (Claude Code)
371
+ ├── .cursor/mcp.json # MCP server config (Cursor)
372
+ ├── .vscode/mcp.json # MCP server config (VS Code Copilot)
373
+ ├── .aidevos/
374
+ │ ├── config.json # Project configuration
375
+ │ ├── rules.json # Rules registry (source of truth)
376
+ │ ├── rules/ # Auto-generated rule views (gitignored)
377
+ │ ├── index.json # Project-level aggregation
378
+ │ ├── skills/ # 14 AI Skill SOPs
379
+ │ └── runs/
380
+ │ └── [branch]/
381
+ │ ├── prd.md # PRD document (shared)
382
+ │ ├── analysis.md # Requirement analysis (shared)
383
+ │ ├── requirement.json # Branch-level aggregation (shared)
384
+ │ └── [developer]/
385
+ │ └── run.json # All structured dev data (personal)
386
+ ├── .claude/commands/ # Slash commands (Claude Code)
387
+ └── CLAUDE.md # Project rules + iron laws
388
+ ```
389
+
390
+ ## Testing
391
+
392
+ ```bash
393
+ npm test
394
+ ```
395
+
396
+ 82 tests across 5 test suites:
397
+
398
+ - **`mcp-server.test`** — MCP protocol, all 9 tools, prompts, lazy init, end-to-end data verification
399
+ - **`rules.test`** — Fingerprint dedup, registry CRUD, view generation, merge, similarity detection
400
+ - **`cli-log.test`** — All 12 log subcommands, enum validation, metrics calculation, requirement.json sync
401
+ - **`cli-start.test`** — run.json structure integrity, schema alignment, gitignore management
402
+ - **`reindex.test`** — Index aggregation, status inference, edge cases
403
+
404
+ ## Tech Stack
405
+
406
+ - **CLI**: Node.js + TypeScript (zero runtime dependencies)
407
+ - **MCP Server**: Model Context Protocol over stdio
408
+ - **Dashboard**: React 19 + ECharts + Tailwind CSS 4
409
+ - **Data**: JSON files (no database required)
410
+ - **Real-time**: Server-Sent Events (SSE)
411
+ - **Tests**: Node.js built-in test runner
412
+
413
+ ## Philosophy
414
+
415
+ > The performance of a system is not determined by its strongest component, but by the synergy between all parts.
416
+
417
+ AIDevOS is built on three iron laws:
418
+
419
+ 1. **No hallucination** — When uncertain, ask. Never guess.
420
+ 2. **No unauthorized docs** — Don't generate documents without explicit permission.
421
+ 3. **Clean workspace** — Test scripts must be deleted after passing. Keep the project lean.
422
+
423
+ These laws are enforced in every AI Skill and injected into your project's global rules.
424
+
425
+ ## Contributing
426
+
427
+ Issues and PRs welcome.
428
+
429
+ ## License
430
+
431
+ [MIT](./LICENSE)
@@ -0,0 +1,2 @@
1
+ export declare function dashboard(): Promise<void>;
2
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/dashboard.ts"],"names":[],"mappings":"AAmBA,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CA8D/C"}
@@ -0,0 +1,70 @@
1
+ import { resolve } from 'node:path';
2
+ import { configPath, runsDir, ASSETS_DIR } from '../../utils/paths.js';
3
+ import { fileExists, ensureDir, writeJson, readJson } from '../../utils/fs.js';
4
+ import { bold, green, cyan, red, dim, yellow } from '../../utils/display.js';
5
+ import { getBranchName } from '../../utils/git.js';
6
+ import { startServer } from '../../server/index.js';
7
+ import { getAllRuns } from '../../server/api.js';
8
+ import { existsSync } from 'node:fs';
9
+ function loadDemoData(projectRoot) {
10
+ const demoPath = resolve(ASSETS_DIR, 'templates', 'demo-run.json');
11
+ if (!existsSync(demoPath))
12
+ return;
13
+ const demoDir = resolve(projectRoot, '.aidevos', 'runs', 'demo-feature', 'demo-dev');
14
+ ensureDir(demoDir);
15
+ const data = readJson(demoPath);
16
+ writeJson(resolve(demoDir, 'run.json'), data);
17
+ }
18
+ export async function dashboard() {
19
+ const projectRoot = process.cwd();
20
+ const isDemo = process.argv.includes('--demo');
21
+ if (!isDemo && !fileExists(configPath(projectRoot))) {
22
+ console.log(red('\n AIDevOS not initialized. Run `npx aidevo init` first.\n'));
23
+ return;
24
+ }
25
+ // Parse --port flag
26
+ let port = 2375;
27
+ const portIdx = process.argv.indexOf('--port');
28
+ if (portIdx !== -1 && process.argv[portIdx + 1]) {
29
+ port = parseInt(process.argv[portIdx + 1]) || 2375;
30
+ }
31
+ if (isDemo) {
32
+ loadDemoData(projectRoot);
33
+ console.log(yellow('\n Running in demo mode with sample data.\n'));
34
+ }
35
+ // Auto-reindex on dashboard start to ensure overview data is fresh
36
+ try {
37
+ const { buildIndex } = await import('./reindex.js');
38
+ buildIndex(projectRoot);
39
+ }
40
+ catch {
41
+ /* reindex is best-effort */
42
+ }
43
+ const runs = getAllRuns(runsDir(projectRoot));
44
+ let currentBranch = '';
45
+ try {
46
+ currentBranch = getBranchName().replace(/\//g, '-');
47
+ }
48
+ catch {
49
+ /* not in git repo */
50
+ }
51
+ console.log(`\n ${bold('AIDevOS Dashboard')}\n`);
52
+ await startServer(port, projectRoot);
53
+ console.log(green(' ✓ Server running at ') + cyan(`http://localhost:${port}`));
54
+ console.log(dim(' Watching for changes...'));
55
+ console.log(dim(' Press Ctrl+C to stop\n'));
56
+ if (runs.length > 0) {
57
+ console.log(` Found ${runs.length} run(s):`);
58
+ for (const run of runs) {
59
+ const isCurrent = run.runId.startsWith(currentBranch)
60
+ ? cyan(' ← current')
61
+ : '';
62
+ console.log(` - ${run.branch} (${run.status})${isCurrent}`);
63
+ }
64
+ console.log('');
65
+ }
66
+ else {
67
+ console.log(dim(' No runs found. Run `aidevo start` first.\n'));
68
+ }
69
+ }
70
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../src/cli/commands/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,SAAS,YAAY,CAAC,WAAmB;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;IACnE,I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OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function init(): Promise<void>;
2
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AA2JA,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA8M1C"}