chati-dev 4.0.2 → 4.0.3
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.
|
@@ -53,17 +53,24 @@ Implement each task from the approved task breakdown with high quality, followin
|
|
|
53
53
|
### Interactive Mode (default)
|
|
54
54
|
```
|
|
55
55
|
For each task:
|
|
56
|
-
1. Announce: "Starting {
|
|
56
|
+
1. Announce: "Starting T{X}: {title} — implementing now..."
|
|
57
57
|
2. Read task details and acceptance criteria
|
|
58
58
|
3. Implement code
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
-> Output: "Implementation done. Running self-critique (5.5)..."
|
|
60
|
+
4. Run self-critique (Step 5.5) — 1 fix pass, then proceed
|
|
61
|
+
-> Output: "Self-critique complete. Running tests..."
|
|
62
|
+
5. Run tests (once)
|
|
63
|
+
-> Output: "Tests: {N}/{total} passed. Running post-test review (6.5)..."
|
|
64
|
+
6. Run post-test critique (Step 6.5) — 1 fix pass, then score
|
|
65
|
+
-> Output: "Review complete. Calculating score..."
|
|
62
66
|
7. Self-validate against acceptance criteria
|
|
63
67
|
8. Present result with score
|
|
64
|
-
9.
|
|
68
|
+
9. Ask: "T{X} complete (score: {Y}%). Continue to next task? [yes/skip/stop]"
|
|
65
69
|
10. Commit and move to next task
|
|
66
70
|
|
|
71
|
+
ANTI-LOOP RULE: Steps 5.5 and 6.5 execute ONCE per task. No cycles allowed.
|
|
72
|
+
PROGRESS RULE: Output a status line at every step transition (steps 3→4, 4→5, 5→6, 6→7).
|
|
73
|
+
This ensures the user always sees forward progress and never mistakes work for a freeze.
|
|
67
74
|
User can intervene at any point.
|
|
68
75
|
```
|
|
69
76
|
|
|
@@ -71,27 +78,39 @@ User can intervene at any point.
|
|
|
71
78
|
```
|
|
72
79
|
Activated when session.yaml execution_mode = autonomous
|
|
73
80
|
|
|
81
|
+
ANTI-LOOP GUARANTEE: Each step (5.5, 6.5) executes ONCE per attempt.
|
|
82
|
+
No re-running tests after 6.5. No cycling back to 5.5.
|
|
83
|
+
Max 3 attempts per task, then escalate — no exceptions.
|
|
84
|
+
PROGRESS RULE: Output a status line at every step transition within each attempt.
|
|
85
|
+
|
|
74
86
|
WHILE tasks_pending:
|
|
75
87
|
task = read_next_task()
|
|
88
|
+
Output: "Starting T{X}: {title} (attempt {N}/3)"
|
|
76
89
|
|
|
77
90
|
FOR attempt IN 1..3:
|
|
78
91
|
1. Read task details and acceptance criteria
|
|
79
92
|
2. Implement code
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
-> Output: "T{X} implementation done. Self-critique (5.5)..."
|
|
94
|
+
3. Run self-critique (Step 5.5) — 1 fix pass, then proceed
|
|
95
|
+
-> Output: "T{X} critique done. Running tests..."
|
|
96
|
+
4. Run tests (once)
|
|
97
|
+
-> Output: "T{X} tests: {N}/{total} passed. Post-test review (6.5)..."
|
|
98
|
+
5. Run post-test critique (Step 6.5) — 1 fix pass, then score
|
|
99
|
+
-> Output: "T{X} review done. Scoring..."
|
|
83
100
|
6. Self-validate against acceptance criteria
|
|
84
101
|
7. Calculate score
|
|
85
102
|
|
|
86
103
|
IF score >= 95:
|
|
87
104
|
mark_complete(task)
|
|
88
105
|
commit_changes()
|
|
89
|
-
|
|
106
|
+
Output: "T{X} completed (score: {Y}%) ✓"
|
|
90
107
|
BREAK
|
|
91
108
|
ELIF attempt == 3:
|
|
92
109
|
STOP: "Score insufficient after 3 attempts for T{X}"
|
|
93
110
|
escalate_to_user()
|
|
94
111
|
RETURN
|
|
112
|
+
ELSE:
|
|
113
|
+
Output: "T{X} attempt {N} score: {Y}%. Retrying ({N+1}/3)..."
|
|
95
114
|
|
|
96
115
|
IF has_blocker():
|
|
97
116
|
STOP: "Blocker detected: {blocker_id} - {description}"
|
|
@@ -99,6 +118,7 @@ WHILE tasks_pending:
|
|
|
99
118
|
RETURN
|
|
100
119
|
END
|
|
101
120
|
|
|
121
|
+
run_dev_preview() // mandatory: start server, show URL, wait for user OK
|
|
102
122
|
transition_to_qa_implementation()
|
|
103
123
|
```
|
|
104
124
|
|
|
@@ -109,6 +129,7 @@ transition_to_qa_implementation()
|
|
|
109
129
|
### Step 5.5: Post-Code, BEFORE Tests
|
|
110
130
|
```
|
|
111
131
|
After implementing code, before running tests:
|
|
132
|
+
MAX 1 fix pass — identify issues, fix once, then proceed to tests regardless.
|
|
112
133
|
|
|
113
134
|
1. Predicted Bugs (identify at least 3):
|
|
114
135
|
- {potential bug 1}: {why it could happen}
|
|
@@ -118,7 +139,7 @@ After implementing code, before running tests:
|
|
|
118
139
|
2. Edge Cases (identify at least 3):
|
|
119
140
|
- {edge case 1}: {how it should be handled}
|
|
120
141
|
- {edge case 2}: {how it should be handled}
|
|
121
|
-
- {edge case 3}: {how it
|
|
142
|
+
- {edge case 3}: {how it could happen}
|
|
122
143
|
|
|
123
144
|
3. Error Handling Review:
|
|
124
145
|
- All external calls have try/catch?
|
|
@@ -131,12 +152,14 @@ After implementing code, before running tests:
|
|
|
131
152
|
- No hardcoded secrets?
|
|
132
153
|
- OWASP Top 10 checked?
|
|
133
154
|
|
|
134
|
-
If issues found -> FIX
|
|
155
|
+
If issues found -> FIX (1 pass only) then proceed to tests.
|
|
156
|
+
NEVER loop back to 5.5 after fixing. Move forward.
|
|
135
157
|
```
|
|
136
158
|
|
|
137
159
|
### Step 6.5: Post-Tests, BEFORE Completing
|
|
138
160
|
```
|
|
139
|
-
After tests pass:
|
|
161
|
+
After tests pass (or after recording test failures in score):
|
|
162
|
+
MAX 1 fix pass — identify issues, fix once, then score and proceed.
|
|
140
163
|
|
|
141
164
|
1. Pattern Adherence:
|
|
142
165
|
- Code follows Architecture document patterns?
|
|
@@ -159,7 +182,9 @@ After tests pass:
|
|
|
159
182
|
- No unused imports?
|
|
160
183
|
- No TODO comments without ticket reference?
|
|
161
184
|
|
|
162
|
-
If issues found -> FIX
|
|
185
|
+
If issues found -> FIX (1 pass only) then calculate score and proceed.
|
|
186
|
+
NEVER re-run tests after 6.5. Score current state and move forward.
|
|
187
|
+
ANTI-LOOP RULE: Steps 5.5 and 6.5 execute ONCE per task. No cycles.
|
|
163
188
|
```
|
|
164
189
|
|
|
165
190
|
---
|
|
@@ -304,10 +329,43 @@ agents:
|
|
|
304
329
|
completed_at: "{timestamp when all tasks done}"
|
|
305
330
|
```
|
|
306
331
|
|
|
332
|
+
### Dev Preview Step (mandatory before handoff)
|
|
333
|
+
|
|
334
|
+
When ALL tasks in current phase are complete, BEFORE generating the handoff:
|
|
335
|
+
|
|
336
|
+
```
|
|
337
|
+
1. Detect run command from package.json scripts:
|
|
338
|
+
Priority: "dev" > "start" > "serve" > "preview"
|
|
339
|
+
Fallback: inspect Makefile or README for run instructions
|
|
340
|
+
|
|
341
|
+
2. Start the dev server:
|
|
342
|
+
Output: "All tasks done! Starting dev server so you can preview..."
|
|
343
|
+
Run: npm run dev (or detected equivalent)
|
|
344
|
+
|
|
345
|
+
3. Detect the local URL from server output:
|
|
346
|
+
Look for: "localhost:", "Local:", "http://127.0.0.1", "http://0.0.0.0"
|
|
347
|
+
Output: "App running at: {URL}"
|
|
348
|
+
|
|
349
|
+
4. Ask: "Your app is live at {URL}. Take a look and let me know:
|
|
350
|
+
- Ready to continue to QA-Implementation? [yes]
|
|
351
|
+
- Found something to fix? Describe it and I'll fix it.
|
|
352
|
+
- Want to keep the server running and stop here? [stop]"
|
|
353
|
+
|
|
354
|
+
5. Wait for user response before proceeding.
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
RULE: The dev server step is NOT optional. Every project with a UI or API
|
|
358
|
+
must be previewed by the user before QA-Implementation.
|
|
359
|
+
EXCEPTION: If the project has no runnable server (library, CLI tool, etc.),
|
|
360
|
+
output: "This project has no dev server (library/CLI). Skipping preview step."
|
|
361
|
+
and proceed directly to handoff.
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
307
365
|
### Handoff (Protocol 5.5)
|
|
308
366
|
Save to: `chati.dev/artifacts/handoffs/dev-handoff.md`
|
|
309
367
|
|
|
310
|
-
When ALL tasks in current phase are complete:
|
|
368
|
+
When ALL tasks in current phase are complete AND user confirmed preview:
|
|
311
369
|
- Transition to QA-Implementation
|
|
312
370
|
- Generate handoff with implementation summary
|
|
313
371
|
|
|
@@ -316,12 +374,12 @@ When ALL tasks in current phase are complete:
|
|
|
316
374
|
## Guided Options on Completion (Protocol 5.3)
|
|
317
375
|
|
|
318
376
|
```
|
|
319
|
-
All tasks implemented!
|
|
377
|
+
All tasks implemented! App is running at {URL}.
|
|
320
378
|
|
|
321
379
|
Next steps:
|
|
322
380
|
1. Continue to QA-Implementation (Recommended) — validate code quality
|
|
323
|
-
2.
|
|
324
|
-
3.
|
|
381
|
+
2. Fix something you noticed in the preview — describe what to change
|
|
382
|
+
3. Keep the server running and stop here
|
|
325
383
|
```
|
|
326
384
|
|
|
327
385
|
---
|
|
@@ -392,6 +450,7 @@ This agent supports TASK-LEVEL parallelization (all modes):
|
|
|
392
450
|
| `post-test` | Post-Test Critique (6.5) | Run post-test critique: pattern adherence, hardcoded values, cleanup | After run-tests |
|
|
393
451
|
| `validate-task` | Validate Acceptance | Validate implementation against Given-When-Then acceptance criteria | After post-test |
|
|
394
452
|
| `commit-task` | Commit Changes | Create local commit with conventional format for the completed task | After validate-task |
|
|
453
|
+
| `dev-preview` | Dev Server Preview | Detect run command, start dev server, output localhost URL, wait for user confirmation before QA | After all tasks complete |
|
|
395
454
|
|
|
396
455
|
---
|
|
397
456
|
|
|
@@ -455,7 +514,7 @@ Beyond per-task self-validation (Protocol 5.1), the Dev agent enforces:
|
|
|
455
514
|
| UX specification missing | Proceed without Design System token enforcement. Note in handoff that token compliance could not be verified. |
|
|
456
515
|
| Self-validation score < 95% after 3 attempts (autonomous mode) | Stop autonomous execution. Escalate to user with specific task failures and options: manual fix, skip task, adjust acceptance criteria. |
|
|
457
516
|
| Blocker detected (C01-C15, G01-G08) | Immediately stop current task. Present blocker details to user. Wait for resolution before continuing. |
|
|
458
|
-
| Test suite fails to run | Attempt to fix test infrastructure (missing deps, config). If
|
|
517
|
+
| Test suite fails to run | Attempt to fix test infrastructure once (missing deps, config). If still failing after 1 attempt, document failure and escalate to user. Do NOT retry repeatedly. |
|
|
459
518
|
| Session state corrupted | Read artifacts directly from filesystem. Reconstruct task completion state from commit history. Log warning. |
|
|
460
519
|
| Intelligence files missing | Proceed without gotcha/pattern awareness. Note limitation in handoff. |
|
|
461
520
|
|
|
@@ -484,11 +543,24 @@ Beyond per-task self-validation (Protocol 5.1), the Dev agent enforces:
|
|
|
484
543
|
## Error Handling
|
|
485
544
|
|
|
486
545
|
```
|
|
487
|
-
On error during execution:
|
|
488
|
-
|
|
489
|
-
Level
|
|
490
|
-
|
|
491
|
-
|
|
546
|
+
On error during execution (each level executes ONCE — no cycling back):
|
|
547
|
+
|
|
548
|
+
Level 1: Fix the issue inline (1 attempt only). Re-score current state.
|
|
549
|
+
IF resolved -> continue.
|
|
550
|
+
IF still failing -> proceed to Level 2 immediately (do NOT repeat Level 1).
|
|
551
|
+
|
|
552
|
+
Level 2: Roll back to last working state and retry task from scratch (1 attempt only).
|
|
553
|
+
This counts as a Ralph Wiggum attempt (contributes to the 3-attempt cap).
|
|
554
|
+
IF resolved -> continue.
|
|
555
|
+
IF still failing -> proceed to Level 3 immediately (do NOT repeat Level 2).
|
|
556
|
+
|
|
557
|
+
Level 3: Mark task as blocked with specific error details. Move to next independent task.
|
|
558
|
+
Do NOT attempt to fix. Document blocker ID (C01-C15 or G01-G08).
|
|
559
|
+
|
|
560
|
+
Level 4: Escalate to orchestrator with blocked task list and implementation summary.
|
|
561
|
+
Present to user with 3 options: fix manually, skip task, stop session.
|
|
562
|
+
|
|
563
|
+
ANTI-CYCLE RULE: Levels are a one-way escalation path. NEVER go back to a previous level.
|
|
492
564
|
```
|
|
493
565
|
|
|
494
566
|
---
|
|
@@ -271,7 +271,7 @@ Criteria (binary pass/fail):
|
|
|
271
271
|
17. Zero banned placeholder content — no lorem ipsum, no "John Doe", domain-realistic sample data used (Directive 5F)
|
|
272
272
|
18. All animations use GPU-only properties (transform/opacity) with reduced-motion alternatives (Directive 5G)
|
|
273
273
|
19. Motion System defined: library specified by stack, animation tokens in Design System Layer 5, scroll animations + micro-interactions catalogued, reduced-motion alternatives provided (Directive 6)
|
|
274
|
-
20. Component
|
|
274
|
+
20. Component Discovery Log complete: EVERY Molecule and Organism in the component map has an entry in the Discovery Log with status (ADOPTED/ADAPTED/CUSTOM) and source or rationale. Any component with no log entry = FAIL for this criterion. Zero silent skips. (Directive 7)
|
|
275
275
|
|
|
276
276
|
Score = criteria met / total criteria
|
|
277
277
|
Threshold: >= 90% (standard agent tier, 18/20 target)
|
|
@@ -284,6 +284,7 @@ Threshold: >= 90% (standard agent tier, 18/20 target)
|
|
|
284
284
|
### Artifacts
|
|
285
285
|
1. Save to: `chati.dev/artifacts/4-UX/ux-specification.md`
|
|
286
286
|
2. Save to: `chati.dev/artifacts/4-UX/reference-analysis.md` (if reference URLs provided)
|
|
287
|
+
3. Save to: `chati.dev/artifacts/4-UX/component-discovery-log.md` **(mandatory — criterion #20)**
|
|
287
288
|
|
|
288
289
|
```markdown
|
|
289
290
|
# UX Specification — {Project Name}
|
|
@@ -367,6 +368,21 @@ Threshold: >= 90% (standard agent tier, 18/20 target)
|
|
|
367
368
|
## 7. Responsive Strategy
|
|
368
369
|
{Breakpoints, layout behavior per breakpoint}
|
|
369
370
|
|
|
371
|
+
## 8. Component Discovery Log
|
|
372
|
+
<!-- MANDATORY (Directive 7) — every Molecule and Organism must have an entry. -->
|
|
373
|
+
<!-- Missing entry = criterion #20 FAILS. Zero silent skips allowed. -->
|
|
374
|
+
|
|
375
|
+
| Component | Level | Status | Source / Rationale |
|
|
376
|
+
|-----------|-------|--------|--------------------|
|
|
377
|
+
| {name} | Molecule | ADOPTED | 21st.dev: {component-name} — {URL} |
|
|
378
|
+
| {name} | Molecule | ADAPTED | 21st.dev: {component-name} — customized {what changed} |
|
|
379
|
+
| {name} | Organism | CUSTOM | Not found on 21st.dev — {reason why custom was needed} |
|
|
380
|
+
|
|
381
|
+
Status legend:
|
|
382
|
+
- **ADOPTED**: Used as-is with only token/color adaptation
|
|
383
|
+
- **ADAPTED**: Pattern reused, significant structural customization
|
|
384
|
+
- **CUSTOM**: Not found (or <50% match) — designed from scratch with documented rationale
|
|
385
|
+
|
|
370
386
|
## Traceability
|
|
371
387
|
| Brief User Need | UX Decision |
|
|
372
388
|
|-----------------|-------------|
|
|
@@ -1009,8 +1025,49 @@ Search these categories on 21st.dev FIRST (highest reuse potential):
|
|
|
1009
1025
|
|
|
1010
1026
|
If 21st.dev is unreachable (offline, network issue):
|
|
1011
1027
|
- Proceed with component design from scratch
|
|
1028
|
+
- Mark ALL components as CUSTOM with rationale: "21st.dev unavailable — {reason}"
|
|
1012
1029
|
- Note in handoff: "21st.dev lookup skipped — {reason}"
|
|
1013
1030
|
- Agent MUST NOT block pipeline due to external resource unavailability
|
|
1031
|
+
- Criterion #20 still passes if ALL molecules/organisms have entries (even if all are CUSTOM)
|
|
1032
|
+
|
|
1033
|
+
#### 7E. Discovery Log Format (save to `component-discovery-log.md`)
|
|
1034
|
+
|
|
1035
|
+
```markdown
|
|
1036
|
+
# Component Discovery Log — {Project Name}
|
|
1037
|
+
|
|
1038
|
+
Generated: {date}
|
|
1039
|
+
Total components: {N} ({M} Molecules, {K} Organisms)
|
|
1040
|
+
Discovery coverage: {X}/{N} (must be 100%)
|
|
1041
|
+
|
|
1042
|
+
## Molecules
|
|
1043
|
+
|
|
1044
|
+
### {ComponentName}
|
|
1045
|
+
- Status: ADOPTED | ADAPTED | CUSTOM
|
|
1046
|
+
- Source: {21st.dev URL} | N/A
|
|
1047
|
+
- Patterns observed: {what was reused}
|
|
1048
|
+
- Adaptations: {what was changed to match our tokens}
|
|
1049
|
+
- Rationale (if CUSTOM): {reason no existing component worked}
|
|
1050
|
+
|
|
1051
|
+
## Organisms
|
|
1052
|
+
|
|
1053
|
+
### {ComponentName}
|
|
1054
|
+
- Status: ADOPTED | ADAPTED | CUSTOM
|
|
1055
|
+
- Source: {21st.dev URL} | N/A
|
|
1056
|
+
- Patterns observed: {what was reused}
|
|
1057
|
+
- Adaptations: {what was changed to match our tokens}
|
|
1058
|
+
- Rationale (if CUSTOM): {reason no existing component worked}
|
|
1059
|
+
|
|
1060
|
+
## Summary
|
|
1061
|
+
| Status | Count | % |
|
|
1062
|
+
|--------|-------|---|
|
|
1063
|
+
| ADOPTED | {n} | {%} |
|
|
1064
|
+
| ADAPTED | {n} | {%} |
|
|
1065
|
+
| CUSTOM | {n} | {%} |
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
**VALIDATION RULE**: Before marking criterion #20 as PASS, count entries in this log.
|
|
1069
|
+
Entry count MUST equal Molecule count + Organism count from the component map.
|
|
1070
|
+
If any component is missing an entry → criterion #20 = FAIL → do NOT proceed to handoff.
|
|
1014
1071
|
|
|
1015
1072
|
**RULE**: The goal is quality, not compliance. Adapting a premium component is better than
|
|
1016
1073
|
designing a mediocre custom component. The minimum bar is: every Organism must show evidence
|
package/framework/config.yaml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chati-dev",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "AI-Powered Multi-Agent Orchestration System — Structured vibe coding for Full Stack Development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@eslint/js": "^10.0.1",
|
|
73
|
-
"eslint": "^10.
|
|
73
|
+
"eslint": "^10.1.0",
|
|
74
74
|
"globals": "^17.3.0"
|
|
75
75
|
}
|
|
76
76
|
}
|