chati-dev 1.4.0 → 2.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 +40 -24
- package/framework/agents/build/dev.md +343 -0
- package/framework/agents/clarity/architect.md +112 -0
- package/framework/agents/clarity/brief.md +182 -0
- package/framework/agents/clarity/brownfield-wu.md +181 -0
- package/framework/agents/clarity/detail.md +110 -0
- package/framework/agents/clarity/greenfield-wu.md +153 -0
- package/framework/agents/clarity/ux.md +112 -0
- package/framework/config.yaml +3 -3
- package/framework/constitution.md +31 -1
- package/framework/context/governance.md +37 -0
- package/framework/context/protocols.md +34 -0
- package/framework/context/quality.md +27 -0
- package/framework/context/root.md +24 -0
- package/framework/data/entity-registry.yaml +1 -1
- package/framework/domains/agents/architect.yaml +51 -0
- package/framework/domains/agents/brief.yaml +47 -0
- package/framework/domains/agents/brownfield-wu.yaml +49 -0
- package/framework/domains/agents/detail.yaml +47 -0
- package/framework/domains/agents/dev.yaml +49 -0
- package/framework/domains/agents/devops.yaml +43 -0
- package/framework/domains/agents/greenfield-wu.yaml +47 -0
- package/framework/domains/agents/orchestrator.yaml +49 -0
- package/framework/domains/agents/phases.yaml +47 -0
- package/framework/domains/agents/qa-implementation.yaml +43 -0
- package/framework/domains/agents/qa-planning.yaml +44 -0
- package/framework/domains/agents/tasks.yaml +48 -0
- package/framework/domains/agents/ux.yaml +50 -0
- package/framework/domains/constitution.yaml +77 -0
- package/framework/domains/global.yaml +64 -0
- package/framework/domains/workflows/brownfield-discovery.yaml +16 -0
- package/framework/domains/workflows/brownfield-fullstack.yaml +26 -0
- package/framework/domains/workflows/brownfield-service.yaml +22 -0
- package/framework/domains/workflows/brownfield-ui.yaml +22 -0
- package/framework/domains/workflows/greenfield-fullstack.yaml +26 -0
- package/framework/hooks/constitution-guard.js +101 -0
- package/framework/hooks/mode-governance.js +92 -0
- package/framework/hooks/model-governance.js +76 -0
- package/framework/hooks/prism-engine.js +89 -0
- package/framework/hooks/session-digest.js +60 -0
- package/framework/hooks/settings.json +44 -0
- 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/decision-engine.md +1 -1
- package/framework/migrations/v1.4-to-v2.0.yaml +167 -0
- package/framework/migrations/v2.0-to-v2.0.1.yaml +132 -0
- package/framework/orchestrator/chati.md +284 -6
- package/framework/tasks/architect-api-design.md +63 -0
- package/framework/tasks/architect-consolidate.md +47 -0
- package/framework/tasks/architect-db-design.md +73 -0
- package/framework/tasks/architect-design.md +95 -0
- package/framework/tasks/architect-security-review.md +62 -0
- package/framework/tasks/architect-stack-selection.md +53 -0
- package/framework/tasks/brief-consolidate.md +249 -0
- package/framework/tasks/brief-constraint-identify.md +277 -0
- package/framework/tasks/brief-extract-requirements.md +339 -0
- package/framework/tasks/brief-stakeholder-map.md +176 -0
- package/framework/tasks/brief-validate-completeness.md +121 -0
- package/framework/tasks/brownfield-wu-architecture-map.md +394 -0
- package/framework/tasks/brownfield-wu-deep-discovery.md +312 -0
- package/framework/tasks/brownfield-wu-dependency-scan.md +359 -0
- package/framework/tasks/brownfield-wu-migration-plan.md +483 -0
- package/framework/tasks/brownfield-wu-report.md +325 -0
- package/framework/tasks/brownfield-wu-risk-assess.md +424 -0
- package/framework/tasks/detail-acceptance-criteria.md +372 -0
- package/framework/tasks/detail-consolidate.md +138 -0
- package/framework/tasks/detail-edge-case-analysis.md +300 -0
- package/framework/tasks/detail-expand-prd.md +389 -0
- package/framework/tasks/detail-nfr-extraction.md +223 -0
- package/framework/tasks/dev-code-review.md +404 -0
- package/framework/tasks/dev-consolidate.md +543 -0
- package/framework/tasks/dev-debug.md +322 -0
- package/framework/tasks/dev-implement.md +252 -0
- package/framework/tasks/dev-iterate.md +411 -0
- package/framework/tasks/dev-pr-prepare.md +497 -0
- package/framework/tasks/dev-refactor.md +342 -0
- package/framework/tasks/dev-test-write.md +306 -0
- package/framework/tasks/devops-ci-setup.md +412 -0
- package/framework/tasks/devops-consolidate.md +712 -0
- package/framework/tasks/devops-deploy-config.md +598 -0
- package/framework/tasks/devops-monitoring-setup.md +658 -0
- package/framework/tasks/devops-release-prepare.md +673 -0
- package/framework/tasks/greenfield-wu-analyze-empty.md +169 -0
- package/framework/tasks/greenfield-wu-report.md +266 -0
- package/framework/tasks/greenfield-wu-scaffold-detection.md +203 -0
- package/framework/tasks/greenfield-wu-tech-stack-assess.md +255 -0
- package/framework/tasks/orchestrator-deviation.md +260 -0
- package/framework/tasks/orchestrator-escalate.md +276 -0
- package/framework/tasks/orchestrator-handoff.md +243 -0
- package/framework/tasks/orchestrator-health.md +372 -0
- package/framework/tasks/orchestrator-mode-switch.md +262 -0
- package/framework/tasks/orchestrator-resume.md +189 -0
- package/framework/tasks/orchestrator-route.md +169 -0
- package/framework/tasks/orchestrator-spawn-terminal.md +358 -0
- package/framework/tasks/orchestrator-status.md +260 -0
- package/framework/tasks/orchestrator-suggest-mode.md +372 -0
- package/framework/tasks/phases-breakdown.md +91 -0
- package/framework/tasks/phases-dependency-mapping.md +67 -0
- package/framework/tasks/phases-mvp-scoping.md +94 -0
- package/framework/tasks/qa-impl-consolidate.md +522 -0
- package/framework/tasks/qa-impl-performance-test.md +487 -0
- package/framework/tasks/qa-impl-regression-check.md +413 -0
- package/framework/tasks/qa-impl-sast-scan.md +402 -0
- package/framework/tasks/qa-impl-test-execute.md +344 -0
- package/framework/tasks/qa-impl-verdict.md +339 -0
- package/framework/tasks/qa-planning-consolidate.md +309 -0
- package/framework/tasks/qa-planning-coverage-plan.md +338 -0
- package/framework/tasks/qa-planning-gate-define.md +339 -0
- package/framework/tasks/qa-planning-risk-matrix.md +631 -0
- package/framework/tasks/qa-planning-test-strategy.md +217 -0
- package/framework/tasks/tasks-acceptance-write.md +75 -0
- package/framework/tasks/tasks-consolidate.md +57 -0
- package/framework/tasks/tasks-decompose.md +80 -0
- package/framework/tasks/tasks-estimate.md +66 -0
- package/framework/tasks/ux-a11y-check.md +49 -0
- package/framework/tasks/ux-component-map.md +55 -0
- package/framework/tasks/ux-consolidate.md +46 -0
- package/framework/tasks/ux-user-flow.md +46 -0
- package/framework/tasks/ux-wireframe.md +76 -0
- package/package.json +2 -2
- package/scripts/bundle-framework.js +2 -0
- package/scripts/changelog-generator.js +222 -0
- package/scripts/codebase-mapper.js +728 -0
- package/scripts/commit-message-generator.js +167 -0
- package/scripts/coverage-analyzer.js +260 -0
- package/scripts/dependency-analyzer.js +280 -0
- package/scripts/framework-analyzer.js +308 -0
- package/scripts/generate-constitution-domain.js +253 -0
- package/scripts/health-check.js +481 -0
- package/scripts/ide-sync.js +327 -0
- package/scripts/performance-analyzer.js +325 -0
- package/scripts/plan-tracker.js +278 -0
- package/scripts/populate-entity-registry.js +481 -0
- package/scripts/pr-review.js +317 -0
- package/scripts/rollback-manager.js +310 -0
- package/scripts/stuck-detector.js +343 -0
- package/scripts/test-quality-assessment.js +257 -0
- package/scripts/validate-agents.js +367 -0
- package/scripts/validate-tasks.js +465 -0
- package/src/autonomy/autonomous-gate.js +293 -0
- package/src/autonomy/index.js +51 -0
- package/src/autonomy/mode-manager.js +225 -0
- package/src/autonomy/mode-suggester.js +283 -0
- package/src/autonomy/progress-reporter.js +268 -0
- package/src/autonomy/safety-net.js +320 -0
- package/src/context/bracket-tracker.js +79 -0
- package/src/context/domain-loader.js +107 -0
- package/src/context/engine.js +144 -0
- package/src/context/formatter.js +184 -0
- package/src/context/index.js +4 -0
- package/src/context/layers/l0-constitution.js +28 -0
- package/src/context/layers/l1-global.js +37 -0
- package/src/context/layers/l2-agent.js +39 -0
- package/src/context/layers/l3-workflow.js +42 -0
- package/src/context/layers/l4-task.js +24 -0
- package/src/decision/analyzer.js +167 -0
- package/src/decision/engine.js +270 -0
- package/src/decision/index.js +38 -0
- package/src/decision/registry-healer.js +450 -0
- package/src/decision/registry-updater.js +330 -0
- package/src/gates/circuit-breaker.js +119 -0
- package/src/gates/g1-planning-complete.js +153 -0
- package/src/gates/g2-qa-planning.js +153 -0
- package/src/gates/g3-implementation.js +188 -0
- package/src/gates/g4-qa-implementation.js +207 -0
- package/src/gates/g5-deploy-ready.js +180 -0
- package/src/gates/gate-base.js +144 -0
- package/src/gates/index.js +46 -0
- package/src/installer/brownfield-upgrader.js +249 -0
- package/src/installer/core.js +82 -11
- package/src/installer/file-hasher.js +51 -0
- package/src/installer/manifest.js +117 -0
- package/src/installer/templates.js +17 -15
- package/src/installer/transaction.js +229 -0
- package/src/installer/validator.js +18 -1
- package/src/intelligence/registry-manager.js +2 -2
- package/src/memory/agent-memory.js +255 -0
- package/src/memory/gotchas-injector.js +72 -0
- package/src/memory/gotchas.js +361 -0
- package/src/memory/index.js +35 -0
- package/src/memory/search.js +233 -0
- package/src/memory/session-digest.js +239 -0
- package/src/merger/env-merger.js +112 -0
- package/src/merger/index.js +56 -0
- package/src/merger/replace-merger.js +51 -0
- package/src/merger/yaml-merger.js +127 -0
- package/src/orchestrator/agent-selector.js +285 -0
- package/src/orchestrator/deviation-handler.js +350 -0
- package/src/orchestrator/handoff-engine.js +271 -0
- package/src/orchestrator/index.js +67 -0
- package/src/orchestrator/intent-classifier.js +264 -0
- package/src/orchestrator/pipeline-manager.js +492 -0
- package/src/orchestrator/pipeline-state.js +223 -0
- package/src/orchestrator/session-manager.js +409 -0
- package/src/tasks/executor.js +195 -0
- package/src/tasks/handoff.js +226 -0
- package/src/tasks/index.js +4 -0
- package/src/tasks/loader.js +210 -0
- package/src/tasks/router.js +182 -0
- package/src/terminal/collector.js +216 -0
- package/src/terminal/index.js +30 -0
- package/src/terminal/isolation.js +129 -0
- package/src/terminal/monitor.js +277 -0
- package/src/terminal/spawner.js +269 -0
- package/src/upgrade/checker.js +1 -1
- package/src/wizard/i18n.js +3 -3
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: greenfield-wu-analyze-empty
|
|
3
|
+
agent: greenfield-wu
|
|
4
|
+
trigger: orchestrator
|
|
5
|
+
phase: clarity
|
|
6
|
+
requires_input: false
|
|
7
|
+
parallelizable: false
|
|
8
|
+
outputs: [wu-analysis.yaml]
|
|
9
|
+
handoff_to: greenfield-wu-scaffold-detection
|
|
10
|
+
autonomous_gate: true
|
|
11
|
+
criteria:
|
|
12
|
+
- Runtime environment detected (node, python, etc.)
|
|
13
|
+
- Existing configuration files catalogued
|
|
14
|
+
- Git state analyzed (initialized, remote, branches)
|
|
15
|
+
- Project root structure documented
|
|
16
|
+
---
|
|
17
|
+
# Analyze Empty Project
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
Perform initial analysis of an empty or minimal project directory to establish baseline environment and detect any existing configuration.
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
- Project directory exists
|
|
24
|
+
- User has read permissions
|
|
25
|
+
- Path to project root is known
|
|
26
|
+
|
|
27
|
+
## Steps
|
|
28
|
+
|
|
29
|
+
### 1. Detect Runtime Environment
|
|
30
|
+
- Check for runtime indicators:
|
|
31
|
+
- Node.js: `package.json`, `.nvmrc`, `node_modules/`
|
|
32
|
+
- Python: `requirements.txt`, `pyproject.toml`, `setup.py`, `venv/`, `.python-version`
|
|
33
|
+
- Ruby: `Gemfile`, `.ruby-version`
|
|
34
|
+
- PHP: `composer.json`
|
|
35
|
+
- Go: `go.mod`
|
|
36
|
+
- Rust: `Cargo.toml`
|
|
37
|
+
- Java: `pom.xml`, `build.gradle`
|
|
38
|
+
- Record detected runtimes and versions if specified
|
|
39
|
+
- Flag multi-runtime projects
|
|
40
|
+
|
|
41
|
+
### 2. Scan Configuration Files
|
|
42
|
+
- Search for common config files:
|
|
43
|
+
- Editor configs: `.editorconfig`, `.vscode/`, `.idea/`
|
|
44
|
+
- Linters: `.eslintrc*`, `.prettierrc*`, `pylint.rc`, `rubocop.yml`
|
|
45
|
+
- Type checkers: `tsconfig.json`, `mypy.ini`
|
|
46
|
+
- Build tools: `webpack.config.js`, `vite.config.ts`, `rollup.config.js`
|
|
47
|
+
- CI/CD: `.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`
|
|
48
|
+
- Docker: `Dockerfile`, `docker-compose.yml`
|
|
49
|
+
- Environment: `.env.example`, `.env.template`
|
|
50
|
+
- Catalog all found configurations with paths
|
|
51
|
+
|
|
52
|
+
### 3. Analyze Git State
|
|
53
|
+
- Check if git repository is initialized (`git rev-parse --git-dir`)
|
|
54
|
+
- If initialized:
|
|
55
|
+
- Get current branch (`git branch --show-current`)
|
|
56
|
+
- List all branches (`git branch -a`)
|
|
57
|
+
- Check for remote (`git remote -v`)
|
|
58
|
+
- Count commits (`git rev-list --count HEAD`)
|
|
59
|
+
- Check for uncommitted changes (`git status --porcelain`)
|
|
60
|
+
- If not initialized:
|
|
61
|
+
- Flag as new repository
|
|
62
|
+
- Recommend initialization
|
|
63
|
+
|
|
64
|
+
### 4. Document Directory Structure
|
|
65
|
+
- List top-level directories and files
|
|
66
|
+
- Identify standard patterns:
|
|
67
|
+
- `src/`, `lib/`, `app/` = source code
|
|
68
|
+
- `test/`, `tests/`, `__tests__/` = test files
|
|
69
|
+
- `docs/`, `documentation/` = documentation
|
|
70
|
+
- `public/`, `static/` = static assets
|
|
71
|
+
- `scripts/`, `bin/` = utility scripts
|
|
72
|
+
- `config/`, `configs/` = configuration
|
|
73
|
+
- Calculate total file count and directory depth
|
|
74
|
+
|
|
75
|
+
### 5. Detect Existing Frameworks
|
|
76
|
+
- Look for framework indicators:
|
|
77
|
+
- React: `react` in dependencies, `src/App.jsx`
|
|
78
|
+
- Next.js: `next.config.js`, `pages/` or `app/`
|
|
79
|
+
- Vue: `vue` in dependencies, `*.vue` files
|
|
80
|
+
- Angular: `angular.json`
|
|
81
|
+
- Express: `express` in dependencies
|
|
82
|
+
- Django: `manage.py`, `settings.py`
|
|
83
|
+
- Rails: `Rakefile`, `config/routes.rb`
|
|
84
|
+
- Record framework names and versions
|
|
85
|
+
|
|
86
|
+
### 6. Assess Project Maturity
|
|
87
|
+
- Calculate maturity score based on:
|
|
88
|
+
- Presence of tests (0-25 points)
|
|
89
|
+
- CI/CD configuration (0-25 points)
|
|
90
|
+
- Documentation (0-25 points)
|
|
91
|
+
- Linting/formatting setup (0-25 points)
|
|
92
|
+
- Classify as: empty (0-10), minimal (11-40), basic (41-70), mature (71-100)
|
|
93
|
+
|
|
94
|
+
### 7. Identify Missing Essentials
|
|
95
|
+
- Check for critical files:
|
|
96
|
+
- `README.md` - project documentation
|
|
97
|
+
- `LICENSE` - licensing information
|
|
98
|
+
- `.gitignore` - git exclusions
|
|
99
|
+
- `CONTRIBUTING.md` - contribution guidelines (for open source)
|
|
100
|
+
- Flag missing files as recommendations
|
|
101
|
+
|
|
102
|
+
### 8. Compile Analysis Report
|
|
103
|
+
- Aggregate all findings into structured YAML
|
|
104
|
+
- Include confidence scores for each detection
|
|
105
|
+
- Add recommendations for next steps
|
|
106
|
+
|
|
107
|
+
## Decision Points
|
|
108
|
+
- **Multi-Runtime Detected**: Ask user which runtime is primary
|
|
109
|
+
- **No Runtime Detected**: Ask user to specify intended runtime
|
|
110
|
+
- **Git Remote Mismatch**: If remote exists but doesn't match user's organization, flag for review
|
|
111
|
+
|
|
112
|
+
## Error Handling
|
|
113
|
+
- **Permission Denied**: Request user to check directory permissions or run with appropriate access
|
|
114
|
+
- **Invalid Project Path**: Verify path exists and retry, or ask user to provide correct path
|
|
115
|
+
- **Git Not Installed**: Flag git operations as skipped, continue with other analysis
|
|
116
|
+
- **Corrupted Config Files**: Note files that cannot be parsed, continue analysis
|
|
117
|
+
|
|
118
|
+
## Output Format
|
|
119
|
+
```yaml
|
|
120
|
+
# wu-analysis.yaml
|
|
121
|
+
project_path: /absolute/path/to/project
|
|
122
|
+
analysis_timestamp: 2026-02-13T10:30:00Z
|
|
123
|
+
runtime:
|
|
124
|
+
detected: [node, python]
|
|
125
|
+
primary: node
|
|
126
|
+
versions:
|
|
127
|
+
node: "22.22.0"
|
|
128
|
+
npm: "10.5.0"
|
|
129
|
+
configuration_files:
|
|
130
|
+
- path: package.json
|
|
131
|
+
type: npm_manifest
|
|
132
|
+
valid: true
|
|
133
|
+
- path: tsconfig.json
|
|
134
|
+
type: typescript_config
|
|
135
|
+
valid: true
|
|
136
|
+
git:
|
|
137
|
+
initialized: true
|
|
138
|
+
branch: main
|
|
139
|
+
remote: origin
|
|
140
|
+
remote_url: https://github.com/user/repo.git
|
|
141
|
+
commit_count: 3
|
|
142
|
+
uncommitted_changes: false
|
|
143
|
+
structure:
|
|
144
|
+
directories: [src, tests, docs]
|
|
145
|
+
file_count: 12
|
|
146
|
+
max_depth: 3
|
|
147
|
+
frameworks:
|
|
148
|
+
- name: react
|
|
149
|
+
version: "18.2.0"
|
|
150
|
+
- name: vite
|
|
151
|
+
version: "5.0.0"
|
|
152
|
+
maturity:
|
|
153
|
+
score: 35
|
|
154
|
+
classification: minimal
|
|
155
|
+
breakdown:
|
|
156
|
+
tests: 10
|
|
157
|
+
ci_cd: 0
|
|
158
|
+
docs: 15
|
|
159
|
+
linting: 10
|
|
160
|
+
missing_essentials:
|
|
161
|
+
- README.md
|
|
162
|
+
- LICENSE
|
|
163
|
+
- .gitignore
|
|
164
|
+
recommendations:
|
|
165
|
+
- Add README.md with project description
|
|
166
|
+
- Initialize .gitignore for Node.js
|
|
167
|
+
- Set up basic testing framework
|
|
168
|
+
confidence: 95
|
|
169
|
+
```
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: greenfield-wu-report
|
|
3
|
+
agent: greenfield-wu
|
|
4
|
+
trigger: greenfield-wu-tech-stack-assess
|
|
5
|
+
phase: clarity
|
|
6
|
+
requires_input: false
|
|
7
|
+
parallelizable: false
|
|
8
|
+
outputs: [wu-report.yaml]
|
|
9
|
+
handoff_to: brief
|
|
10
|
+
autonomous_gate: true
|
|
11
|
+
criteria:
|
|
12
|
+
- All analysis artifacts consolidated
|
|
13
|
+
- Clear recommendations provided
|
|
14
|
+
- Risk assessment included
|
|
15
|
+
- Next steps documented
|
|
16
|
+
---
|
|
17
|
+
# Compile Greenfield WU Report
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
Consolidate all greenfield analysis findings into a comprehensive Work Understanding report that provides clear recommendations and next steps.
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
- `wu-analysis.yaml` exists
|
|
24
|
+
- `scaffold-report.yaml` exists
|
|
25
|
+
- `tech-stack.yaml` exists
|
|
26
|
+
|
|
27
|
+
## Steps
|
|
28
|
+
|
|
29
|
+
### 1. Load All Analysis Artifacts
|
|
30
|
+
- Read `wu-analysis.yaml` for environment and maturity assessment
|
|
31
|
+
- Read `scaffold-report.yaml` for scaffolding recommendations
|
|
32
|
+
- Read `tech-stack.yaml` for complete stack recommendations
|
|
33
|
+
- Verify all files are valid YAML and contain expected keys
|
|
34
|
+
|
|
35
|
+
### 2. Create Executive Summary
|
|
36
|
+
Write a 3-5 sentence summary covering:
|
|
37
|
+
- Current project state (empty, minimal, or basic)
|
|
38
|
+
- Detected runtime and existing setup (if any)
|
|
39
|
+
- Recommended scaffolding tool
|
|
40
|
+
- Recommended tech stack highlights
|
|
41
|
+
- Estimated time to initial scaffold
|
|
42
|
+
|
|
43
|
+
### 3. Consolidate Environment Analysis
|
|
44
|
+
Summarize from `wu-analysis.yaml`:
|
|
45
|
+
- **Project Path**: Absolute path to project
|
|
46
|
+
- **Current State**: Empty, minimal, or basic with maturity score
|
|
47
|
+
- **Runtime Environment**: Detected runtimes and versions
|
|
48
|
+
- **Git Status**: Initialized, branch, remote status
|
|
49
|
+
- **Existing Configuration**: List of found config files
|
|
50
|
+
- **Missing Essentials**: Critical files not present
|
|
51
|
+
|
|
52
|
+
### 4. Consolidate Scaffolding Recommendations
|
|
53
|
+
Summarize from `scaffold-report.yaml`:
|
|
54
|
+
- **Recommended Tool**: Top choice with score
|
|
55
|
+
- **Command to Run**: Exact scaffolding command
|
|
56
|
+
- **Alternatives**: Brief mention of alternatives considered
|
|
57
|
+
- **Justification**: Why this tool was chosen
|
|
58
|
+
|
|
59
|
+
### 5. Consolidate Tech Stack
|
|
60
|
+
Summarize from `tech-stack.yaml`:
|
|
61
|
+
- **Frontend**: Framework, UI library, build tool
|
|
62
|
+
- **Backend**: Runtime, framework, API style
|
|
63
|
+
- **Database**: Primary database and cache
|
|
64
|
+
- **Infrastructure**: Hosting and CI/CD
|
|
65
|
+
- **Key Justifications**: Major reasoning for choices
|
|
66
|
+
|
|
67
|
+
### 6. Aggregate Risk Assessment
|
|
68
|
+
Compile all risks mentioned across artifacts:
|
|
69
|
+
- Runtime/version compatibility risks
|
|
70
|
+
- Tool maintenance risks
|
|
71
|
+
- Team expertise gaps
|
|
72
|
+
- Vendor lock-in concerns
|
|
73
|
+
- Performance bottlenecks
|
|
74
|
+
- Security considerations
|
|
75
|
+
For each risk:
|
|
76
|
+
- Severity: Low, Medium, High, Critical
|
|
77
|
+
- Likelihood: Low, Medium, High
|
|
78
|
+
- Impact: What happens if risk materializes
|
|
79
|
+
- Mitigation: How to address or reduce risk
|
|
80
|
+
|
|
81
|
+
### 7. Calculate Confidence Score
|
|
82
|
+
Determine overall confidence (0-100) based on:
|
|
83
|
+
- Environment detection confidence (from wu-analysis.yaml)
|
|
84
|
+
- Availability of clear requirements (if ambiguous, reduce confidence)
|
|
85
|
+
- Maturity of recommended tools (bleeding edge = lower confidence)
|
|
86
|
+
- Team expertise match (unknown team = lower confidence)
|
|
87
|
+
- Compatibility verification (verified = higher confidence)
|
|
88
|
+
|
|
89
|
+
### 8. Define Next Steps
|
|
90
|
+
Provide ordered list of immediate actions:
|
|
91
|
+
1. **Review and Approve**: User reviews this report and tech stack
|
|
92
|
+
2. **Run Scaffold Command**: Execute recommended scaffolding
|
|
93
|
+
3. **Install Dependencies**: Any additional packages needed
|
|
94
|
+
4. **Configure Tooling**: Set up linters, formatters, type checkers
|
|
95
|
+
5. **Initialize Git** (if not already): Commit initial scaffold
|
|
96
|
+
6. **Create Brief**: Move to requirements gathering phase
|
|
97
|
+
|
|
98
|
+
### 9. Add Recommendations
|
|
99
|
+
Include actionable recommendations:
|
|
100
|
+
- **Immediate**: Actions to take before writing code
|
|
101
|
+
- **Short-term**: Set up during first sprint (CI/CD, testing)
|
|
102
|
+
- **Medium-term**: Add as project matures (monitoring, documentation site)
|
|
103
|
+
- **Long-term**: Consider for scale (microservices, caching layers)
|
|
104
|
+
|
|
105
|
+
### 10. Generate Final Report
|
|
106
|
+
Combine all sections into structured YAML with clear hierarchy and human-readable formatting.
|
|
107
|
+
|
|
108
|
+
## Decision Points
|
|
109
|
+
- **Low Confidence (<70%)**: Flag the report for user review and ask if additional analysis is needed before proceeding
|
|
110
|
+
- **High Risk Identified**: If any critical risks found, highlight prominently and recommend risk mitigation tasks before development
|
|
111
|
+
- **Conflicting Data**: If analysis artifacts have conflicting information (e.g., scaffold-report suggests different runtime than wu-analysis), flag conflict and ask for clarification
|
|
112
|
+
|
|
113
|
+
## Error Handling
|
|
114
|
+
- **Missing Artifact**: If any prerequisite YAML file is missing, halt and request that previous task be completed
|
|
115
|
+
- **Invalid YAML**: If any artifact cannot be parsed, log error with file path and line number, attempt to continue with partial data
|
|
116
|
+
- **Empty Recommendations**: If tech-stack.yaml has no recommendations, flag as error and request tech-stack-assess be re-run
|
|
117
|
+
- **Circular Dependencies**: If next_steps reference tasks that reference back, flag as planning error
|
|
118
|
+
|
|
119
|
+
## Output Format
|
|
120
|
+
```yaml
|
|
121
|
+
# wu-report.yaml
|
|
122
|
+
report_type: greenfield
|
|
123
|
+
timestamp: 2026-02-13T10:45:00Z
|
|
124
|
+
executive_summary: |
|
|
125
|
+
Empty Node.js project detected with no existing framework. Recommended scaffolding
|
|
126
|
+
with Vite for React + TypeScript. Full-stack architecture recommended with
|
|
127
|
+
Fastify backend, PostgreSQL database, and deployment on Vercel + Railway.
|
|
128
|
+
Estimated 30 minutes to initial scaffold, 2-4 hours to complete tooling setup.
|
|
129
|
+
|
|
130
|
+
environment:
|
|
131
|
+
project_path: /Users/user/projects/my-app
|
|
132
|
+
current_state: empty
|
|
133
|
+
maturity_score: 0
|
|
134
|
+
runtime:
|
|
135
|
+
primary: node
|
|
136
|
+
version: "22.22.0"
|
|
137
|
+
git:
|
|
138
|
+
initialized: false
|
|
139
|
+
recommendation: Initialize after scaffold
|
|
140
|
+
existing_config: []
|
|
141
|
+
missing_essentials:
|
|
142
|
+
- README.md
|
|
143
|
+
- .gitignore
|
|
144
|
+
- LICENSE
|
|
145
|
+
|
|
146
|
+
scaffolding:
|
|
147
|
+
recommended_tool: vite
|
|
148
|
+
command: npm create vite@latest my-app -- --template react-ts
|
|
149
|
+
justification: |
|
|
150
|
+
Fast build times, modern architecture, excellent TypeScript support.
|
|
151
|
+
Minimal but extensible starting point for React applications.
|
|
152
|
+
alternatives:
|
|
153
|
+
- create-next-app: Full-stack needs
|
|
154
|
+
- create-react-app: Traditional setup (slower builds)
|
|
155
|
+
estimated_time: 5 minutes
|
|
156
|
+
|
|
157
|
+
tech_stack:
|
|
158
|
+
frontend:
|
|
159
|
+
framework: React 18.2
|
|
160
|
+
ui_library: shadcn/ui
|
|
161
|
+
build_tool: Vite
|
|
162
|
+
state: TanStack Query
|
|
163
|
+
backend:
|
|
164
|
+
runtime: Node.js 22.x
|
|
165
|
+
framework: Fastify
|
|
166
|
+
orm: Prisma
|
|
167
|
+
database:
|
|
168
|
+
primary: PostgreSQL 16
|
|
169
|
+
cache: Redis 7
|
|
170
|
+
infrastructure:
|
|
171
|
+
hosting_frontend: Vercel
|
|
172
|
+
hosting_backend: Railway
|
|
173
|
+
ci_cd: GitHub Actions
|
|
174
|
+
justification_summary: |
|
|
175
|
+
Modern React stack prioritizing developer experience and type safety.
|
|
176
|
+
Node.js backend for shared language. PostgreSQL for data integrity.
|
|
177
|
+
Vercel + Railway for simple deployment with good free tiers.
|
|
178
|
+
|
|
179
|
+
risks:
|
|
180
|
+
- id: R1
|
|
181
|
+
description: Team unfamiliarity with Fastify
|
|
182
|
+
severity: medium
|
|
183
|
+
likelihood: medium
|
|
184
|
+
impact: Slower initial backend development
|
|
185
|
+
mitigation: Provide Fastify learning resources, leverage strong documentation
|
|
186
|
+
- id: R2
|
|
187
|
+
description: Node.js single-threaded performance limits
|
|
188
|
+
severity: low
|
|
189
|
+
likelihood: low
|
|
190
|
+
impact: May need to refactor under extreme load
|
|
191
|
+
mitigation: Use clustering, profile early, consider Go microservices for hot paths
|
|
192
|
+
- id: R3
|
|
193
|
+
description: Rapid JavaScript ecosystem churn
|
|
194
|
+
severity: medium
|
|
195
|
+
likelihood: high
|
|
196
|
+
impact: Frequent breaking changes requiring updates
|
|
197
|
+
mitigation: Pin versions carefully, allocate time for quarterly dependency updates
|
|
198
|
+
|
|
199
|
+
confidence: 85
|
|
200
|
+
confidence_breakdown:
|
|
201
|
+
environment_detection: 95
|
|
202
|
+
requirements_clarity: 70
|
|
203
|
+
tool_maturity: 90
|
|
204
|
+
team_expertise: 75
|
|
205
|
+
compatibility: 95
|
|
206
|
+
|
|
207
|
+
next_steps:
|
|
208
|
+
- step: 1
|
|
209
|
+
action: Review and approve WU report
|
|
210
|
+
owner: user
|
|
211
|
+
estimated_time: 15 minutes
|
|
212
|
+
- step: 2
|
|
213
|
+
action: Run scaffolding command
|
|
214
|
+
command: npm create vite@latest my-app -- --template react-ts
|
|
215
|
+
owner: greenfield-wu
|
|
216
|
+
estimated_time: 5 minutes
|
|
217
|
+
- step: 3
|
|
218
|
+
action: Install additional dependencies
|
|
219
|
+
commands:
|
|
220
|
+
- cd my-app && npm install
|
|
221
|
+
- npm install -D prettier eslint
|
|
222
|
+
estimated_time: 3 minutes
|
|
223
|
+
- step: 4
|
|
224
|
+
action: Initialize git repository
|
|
225
|
+
commands:
|
|
226
|
+
- git init
|
|
227
|
+
- git add .
|
|
228
|
+
- git commit -m "chore: initial scaffold"
|
|
229
|
+
estimated_time: 2 minutes
|
|
230
|
+
- step: 5
|
|
231
|
+
action: Transition to brief agent for requirements gathering
|
|
232
|
+
owner: orchestrator
|
|
233
|
+
handoff: brief
|
|
234
|
+
|
|
235
|
+
recommendations:
|
|
236
|
+
immediate:
|
|
237
|
+
- Create .env.example for environment variable documentation
|
|
238
|
+
- Set up .gitignore for Node.js (node_modules, .env, dist)
|
|
239
|
+
- Add README.md with setup instructions
|
|
240
|
+
short_term:
|
|
241
|
+
- Configure GitHub Actions for CI (lint, test, build)
|
|
242
|
+
- Set up Prettier and ESLint with pre-commit hooks
|
|
243
|
+
- Add Vitest and React Testing Library
|
|
244
|
+
- Create basic component structure (components/, pages/, utils/)
|
|
245
|
+
medium_term:
|
|
246
|
+
- Set up Sentry or similar error tracking
|
|
247
|
+
- Add Storybook for component documentation
|
|
248
|
+
- Create API integration layer with TanStack Query
|
|
249
|
+
- Set up database with Prisma schema
|
|
250
|
+
long_term:
|
|
251
|
+
- Consider monorepo structure if multiple apps needed
|
|
252
|
+
- Implement monitoring and alerting
|
|
253
|
+
- Add end-to-end testing with Playwright
|
|
254
|
+
- Evaluate micro-frontend architecture for scale
|
|
255
|
+
|
|
256
|
+
artifacts_generated:
|
|
257
|
+
- wu-analysis.yaml
|
|
258
|
+
- scaffold-report.yaml
|
|
259
|
+
- tech-stack.yaml
|
|
260
|
+
- wu-report.yaml
|
|
261
|
+
|
|
262
|
+
handoff_to: brief
|
|
263
|
+
handoff_context: |
|
|
264
|
+
Greenfield project setup complete. Recommended stack defined. Next phase
|
|
265
|
+
is requirements gathering to define features and scope before development.
|
|
266
|
+
```
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: greenfield-wu-scaffold-detection
|
|
3
|
+
agent: greenfield-wu
|
|
4
|
+
trigger: greenfield-wu-analyze-empty
|
|
5
|
+
phase: clarity
|
|
6
|
+
requires_input: false
|
|
7
|
+
parallelizable: false
|
|
8
|
+
outputs: [scaffold-report.yaml]
|
|
9
|
+
handoff_to: greenfield-wu-tech-stack-assess
|
|
10
|
+
autonomous_gate: true
|
|
11
|
+
criteria:
|
|
12
|
+
- All available scaffolding tools identified for detected runtime
|
|
13
|
+
- Tool compatibility assessed
|
|
14
|
+
- Recommendations ranked by suitability
|
|
15
|
+
---
|
|
16
|
+
# Detect Project Scaffolding Tools
|
|
17
|
+
|
|
18
|
+
## Purpose
|
|
19
|
+
Identify and evaluate available project scaffolding tools that match the detected runtime environment and project requirements.
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
- `wu-analysis.yaml` exists with runtime detection
|
|
23
|
+
- Internet connectivity for checking tool availability (optional)
|
|
24
|
+
- Knowledge of current project requirements
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
### 1. Load Runtime Context
|
|
29
|
+
- Read `wu-analysis.yaml` to get detected runtime(s)
|
|
30
|
+
- Extract primary runtime and version
|
|
31
|
+
- Note any existing frameworks or build tools
|
|
32
|
+
|
|
33
|
+
### 2. Map Runtime to Scaffolding Tools
|
|
34
|
+
- **Node.js/JavaScript/TypeScript**:
|
|
35
|
+
- `create-react-app` - React applications
|
|
36
|
+
- `vite` - Fast modern build tool (React, Vue, Svelte, Vanilla)
|
|
37
|
+
- `create-next-app` - Next.js applications
|
|
38
|
+
- `create-vue` - Vue.js applications
|
|
39
|
+
- `@angular/cli` - Angular applications
|
|
40
|
+
- `create-remix` - Remix applications
|
|
41
|
+
- `create-t3-app` - Full-stack TypeScript (Next.js + tRPC + Tailwind + Prisma)
|
|
42
|
+
- `create-expo-app` - React Native/Expo mobile apps
|
|
43
|
+
- `express-generator` - Express.js backend
|
|
44
|
+
- `nest-cli` - NestJS backend
|
|
45
|
+
- **Python**:
|
|
46
|
+
- `django-admin startproject` - Django web framework
|
|
47
|
+
- `flask` - Flask microframework (manual setup)
|
|
48
|
+
- `fastapi` - FastAPI modern API framework
|
|
49
|
+
- `cookiecutter` - Template-based project generator
|
|
50
|
+
- `poetry new` - Poetry package manager with project scaffolding
|
|
51
|
+
- **Ruby**:
|
|
52
|
+
- `rails new` - Ruby on Rails
|
|
53
|
+
- `hanami new` - Hanami framework
|
|
54
|
+
- `sinatra` - Sinatra microframework (manual setup)
|
|
55
|
+
- **PHP**:
|
|
56
|
+
- `composer create-project laravel/laravel` - Laravel
|
|
57
|
+
- `symfony new` - Symfony
|
|
58
|
+
- **Go**:
|
|
59
|
+
- `go mod init` - Go modules (manual structure)
|
|
60
|
+
- `gonew` - Go project templates
|
|
61
|
+
- **Rust**:
|
|
62
|
+
- `cargo new` - Rust binary/library
|
|
63
|
+
- **Java**:
|
|
64
|
+
- Spring Initializr - Spring Boot
|
|
65
|
+
- Maven archetypes
|
|
66
|
+
- Gradle init
|
|
67
|
+
|
|
68
|
+
### 3. Filter by Project Type
|
|
69
|
+
- Determine project type from requirements or ask user:
|
|
70
|
+
- Web application (frontend)
|
|
71
|
+
- Web application (fullstack)
|
|
72
|
+
- API/Backend service
|
|
73
|
+
- Mobile application
|
|
74
|
+
- CLI tool
|
|
75
|
+
- Library/Package
|
|
76
|
+
- Remove incompatible scaffolding tools
|
|
77
|
+
|
|
78
|
+
### 4. Assess Tool Compatibility
|
|
79
|
+
For each remaining tool, evaluate:
|
|
80
|
+
- **Version Compatibility**: Does it support the detected runtime version?
|
|
81
|
+
- **Maintenance Status**: Is the tool actively maintained? (check last release date)
|
|
82
|
+
- **Community Size**: NPM downloads, GitHub stars, community activity
|
|
83
|
+
- **Flexibility**: How much control does it give vs. abstraction?
|
|
84
|
+
- **Ejection Support**: Can you customize deeply or "eject"?
|
|
85
|
+
- **TypeScript Support**: Native or via plugin?
|
|
86
|
+
- **Testing Setup**: Does it include testing framework?
|
|
87
|
+
- **Build Performance**: Known for fast/slow builds?
|
|
88
|
+
|
|
89
|
+
### 5. Check for Existing Scaffolding
|
|
90
|
+
- If `wu-analysis.yaml` shows existing framework:
|
|
91
|
+
- Identify the scaffolding tool that was likely used
|
|
92
|
+
- Check if re-scaffolding is needed or if incremental setup is better
|
|
93
|
+
- Flag if existing setup is non-standard
|
|
94
|
+
|
|
95
|
+
### 6. Rank Recommendations
|
|
96
|
+
- Assign score (0-100) to each tool based on:
|
|
97
|
+
- Match to project requirements (40 points)
|
|
98
|
+
- Community support (20 points)
|
|
99
|
+
- Maintenance status (15 points)
|
|
100
|
+
- TypeScript support if needed (10 points)
|
|
101
|
+
- Build performance (10 points)
|
|
102
|
+
- Developer experience (5 points)
|
|
103
|
+
- Sort by score descending
|
|
104
|
+
- Select top 3 recommendations
|
|
105
|
+
|
|
106
|
+
### 7. Document Trade-offs
|
|
107
|
+
For each recommended tool, document:
|
|
108
|
+
- **Pros**: What it does well
|
|
109
|
+
- **Cons**: Known limitations or issues
|
|
110
|
+
- **Use Case**: When to choose this tool
|
|
111
|
+
- **Learning Curve**: Beginner-friendly vs. advanced
|
|
112
|
+
- **Vendor Lock-in**: How easy to migrate away
|
|
113
|
+
|
|
114
|
+
### 8. Generate Scaffold Commands
|
|
115
|
+
For each recommendation, provide:
|
|
116
|
+
- Exact command to run
|
|
117
|
+
- Required prerequisites (global installs, etc.)
|
|
118
|
+
- Expected output
|
|
119
|
+
- Post-scaffold next steps
|
|
120
|
+
|
|
121
|
+
## Decision Points
|
|
122
|
+
- **Multiple Runtimes**: If project uses multiple runtimes (e.g., Node + Python), ask user which runtime should be primary for scaffolding
|
|
123
|
+
- **Existing Framework Conflict**: If analysis detected existing framework but user wants to scaffold fresh, confirm they want to overwrite
|
|
124
|
+
- **Opinionated vs. Flexible**: If requirements are unclear, ask user preference for opinionated (batteries-included) vs. flexible (minimal) setup
|
|
125
|
+
|
|
126
|
+
## Error Handling
|
|
127
|
+
- **Unknown Runtime**: If runtime not recognized, skip scaffold detection and document manual setup requirement
|
|
128
|
+
- **No Tools Available**: If no scaffolding tools exist for the runtime, provide manual project structure recommendations
|
|
129
|
+
- **Version Mismatch**: If detected runtime version is too old for modern scaffolding tools, warn user and suggest upgrade path
|
|
130
|
+
- **Conflicting Requirements**: If requirements suggest incompatible tools (e.g., React + Vue), flag conflict and request clarification
|
|
131
|
+
|
|
132
|
+
## Output Format
|
|
133
|
+
```yaml
|
|
134
|
+
# scaffold-report.yaml
|
|
135
|
+
runtime: node
|
|
136
|
+
runtime_version: "22.22.0"
|
|
137
|
+
project_type: web_application_frontend
|
|
138
|
+
existing_scaffold: null
|
|
139
|
+
available_tools:
|
|
140
|
+
- name: vite
|
|
141
|
+
score: 95
|
|
142
|
+
command: npm create vite@latest my-app -- --template react-ts
|
|
143
|
+
prerequisites: [npm >= 7.0.0]
|
|
144
|
+
pros:
|
|
145
|
+
- Extremely fast HMR and build times
|
|
146
|
+
- Modern ESM-based architecture
|
|
147
|
+
- First-class TypeScript support
|
|
148
|
+
- Framework-agnostic (React, Vue, Svelte, etc.)
|
|
149
|
+
cons:
|
|
150
|
+
- Less opinionated than CRA
|
|
151
|
+
- Smaller ecosystem of plugins vs. webpack
|
|
152
|
+
use_case: Modern React/Vue/Svelte apps prioritizing build speed
|
|
153
|
+
learning_curve: easy
|
|
154
|
+
vendor_lockin: low
|
|
155
|
+
compatibility:
|
|
156
|
+
node: ">= 18.0.0"
|
|
157
|
+
typescript: true
|
|
158
|
+
testing: vitest
|
|
159
|
+
maintenance:
|
|
160
|
+
last_release: 2026-01-15
|
|
161
|
+
status: active
|
|
162
|
+
community_size: high
|
|
163
|
+
- name: create-next-app
|
|
164
|
+
score: 88
|
|
165
|
+
command: npx create-next-app@latest my-app --typescript --tailwind --app
|
|
166
|
+
prerequisites: []
|
|
167
|
+
pros:
|
|
168
|
+
- Full-stack framework (SSR, API routes, file-based routing)
|
|
169
|
+
- Excellent developer experience
|
|
170
|
+
- Strong community and Vercel backing
|
|
171
|
+
cons:
|
|
172
|
+
- More complex than pure React
|
|
173
|
+
- Some vendor lock-in to Next.js patterns
|
|
174
|
+
use_case: Full-stack React apps with SSR/SSG needs
|
|
175
|
+
learning_curve: moderate
|
|
176
|
+
vendor_lockin: medium
|
|
177
|
+
- name: create-react-app
|
|
178
|
+
score: 72
|
|
179
|
+
command: npx create-react-app my-app --template typescript
|
|
180
|
+
prerequisites: []
|
|
181
|
+
pros:
|
|
182
|
+
- Zero config setup
|
|
183
|
+
- Battle-tested and stable
|
|
184
|
+
- Large ecosystem
|
|
185
|
+
cons:
|
|
186
|
+
- Slow build times
|
|
187
|
+
- Maintenance has slowed
|
|
188
|
+
- Difficult to customize without ejecting
|
|
189
|
+
use_case: Traditional React SPAs, learning projects
|
|
190
|
+
learning_curve: easy
|
|
191
|
+
vendor_lockin: low
|
|
192
|
+
recommended: vite
|
|
193
|
+
reasoning: |
|
|
194
|
+
Vite offers the best balance of performance, flexibility, and modern architecture
|
|
195
|
+
for a new React TypeScript project. Its HMR is significantly faster than alternatives,
|
|
196
|
+
and it provides a minimal but extensible starting point.
|
|
197
|
+
next_steps:
|
|
198
|
+
- Run scaffold command
|
|
199
|
+
- Install additional dependencies if needed
|
|
200
|
+
- Configure linting and formatting
|
|
201
|
+
- Set up testing framework (Vitest recommended)
|
|
202
|
+
timestamp: 2026-02-13T10:35:00Z
|
|
203
|
+
```
|