chati-dev 4.2.2 → 4.3.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.
- package/README.md +80 -53
- package/bin/chati.js +170 -5
- package/framework/agents/build/dev.md +509 -76
- package/framework/agents/deploy/devops.md +40 -25
- package/framework/agents/discover/brief.md +158 -22
- package/framework/agents/discover/brownfield-wu.md +26 -14
- package/framework/agents/discover/greenfield-wu.md +102 -14
- package/framework/agents/plan/architect-data-engineer.md +6 -6
- package/framework/agents/plan/architect-system.md +46 -12
- package/framework/agents/plan/architect.md +40 -20
- package/framework/agents/plan/detail.md +38 -24
- package/framework/agents/plan/phases.md +36 -26
- package/framework/agents/plan/tasks.md +114 -33
- package/framework/agents/plan/ux-brand-architect.md +240 -8
- package/framework/agents/plan/ux-component-engineer.md +28 -13
- package/framework/agents/plan/ux-researcher.md +7 -6
- package/framework/agents/plan/ux.md +55 -22
- package/framework/agents/quality/qa-implementation.md +143 -74
- package/framework/agents/quality/qa-planning.md +115 -42
- package/framework/agents/quality/qa-visual.md +448 -0
- package/framework/agents/shared/visualizer.md +128 -0
- package/framework/config.yaml +7 -6
- package/framework/constitution.md +127 -44
- package/framework/context/governance.md +12 -7
- package/framework/context/quality.md +6 -5
- package/framework/context/root.md +6 -6
- package/framework/data/entity-registry.yaml +377 -4
- package/framework/data/model-limits.json +19 -0
- package/framework/domains/agents/qa-visual.yaml +74 -0
- package/framework/domains/constitution.yaml +46 -2
- package/framework/domains/workflows/greenfield-fullstack.yaml +2 -2
- package/framework/hooks/advance-trigger.js +131 -0
- package/framework/hooks/brief-validator.js +83 -0
- package/framework/hooks/constitution-guard.js +24 -5
- package/framework/hooks/license-guard.js +62 -27
- package/framework/hooks/mode-governance.js +13 -2
- package/framework/hooks/model-governance.js +1 -0
- package/framework/hooks/post-dev.js +207 -0
- package/framework/hooks/prism-engine.js +274 -105
- package/framework/hooks/reasoning-escalator.js +371 -0
- package/framework/hooks/reference-trigger.js +117 -0
- package/framework/hooks/session-digest.js +50 -1
- package/framework/hooks/settings.json +32 -1
- package/framework/hooks/style-guard.js +25 -6
- package/framework/hooks/team-quality-gate.js +19 -12
- package/framework/hooks/undercover-guard.js +4 -2
- package/framework/i18n/en.yaml +3 -3
- package/framework/i18n/es.yaml +3 -3
- package/framework/i18n/fr.yaml +3 -3
- package/framework/i18n/pt.yaml +3 -3
- package/framework/intelligence/context-engine.md +4 -5
- package/framework/intelligence/decision-engine.md +1 -1
- package/framework/intelligence/hooks-performance.md +3 -3
- package/framework/migrations/v1.0-to-v1.1.yaml +1 -1
- package/framework/migrations/v1.4-to-v2.0.yaml +11 -11
- package/framework/migrations/v4.0-to-v4.1.yaml +2 -2
- package/framework/migrations/v4.2-to-v4.3.yaml +29 -0
- package/framework/orchestrator/chati-router.js +441 -0
- package/framework/orchestrator/chati-update.md +40 -40
- package/framework/orchestrator/chati.md +295 -94
- package/framework/rules/human-writing-style.md +47 -0
- package/framework/scaffold/motion-premium/README.md +99 -0
- package/framework/scaffold/motion-premium/app/globals.css.template +400 -0
- package/framework/scaffold/motion-premium/app/layout.tsx.template +110 -0
- package/framework/scaffold/motion-premium/components/animation/BackgroundCrossfadeProvider.tsx.template +170 -0
- package/framework/scaffold/motion-premium/components/animation/LenisProvider.tsx.template +49 -0
- package/framework/scaffold/motion-premium/components/animation/PageTransitionWrapper.tsx.template +83 -0
- package/framework/scaffold/motion-premium/components/animation/Preloader.tsx.template +171 -0
- package/framework/scaffold/motion-premium/components/ui/Container.tsx.template +69 -0
- package/framework/scaffold/motion-premium/components/ui/PageSection.tsx.template +74 -0
- package/framework/scaffold/motion-premium/lib/animations/gsap.ts.template +112 -0
- package/framework/scaffold/motion-premium/lib/animations/refreshCoordinator.ts.template +75 -0
- package/framework/scaffold/motion-premium/lib/animations/tokens.ts.template +119 -0
- package/framework/scaffold/motion-premium/lib/animations/useGsapContext.ts.template +92 -0
- package/framework/scaffold/motion-premium/lib/animations/useScrollSnapStepper.ts.template +265 -0
- package/framework/scaffold/motion-premium/lib/animations/useSmoothScroll.ts.template +67 -0
- package/framework/scaffold/motion-premium/lib/brand.ts.template +43 -0
- package/framework/scaffold/motion-premium/scaffold.yaml +178 -0
- package/framework/scaffold/motion-premium-3d/README.md +90 -0
- package/framework/scaffold/motion-premium-3d/app/(3d)/scroll-demo/ScrollDemoCanvas.tsx.template +81 -0
- package/framework/scaffold/motion-premium-3d/app/(3d)/scroll-demo/ScrollDemoClient.tsx.template +75 -0
- package/framework/scaffold/motion-premium-3d/app/(3d)/scroll-demo/page.tsx.template +26 -0
- package/framework/scaffold/motion-premium-3d/components/3d/CameraRig.tsx.template +100 -0
- package/framework/scaffold/motion-premium-3d/components/3d/CanvasProvider.tsx.template +85 -0
- package/framework/scaffold/motion-premium-3d/components/3d/InvalidateOnScroll.tsx.template +51 -0
- package/framework/scaffold/motion-premium-3d/components/3d/MeshCrossfade.tsx.template +79 -0
- package/framework/scaffold/motion-premium-3d/components/3d/ScrollCrossfade.tsx.template +88 -0
- package/framework/scaffold/motion-premium-3d/components/3d/ScrollScene.tsx.template +121 -0
- package/framework/scaffold/motion-premium-3d/components/webgl/SceneFallback.tsx.template +65 -0
- package/framework/scaffold/motion-premium-3d/components/webgl/WebGLContext.tsx.template +68 -0
- package/framework/scaffold/motion-premium-3d/lib/webgl/detect.ts.template +69 -0
- package/framework/scaffold/motion-premium-3d/scaffold.yaml +136 -0
- package/framework/schemas/session.schema.json +109 -21
- package/framework/scripts/reference-capture.js +430 -0
- package/framework/scripts/visual-qa.js +686 -0
- package/framework/tasks/orchestrator-handoff.md +1 -1
- package/framework/tasks/orchestrator-resume.md +1 -1
- package/framework/tasks/orchestrator-route.md +1 -1
- package/framework/tasks/orchestrator-status.md +3 -3
- package/framework/tasks/qa-planning-gate-define.md +1 -1
- package/framework/templates/brandbook-html-tmpl.md +2 -2
- package/framework/templates/brandbook-tmpl.yaml +1 -1
- package/framework/templates/component-spec-tmpl.yaml +1 -1
- package/framework/templates/design-token-tmpl.yaml +1 -1
- package/framework/templates/icon-system-tmpl.yaml +1 -1
- package/framework/templates/team-planning-tasks.yaml +6 -5
- package/framework/workflows/brownfield-discovery.yaml +2 -2
- package/framework/workflows/brownfield-fullstack.yaml +15 -11
- package/framework/workflows/brownfield-service.yaml +14 -10
- package/framework/workflows/brownfield-ui.yaml +15 -11
- package/framework/workflows/greenfield-fullstack.yaml +16 -13
- package/framework/workflows/quick-flow.yaml +3 -3
- package/framework/workflows/standard-flow.yaml +12 -9
- package/package.json +12 -6
- package/src/autonomy/autonomous-gate.js +1 -0
- package/src/autonomy/build-state.js +1 -2
- package/src/autonomy/progress-reporter.js +1 -1
- package/src/config/agent-customizer.js +11 -3
- package/src/config/claude-settings-generator.js +27 -7
- package/src/config/context-file-generator.js +41 -21
- package/src/config/framework-adapter.js +1 -0
- package/src/config/gemini-hooks-generator.js +19 -7
- package/src/config/mcp-configs.js +1 -0
- package/src/context/layers/l1-global.js +2 -1
- package/src/dashboard/data-reader.js +4 -3
- package/src/dashboard/layout.js +2 -1
- package/src/decision/analyzer.js +6 -30
- package/src/decision/engine.js +4 -28
- package/src/decision/registry-healer.js +3 -2
- package/src/decision/registry-updater.js +23 -14
- package/src/extensions/loader.js +2 -8
- package/src/gates/g1-planning-complete.js +2 -1
- package/src/gates/g2-qa-planning.js +2 -1
- package/src/gates/g3-implementation.js +2 -1
- package/src/gates/g4-qa-implementation.js +3 -2
- package/src/gates/g5-deploy-ready.js +2 -1
- package/src/health/engine.js +4 -3
- package/src/installer/core.js +431 -81
- package/src/installer/preflight.js +131 -0
- package/src/installer/provider-overlay.js +3 -3
- package/src/installer/scaffold-applier.js +358 -0
- package/src/installer/templates.js +46 -29
- package/src/installer/validator.js +17 -12
- package/src/intelligence/registry-manager.js +22 -29
- package/src/intelligence/timeline.js +11 -6
- package/src/license/commands.js +1 -1
- package/src/license/wait.js +102 -0
- package/src/memory/agent-memory.js +81 -0
- package/src/memory/dream.js +32 -1
- package/src/merger/replace-merger.js +28 -15
- package/src/orchestrator/agent-selector.js +2 -1
- package/src/orchestrator/cli.js +1880 -71
- package/src/orchestrator/doctor.js +270 -0
- package/src/orchestrator/handoff-engine.js +4 -3
- package/src/orchestrator/index.js +2 -0
- package/src/orchestrator/pipeline-manager.js +306 -15
- package/src/orchestrator/session-manager.js +339 -6
- package/src/tasks/handoff.js +3 -2
- package/src/telemetry/config.js +4 -3
- package/src/telemetry/schema.js +1 -0
- package/src/terminal/collector.js +3 -2
- package/src/terminal/index.js +1 -2
- package/src/terminal/isolation.js +52 -18
- package/src/terminal/prompt-builder.js +42 -25
- package/src/terminal/run-parallel.js +1 -1
- package/src/terminal/run-team.js +3 -3
- package/src/terminal/team-task-list.js +43 -4
- package/src/upgrade/backup.js +3 -2
- package/src/upgrade/checker.js +3 -2
- package/src/upgrade/migrator.js +65 -7
- package/src/upgrade/tracked-files-detector.js +86 -0
- package/src/upgrade/user-messages.js +94 -0
- package/src/utils/config-parser.js +2 -1
- package/src/utils/feature-flags.js +2 -1
- package/src/utils/flatten-entities.js +69 -0
- package/src/utils/framework-dir.js +16 -0
- package/src/utils/model-id.js +85 -0
- package/src/utils/provider-limits.js +84 -23
- package/src/utils/schema-validator.js +1 -1
- package/src/wizard/i18n.js +5 -4
- package/src/wizard/index.js +14 -0
- package/assets/logo - c/303/263pia.png +0 -0
- package/assets/logo.svg +0 -42
- package/assets/logo2.png +0 -0
- package/assets/social-preview.png +0 -0
- package/scripts/bundle-framework.js +0 -69
- package/scripts/changelog-generator.js +0 -222
- package/scripts/codebase-mapper.js +0 -728
- package/scripts/commit-message-generator.js +0 -167
- package/scripts/coverage-analyzer.js +0 -260
- package/scripts/dependency-analyzer.js +0 -280
- package/scripts/doctor/checks/agents.js +0 -77
- package/scripts/doctor/checks/constitution.js +0 -41
- package/scripts/doctor/checks/domain-alignment.js +0 -58
- package/scripts/doctor/checks/prism-layers.js +0 -84
- package/scripts/doctor/checks/registry.js +0 -55
- package/scripts/doctor/checks/schemas.js +0 -61
- package/scripts/doctor/fixes/reference-fix.js +0 -100
- package/scripts/doctor/fixes/registry-fix.js +0 -56
- package/scripts/doctor/index.js +0 -212
- package/scripts/framework-analyzer.js +0 -308
- package/scripts/generate-constitution-domain.js +0 -253
- package/scripts/generate-signing-key.js +0 -33
- package/scripts/health-check.js +0 -481
- package/scripts/ide-sync.js +0 -326
- package/scripts/performance-analyzer.js +0 -325
- package/scripts/plan-tracker.js +0 -278
- package/scripts/populate-entity-registry.js +0 -481
- package/scripts/pr-review.js +0 -317
- package/scripts/rollback-manager.js +0 -310
- package/scripts/semantic-lint.js +0 -328
- package/scripts/sign-manifest.js +0 -53
- package/scripts/stuck-detector.js +0 -343
- package/scripts/test-quality-assessment.js +0 -257
- package/scripts/validate-agents.js +0 -368
- package/scripts/validate-package.js +0 -505
- package/scripts/validate-tasks.js +0 -465
- package/src/autonomy/worktree-manager.js +0 -250
- package/src/intelligence/decision-engine.js +0 -256
- package/src/intelligence/document-sharder.js +0 -221
- package/src/intelligence/elicitation.js +0 -265
package/README.md
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
## What is Chati.dev?
|
|
22
22
|
|
|
23
|
-
Chati.dev is a system that **turns AI into a structured development team**. Instead of chatting with a single AI that forgets everything between sessions, you get specialized agents
|
|
23
|
+
Chati.dev is a system that **turns AI into a structured development team**. Instead of chatting with a single AI that forgets everything between sessions, you get specialized agents - each with a clear role - working together through a defined pipeline.
|
|
24
24
|
|
|
25
|
-
You describe what you want to build. The agents handle requirements, architecture, planning, coding, testing, and deployment
|
|
25
|
+
You describe what you want to build. The agents handle requirements, architecture, planning, coding, testing, and deployment - in order, with quality gates between each phase.
|
|
26
26
|
|
|
27
27
|
```
|
|
28
28
|
You → DISCOVER → PLAN → BUILD → DEPLOY → Done
|
|
@@ -39,9 +39,9 @@ Every decision is saved. Every artifact is validated. If you close your laptop a
|
|
|
39
39
|
|
|
40
40
|
AI-assisted development today has three critical issues:
|
|
41
41
|
|
|
42
|
-
1. **Context Loss**
|
|
43
|
-
2. **Planning Gaps**
|
|
44
|
-
3. **Vendor Lock-in**
|
|
42
|
+
1. **Context Loss** - AI forgets decisions across sessions, leading to inconsistent implementations
|
|
43
|
+
2. **Planning Gaps** - Jumping straight to code without structured requirements leads to rework
|
|
44
|
+
3. **Vendor Lock-in** - Most AI dev tools only work with one provider, limiting flexibility
|
|
45
45
|
|
|
46
46
|
### The Solution
|
|
47
47
|
|
|
@@ -54,7 +54,7 @@ Chati.dev introduces **Agent-Driven Development**: a pipeline where each agent o
|
|
|
54
54
|
### Prerequisites
|
|
55
55
|
|
|
56
56
|
- **Node.js** >= 20.0.0 ([download](https://nodejs.org/))
|
|
57
|
-
- **An AI CLI**
|
|
57
|
+
- **An AI CLI** - at least one of:
|
|
58
58
|
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) (recommended)
|
|
59
59
|
- [Gemini CLI](https://github.com/google-gemini/gemini-cli)
|
|
60
60
|
- [Codex CLI](https://github.com/openai/codex)
|
|
@@ -73,7 +73,7 @@ The wizard guides you through 4 steps:
|
|
|
73
73
|
|------|-------------|
|
|
74
74
|
| **Language** | English, Portuguese, Spanish, or French |
|
|
75
75
|
| **Project Type** | Greenfield (new) or Brownfield (existing) |
|
|
76
|
-
| **AI Provider** | Claude, Gemini, or Codex
|
|
76
|
+
| **AI Provider** | Claude, Gemini, or Codex - auto-configures optimal models per agent |
|
|
77
77
|
| **Confirm** | Review summary and proceed |
|
|
78
78
|
|
|
79
79
|
### 2. Activate the orchestrator
|
|
@@ -101,7 +101,7 @@ The agents guide you through each phase:
|
|
|
101
101
|
| **BUILD** | Dev agent implements the code, task by task | Review code as it's built |
|
|
102
102
|
| **DEPLOY** | DevOps agent handles git, deployment, and documentation | Confirm deployment settings |
|
|
103
103
|
|
|
104
|
-
Quality gates run automatically between phases
|
|
104
|
+
Quality gates run automatically between phases. If something doesn't meet the threshold, the system loops back and fixes it.
|
|
105
105
|
|
|
106
106
|
### Monitor progress
|
|
107
107
|
|
|
@@ -118,7 +118,7 @@ npx chati-dev status --watch # Auto-refresh every 5s
|
|
|
118
118
|
| **Gemini CLI** | `/chati exit` | `/chati` |
|
|
119
119
|
| **Codex CLI** | `$chati exit` | `$chati` |
|
|
120
120
|
|
|
121
|
-
The system saves your full session state
|
|
121
|
+
The system saves your full session state (pipeline position, current agent, decisions, and context). You resume exactly where you left off, even across days or machines.
|
|
122
122
|
|
|
123
123
|
---
|
|
124
124
|
|
|
@@ -126,14 +126,18 @@ The system saves your full session state — pipeline position, current agent, d
|
|
|
126
126
|
|
|
127
127
|
| Feature | What it means |
|
|
128
128
|
|---------|--------------|
|
|
129
|
-
| **Specialized Agents** | Each agent has a defined mission, success criteria, and handoff protocol
|
|
129
|
+
| **Specialized Agents** | Each agent has a defined mission, success criteria, and handoff protocol. Not one AI trying to do everything |
|
|
130
|
+
| **Agent Teams** | Planning Team (Detail + Architect + UX + QA-Planning) and Build Team (Dev + QA-Implementation) with Wave-Based Pipeline. Teams work in parallel with peer-to-peer communication, cross-review, and intra-team quality assurance. No single agent bottleneck |
|
|
131
|
+
| **Visual QA** | QA-Visual agent validates the visual experience: screenshots at 5 scroll positions, hover states, GSAP/Lenis verification, brandbook compliance. Powered by Playwright. |
|
|
132
|
+
| **Premium Animations** | GSAP + ScrollTrigger + Lenis as mandatory stack for UI projects. Every page has scroll reveals, micro-interactions, and smooth scrolling. |
|
|
130
133
|
| **Multi-CLI Architecture** | Choose your AI provider at install time: Claude, Gemini, or Codex. Each agent gets the optimal model for that provider |
|
|
131
|
-
| **Quality Gates** | Every phase is validated before moving forward. 3-tier verdicts: APPROVED, NEEDS_REVISION, or BLOCKED |
|
|
132
|
-
| **
|
|
134
|
+
| **Quality Gates** | Every phase is validated before moving forward, including QA-Visual for visual quality. 3-tier verdicts: APPROVED, NEEDS_REVISION, or BLOCKED |
|
|
135
|
+
| **Fault Vector Protocol** | Root Layer Routing classifies bugs by origin (INTENT/SPEC/CODE/DEFER). Evidence-Bound Verdicts, Decision Trail, and Echo Detection prevent cyclical rework |
|
|
136
|
+
| **Context Persistence** | Sessions survive restarts. Close your IDE, come back next week - the system remembers everything |
|
|
133
137
|
| **Session Lock** | Once activated, you stay inside the system. No accidentally "falling out" into generic AI mode |
|
|
134
|
-
| **Multi-Terminal** | Autonomous agents run in parallel
|
|
138
|
+
| **Multi-Terminal** | Autonomous agents run in parallel. Planning Team (Detail + Architect + UX + QA-Planning) and Build Team (Dev + QA-Implementation) coordinate via peer-to-peer mailbox |
|
|
135
139
|
| **Memory System** | The system learns from mistakes. Gotchas are captured automatically and recalled when relevant |
|
|
136
|
-
| **Execution Profiles** | Three profiles
|
|
140
|
+
| **Execution Profiles** | Three profiles: explore (read-only), guided (default), autonomous (gate >= 95%). Includes safety net and circuit breaker |
|
|
137
141
|
| **IDE-Agnostic** | Works with Claude Code, VS Code, Cursor, Gemini CLI, Codex CLI, and AntiGravity |
|
|
138
142
|
| **4 Languages** | Interface supports English, Portuguese, Spanish, and French. Artifacts are always generated in English |
|
|
139
143
|
| **Supply Chain Security** | Every file is cryptographically signed (Ed25519). Tampered packages are blocked on install |
|
|
@@ -182,7 +186,7 @@ Each provider uses its own CLI syntax. Chati.dev handles this transparently:
|
|
|
182
186
|
| Gemini | `gemini --model <id>` | `gemini --model gemini-2.5-pro` |
|
|
183
187
|
| Codex | `codex exec -m <id>` | `codex exec -m gpt-5.3-codex` |
|
|
184
188
|
|
|
185
|
-
Prompts are piped via stdin for all providers. You can override individual agent models in
|
|
189
|
+
Prompts are piped via stdin for all providers. You can override individual agent models in `.chati.dev/config.yaml` under `agent_overrides`.
|
|
186
190
|
|
|
187
191
|
---
|
|
188
192
|
|
|
@@ -207,10 +211,9 @@ The system starts in `guided` mode. Transition to `autonomous` requires both QA
|
|
|
207
211
|
| Phase | Agents | What they do |
|
|
208
212
|
|-------|--------|-------------|
|
|
209
213
|
| **DISCOVER** | Greenfield WU, Brownfield WU, Brief | Interview you, understand your project, extract requirements |
|
|
210
|
-
| **PLAN** |
|
|
211
|
-
| **BUILD** | Dev | Implement code task by task,
|
|
214
|
+
| **PLAN** | Planning Team (Detail + Architect + UX + QA-Planning), Phases, Tasks | Create PRD, architecture, UX spec with cross-review. QA-Planning validates all 3 artifacts before the team dissolves |
|
|
215
|
+
| **BUILD** | Build Team (Dev + QA-Implementation) with Wave-Based Pipeline. After build: QA-Visual validates visual quality. | Implement code task by task, with per-task quality review and visual validation |
|
|
212
216
|
| **DEPLOY** | DevOps | Handle git operations, deployment, and documentation |
|
|
213
|
-
| **Quality** | QA-Planning, QA-Implementation | Validate plan coherence (>= 95%) and code quality (>= 95%) between phases |
|
|
214
217
|
|
|
215
218
|
### How the Pipeline Works
|
|
216
219
|
|
|
@@ -230,30 +233,30 @@ The system starts in `guided` mode. Transition to `autonomous` requires both QA
|
|
|
230
233
|
│ WU interviews you → Brief compiles │
|
|
231
234
|
│ requirements into a structured doc │
|
|
232
235
|
│ │
|
|
233
|
-
├─ Spawns
|
|
234
|
-
│ (
|
|
236
|
+
├─ Spawns Planning Team ──────────────────┐
|
|
237
|
+
│ (4 agents, peer communication) │
|
|
235
238
|
│ │
|
|
236
|
-
│ PLAN
|
|
239
|
+
│ PLAN │
|
|
237
240
|
│ Detail ───┐ │
|
|
238
241
|
│ Architect ├─ run simultaneously │
|
|
239
|
-
│ UX ───────┘
|
|
242
|
+
│ UX ───────┘ with cross-review │
|
|
243
|
+
│ │ │
|
|
244
|
+
│ QA-Planning activates after trio │
|
|
245
|
+
│ Reviews all 3 artifacts (>= 95%) │
|
|
246
|
+
│ Sends feedback via mailbox │
|
|
247
|
+
│ Team dissolves when approved │
|
|
248
|
+
│ │ │
|
|
240
249
|
│ Then: Phases → Tasks │
|
|
241
250
|
│ │
|
|
242
|
-
├─
|
|
243
|
-
│
|
|
244
|
-
│ QA-Planning validates the plan │
|
|
245
|
-
│ Must score >= 95% to proceed │
|
|
246
|
-
│ │
|
|
247
|
-
├─ Spawns terminal(s) ───────────────────┐
|
|
251
|
+
├─ Spawns Build Team ────────────────────┐
|
|
252
|
+
│ (2 agents, Wave-Based Pipeline) │
|
|
248
253
|
│ │
|
|
249
254
|
│ BUILD │
|
|
250
|
-
│ Dev
|
|
251
|
-
│
|
|
252
|
-
│
|
|
253
|
-
|
|
254
|
-
│
|
|
255
|
-
│ QA-Implementation validates code │
|
|
256
|
-
│ Tests + static analysis + coverage │
|
|
255
|
+
│ Build Waves: Dev + QA in parallel │
|
|
256
|
+
│ Cleanup Wave: fixes remaining warns │
|
|
257
|
+
│ Visual QA Wave: QA-Visual validates │
|
|
258
|
+
│ screenshots, GSAP/Lenis, brandbook │
|
|
259
|
+
│ Final QA: Triple Review │
|
|
257
260
|
│ │
|
|
258
261
|
└─ Spawns terminal ──────────────────────┐
|
|
259
262
|
│
|
|
@@ -277,18 +280,18 @@ Three systems operate transparently behind the pipeline:
|
|
|
277
280
|
|
|
278
281
|
### Constitution
|
|
279
282
|
|
|
280
|
-
The system is governed by a **
|
|
283
|
+
The system is governed by a **23-article Constitution** that enforces agent behavior, quality standards, security, and system integrity:
|
|
281
284
|
|
|
282
|
-
- **Agent Governance**
|
|
283
|
-
- **Quality Standards**
|
|
284
|
-
- **Security**
|
|
285
|
-
- **Mode Governance**
|
|
286
|
-
- **Session Lock**
|
|
287
|
-
- **Model Governance**
|
|
288
|
-
- **Execution Profiles**
|
|
289
|
-
- **Multi-CLI**
|
|
290
|
-
- **Agent Teams**
|
|
291
|
-
- **Fault Vector Protocol**
|
|
285
|
+
- **Agent Governance** - Every agent has a defined mission, scope, and success criteria
|
|
286
|
+
- **Quality Standards** - Minimum 95% score on quality gates. 3-tier verdicts (APPROVED / NEEDS_REVISION / BLOCKED)
|
|
287
|
+
- **Security** - No secrets in system files. No destructive operations without confirmation. Ed25519 supply chain verification
|
|
288
|
+
- **Mode Governance** - Planning mode can't modify project code. Build mode has full access
|
|
289
|
+
- **Session Lock** - Once activated, all messages route through the orchestrator
|
|
290
|
+
- **Model Governance** - Each agent runs on its designated model, enforced by the CLI adapter
|
|
291
|
+
- **Execution Profiles** - Explore, guided, and autonomous modes with safety net and circuit breaker
|
|
292
|
+
- **Multi-CLI** - Provider-agnostic architecture with adapter pattern and automatic model mapping
|
|
293
|
+
- **Agent Teams** - Real-time peer communication between agents with cross-review, per-task QA, and sealed-bid quality assurance
|
|
294
|
+
- **Fault Vector Protocol** - Root Layer Routing, Evidence-Bound Verdicts, Decision Trail, and Echo Detection for adversarial quality
|
|
292
295
|
|
|
293
296
|
---
|
|
294
297
|
|
|
@@ -350,7 +353,31 @@ All IDEs use a thin router file that points to the same orchestrator. Your proje
|
|
|
350
353
|
|
|
351
354
|
## Project Structure
|
|
352
355
|
|
|
353
|
-
|
|
356
|
+
At a glance, an installed project looks like this:
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
your-project/
|
|
360
|
+
├── CLAUDE.md # Project context (auto-generated)
|
|
361
|
+
├── CLAUDE.local.md # Runtime session lock
|
|
362
|
+
├── artifacts/ # Pipeline output (visible to user)
|
|
363
|
+
│ ├── 0-WU/
|
|
364
|
+
│ ├── 1-Brief/
|
|
365
|
+
│ ├── 2-PRD/
|
|
366
|
+
│ ├── 3-Architecture/
|
|
367
|
+
│ ├── 4-UX/
|
|
368
|
+
│ └── handoffs/
|
|
369
|
+
├── .chati.dev/ # Framework (hidden)
|
|
370
|
+
│ ├── agents/
|
|
371
|
+
│ ├── hooks/
|
|
372
|
+
│ ├── orchestrator/
|
|
373
|
+
│ ├── constitution.md
|
|
374
|
+
│ └── config.yaml
|
|
375
|
+
├── .chati/ # Runtime session state (hidden)
|
|
376
|
+
├── .claude/ # Claude Code settings + rules (hidden)
|
|
377
|
+
└── .gitignore
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
The full layout below shows the Claude Code layout (default). Gemini and Codex get equivalent files in their native locations.
|
|
354
381
|
|
|
355
382
|
```
|
|
356
383
|
your-project/
|
|
@@ -388,8 +415,8 @@ your-project/
|
|
|
388
415
|
├── AGENTS.md # Project context with inline governance
|
|
389
416
|
├── AGENTS.override.md # Runtime state / session lock (gitignored)
|
|
390
417
|
│
|
|
391
|
-
│── # ─── Framework
|
|
392
|
-
├── chati.dev/
|
|
418
|
+
│── # ─── Framework (hidden) ────────────
|
|
419
|
+
├── .chati.dev/
|
|
393
420
|
│ ├── orchestrator/ # Main orchestrator
|
|
394
421
|
│ ├── agents/ # Agent definitions
|
|
395
422
|
│ │ ├── discover/ # Greenfield WU, Brownfield WU, Brief
|
|
@@ -410,7 +437,7 @@ your-project/
|
|
|
410
437
|
│ ├── data/ # Entity registry
|
|
411
438
|
│ ├── i18n/ # EN, PT, ES, FR translations
|
|
412
439
|
│ ├── migrations/ # Version migration scripts
|
|
413
|
-
│ ├── constitution.md #
|
|
440
|
+
│ ├── constitution.md # 23 Articles + Preamble
|
|
414
441
|
│ └── config.yaml # System configuration
|
|
415
442
|
└── packages/
|
|
416
443
|
└── chati-dev/ # CLI + runtime engine
|
|
@@ -447,7 +474,7 @@ Upgrades include automatic backup, migrations, validation, and config merging. R
|
|
|
447
474
|
|
|
448
475
|
## Contributing
|
|
449
476
|
|
|
450
|
-
We welcome contributions
|
|
477
|
+
We welcome contributions: agents, templates, workflows, translations, and CLI improvements. See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for guidelines.
|
|
451
478
|
|
|
452
479
|
## Security
|
|
453
480
|
|
|
@@ -455,11 +482,11 @@ For security concerns, see our [Security Policy](.github/SECURITY.md).
|
|
|
455
482
|
|
|
456
483
|
## License
|
|
457
484
|
|
|
458
|
-
[Elastic License 2.0](LICENSE)
|
|
485
|
+
[Elastic License 2.0](LICENSE) - free to use for any purpose; you may not offer it as a hosted/managed service to third parties or remove licensing notices.
|
|
459
486
|
|
|
460
487
|
---
|
|
461
488
|
|
|
462
489
|
<p align="center">
|
|
463
490
|
<sub>Built with structure, validated by agents, governed by constitution.</sub><br>
|
|
464
|
-
<sub>Chati.dev v4.
|
|
491
|
+
<sub>Chati.dev v4.3.0 "Phoenix" © 2026</sub>
|
|
465
492
|
</p>
|
package/bin/chati.js
CHANGED
|
@@ -9,6 +9,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
9
9
|
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
10
10
|
|
|
11
11
|
import { logBanner } from '../src/utils/logger.js';
|
|
12
|
+
import { resolveFrameworkDir } from '../src/utils/framework-dir.js';
|
|
12
13
|
|
|
13
14
|
function showBanner() {
|
|
14
15
|
let logoText;
|
|
@@ -22,7 +23,32 @@ function showBanner() {
|
|
|
22
23
|
|
|
23
24
|
const args = process.argv.slice(2);
|
|
24
25
|
const command = args[0] || 'init';
|
|
25
|
-
|
|
26
|
+
// Known subcommands and agent names that should NOT be mistaken for targetDir paths.
|
|
27
|
+
// Without this, `chati orchestrate advance --agent detail` resolves targetDir to `<cwd>/detail/`.
|
|
28
|
+
const KNOWN_SUBCOMMANDS = new Set([
|
|
29
|
+
// CLI subcommands
|
|
30
|
+
'next', 'advance', 'init', 'status', 'validate-handoff', 'deviation', 'exit',
|
|
31
|
+
'providers', 'detect-flow', 'backlog', 'qa-plan-score', 'qa-impl-score', 'scan',
|
|
32
|
+
'spawn-team', 'team-status', 'team-dissolve',
|
|
33
|
+
'stats', 'list', 'search', 'clean', 'check', // memory/registry subcommands
|
|
34
|
+
'scaffold', // scaffold preset commands
|
|
35
|
+
// Scaffold preset ids (prevent consumption as targetDir after `scaffold <preset>`)
|
|
36
|
+
'motion-premium',
|
|
37
|
+
// Agent names (prevent consumption as targetDir when passed via --agent flag)
|
|
38
|
+
'greenfield-wu', 'brownfield-wu', 'brief', 'detail', 'architect', 'ux',
|
|
39
|
+
'phases', 'tasks', 'qa-planning', 'qa-implementation', 'qa-visual', 'dev', 'devops',
|
|
40
|
+
]);
|
|
41
|
+
// Skip values that follow --flag patterns (e.g., --agent detail, --score 100)
|
|
42
|
+
const flagValues = new Set();
|
|
43
|
+
for (let i = 0; i < args.length; i++) {
|
|
44
|
+
if (args[i].startsWith('--') && i + 1 < args.length && !args[i + 1].startsWith('-')) {
|
|
45
|
+
flagValues.add(args[i + 1]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const targetDir = resolve(
|
|
49
|
+
args.find(a => !a.startsWith('-') && a !== command && !KNOWN_SUBCOMMANDS.has(a) && !flagValues.has(a))
|
|
50
|
+
|| process.cwd()
|
|
51
|
+
);
|
|
26
52
|
|
|
27
53
|
async function main() {
|
|
28
54
|
switch (command) {
|
|
@@ -109,12 +135,44 @@ async function main() {
|
|
|
109
135
|
console.log(' Syncing framework files...');
|
|
110
136
|
try {
|
|
111
137
|
const { copyFrameworkFiles } = await import('../src/installer/core.js');
|
|
112
|
-
copyFrameworkFiles(join(targetDir,
|
|
138
|
+
copyFrameworkFiles(join(targetDir, resolveFrameworkDir(targetDir)));
|
|
113
139
|
console.log(' Framework files synced.');
|
|
114
140
|
} catch (err) {
|
|
115
141
|
console.log(` Framework sync skipped: ${err.message}`);
|
|
116
142
|
}
|
|
117
143
|
|
|
144
|
+
// 2.6. Re-bundle CLI (Bug 4 part 3, v4.3.1+) — refreshes .chati.dev/_cli/
|
|
145
|
+
// and writes version.json so chati-router.js mismatch detection clears
|
|
146
|
+
// on the next invocation.
|
|
147
|
+
console.log(' Re-bundling CLI...');
|
|
148
|
+
try {
|
|
149
|
+
const { copyCliSource, copyCliDependencies } = await import('../src/installer/core.js');
|
|
150
|
+
const { writeFileSync } = await import('fs');
|
|
151
|
+
const fwDir = resolveFrameworkDir(targetDir);
|
|
152
|
+
const frameworkDir = join(targetDir, fwDir);
|
|
153
|
+
copyCliSource(join(__dirname, '..', 'src'), join(frameworkDir, '_cli'));
|
|
154
|
+
copyCliDependencies(join(__dirname, '..'), join(frameworkDir, '_cli', 'node_modules'));
|
|
155
|
+
writeFileSync(
|
|
156
|
+
join(frameworkDir, '_cli', 'version.json'),
|
|
157
|
+
JSON.stringify({ version: pkg.version, bundled_at: new Date().toISOString() }, null, 2),
|
|
158
|
+
);
|
|
159
|
+
console.log(' CLI re-bundled.');
|
|
160
|
+
} catch (err) {
|
|
161
|
+
console.log(` CLI rebundle skipped: ${err.message}`);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// 2.6. Detect tracked framework files and warn user (non-blocking)
|
|
165
|
+
try {
|
|
166
|
+
const { detectTrackedFrameworkFiles } = await import('../src/upgrade/tracked-files-detector.js');
|
|
167
|
+
const { renderTrackedFilesWarning } = await import('../src/upgrade/user-messages.js');
|
|
168
|
+
const trackedFiles = detectTrackedFrameworkFiles(targetDir);
|
|
169
|
+
if (trackedFiles.length > 0) {
|
|
170
|
+
process.stdout.write(renderTrackedFilesWarning(trackedFiles));
|
|
171
|
+
}
|
|
172
|
+
} catch {
|
|
173
|
+
// Non-critical — skip silently if git is unavailable
|
|
174
|
+
}
|
|
175
|
+
|
|
118
176
|
// 3. Validate
|
|
119
177
|
console.log(' Validating...');
|
|
120
178
|
const validation = await validateInstallation(targetDir);
|
|
@@ -305,7 +363,7 @@ async function main() {
|
|
|
305
363
|
console.log(' - Specialized agents across DISCOVER, PLAN, BUILD, DEPLOY phases');
|
|
306
364
|
console.log(' - 6 workflow blueprints');
|
|
307
365
|
console.log(' - 6 templates');
|
|
308
|
-
console.log(' - Constitution (
|
|
366
|
+
console.log(' - Constitution (23 Articles + Preamble)');
|
|
309
367
|
console.log(' - Dashboard TUI');
|
|
310
368
|
console.log(' - Upgrade system with migrations');
|
|
311
369
|
console.log(' - 6 IDE support');
|
|
@@ -357,6 +415,12 @@ Intelligence:
|
|
|
357
415
|
npx chati-dev registry [stats|check] Entity registry
|
|
358
416
|
npx chati-dev health System health check
|
|
359
417
|
|
|
418
|
+
Scaffold:
|
|
419
|
+
npx chati-dev scaffold List available scaffold presets
|
|
420
|
+
npx chati-dev scaffold <preset> Apply a scaffold preset (e.g. motion-premium)
|
|
421
|
+
npx chati-dev scaffold <preset> --dry-run Show what would be applied, write nothing
|
|
422
|
+
npx chati-dev scaffold <preset> --force Overwrite existing files
|
|
423
|
+
|
|
360
424
|
License:
|
|
361
425
|
npx chati-dev activate [--key=CHATI-XXXX] Activate license on this machine
|
|
362
426
|
npx chati-dev deactivate Remove license key locally
|
|
@@ -402,10 +466,111 @@ Telemetry:
|
|
|
402
466
|
break;
|
|
403
467
|
}
|
|
404
468
|
|
|
469
|
+
case 'scaffold': {
|
|
470
|
+
const sub = args[1];
|
|
471
|
+
const {
|
|
472
|
+
resolveScaffoldSource, listPresets, applyScaffold, syncBrand, upgradeScaffold,
|
|
473
|
+
} = await import('../src/installer/scaffold-applier.js');
|
|
474
|
+
|
|
475
|
+
const scaffoldSrc = (() => {
|
|
476
|
+
try { return resolveScaffoldSource(targetDir); }
|
|
477
|
+
catch (e) { console.error(`Error: ${e.message}`); process.exit(1); }
|
|
478
|
+
})();
|
|
479
|
+
|
|
480
|
+
if (!sub || sub === 'list') {
|
|
481
|
+
const presets = listPresets(scaffoldSrc);
|
|
482
|
+
if (presets.length === 0) {
|
|
483
|
+
console.log('No scaffold presets found.');
|
|
484
|
+
} else {
|
|
485
|
+
console.log('Available scaffold presets:\n');
|
|
486
|
+
for (const p of presets) {
|
|
487
|
+
console.log(` ${p.id}@${p.version}`);
|
|
488
|
+
if (p.description) console.log(` ${p.description}`);
|
|
489
|
+
}
|
|
490
|
+
console.log(`\nApply: npx chati-dev scaffold <preset-id>`);
|
|
491
|
+
}
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
const preset = sub;
|
|
496
|
+
const dryRun = args.includes('--dry-run');
|
|
497
|
+
const force = args.includes('--force');
|
|
498
|
+
|
|
499
|
+
if (args.includes('--sync-brand')) {
|
|
500
|
+
try { syncBrand(); }
|
|
501
|
+
catch (e) { console.log(e.message); process.exit(1); }
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
if (args.includes('--upgrade')) {
|
|
505
|
+
try { upgradeScaffold(); }
|
|
506
|
+
catch (e) { console.log(e.message); process.exit(1); }
|
|
507
|
+
break;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
let result;
|
|
511
|
+
try {
|
|
512
|
+
result = applyScaffold({
|
|
513
|
+
projectDir: targetDir,
|
|
514
|
+
scaffoldSourceDir: scaffoldSrc,
|
|
515
|
+
preset,
|
|
516
|
+
dryRun,
|
|
517
|
+
force,
|
|
518
|
+
});
|
|
519
|
+
} catch (e) {
|
|
520
|
+
console.error(`Error: ${e.message}`);
|
|
521
|
+
process.exit(1);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
const verb = dryRun ? 'Would apply' : 'Applied';
|
|
525
|
+
console.log(`${verb} scaffold "${result.preset}@${result.version}" — ${result.applied.length} files:\n`);
|
|
526
|
+
for (const f of result.applied) console.log(` + ${f}`);
|
|
527
|
+
if (result.skipped.length > 0) {
|
|
528
|
+
console.log(`\nSkipped ${result.skipped.length} file(s):`);
|
|
529
|
+
for (const s of result.skipped) console.log(` - ${s.target} (${s.reason})`);
|
|
530
|
+
}
|
|
531
|
+
console.log(`\nBrand source: ${result.brandSource}`);
|
|
532
|
+
if (result.manifestPath) {
|
|
533
|
+
console.log(`Manifest: ${result.manifestPath}`);
|
|
534
|
+
}
|
|
535
|
+
if (result.skipped.some(s => s.reason === 'already-exists')) {
|
|
536
|
+
console.log('\nTip: use --force to overwrite existing files.');
|
|
537
|
+
}
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
|
|
405
541
|
case 'orchestrate': {
|
|
406
|
-
const { runOrchestrate } = await import('../src/orchestrator/cli.js');
|
|
407
542
|
const subCommand = args[1] || 'next';
|
|
408
|
-
|
|
543
|
+
// Validate subcommand exists in KNOWN_SUBCOMMANDS to prevent misparsing
|
|
544
|
+
// (e.g., `chati orchestrate xyz` should not silently create cwd/xyz/ as targetDir)
|
|
545
|
+
const VALID_ORCHESTRATE_SUBS = new Set([
|
|
546
|
+
'next', 'advance', 'init', 'status', 'validate-handoff',
|
|
547
|
+
'deviation', 'exit', 'providers', 'detect-flow', 'backlog',
|
|
548
|
+
'qa-plan-score', 'qa-impl-score', 'scan',
|
|
549
|
+
'spawn-team', 'team-status', 'team-dissolve',
|
|
550
|
+
]);
|
|
551
|
+
if (!VALID_ORCHESTRATE_SUBS.has(subCommand)) {
|
|
552
|
+
console.error(`Error: Unknown orchestrate subcommand "${subCommand}".`);
|
|
553
|
+
console.error(`Valid: ${[...VALID_ORCHESTRATE_SUBS].join(', ')}`);
|
|
554
|
+
process.exit(1);
|
|
555
|
+
}
|
|
556
|
+
// Reject positional args after subcommand (orchestrate accepts only --flags).
|
|
557
|
+
// Prevents `chati orchestrate init <free-text>` from being misparsed as targetDir.
|
|
558
|
+
const orchArgs = args.slice(2);
|
|
559
|
+
const stray = orchArgs.find((a, i) => {
|
|
560
|
+
if (a.startsWith('-')) return false;
|
|
561
|
+
const prev = i > 0 ? orchArgs[i - 1] : null;
|
|
562
|
+
// skip values that follow a --flag
|
|
563
|
+
if (prev && prev.startsWith('--')) return false;
|
|
564
|
+
return true;
|
|
565
|
+
});
|
|
566
|
+
if (stray) {
|
|
567
|
+
console.error(`Error: Unexpected positional argument "${stray}" for orchestrate ${subCommand}.`);
|
|
568
|
+
console.error('orchestrate subcommands accept only --flag arguments. To set the project name, use --name "<name>".');
|
|
569
|
+
process.exit(1);
|
|
570
|
+
}
|
|
571
|
+
// targetDir for orchestrate is ALWAYS cwd (or auto-resolved by handleInit)
|
|
572
|
+
const { runOrchestrate } = await import('../src/orchestrator/cli.js');
|
|
573
|
+
await runOrchestrate(subCommand, args.slice(1), process.cwd());
|
|
409
574
|
break;
|
|
410
575
|
}
|
|
411
576
|
|