chati-dev 3.2.5 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +96 -0
- package/bin/chati.js +46 -0
- package/framework/agents/build/dev.md +122 -1
- package/framework/agents/deploy/devops.md +128 -3
- package/framework/agents/discover/brief.md +77 -15
- package/framework/agents/discover/brownfield-wu.md +2 -2
- package/framework/agents/discover/greenfield-wu.md +3 -3
- package/framework/agents/plan/architect.md +2 -2
- package/framework/agents/plan/detail.md +3 -3
- package/framework/agents/plan/phases.md +127 -2
- package/framework/agents/plan/tasks.md +127 -2
- package/framework/agents/plan/ux.md +269 -22
- package/framework/agents/quality/qa-implementation.md +172 -8
- package/framework/agents/quality/qa-planning.md +147 -2
- package/framework/config.yaml +9 -5
- package/framework/constitution.md +7 -1
- package/framework/context/quality.md +1 -1
- package/framework/context/root.md +1 -1
- package/framework/hooks/constitution-guard.js +18 -2
- package/framework/hooks/mode-governance.js +3 -3
- package/framework/hooks/read-protection.js +10 -2
- package/framework/i18n/en.yaml +6 -0
- package/framework/i18n/es.yaml +6 -0
- package/framework/i18n/fr.yaml +6 -0
- package/framework/i18n/pt.yaml +6 -0
- package/framework/orchestrator/chati.md +102 -6
- package/framework/schemas/task.schema.json +1 -1
- package/framework/tasks/architect-dep-audit.md +128 -0
- package/framework/tasks/architect-stack-selection.md +28 -0
- package/framework/workflows/brownfield-fullstack.yaml +2 -2
- package/framework/workflows/brownfield-service.yaml +2 -2
- package/framework/workflows/brownfield-ui.yaml +2 -2
- package/framework/workflows/greenfield-fullstack.yaml +6 -2
- package/framework/workflows/quick-flow.yaml +7 -5
- package/framework/workflows/standard-flow.yaml +171 -0
- package/package.json +4 -2
- package/src/api/index.js +129 -0
- package/src/autonomy/build-loop.js +93 -6
- package/src/autonomy/build-state.js +20 -2
- package/src/autonomy/cause-analyzer.js +177 -0
- package/src/autonomy/escalation.js +214 -0
- package/src/autonomy/safety-net.js +23 -5
- package/src/autonomy/worktree-manager.js +245 -0
- package/src/config/agent-customizer.js +227 -0
- package/src/config/ide-configs.js +57 -27
- package/src/decision/analyzer.js +148 -0
- package/src/decision/registry-healer.js +38 -21
- package/src/extensions/loader.js +151 -0
- package/src/extensions/registry.js +134 -0
- package/src/gates/circuit-breaker.js +32 -0
- package/src/gates/g3-implementation.js +30 -4
- package/src/gates/g4-qa-implementation.js +34 -5
- package/src/gates/gate-base.js +9 -0
- package/src/health/auto-fix.js +216 -0
- package/src/installer/core.js +24 -11
- package/src/installer/provider-overlay.js +82 -0
- package/src/installer/templates.js +22 -10
- package/src/installer/transaction.js +3 -2
- package/src/installer/validator.js +74 -0
- package/src/intelligence/context-status.js +9 -5
- package/src/intelligence/document-sharder.js +221 -0
- package/src/intelligence/elicitation.js +265 -0
- package/src/intelligence/timeline.js +5 -0
- package/src/memory/gotchas.js +78 -2
- package/src/merger/semantic-merger.js +292 -0
- package/src/orchestrator/agent-selector.js +20 -0
- package/src/orchestrator/handoff-engine.js +77 -0
- package/src/orchestrator/index.js +0 -8
- package/src/orchestrator/intent-classifier.js +182 -0
- package/src/orchestrator/pipeline-manager.js +125 -1
- package/src/orchestrator/session-manager.js +164 -2
- package/src/quality/metrics-collector.js +283 -0
- package/src/quality/test-runner.js +368 -0
- package/src/telemetry/collector.js +83 -0
- package/src/telemetry/config.js +119 -0
- package/src/telemetry/index.js +11 -0
- package/src/telemetry/schema.js +104 -0
- package/src/telemetry/sender.js +60 -0
- package/src/terminal/cli-registry.js +7 -1
- package/src/terminal/cost-tracker.js +197 -0
- package/src/terminal/handoff-parser.js +61 -4
- package/src/terminal/prompt-builder.js +56 -18
- package/src/terminal/rate-limiter.js +172 -0
- package/src/terminal/run-agent.js +39 -0
- package/src/terminal/run-parallel.js +22 -1
- package/src/terminal/spawner.js +181 -3
- package/src/upgrade/migrator.js +2 -2
- package/src/utils/event-bus.js +126 -0
- package/src/utils/file-lock.js +291 -0
- package/src/utils/schema-validator.js +226 -0
- package/src/wizard/i18n.js +11 -0
- package/src/wizard/index.js +42 -20
- package/src/wizard/questions.js +200 -39
- package/src/autonomy/execution-profile.js +0 -151
- package/src/intelligence/file-tracker.js +0 -117
- package/src/memory/gotchas-auto-capture.js +0 -253
- package/src/orchestrator/pipeline-state.js +0 -223
- package/src/terminal/wave-analyzer.js +0 -143
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: architect-dep-audit
|
|
3
|
+
agent: architect
|
|
4
|
+
trigger: architect-stack-selection
|
|
5
|
+
phase: plan
|
|
6
|
+
requires_input: false
|
|
7
|
+
parallelizable: false
|
|
8
|
+
outputs: [dep-audit.yaml]
|
|
9
|
+
handoff_to: architect-api-design
|
|
10
|
+
autonomous_gate: true
|
|
11
|
+
criteria:
|
|
12
|
+
- All chosen dependencies verified against vulnerability databases
|
|
13
|
+
- No critical or high severity CVEs at selected versions
|
|
14
|
+
- No deprecated packages in the stack
|
|
15
|
+
- Peer dependency compatibility confirmed
|
|
16
|
+
- License compliance verified (no GPL in proprietary projects)
|
|
17
|
+
---
|
|
18
|
+
# Dependency Audit (Greenfield)
|
|
19
|
+
|
|
20
|
+
## Purpose
|
|
21
|
+
Verify that the technology stack chosen in `architect-stack-selection` has no known vulnerabilities, deprecated packages, or compatibility issues BEFORE implementation begins.
|
|
22
|
+
|
|
23
|
+
This prevents the scenario where `npm install` on day 1 reveals critical vulnerabilities that require breaking changes to resolve.
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
- `stack-selection.yaml` exists with chosen technologies and versions
|
|
27
|
+
- Version verification from stack-selection completed
|
|
28
|
+
|
|
29
|
+
## Steps
|
|
30
|
+
|
|
31
|
+
### 1. Generate Dependency Manifest
|
|
32
|
+
From `stack-selection.yaml`, create a virtual dependency list:
|
|
33
|
+
- Extract all packages with their chosen versions
|
|
34
|
+
- Include both production and development dependencies
|
|
35
|
+
- Include peer dependencies implied by framework choices
|
|
36
|
+
|
|
37
|
+
### 2. Check Vulnerabilities
|
|
38
|
+
For each dependency at the chosen version:
|
|
39
|
+
- Query known CVE databases (npm audit, GitHub Advisory Database)
|
|
40
|
+
- Check for known security advisories
|
|
41
|
+
- Classify findings by severity: critical, high, moderate, low
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
# Example finding
|
|
45
|
+
- package: "lodash"
|
|
46
|
+
version: "4.17.15"
|
|
47
|
+
vulnerability:
|
|
48
|
+
id: "CVE-2021-23337"
|
|
49
|
+
severity: high
|
|
50
|
+
description: "Prototype pollution in lodash"
|
|
51
|
+
fixed_in: "4.17.21"
|
|
52
|
+
recommendation: "Upgrade to 4.17.21+"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 3. Verify Deprecation Status
|
|
56
|
+
For each dependency:
|
|
57
|
+
- Check if the package is deprecated on its registry
|
|
58
|
+
- Check if the chosen version is in an unsupported/EOL branch
|
|
59
|
+
- Flag packages with no updates in > 12 months (potential abandonment)
|
|
60
|
+
|
|
61
|
+
### 4. Verify Peer Dependency Compatibility
|
|
62
|
+
- Check that all chosen packages are compatible with each other at selected versions
|
|
63
|
+
- Verify Node.js runtime compatibility
|
|
64
|
+
- Verify TypeScript version compatibility across packages
|
|
65
|
+
- Flag any known conflicts between chosen packages
|
|
66
|
+
|
|
67
|
+
### 5. Check License Compliance
|
|
68
|
+
- Extract license for each dependency
|
|
69
|
+
- Flag GPL/AGPL dependencies in proprietary projects
|
|
70
|
+
- Flag any license that requires attribution and document it
|
|
71
|
+
- Flag packages with no license specified
|
|
72
|
+
|
|
73
|
+
### 6. Generate Audit Report
|
|
74
|
+
|
|
75
|
+
## Output Format
|
|
76
|
+
```yaml
|
|
77
|
+
# dep-audit.yaml
|
|
78
|
+
audit:
|
|
79
|
+
status: clean | warnings | blocked
|
|
80
|
+
audited_at: "{ISO timestamp}"
|
|
81
|
+
stack_source: stack-selection.yaml
|
|
82
|
+
|
|
83
|
+
summary:
|
|
84
|
+
total_packages: 0
|
|
85
|
+
vulnerabilities:
|
|
86
|
+
critical: 0
|
|
87
|
+
high: 0
|
|
88
|
+
moderate: 0
|
|
89
|
+
low: 0
|
|
90
|
+
deprecated: 0
|
|
91
|
+
incompatible: 0
|
|
92
|
+
license_issues: 0
|
|
93
|
+
|
|
94
|
+
findings: []
|
|
95
|
+
# Each finding:
|
|
96
|
+
# - package: "{name}"
|
|
97
|
+
# version: "{chosen version}"
|
|
98
|
+
# category: vulnerability | deprecated | incompatible | license
|
|
99
|
+
# severity: critical | high | moderate | low | info
|
|
100
|
+
# description: "{what's wrong}"
|
|
101
|
+
# recommendation: "{what to do}"
|
|
102
|
+
# alternative: "{alternative package if applicable}"
|
|
103
|
+
|
|
104
|
+
recommendations:
|
|
105
|
+
version_pins: []
|
|
106
|
+
# Specific version pins that resolve issues
|
|
107
|
+
package_swaps: []
|
|
108
|
+
# Alternative packages if current choice is problematic
|
|
109
|
+
|
|
110
|
+
decision_required: true | false
|
|
111
|
+
# true if any critical/high findings need user decision before proceeding
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Gate Criteria
|
|
115
|
+
- **PASS**: 0 critical, 0 high vulnerabilities; 0 deprecated packages; all peer deps compatible
|
|
116
|
+
- **WARN**: moderate vulnerabilities exist (document and proceed)
|
|
117
|
+
- **BLOCK**: critical or high vulnerabilities, deprecated packages, or incompatible peer deps
|
|
118
|
+
|
|
119
|
+
If BLOCKED:
|
|
120
|
+
1. Present findings to user with alternatives
|
|
121
|
+
2. User must approve resolution (upgrade version, swap package, accept risk)
|
|
122
|
+
3. Update `stack-selection.yaml` with approved changes
|
|
123
|
+
4. Re-run audit to verify resolution
|
|
124
|
+
|
|
125
|
+
## Notes
|
|
126
|
+
- This task runs BEFORE implementation, saving the user from discovering issues after scaffolding
|
|
127
|
+
- Pattern adapted from `brownfield-wu-dependency-scan` (simplified for greenfield where no lock file exists yet)
|
|
128
|
+
- If web search or context7 MCP is available, use them for real-time CVE lookups
|
|
@@ -12,6 +12,7 @@ criteria:
|
|
|
12
12
|
- Specific technologies chosen for each layer
|
|
13
13
|
- Choices justified with technical reasoning
|
|
14
14
|
- Compatibility verified
|
|
15
|
+
- Version verification completed (no deprecated packages, no critical CVEs at chosen versions)
|
|
15
16
|
---
|
|
16
17
|
# Select Technology Stack
|
|
17
18
|
|
|
@@ -30,6 +31,33 @@ Expand with specific versions and libraries:
|
|
|
30
31
|
|
|
31
32
|
Document rationale for each choice.
|
|
32
33
|
|
|
34
|
+
### Version Verification (mandatory before finalizing)
|
|
35
|
+
For each technology in the stack:
|
|
36
|
+
1. Verify the chosen version is NOT deprecated or end-of-life
|
|
37
|
+
2. Check if a newer stable version exists (flag if major version behind)
|
|
38
|
+
3. Verify runtime alignment (Node.js version, TypeScript version compatibility)
|
|
39
|
+
4. Check peer dependency compatibility between all chosen packages
|
|
40
|
+
5. If context7 MCP is available: query for latest stable versions and known issues
|
|
41
|
+
6. If web search is available: check npm registry for deprecation notices
|
|
42
|
+
|
|
43
|
+
Output a compatibility matrix as part of stack-selection.yaml:
|
|
44
|
+
```yaml
|
|
45
|
+
version_check:
|
|
46
|
+
status: verified | warnings | blocked
|
|
47
|
+
verified_at: "{ISO timestamp}"
|
|
48
|
+
findings:
|
|
49
|
+
- package: "{name}"
|
|
50
|
+
chosen: "{version}"
|
|
51
|
+
latest_stable: "{version}"
|
|
52
|
+
deprecated: true | false
|
|
53
|
+
known_cves: [] | [{id, severity}]
|
|
54
|
+
note: "{explanation}"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If any package has critical CVEs or is deprecated:
|
|
58
|
+
→ Present alternatives to user before proceeding
|
|
59
|
+
→ Do NOT finalize stack with known critical vulnerabilities
|
|
60
|
+
|
|
33
61
|
## Output Format
|
|
34
62
|
```yaml
|
|
35
63
|
# stack-selection.yaml
|
|
@@ -88,7 +88,7 @@ phases:
|
|
|
88
88
|
action: implement-tasks
|
|
89
89
|
- agent: qa-implementation
|
|
90
90
|
action: validate-code
|
|
91
|
-
creates: [chati.dev/artifacts/
|
|
91
|
+
creates: [chati.dev/artifacts/9-QA-Implementation/qa-implementation-report.md]
|
|
92
92
|
|
|
93
93
|
- phase: 7
|
|
94
94
|
name: Deployment
|
|
@@ -96,7 +96,7 @@ phases:
|
|
|
96
96
|
sequence:
|
|
97
97
|
- agent: devops
|
|
98
98
|
action: deploy
|
|
99
|
-
creates: [chati.dev/artifacts/
|
|
99
|
+
creates: [chati.dev/artifacts/10-Deploy/deploy-report.md]
|
|
100
100
|
|
|
101
101
|
transitions:
|
|
102
102
|
discover_to_plan:
|
|
@@ -70,7 +70,7 @@ phases:
|
|
|
70
70
|
action: implement-tasks
|
|
71
71
|
- agent: qa-implementation
|
|
72
72
|
action: validate-code
|
|
73
|
-
creates: [chati.dev/artifacts/
|
|
73
|
+
creates: [chati.dev/artifacts/9-QA-Implementation/qa-implementation-report.md]
|
|
74
74
|
|
|
75
75
|
- phase: 6
|
|
76
76
|
name: Deployment
|
|
@@ -78,7 +78,7 @@ phases:
|
|
|
78
78
|
sequence:
|
|
79
79
|
- agent: devops
|
|
80
80
|
action: deploy
|
|
81
|
-
creates: [chati.dev/artifacts/
|
|
81
|
+
creates: [chati.dev/artifacts/10-Deploy/deploy-report.md]
|
|
82
82
|
|
|
83
83
|
transitions:
|
|
84
84
|
discover_to_plan:
|
|
@@ -76,7 +76,7 @@ phases:
|
|
|
76
76
|
notes: "Design System token enforcement is critical for UI work"
|
|
77
77
|
- agent: qa-implementation
|
|
78
78
|
action: validate-code
|
|
79
|
-
creates: [chati.dev/artifacts/
|
|
79
|
+
creates: [chati.dev/artifacts/9-QA-Implementation/qa-implementation-report.md]
|
|
80
80
|
|
|
81
81
|
- phase: 6
|
|
82
82
|
name: Deployment
|
|
@@ -84,7 +84,7 @@ phases:
|
|
|
84
84
|
sequence:
|
|
85
85
|
- agent: devops
|
|
86
86
|
action: deploy
|
|
87
|
-
creates: [chati.dev/artifacts/
|
|
87
|
+
creates: [chati.dev/artifacts/10-Deploy/deploy-report.md]
|
|
88
88
|
|
|
89
89
|
transitions:
|
|
90
90
|
discover_to_plan:
|
|
@@ -51,6 +51,10 @@ phases:
|
|
|
51
51
|
creates: [chati.dev/artifacts/3-Architecture/architecture.md]
|
|
52
52
|
template: fullstack-architecture-tmpl.yaml
|
|
53
53
|
notes: "Tech stack selection, data model, deployment strategy"
|
|
54
|
+
- agent: architect
|
|
55
|
+
action: dep-audit
|
|
56
|
+
creates: [chati.dev/artifacts/3-Architecture/dep-audit.yaml]
|
|
57
|
+
notes: "Verify dependency versions, vulnerabilities, and compatibility before implementation"
|
|
54
58
|
- agent: ux
|
|
55
59
|
action: define-experience
|
|
56
60
|
creates: [chati.dev/artifacts/4-UX/ux-specification.md]
|
|
@@ -89,7 +93,7 @@ phases:
|
|
|
89
93
|
notes: "Interactive or autonomous (Ralph Wiggum) mode"
|
|
90
94
|
- agent: qa-implementation
|
|
91
95
|
action: validate-code
|
|
92
|
-
creates: [chati.dev/artifacts/
|
|
96
|
+
creates: [chati.dev/artifacts/9-QA-Implementation/qa-implementation-report.md]
|
|
93
97
|
template: qa-gate-tmpl.yaml
|
|
94
98
|
notes: "Tests + SAST + code review. Must pass to deploy"
|
|
95
99
|
|
|
@@ -99,7 +103,7 @@ phases:
|
|
|
99
103
|
sequence:
|
|
100
104
|
- agent: devops
|
|
101
105
|
action: deploy
|
|
102
|
-
creates: [chati.dev/artifacts/
|
|
106
|
+
creates: [chati.dev/artifacts/10-Deploy/deploy-report.md]
|
|
103
107
|
notes: "Git operations, deployment, documentation"
|
|
104
108
|
|
|
105
109
|
transitions:
|
|
@@ -23,10 +23,12 @@ detection:
|
|
|
23
23
|
- "Configuration or environment change"
|
|
24
24
|
- "Small refactoring with clear scope"
|
|
25
25
|
- "User says 'just do it' or 'quick fix' or similar urgency signals"
|
|
26
|
+
- "Simple, fun, or experimental project (single-purpose tool, game, prototype)"
|
|
27
|
+
- "Single-page utility or learning project with no production requirements"
|
|
26
28
|
disqualifiers:
|
|
27
|
-
- "New feature requiring architecture decisions"
|
|
28
|
-
- "Multiple interconnected requirements"
|
|
29
|
-
- "
|
|
29
|
+
- "New feature requiring architecture decisions (multiple services, database design, auth system)"
|
|
30
|
+
- "Multiple interconnected requirements (>3 distinct features)"
|
|
31
|
+
- "Complex greenfield project (enterprise, multi-service, compliance requirements)"
|
|
30
32
|
- "Enterprise or compliance context"
|
|
31
33
|
- "User explicitly requests full pipeline"
|
|
32
34
|
- "Scope involves more than 5 files"
|
|
@@ -70,7 +72,7 @@ phases:
|
|
|
70
72
|
sequence:
|
|
71
73
|
- agent: qa-implementation
|
|
72
74
|
action: validate-code
|
|
73
|
-
creates: [chati.dev/artifacts/
|
|
75
|
+
creates: [chati.dev/artifacts/9-QA-Implementation/qa-implementation-report.md]
|
|
74
76
|
notes: >
|
|
75
77
|
Full QA-Implementation validation still applies (no shortcuts on quality).
|
|
76
78
|
Adversarial review still mandatory.
|
|
@@ -85,7 +87,7 @@ phases:
|
|
|
85
87
|
sequence:
|
|
86
88
|
- agent: devops
|
|
87
89
|
action: deploy
|
|
88
|
-
creates: [chati.dev/artifacts/
|
|
90
|
+
creates: [chati.dev/artifacts/10-Deploy/deploy-report.md]
|
|
89
91
|
notes: "Standard deployment process"
|
|
90
92
|
|
|
91
93
|
transitions:
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Standard Flow Workflow
|
|
2
|
+
# Mid-tier pipeline for moderate tasks: new features, integrations, brownfield enhancements
|
|
3
|
+
# Uses 8 agents — between Quick Flow (4) and Full Flow (12)
|
|
4
|
+
|
|
5
|
+
workflow:
|
|
6
|
+
id: standard-flow
|
|
7
|
+
name: Standard Flow — Balanced Development
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
type: any
|
|
10
|
+
project_types: [feature, integration, enhancement, module, component, brownfield-moderate]
|
|
11
|
+
description: >
|
|
12
|
+
Balanced pipeline for moderate complexity tasks that need proper planning
|
|
13
|
+
but not the full 12-agent pipeline. Skips WU (assumes existing codebase
|
|
14
|
+
context), UX (no design-heavy work), and Phases (tasks agent handles
|
|
15
|
+
scope directly). Ideal for 2-5 requirements in brownfield projects.
|
|
16
|
+
|
|
17
|
+
detection:
|
|
18
|
+
triggers:
|
|
19
|
+
- "Moderate complexity feature with 2-5 requirements"
|
|
20
|
+
- "Brownfield project enhancement or integration"
|
|
21
|
+
- "New module or component within existing architecture"
|
|
22
|
+
- "User explicitly requests standard flow"
|
|
23
|
+
- "Feature that needs architecture review but not full UX design"
|
|
24
|
+
- "API integration or service connection"
|
|
25
|
+
- "Database-backed feature with clear data model"
|
|
26
|
+
disqualifiers:
|
|
27
|
+
- "Quick fix, hotfix, or single-line change (use Quick Flow)"
|
|
28
|
+
- "Enterprise-scale project with compliance requirements (use Full Flow)"
|
|
29
|
+
- "Greenfield project requiring full discovery (use Full Flow)"
|
|
30
|
+
- "UX-heavy feature requiring design system work (use Full Flow)"
|
|
31
|
+
- "Multi-service architecture changes (use Full Flow)"
|
|
32
|
+
- "User explicitly requests full pipeline"
|
|
33
|
+
|
|
34
|
+
confidence_threshold: 0.8
|
|
35
|
+
user_confirmation: true
|
|
36
|
+
|
|
37
|
+
agents:
|
|
38
|
+
included:
|
|
39
|
+
- brief
|
|
40
|
+
- detail
|
|
41
|
+
- architect
|
|
42
|
+
- tasks
|
|
43
|
+
- qa-planning
|
|
44
|
+
- dev
|
|
45
|
+
- qa-implementation
|
|
46
|
+
- devops
|
|
47
|
+
excluded:
|
|
48
|
+
- greenfield-wu
|
|
49
|
+
- brownfield-wu
|
|
50
|
+
- ux
|
|
51
|
+
- phases
|
|
52
|
+
|
|
53
|
+
phases:
|
|
54
|
+
- phase: 0
|
|
55
|
+
name: Discovery
|
|
56
|
+
category: DISCOVER
|
|
57
|
+
sequence:
|
|
58
|
+
- agent: brief
|
|
59
|
+
action: extract-requirements
|
|
60
|
+
creates: [chati.dev/artifacts/1-Brief/brief.md]
|
|
61
|
+
notes: >
|
|
62
|
+
Full brief extraction (5 phases). Since no WU precedes it,
|
|
63
|
+
Brief must also capture codebase context from user input.
|
|
64
|
+
config:
|
|
65
|
+
max_rounds: 5
|
|
66
|
+
require_approval: true
|
|
67
|
+
|
|
68
|
+
- phase: 1
|
|
69
|
+
name: Planning
|
|
70
|
+
category: PLAN
|
|
71
|
+
sequence:
|
|
72
|
+
- agent: detail
|
|
73
|
+
action: expand-requirements
|
|
74
|
+
creates: [chati.dev/artifacts/2-Detail/prd.md]
|
|
75
|
+
notes: "Full PRD from brief output"
|
|
76
|
+
parallel_with: [architect]
|
|
77
|
+
|
|
78
|
+
- agent: architect
|
|
79
|
+
action: design-architecture
|
|
80
|
+
creates: [chati.dev/artifacts/3-Architecture/architecture.md]
|
|
81
|
+
notes: "Architecture decisions, no UX constraints needed"
|
|
82
|
+
parallel_with: [detail]
|
|
83
|
+
|
|
84
|
+
- agent: tasks
|
|
85
|
+
action: create-tasks
|
|
86
|
+
creates: [chati.dev/artifacts/5-Tasks/tasks.md]
|
|
87
|
+
notes: >
|
|
88
|
+
Tasks agent works directly from PRD + Architecture.
|
|
89
|
+
No phases agent — tasks agent determines task breakdown directly.
|
|
90
|
+
|
|
91
|
+
- agent: qa-planning
|
|
92
|
+
action: validate-plan
|
|
93
|
+
creates: [chati.dev/artifacts/6-QA-Planning/qa-planning-report.md]
|
|
94
|
+
notes: "Full QA-Planning validation. Score >= 95% required to advance."
|
|
95
|
+
config:
|
|
96
|
+
minimum_score: 95
|
|
97
|
+
|
|
98
|
+
- phase: 2
|
|
99
|
+
name: Implementation
|
|
100
|
+
category: BUILD
|
|
101
|
+
sequence:
|
|
102
|
+
- agent: dev
|
|
103
|
+
action: implement-tasks
|
|
104
|
+
notes: "Dev works from full PRD + architecture + tasks"
|
|
105
|
+
|
|
106
|
+
- agent: qa-implementation
|
|
107
|
+
action: validate-code
|
|
108
|
+
creates: [chati.dev/artifacts/9-QA-Implementation/qa-implementation-report.md]
|
|
109
|
+
notes: >
|
|
110
|
+
Full QA-Implementation validation. Score >= 95% required.
|
|
111
|
+
Adversarial review mandatory.
|
|
112
|
+
config:
|
|
113
|
+
adversarial_review: true
|
|
114
|
+
minimum_findings: 5
|
|
115
|
+
minimum_score: 95
|
|
116
|
+
|
|
117
|
+
- phase: 3
|
|
118
|
+
name: Deployment
|
|
119
|
+
category: DEPLOY
|
|
120
|
+
sequence:
|
|
121
|
+
- agent: devops
|
|
122
|
+
action: deploy
|
|
123
|
+
creates: [chati.dev/artifacts/10-Deploy/deploy-report.md]
|
|
124
|
+
notes: "Standard deployment process"
|
|
125
|
+
|
|
126
|
+
transitions:
|
|
127
|
+
discover_to_plan:
|
|
128
|
+
trigger: "brief.status == completed"
|
|
129
|
+
type: automatic
|
|
130
|
+
action: "Advance to PLAN phase"
|
|
131
|
+
plan_to_build:
|
|
132
|
+
trigger: "qa-planning.score >= 95"
|
|
133
|
+
type: automatic
|
|
134
|
+
action: "Advance to BUILD phase"
|
|
135
|
+
build_to_validate:
|
|
136
|
+
trigger: "dev.status == completed"
|
|
137
|
+
type: automatic
|
|
138
|
+
action: "Run QA-Implementation"
|
|
139
|
+
validate_to_deploy:
|
|
140
|
+
trigger: "qa-implementation.score >= 95"
|
|
141
|
+
type: user_preview
|
|
142
|
+
action: "User preview gate, then advance to DEPLOY"
|
|
143
|
+
deploy_to_completed:
|
|
144
|
+
trigger: "devops.status == completed"
|
|
145
|
+
type: automatic
|
|
146
|
+
action: "Pipeline complete"
|
|
147
|
+
|
|
148
|
+
escalation:
|
|
149
|
+
to_full_flow:
|
|
150
|
+
triggers:
|
|
151
|
+
- "Architect discovers multi-service complexity"
|
|
152
|
+
- "QA-Planning finds UX requirements not addressed"
|
|
153
|
+
- "Scope creep: more than 5 distinct requirements discovered"
|
|
154
|
+
- "User requests full pipeline"
|
|
155
|
+
action: >
|
|
156
|
+
Pause standard-flow, notify user:
|
|
157
|
+
"This task is more complex than the standard flow can handle.
|
|
158
|
+
Options:
|
|
159
|
+
1. Switch to full pipeline (Recommended)
|
|
160
|
+
2. Continue with standard flow (document gaps)
|
|
161
|
+
3. Reduce scope and continue"
|
|
162
|
+
to_quick_flow:
|
|
163
|
+
triggers:
|
|
164
|
+
- "Detail agent finds only 1 simple requirement"
|
|
165
|
+
- "Architect confirms no architecture changes needed"
|
|
166
|
+
action: >
|
|
167
|
+
Suggest downgrade:
|
|
168
|
+
"This task might be simpler than expected.
|
|
169
|
+
Options:
|
|
170
|
+
1. Switch to quick flow (faster)
|
|
171
|
+
2. Continue with standard flow"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chati-dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "AI-Powered Multi-Agent Orchestration System — Structured vibe coding for Full Stack Development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"main": "src/wizard/index.js",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": "./src/wizard/index.js",
|
|
13
|
+
"./api": "./src/api/index.js",
|
|
13
14
|
"./installer": "./src/installer/core.js",
|
|
14
15
|
"./dashboard": "./src/dashboard/renderer.js",
|
|
15
16
|
"./upgrade": "./src/upgrade/checker.js"
|
|
@@ -19,7 +20,8 @@
|
|
|
19
20
|
"src/",
|
|
20
21
|
"assets/",
|
|
21
22
|
"framework/",
|
|
22
|
-
"scripts/"
|
|
23
|
+
"scripts/",
|
|
24
|
+
"LICENSE"
|
|
23
25
|
],
|
|
24
26
|
"scripts": {
|
|
25
27
|
"start": "node bin/chati.js",
|
package/src/api/index.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Public API surface for chati-dev.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports stable functions from core modules, providing
|
|
5
|
+
* a clean entry point for programmatic usage.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { createSession, runHealthChecks, classifyIntent } from 'chati-dev/api';
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Health & Diagnostics
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
export { runHealthChecks } from '../health/engine.js';
|
|
16
|
+
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Context Engine (PRISM)
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
export { runPrism } from '../context/engine.js';
|
|
22
|
+
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// Orchestrator
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
export { classifyIntent, INTENT_TYPES } from '../orchestrator/intent-classifier.js';
|
|
28
|
+
export {
|
|
29
|
+
initPipeline,
|
|
30
|
+
advancePipeline,
|
|
31
|
+
initQuickFlowPipeline,
|
|
32
|
+
initStandardFlowPipeline,
|
|
33
|
+
} from '../orchestrator/pipeline-manager.js';
|
|
34
|
+
export { selectAgent } from '../orchestrator/agent-selector.js';
|
|
35
|
+
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// Session Management
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
import {
|
|
41
|
+
initSession as _initSession,
|
|
42
|
+
loadSession as _loadSession,
|
|
43
|
+
updateSession as _updateSession,
|
|
44
|
+
validateSession as _validateSession,
|
|
45
|
+
getSessionSummary as _getSessionSummary,
|
|
46
|
+
claimSession as _claimSession,
|
|
47
|
+
releaseSession as _releaseSession,
|
|
48
|
+
getSessionOwner as _getSessionOwner,
|
|
49
|
+
} from '../orchestrator/session-manager.js';
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
_initSession as initSession,
|
|
53
|
+
_loadSession as loadSession,
|
|
54
|
+
_updateSession as updateSession,
|
|
55
|
+
_validateSession as validateSession,
|
|
56
|
+
_getSessionSummary as getSessionSummary,
|
|
57
|
+
_claimSession as claimSession,
|
|
58
|
+
_releaseSession as releaseSession,
|
|
59
|
+
_getSessionOwner as getSessionOwner,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
// Autonomy
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
|
|
66
|
+
export { runBuildLoop } from '../autonomy/build-loop.js';
|
|
67
|
+
export { checkSafety, SAFETY_TRIGGERS } from '../autonomy/safety-net.js';
|
|
68
|
+
|
|
69
|
+
// ---------------------------------------------------------------------------
|
|
70
|
+
// Memory
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
export { recordError, getGotchas } from '../memory/gotchas.js';
|
|
74
|
+
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
// Quality
|
|
77
|
+
// ---------------------------------------------------------------------------
|
|
78
|
+
|
|
79
|
+
export { getMetricsHistory, getQualityDashboard, recordMetric } from '../quality/metrics-collector.js';
|
|
80
|
+
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
// Extensions
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
export {
|
|
86
|
+
registerExtension,
|
|
87
|
+
getExtensions,
|
|
88
|
+
executeExtensions,
|
|
89
|
+
clearExtensions,
|
|
90
|
+
EXTENSION_POINTS,
|
|
91
|
+
} from '../extensions/registry.js';
|
|
92
|
+
export { loadProjectExtensions, validateExtension } from '../extensions/loader.js';
|
|
93
|
+
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// Configuration
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
|
|
98
|
+
export { loadCustomization, applyCustomization, validateCustomization } from '../config/agent-customizer.js';
|
|
99
|
+
export { IDE_CONFIGS, getIDEChoices } from '../config/ide-configs.js';
|
|
100
|
+
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
// Convenience Wrapper
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Create and initialize a new chati.dev session.
|
|
107
|
+
*
|
|
108
|
+
* Convenience wrapper that initializes session state.
|
|
109
|
+
*
|
|
110
|
+
* @param {string} projectDir - Project root directory
|
|
111
|
+
* @param {object} [options]
|
|
112
|
+
* @param {string} [options.mode='discover'] - Initial pipeline mode
|
|
113
|
+
* @param {boolean} [options.isGreenfield=true] - Project type
|
|
114
|
+
* @param {string} [options.language='en'] - Interaction language
|
|
115
|
+
* @param {string} [options.projectName=''] - Project name
|
|
116
|
+
* @param {string[]} [options.ides=[]] - Selected IDEs
|
|
117
|
+
* @param {string[]} [options.mcps=[]] - Selected MCPs
|
|
118
|
+
* @returns {{ created: boolean, session: object, path: string }}
|
|
119
|
+
*/
|
|
120
|
+
export function createSession(projectDir, options = {}) {
|
|
121
|
+
return _initSession(projectDir, {
|
|
122
|
+
mode: options.mode || 'discover',
|
|
123
|
+
isGreenfield: options.isGreenfield !== false,
|
|
124
|
+
language: options.language || 'en',
|
|
125
|
+
projectName: options.projectName || '',
|
|
126
|
+
ides: options.ides || [],
|
|
127
|
+
mcps: options.mcps || [],
|
|
128
|
+
});
|
|
129
|
+
}
|