chati-dev 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -24
- package/assets/logo2.png +0 -0
- package/assets/social-preview.png +0 -0
- package/bin/chati.js +1 -1
- package/framework/agents/plan/phases.md +2 -2
- package/framework/config.yaml +2 -2
- package/framework/constitution.md +4 -4
- package/framework/context/governance.md +16 -3
- package/framework/context/root.md +3 -3
- package/framework/data/entity-registry.yaml +1 -1
- package/framework/domains/agents/detail.yaml +1 -1
- package/framework/domains/agents/phases.yaml +2 -2
- package/framework/domains/agents/tasks.yaml +2 -2
- package/framework/domains/constitution.yaml +2 -2
- package/framework/hooks/read-protection.js +1 -0
- package/framework/i18n/en.yaml +11 -4
- package/framework/i18n/es.yaml +11 -4
- package/framework/i18n/fr.yaml +11 -4
- package/framework/i18n/pt.yaml +11 -4
- package/framework/intelligence/context-engine.md +4 -4
- package/framework/intelligence/decision-engine.md +1 -1
- package/framework/patterns/elicitation-library.yaml +2 -2
- package/framework/tasks/brownfield-wu-dependency-scan.md +1 -1
- package/framework/tasks/brownfield-wu-migration-plan.md +4 -4
- package/framework/tasks/brownfield-wu-risk-assess.md +2 -2
- package/framework/tasks/detail-expand-prd.md +2 -2
- package/framework/tasks/greenfield-wu-report.md +1 -1
- package/framework/tasks/orchestrator-handoff.md +2 -2
- package/framework/tasks/orchestrator-resume.md +1 -1
- package/framework/tasks/qa-impl-performance-test.md +2 -2
- package/framework/tasks/qa-impl-sast-scan.md +6 -6
- package/framework/tasks/qa-planning-consolidate.md +1 -1
- package/framework/tasks/qa-planning-coverage-plan.md +9 -9
- package/framework/tasks/qa-planning-gate-define.md +6 -6
- package/framework/tasks/qa-planning-risk-matrix.md +1 -1
- package/framework/tasks/tasks-consolidate.md +5 -5
- package/package.json +1 -1
- package/scripts/changelog-generator.js +2 -2
- package/scripts/ide-sync.js +9 -4
- package/scripts/pr-review.js +5 -5
- package/scripts/semantic-lint.js +3 -3
- package/src/autonomy/build-state.js +1 -1
- package/src/autonomy/execution-profile.js +1 -1
- package/src/config/context-file-generator.js +31 -34
- package/src/config/ide-configs.js +15 -6
- package/src/dashboard/layout.js +3 -1
- package/src/gates/g2-qa-planning.js +1 -1
- package/src/gates/g4-qa-implementation.js +1 -1
- package/src/health/engine.js +7 -12
- package/src/installer/core.js +69 -34
- package/src/installer/templates.js +168 -2
- package/src/installer/validator.js +5 -3
- package/src/intelligence/registry-manager.js +2 -2
- package/src/preview/detector.js +1 -1
- package/src/terminal/adapters/claude-adapter.js +3 -13
- package/src/terminal/adapters/codex-adapter.js +3 -13
- package/src/terminal/adapters/copilot-adapter.js +3 -13
- package/src/terminal/adapters/gemini-adapter.js +3 -17
- package/src/terminal/cli-registry.js +20 -48
- package/src/terminal/index.js +1 -0
- package/src/terminal/prompt-builder.js +3 -18
- package/src/terminal/run-agent.js +2 -1
- package/src/terminal/spawner.js +70 -8
- package/src/terminal/wave-analyzer.js +1 -1
- package/src/utils/config-parser.js +97 -0
- package/src/wizard/feedback.js +1 -1
- package/src/wizard/i18n.js +11 -4
- package/src/wizard/index.js +45 -15
- package/src/wizard/questions.js +54 -3
- package/assets/logo - c/303/263pia.svg" +0 -42
|
@@ -96,7 +96,7 @@ npx chati-dev health
|
|
|
96
96
|
Checks:
|
|
97
97
|
1. All registered entities exist on disk
|
|
98
98
|
2. Schema files are valid JSON
|
|
99
|
-
3. Constitution has >=
|
|
99
|
+
3. Constitution has >= 19 articles
|
|
100
100
|
4. Agents contain required protocol references
|
|
101
101
|
5. Entity count matches actual file count
|
|
102
102
|
6. Checksums match (if calculated)
|
|
@@ -307,7 +307,7 @@ categories:
|
|
|
307
307
|
- "Goals: What do they want to achieve?"
|
|
308
308
|
- "Frustrations: What annoys them about current solutions?"
|
|
309
309
|
- "Typical day: When/where/how do they use the product?"
|
|
310
|
-
- "Key scenario:
|
|
310
|
+
- "Key scenario: Define one key scenario for this persona"
|
|
311
311
|
- "Prioritize personas by frequency of use"
|
|
312
312
|
anti_patterns:
|
|
313
313
|
- "Creating too many personas (3-5 is ideal)"
|
|
@@ -500,7 +500,7 @@ categories:
|
|
|
500
500
|
steps:
|
|
501
501
|
- "Top row: user activities (high-level goals)"
|
|
502
502
|
- "Second row: user tasks (steps within each activity)"
|
|
503
|
-
- "Below each task:
|
|
503
|
+
- "Below each task: specific features and requirements"
|
|
504
504
|
- "Draw horizontal lines for release boundaries"
|
|
505
505
|
- "Everything above first line = MVP"
|
|
506
506
|
- "Validate: Does MVP deliver end-to-end value?"
|
|
@@ -351,7 +351,7 @@ estimated_total_update_effort:
|
|
|
351
351
|
|
|
352
352
|
recommendations:
|
|
353
353
|
- Fix critical lodash vulnerability immediately
|
|
354
|
-
- Plan React 17→18 migration as dedicated
|
|
354
|
+
- Plan React 17→18 migration as dedicated phase (16 hours)
|
|
355
355
|
- Remove unused packages (uuid, color) to reduce bloat
|
|
356
356
|
- Replace moment with date-fns for bundle size reduction (523 KB savings)
|
|
357
357
|
- Standardize on single HTTP client (axios)
|
|
@@ -67,18 +67,18 @@ Present options and recommend:
|
|
|
67
67
|
|
|
68
68
|
### 3. Define Migration Phases
|
|
69
69
|
Break migration into phases (typically 4-8 phases):
|
|
70
|
-
- **Phase
|
|
70
|
+
- **Phase 1: Preparation**
|
|
71
71
|
- Set up monitoring and observability
|
|
72
72
|
- Increase test coverage for critical paths
|
|
73
73
|
- Document current behavior
|
|
74
74
|
- Fix critical security issues
|
|
75
75
|
- Set up feature flags
|
|
76
|
-
- **Phase
|
|
76
|
+
- **Phase 2: Foundation**
|
|
77
77
|
- Update dependencies to secure versions
|
|
78
78
|
- Standardize tooling (linting, formatting, testing)
|
|
79
79
|
- Resolve circular dependencies
|
|
80
80
|
- Set up CI/CD if missing
|
|
81
|
-
- **Phase
|
|
81
|
+
- **Phase 3-N: Incremental Changes**
|
|
82
82
|
- Each phase targets a specific subsystem or concern
|
|
83
83
|
- Maintain working system at end of each phase
|
|
84
84
|
- Deploy and validate before next phase
|
|
@@ -152,7 +152,7 @@ For each phase, document:
|
|
|
152
152
|
- Add 20-30% buffer for unknowns
|
|
153
153
|
- Calculate calendar time based on:
|
|
154
154
|
- Team size
|
|
155
|
-
- Velocity (
|
|
155
|
+
- Velocity (estimated hours per phase)
|
|
156
156
|
- Availability (not 100% on migration)
|
|
157
157
|
- Dependencies and waiting time
|
|
158
158
|
- Provide optimistic, realistic, and pessimistic timelines
|
|
@@ -159,7 +159,7 @@ For each identified risk:
|
|
|
159
159
|
### 9. Prioritize Risks
|
|
160
160
|
Sort risks by risk score descending:
|
|
161
161
|
- **Critical Priority (Score 70-100)**: Address immediately
|
|
162
|
-
- **High Priority (Score 40-69)**: Address in next
|
|
162
|
+
- **High Priority (Score 40-69)**: Address in next phase
|
|
163
163
|
- **Medium Priority (Score 20-39)**: Address within 3 months
|
|
164
164
|
- **Low Priority (Score 1-19)**: Monitor, address when convenient
|
|
165
165
|
|
|
@@ -419,6 +419,6 @@ total_remediation_effort:
|
|
|
419
419
|
next_steps:
|
|
420
420
|
- Address 3 critical security risks immediately
|
|
421
421
|
- Create detailed remediation plan for high priority risks
|
|
422
|
-
- Schedule technical debt reduction
|
|
422
|
+
- Schedule technical debt reduction phases
|
|
423
423
|
- Set up monitoring to track new risks
|
|
424
424
|
```
|
|
@@ -10,7 +10,7 @@ handoff_to: detail-nfr-extraction
|
|
|
10
10
|
autonomous_gate: true
|
|
11
11
|
criteria:
|
|
12
12
|
- All functional requirements expanded with details
|
|
13
|
-
-
|
|
13
|
+
- Requirements written in Given-When-Then format
|
|
14
14
|
- Data models identified
|
|
15
15
|
- API endpoints outlined
|
|
16
16
|
---
|
|
@@ -30,7 +30,7 @@ Read brief.yaml and extract all requirements and context.
|
|
|
30
30
|
### 2. Expand Each Functional Requirement
|
|
31
31
|
For each FR, add:
|
|
32
32
|
- **Description**: Detailed explanation of what it does
|
|
33
|
-
- **
|
|
33
|
+
- **Requirement**: As a [persona], I want [action] so that [benefit]
|
|
34
34
|
- **Acceptance Criteria**: Given-When-Then scenarios
|
|
35
35
|
- **Priority**: P0 (must-have), P1 (should-have), P2 (nice-to-have)
|
|
36
36
|
- **Estimated Complexity**: Small (1-3 days), Medium (4-7 days), Large (8+ days)
|
|
@@ -98,7 +98,7 @@ Provide ordered list of immediate actions:
|
|
|
98
98
|
### 9. Add Recommendations
|
|
99
99
|
Include actionable recommendations:
|
|
100
100
|
- **Immediate**: Actions to take before writing code
|
|
101
|
-
- **Short-term**: Set up during
|
|
101
|
+
- **Short-term**: Set up during Phase 1 (CI/CD, testing)
|
|
102
102
|
- **Medium-term**: Add as project matures (monitoring, documentation site)
|
|
103
103
|
- **Long-term**: Consider for scale (microservices, caching layers)
|
|
104
104
|
|
|
@@ -175,7 +175,7 @@ handoff_document:
|
|
|
175
175
|
|
|
176
176
|
summary: |
|
|
177
177
|
Completed detailed requirements analysis for HealthCare Portal.
|
|
178
|
-
Identified 12
|
|
178
|
+
Identified 12 requirements across 4 modules (Authentication, Patient Records,
|
|
179
179
|
Appointments, Billing). Mapped 3 external integrations (Payment Gateway,
|
|
180
180
|
Insurance API, Lab Results). Defined data model with 8 core entities.
|
|
181
181
|
|
|
@@ -186,7 +186,7 @@ handoff_document:
|
|
|
186
186
|
size_kb: 45
|
|
187
187
|
- path: ".chati/artifacts/requirements/user-stories.yaml"
|
|
188
188
|
type: "structured-data"
|
|
189
|
-
description: "12
|
|
189
|
+
description: "12 requirements with acceptance criteria"
|
|
190
190
|
size_kb: 8
|
|
191
191
|
- path: ".chati/artifacts/requirements/integrations.yaml"
|
|
192
192
|
type: "structured-data"
|
|
@@ -173,7 +173,7 @@ session_state:
|
|
|
173
173
|
file: ".chati/artifacts/handoffs/2026-02-13-detail.md"
|
|
174
174
|
key_outputs:
|
|
175
175
|
- "Functional requirements document"
|
|
176
|
-
- "12
|
|
176
|
+
- "12 requirements identified"
|
|
177
177
|
- "3 external integrations mapped"
|
|
178
178
|
context_summary:
|
|
179
179
|
decisions_made: 8
|
|
@@ -461,7 +461,7 @@ assessment:
|
|
|
461
461
|
|
|
462
462
|
recommendations:
|
|
463
463
|
- Current performance acceptable for release
|
|
464
|
-
- Consider YAML parser alternatives in future optimization
|
|
464
|
+
- Consider YAML parser alternatives in future optimization phase
|
|
465
465
|
- Monitor agent execution time in production, optimize if user complaints
|
|
466
466
|
|
|
467
467
|
baseline_update:
|
|
@@ -477,7 +477,7 @@ next_steps:
|
|
|
477
477
|
- Update performance baseline with improved metrics
|
|
478
478
|
- Proceed to qa-impl-verdict (performance gate PASSED)
|
|
479
479
|
- Monitor performance in production after release
|
|
480
|
-
- Schedule optimization
|
|
480
|
+
- Schedule optimization phase for YAML parsing if user impact observed
|
|
481
481
|
|
|
482
482
|
handoff:
|
|
483
483
|
to: qa-impl-verdict
|
|
@@ -81,9 +81,9 @@ Run static analysis security testing (SAST) to identify security vulnerabilities
|
|
|
81
81
|
|
|
82
82
|
9. **Analyze Trends (if historical data available)**
|
|
83
83
|
- Compare findings with previous scan (if available)
|
|
84
|
-
- Track new vulnerabilities introduced in this
|
|
84
|
+
- Track new vulnerabilities introduced in this phase
|
|
85
85
|
- Track resolved vulnerabilities since last scan
|
|
86
|
-
- Calculate vulnerability velocity (new - resolved per
|
|
86
|
+
- Calculate vulnerability velocity (new - resolved per phase)
|
|
87
87
|
|
|
88
88
|
10. **Generate Remediation Guidance**
|
|
89
89
|
- For each CRITICAL/HIGH finding:
|
|
@@ -330,7 +330,7 @@ trends:
|
|
|
330
330
|
previous_scan_date: YYYY-MM-DD (or null if first scan)
|
|
331
331
|
new_vulnerabilities: 2
|
|
332
332
|
resolved_vulnerabilities: 0
|
|
333
|
-
vulnerability_velocity: +2 per
|
|
333
|
+
vulnerability_velocity: +2 per phase
|
|
334
334
|
|
|
335
335
|
remediation_roadmap:
|
|
336
336
|
priority_1_blocking:
|
|
@@ -378,19 +378,19 @@ assessment:
|
|
|
378
378
|
- Fix both HIGH severity exploitable vulnerabilities
|
|
379
379
|
- Upgrade yaml package to 2.3.4+
|
|
380
380
|
- Re-run SAST scan to verify fixes
|
|
381
|
-
- Medium and low findings can be deferred to next
|
|
381
|
+
- Medium and low findings can be deferred to next phase
|
|
382
382
|
|
|
383
383
|
recommendations:
|
|
384
384
|
- Priority 1: Fix SAST-001 with path validation (2 hours)
|
|
385
385
|
- Priority 2: Fix SAST-002 with execFile (1 hour)
|
|
386
386
|
- Priority 3: Upgrade yaml dependency (30 minutes)
|
|
387
|
-
- Schedule code quality fixes for next
|
|
387
|
+
- Schedule code quality fixes for next phase
|
|
388
388
|
|
|
389
389
|
next_steps:
|
|
390
390
|
- Return to dev agent for HIGH vulnerability remediation
|
|
391
391
|
- Re-run qa-impl-sast-scan after fixes
|
|
392
392
|
- If rerun passes (0 HIGH exploitable), proceed to qa-impl-regression-check
|
|
393
|
-
- Track LOW/MEDIUM findings in backlog for future
|
|
393
|
+
- Track LOW/MEDIUM findings in backlog for future phases
|
|
394
394
|
|
|
395
395
|
handoff:
|
|
396
396
|
to: dev
|
|
@@ -303,7 +303,7 @@ session_update:
|
|
|
303
303
|
|
|
304
304
|
next_steps:
|
|
305
305
|
- Orchestrator triggers dev agent (autonomous transition)
|
|
306
|
-
- Dev agent begins Phase
|
|
306
|
+
- Dev agent begins Phase 1 (Installer) implementation
|
|
307
307
|
- QA-Implementation agent on standby for build phase
|
|
308
308
|
- Revisit minor gaps during Phase 1 review
|
|
309
309
|
```
|
|
@@ -78,7 +78,7 @@ Create a detailed test coverage plan with specific targets for each module, comp
|
|
|
78
78
|
|
|
79
79
|
8. **Establish Coverage Baselines**
|
|
80
80
|
- **Initial Baseline**: Measure current coverage (if brownfield) or set 0% (if greenfield)
|
|
81
|
-
- **
|
|
81
|
+
- **Phase Targets**: Define incremental improvement goals (e.g., +5% per phase)
|
|
82
82
|
- **Release Targets**: Set minimum coverage for each release milestone
|
|
83
83
|
- **Maintenance Target**: Steady-state coverage after initial development (e.g., 75%)
|
|
84
84
|
|
|
@@ -95,10 +95,10 @@ Create a detailed test coverage plan with specific targets for each module, comp
|
|
|
95
95
|
- **Review Cadence**: When exception is revisited (quarterly)
|
|
96
96
|
|
|
97
97
|
11. **Create Coverage Improvement Roadmap**
|
|
98
|
-
- **Phase
|
|
99
|
-
- **Phase
|
|
100
|
-
- **Phase
|
|
101
|
-
- **Phase
|
|
98
|
+
- **Phase 1 (Installer)**: 70% target (focus on CLI and validation logic)
|
|
99
|
+
- **Phase 2-4 (Core Agents)**: 75% target (add agent task execution tests)
|
|
100
|
+
- **Phase 5-6 (Quality/Build)**: 80% target (comprehensive integration tests)
|
|
101
|
+
- **Phase 7-8 (Deploy/Validate)**: 85% target (full pipeline coverage)
|
|
102
102
|
|
|
103
103
|
12. **Compile Coverage Plan Document**
|
|
104
104
|
- List all modules with specific targets
|
|
@@ -108,7 +108,7 @@ Create a detailed test coverage plan with specific targets for each module, comp
|
|
|
108
108
|
|
|
109
109
|
## Decision Points
|
|
110
110
|
|
|
111
|
-
- **Target Adjustment for Legacy Code**: If brownfield project has existing low coverage, set realistic incremental targets rather than immediate 80% requirement. Example: 40% current → 50%
|
|
111
|
+
- **Target Adjustment for Legacy Code**: If brownfield project has existing low coverage, set realistic incremental targets rather than immediate 80% requirement. Example: 40% current → 50% Phase 1 → 60% Phase 2 → 70% Phase 3.
|
|
112
112
|
|
|
113
113
|
- **Integration Test Coverage**: For external dependencies (MCPs, file system), decide between mocking (higher coverage, less realistic) vs real integration (lower coverage, more realistic). Recommend hybrid: unit tests with mocks, separate integration tests with real dependencies.
|
|
114
114
|
|
|
@@ -287,9 +287,9 @@ exceptions:
|
|
|
287
287
|
review_date: quarterly
|
|
288
288
|
|
|
289
289
|
baselines:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
phase_1: 70%
|
|
291
|
+
phase_2: 75%
|
|
292
|
+
phase_3: 80%
|
|
293
293
|
release_1.0: 75%
|
|
294
294
|
maintenance: 75%
|
|
295
295
|
|
|
@@ -73,7 +73,7 @@ Define quality gates and enforcement thresholds for each stage of the chati.dev
|
|
|
73
73
|
7. **Establish Threshold Levels**
|
|
74
74
|
- **BLOCKER**: Must fix immediately, blocks all progress (test failures, critical vulnerabilities)
|
|
75
75
|
- **CRITICAL**: Must fix before merge/release (high vulnerabilities, major regressions)
|
|
76
|
-
- **MAJOR**: Should fix in current
|
|
76
|
+
- **MAJOR**: Should fix in current phase (moderate issues, technical debt)
|
|
77
77
|
- **MINOR**: Can defer to backlog (low priority issues, enhancements)
|
|
78
78
|
|
|
79
79
|
8. **Define Gate Enforcement Mechanisms**
|
|
@@ -98,7 +98,7 @@ Define quality gates and enforcement thresholds for each stage of the chati.dev
|
|
|
98
98
|
- **Gate Pass Rate**: Track percentage of clean gate passes
|
|
99
99
|
- **Bypass Frequency**: Monitor override usage patterns
|
|
100
100
|
- **Time in Gate**: Measure delay caused by gate failures
|
|
101
|
-
- **Trend Analysis**: Track improvement/degradation over
|
|
101
|
+
- **Trend Analysis**: Track improvement/degradation over phases
|
|
102
102
|
|
|
103
103
|
12. **Compile Quality Gates Document**
|
|
104
104
|
- Structure gates by pipeline stage
|
|
@@ -127,7 +127,7 @@ Define quality gates and enforcement thresholds for each stage of the chati.dev
|
|
|
127
127
|
|
|
128
128
|
**Tool Integration Failures**
|
|
129
129
|
- If CI/CD pipeline cannot enforce a gate automatically, define manual checklist
|
|
130
|
-
- Flag for devops agent to implement automation in future
|
|
130
|
+
- Flag for devops agent to implement automation in future phase
|
|
131
131
|
- Ensure interim manual process is documented
|
|
132
132
|
|
|
133
133
|
## Output Format
|
|
@@ -253,14 +253,14 @@ severity_levels:
|
|
|
253
253
|
resolution_time: same day
|
|
254
254
|
|
|
255
255
|
MAJOR:
|
|
256
|
-
description: Fix in current
|
|
256
|
+
description: Fix in current phase
|
|
257
257
|
examples: [moderate issues, technical debt, performance degradation]
|
|
258
|
-
resolution_time: within
|
|
258
|
+
resolution_time: within phase
|
|
259
259
|
|
|
260
260
|
MINOR:
|
|
261
261
|
description: Backlog eligible
|
|
262
262
|
examples: [low priority issues, enhancements, cosmetic fixes]
|
|
263
|
-
resolution_time: next
|
|
263
|
+
resolution_time: next phase or later
|
|
264
264
|
|
|
265
265
|
bypass_procedures:
|
|
266
266
|
deviation_protocol:
|
|
@@ -27,8 +27,8 @@ Merge: tasks-list.yaml, estimates.yaml, task-criteria.yaml
|
|
|
27
27
|
Organize tasks hierarchically:
|
|
28
28
|
- Phase → Feature → Tasks
|
|
29
29
|
|
|
30
|
-
### 3. Add
|
|
31
|
-
Suggest which tasks could be grouped into
|
|
30
|
+
### 3. Add Phase Planning Hints
|
|
31
|
+
Suggest which tasks could be grouped into phases.
|
|
32
32
|
|
|
33
33
|
### 4. Generate Final Task List
|
|
34
34
|
Complete, ready for development.
|
|
@@ -40,12 +40,12 @@ timestamp: 2026-02-13T18:00:00Z
|
|
|
40
40
|
total_tasks: 67
|
|
41
41
|
total_estimated_hours: 480
|
|
42
42
|
[All task details consolidated]
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
phase_suggestions:
|
|
44
|
+
phase_1:
|
|
45
45
|
focus: Database schema and authentication backend
|
|
46
46
|
tasks: [TASK-001, TASK-002, TASK-005, TASK-006]
|
|
47
47
|
estimated_hours: 60
|
|
48
|
-
|
|
48
|
+
phase_2:
|
|
49
49
|
focus: Authentication UI and post backend
|
|
50
50
|
tasks: [TASK-003, TASK-004, TASK-010, TASK-011]
|
|
51
51
|
estimated_hours: 72
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module scripts/changelog-generator
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { execFileSync } from 'node:child_process';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {Object} ParsedCommit
|
|
@@ -84,7 +84,7 @@ export function getGitCommits(since = null, cwd = process.cwd()) {
|
|
|
84
84
|
|
|
85
85
|
let output;
|
|
86
86
|
try {
|
|
87
|
-
output =
|
|
87
|
+
output = execFileSync('git', ['log', range, `--pretty=format:${format}`], {
|
|
88
88
|
cwd,
|
|
89
89
|
encoding: 'utf-8',
|
|
90
90
|
stdio: ['pipe', 'pipe', 'pipe'],
|
package/scripts/ide-sync.js
CHANGED
|
@@ -49,13 +49,13 @@ export const IDE_CONFIGS = {
|
|
|
49
49
|
description: 'AntiGravity',
|
|
50
50
|
},
|
|
51
51
|
'gemini-cli': {
|
|
52
|
-
|
|
53
|
-
extension: '.
|
|
54
|
-
format: '
|
|
52
|
+
commandDir: '.gemini/commands/',
|
|
53
|
+
extension: '.toml',
|
|
54
|
+
format: 'toml',
|
|
55
55
|
description: 'Gemini CLI',
|
|
56
56
|
},
|
|
57
57
|
'github-copilot': {
|
|
58
|
-
|
|
58
|
+
agentsDir: '.github/agents/',
|
|
59
59
|
extension: '.md',
|
|
60
60
|
format: 'markdown',
|
|
61
61
|
description: 'GitHub Copilot',
|
|
@@ -154,6 +154,11 @@ export function buildIDEContent(agentContent, format, agentName = '') {
|
|
|
154
154
|
return lines.join('\n');
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
case 'toml': {
|
|
158
|
+
// Gemini CLI uses TOML format for commands
|
|
159
|
+
return `description = "chati.dev agent — ${agentName}"\n\nprompt = """\n${agentContent}\n"""\n`;
|
|
160
|
+
}
|
|
161
|
+
|
|
157
162
|
case 'markdown':
|
|
158
163
|
default:
|
|
159
164
|
return agentContent;
|
package/scripts/pr-review.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module scripts/pr-review
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { execFileSync } from 'node:child_process';
|
|
11
11
|
import { extname, dirname } from 'node:path';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -64,13 +64,13 @@ export function getSensitivePaths() {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Executes a git command and returns the output.
|
|
67
|
-
* @param {string}
|
|
67
|
+
* @param {string[]} args - Git subcommand and arguments
|
|
68
68
|
* @param {string} cwd
|
|
69
69
|
* @returns {string}
|
|
70
70
|
*/
|
|
71
|
-
function git(
|
|
71
|
+
function git(args, cwd) {
|
|
72
72
|
try {
|
|
73
|
-
return
|
|
73
|
+
return execFileSync('git', args, {
|
|
74
74
|
cwd,
|
|
75
75
|
encoding: 'utf-8',
|
|
76
76
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
@@ -89,7 +89,7 @@ function git(cmd, cwd) {
|
|
|
89
89
|
* @returns {ChangedFiles}
|
|
90
90
|
*/
|
|
91
91
|
export function getChangedFiles(base, head, cwd = process.cwd()) {
|
|
92
|
-
const output = git(
|
|
92
|
+
const output = git(['diff', '--name-status', `${base}...${head}`], cwd);
|
|
93
93
|
if (!output) {
|
|
94
94
|
return { added: [], modified: [], deleted: [], renamed: [] };
|
|
95
95
|
}
|
package/scripts/semantic-lint.js
CHANGED
|
@@ -185,7 +185,7 @@ function checkSchemaExistence(frameworkDir, results) {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
|
-
* Check constitution has >=
|
|
188
|
+
* Check constitution has >= 19 articles.
|
|
189
189
|
*/
|
|
190
190
|
function checkConstitution(frameworkDir, results) {
|
|
191
191
|
results.checks++;
|
|
@@ -199,11 +199,11 @@ function checkConstitution(frameworkDir, results) {
|
|
|
199
199
|
const content = readFileSync(constitutionPath, 'utf-8');
|
|
200
200
|
const articleCount = (content.match(/^## Article/gm) || []).length;
|
|
201
201
|
|
|
202
|
-
if (articleCount >=
|
|
202
|
+
if (articleCount >= 19) {
|
|
203
203
|
results.passed++;
|
|
204
204
|
results.details.push(`Constitution: ${articleCount} articles found`);
|
|
205
205
|
} else {
|
|
206
|
-
results.errors.push(`Constitution has only ${articleCount} articles (expected >=
|
|
206
|
+
results.errors.push(`Constitution has only ${articleCount} articles (expected >= 19)`);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
@@ -198,7 +198,7 @@ export function completeBuild(state) {
|
|
|
198
198
|
* @param {string} [reason]
|
|
199
199
|
* @returns {BuildState}
|
|
200
200
|
*/
|
|
201
|
-
export function failBuild(state,
|
|
201
|
+
export function failBuild(state, _reason) {
|
|
202
202
|
state.status = BuildStatus.FAILED;
|
|
203
203
|
state.completedAt = new Date().toISOString();
|
|
204
204
|
return state;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Constitution Article XVIII — Execution Profile Governance.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { existsSync, readFileSync
|
|
15
|
+
import { existsSync, readFileSync } from 'fs';
|
|
16
16
|
import { join } from 'path';
|
|
17
17
|
|
|
18
18
|
// ---------------------------------------------------------------------------
|
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
* When alternative CLI providers are enabled, generates provider-specific
|
|
5
5
|
* context files (GEMINI.md, AGENTS.md) derived from CLAUDE.md content.
|
|
6
6
|
* Constitution Article XIX — context file generation is automatic.
|
|
7
|
+
*
|
|
8
|
+
* Provider conventions (verified Feb 2026):
|
|
9
|
+
* - Gemini CLI: auto-loads GEMINI.md, uses .gemini/commands/*.toml, no rules/
|
|
10
|
+
* - Codex CLI: auto-loads AGENTS.md, uses .codex/commands/*.md for /chati
|
|
11
|
+
* - Copilot CLI: auto-loads AGENTS.md + CLAUDE.md + GEMINI.md natively (no COPILOT.md needed)
|
|
7
12
|
*/
|
|
8
13
|
|
|
9
14
|
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
10
15
|
import { join } from 'path';
|
|
16
|
+
import { getEnabledNonClaudeProviders } from '../utils/config-parser.js';
|
|
11
17
|
|
|
12
18
|
// ---------------------------------------------------------------------------
|
|
13
19
|
// Replacement Maps
|
|
@@ -16,14 +22,15 @@ import { join } from 'path';
|
|
|
16
22
|
/**
|
|
17
23
|
* Text replacements for Gemini CLI context file.
|
|
18
24
|
* Transforms Claude Code-specific references into Gemini CLI equivalents.
|
|
25
|
+
* Note: Gemini has no rules/ directory — references point to chati.dev/context/.
|
|
19
26
|
*/
|
|
20
27
|
const GEMINI_REPLACEMENTS = [
|
|
21
28
|
['Claude Code', 'Gemini CLI'],
|
|
22
29
|
['claude code', 'Gemini CLI'],
|
|
23
30
|
['CLAUDE.md', 'GEMINI.md'],
|
|
24
31
|
['Claude.md', 'GEMINI.md'],
|
|
25
|
-
['.claude/commands/', '.gemini/
|
|
26
|
-
['.claude/rules/', '.
|
|
32
|
+
['.claude/commands/', '.gemini/commands/'],
|
|
33
|
+
['.claude/rules/', 'chati.dev/context/'],
|
|
27
34
|
['.claude/mcp.json', '.gemini/settings.json'],
|
|
28
35
|
['claude --print', 'gemini --prompt'],
|
|
29
36
|
['claude -p', 'gemini --prompt'],
|
|
@@ -42,15 +49,16 @@ const CODEX_STRIP_PATTERNS = [
|
|
|
42
49
|
|
|
43
50
|
/**
|
|
44
51
|
* Text replacements for Codex CLI context file.
|
|
52
|
+
* Note: Codex has no commands/ or rules/ directories — references point to chati.dev/.
|
|
45
53
|
*/
|
|
46
54
|
const CODEX_REPLACEMENTS = [
|
|
47
55
|
['Claude Code', 'Codex CLI'],
|
|
48
56
|
['claude code', 'Codex CLI'],
|
|
49
57
|
['CLAUDE.md', 'AGENTS.md'],
|
|
50
58
|
['Claude.md', 'AGENTS.md'],
|
|
51
|
-
['.claude/commands/', '.
|
|
52
|
-
['.claude/rules/', '.
|
|
53
|
-
['.claude/mcp.json', '.codex/
|
|
59
|
+
['.claude/commands/', 'chati.dev/orchestrator/'],
|
|
60
|
+
['.claude/rules/', 'chati.dev/context/'],
|
|
61
|
+
['.claude/mcp.json', '.codex/config.toml'],
|
|
54
62
|
['claude --print', 'codex exec'],
|
|
55
63
|
['claude -p', 'codex exec'],
|
|
56
64
|
['CLAUDE.local.md', 'AGENTS.local.md'],
|
|
@@ -131,25 +139,32 @@ export function generateAgentsMd(content) {
|
|
|
131
139
|
* CLAUDE.md from the project root, and writes the appropriate context
|
|
132
140
|
* files (GEMINI.md, AGENTS.md) when their providers are active.
|
|
133
141
|
*
|
|
142
|
+
* Copilot CLI does not need its own context file — it natively reads
|
|
143
|
+
* AGENTS.md, CLAUDE.md, and GEMINI.md.
|
|
144
|
+
*
|
|
134
145
|
* @param {string} projectDir - Project root directory
|
|
146
|
+
* @param {string} [baseContent] - Optional base content (used when CLAUDE.md doesn't exist on disk)
|
|
135
147
|
* @returns {{ generated: string[], skipped: string[], warning: string|null }}
|
|
136
148
|
*/
|
|
137
|
-
export function generateContextFiles(projectDir) {
|
|
149
|
+
export function generateContextFiles(projectDir, baseContent = null) {
|
|
138
150
|
const result = { generated: [], skipped: [], warning: null };
|
|
139
151
|
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
if (!
|
|
143
|
-
|
|
144
|
-
|
|
152
|
+
// Use provided base content or read CLAUDE.md from disk
|
|
153
|
+
let claudeContent = baseContent;
|
|
154
|
+
if (!claudeContent) {
|
|
155
|
+
const claudeMdPath = join(projectDir, 'CLAUDE.md');
|
|
156
|
+
if (!existsSync(claudeMdPath)) {
|
|
157
|
+
result.warning = 'CLAUDE.md not found and no base content provided — skipping context file generation';
|
|
158
|
+
return result;
|
|
159
|
+
}
|
|
160
|
+
claudeContent = readFileSync(claudeMdPath, 'utf-8');
|
|
145
161
|
}
|
|
146
162
|
|
|
147
|
-
const claudeContent = readFileSync(claudeMdPath, 'utf-8');
|
|
148
|
-
|
|
149
163
|
// Determine enabled providers from config.yaml
|
|
150
164
|
const enabledProviders = resolveEnabledProviders(projectDir);
|
|
151
165
|
|
|
152
166
|
// Provider-to-generator mapping
|
|
167
|
+
// Note: Copilot is intentionally excluded — it reads AGENTS.md + CLAUDE.md + GEMINI.md natively
|
|
153
168
|
const generators = {
|
|
154
169
|
gemini: {
|
|
155
170
|
filename: 'GEMINI.md',
|
|
@@ -181,29 +196,11 @@ export function generateContextFiles(projectDir) {
|
|
|
181
196
|
|
|
182
197
|
/**
|
|
183
198
|
* Resolve which alternative providers are enabled from config.yaml.
|
|
184
|
-
*
|
|
185
|
-
* Uses lightweight regex-based YAML extraction (no dependency on a
|
|
186
|
-
* full YAML parser) consistent with cli-registry.js patterns.
|
|
199
|
+
* Delegates to shared config parser utility.
|
|
187
200
|
*
|
|
188
201
|
* @param {string} projectDir - Project root directory
|
|
189
|
-
* @returns {string[]} List of enabled provider names
|
|
202
|
+
* @returns {string[]} List of enabled non-Claude provider names
|
|
190
203
|
*/
|
|
191
204
|
function resolveEnabledProviders(projectDir) {
|
|
192
|
-
|
|
193
|
-
if (!existsSync(configPath)) {
|
|
194
|
-
return [];
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
const raw = readFileSync(configPath, 'utf-8');
|
|
198
|
-
const providers = ['gemini', 'codex', 'copilot'];
|
|
199
|
-
const enabled = [];
|
|
200
|
-
|
|
201
|
-
for (const name of providers) {
|
|
202
|
-
const match = raw.match(new RegExp(`${name}:[\\s\\S]*?enabled:\\s*(true|false)`, 'm'));
|
|
203
|
-
if (match && match[1] === 'true') {
|
|
204
|
-
enabled.push(name);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return enabled;
|
|
205
|
+
return getEnabledNonClaudeProviders(projectDir);
|
|
209
206
|
}
|
|
@@ -39,14 +39,23 @@ export const IDE_CONFIGS = {
|
|
|
39
39
|
mcpConfigFile: null,
|
|
40
40
|
formatNotes: 'Cursor rules format',
|
|
41
41
|
},
|
|
42
|
+
'codex-cli': {
|
|
43
|
+
name: 'Codex CLI',
|
|
44
|
+
description: 'OpenAI Codex terminal agent',
|
|
45
|
+
recommended: false,
|
|
46
|
+
configPath: '.codex/commands/',
|
|
47
|
+
rulesFile: 'AGENTS.md',
|
|
48
|
+
mcpConfigFile: null,
|
|
49
|
+
formatNotes: 'Markdown command format',
|
|
50
|
+
},
|
|
42
51
|
'gemini-cli': {
|
|
43
52
|
name: 'Gemini CLI',
|
|
44
|
-
description: 'Google AI
|
|
53
|
+
description: 'Google AI terminal agent',
|
|
45
54
|
recommended: false,
|
|
46
|
-
configPath: '.gemini/
|
|
47
|
-
rulesFile:
|
|
48
|
-
mcpConfigFile:
|
|
49
|
-
formatNotes: '
|
|
55
|
+
configPath: '.gemini/commands/',
|
|
56
|
+
rulesFile: null,
|
|
57
|
+
mcpConfigFile: '.gemini/settings.json',
|
|
58
|
+
formatNotes: 'TOML command format',
|
|
50
59
|
},
|
|
51
60
|
'github-copilot': {
|
|
52
61
|
name: 'GitHub Copilot',
|
|
@@ -55,7 +64,7 @@ export const IDE_CONFIGS = {
|
|
|
55
64
|
configPath: '.github/agents/',
|
|
56
65
|
rulesFile: '.github/copilot-instructions.md',
|
|
57
66
|
mcpConfigFile: null,
|
|
58
|
-
formatNotes: 'GitHub Copilot format',
|
|
67
|
+
formatNotes: 'GitHub Copilot agent format',
|
|
59
68
|
},
|
|
60
69
|
};
|
|
61
70
|
|