wogiflow 1.0.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/.workflow/agents/reviewer.md +81 -0
- package/.workflow/agents/security.md +94 -0
- package/.workflow/agents/story-writer.md +58 -0
- package/.workflow/bridges/base-bridge.js +395 -0
- package/.workflow/bridges/claude-bridge.js +434 -0
- package/.workflow/bridges/index.js +130 -0
- package/.workflow/lib/assumption-detector.js +481 -0
- package/.workflow/lib/config-substitution.js +371 -0
- package/.workflow/lib/failure-categories.js +478 -0
- package/.workflow/state/app-map.md.template +15 -0
- package/.workflow/state/architecture.md.template +24 -0
- package/.workflow/state/component-index.json.template +5 -0
- package/.workflow/state/decisions.md.template +15 -0
- package/.workflow/state/feedback-patterns.md.template +9 -0
- package/.workflow/state/knowledge-sync.json.template +6 -0
- package/.workflow/state/progress.md.template +14 -0
- package/.workflow/state/ready.json.template +7 -0
- package/.workflow/state/request-log.md.template +14 -0
- package/.workflow/state/session-state.json.template +11 -0
- package/.workflow/state/stack.md.template +33 -0
- package/.workflow/state/testing.md.template +36 -0
- package/.workflow/templates/claude-md.hbs +257 -0
- package/.workflow/templates/correction-report.md +67 -0
- package/.workflow/templates/gemini-md.hbs +52 -0
- package/README.md +1802 -0
- package/bin/flow +205 -0
- package/lib/index.js +33 -0
- package/lib/installer.js +467 -0
- package/lib/release-channel.js +269 -0
- package/lib/skill-registry.js +526 -0
- package/lib/upgrader.js +401 -0
- package/lib/utils.js +305 -0
- package/package.json +64 -0
- package/scripts/flow +985 -0
- package/scripts/flow-adaptive-learning.js +1259 -0
- package/scripts/flow-aggregate.js +488 -0
- package/scripts/flow-archive +133 -0
- package/scripts/flow-auto-context.js +1015 -0
- package/scripts/flow-auto-learn.js +615 -0
- package/scripts/flow-bridge.js +223 -0
- package/scripts/flow-browser-suggest.js +316 -0
- package/scripts/flow-bug.js +247 -0
- package/scripts/flow-cascade.js +711 -0
- package/scripts/flow-changelog +85 -0
- package/scripts/flow-checkpoint.js +483 -0
- package/scripts/flow-cli.js +403 -0
- package/scripts/flow-code-intelligence.js +760 -0
- package/scripts/flow-complexity.js +502 -0
- package/scripts/flow-config-set.js +152 -0
- package/scripts/flow-constants.js +157 -0
- package/scripts/flow-context +152 -0
- package/scripts/flow-context-init.js +482 -0
- package/scripts/flow-context-monitor.js +384 -0
- package/scripts/flow-context-scoring.js +886 -0
- package/scripts/flow-correct.js +458 -0
- package/scripts/flow-damage-control.js +985 -0
- package/scripts/flow-deps +101 -0
- package/scripts/flow-diff.js +700 -0
- package/scripts/flow-done +151 -0
- package/scripts/flow-done.js +489 -0
- package/scripts/flow-durable-session.js +1541 -0
- package/scripts/flow-entropy-monitor.js +345 -0
- package/scripts/flow-export-profile +349 -0
- package/scripts/flow-export-scanner.js +1046 -0
- package/scripts/flow-figma-confirm.js +400 -0
- package/scripts/flow-figma-extract.js +496 -0
- package/scripts/flow-figma-generate.js +683 -0
- package/scripts/flow-figma-index.js +909 -0
- package/scripts/flow-figma-match.js +617 -0
- package/scripts/flow-figma-mcp-server.js +518 -0
- package/scripts/flow-figma-pipeline.js +414 -0
- package/scripts/flow-file-ops.js +301 -0
- package/scripts/flow-gate-confidence.js +825 -0
- package/scripts/flow-guided-edit.js +659 -0
- package/scripts/flow-health +185 -0
- package/scripts/flow-health.js +413 -0
- package/scripts/flow-hooks.js +556 -0
- package/scripts/flow-http-client.js +249 -0
- package/scripts/flow-hybrid-detect.js +167 -0
- package/scripts/flow-hybrid-interactive.js +591 -0
- package/scripts/flow-hybrid-test.js +152 -0
- package/scripts/flow-import-profile +439 -0
- package/scripts/flow-init +253 -0
- package/scripts/flow-instruction-richness.js +827 -0
- package/scripts/flow-jira-integration.js +579 -0
- package/scripts/flow-knowledge-router.js +522 -0
- package/scripts/flow-knowledge-sync.js +589 -0
- package/scripts/flow-linear-integration.js +631 -0
- package/scripts/flow-links.js +774 -0
- package/scripts/flow-log-manager.js +559 -0
- package/scripts/flow-loop-enforcer.js +1246 -0
- package/scripts/flow-loop-retry-learning.js +630 -0
- package/scripts/flow-lsp.js +923 -0
- package/scripts/flow-map-index +348 -0
- package/scripts/flow-map-sync +201 -0
- package/scripts/flow-memory-blocks.js +668 -0
- package/scripts/flow-memory-compactor.js +350 -0
- package/scripts/flow-memory-db.js +1110 -0
- package/scripts/flow-memory-sync.js +484 -0
- package/scripts/flow-metrics.js +353 -0
- package/scripts/flow-migrate-ids.js +370 -0
- package/scripts/flow-model-adapter.js +802 -0
- package/scripts/flow-model-router.js +884 -0
- package/scripts/flow-models.js +1231 -0
- package/scripts/flow-morning.js +517 -0
- package/scripts/flow-multi-approach.js +660 -0
- package/scripts/flow-new-feature +86 -0
- package/scripts/flow-onboard +1042 -0
- package/scripts/flow-orchestrate-llm.js +459 -0
- package/scripts/flow-orchestrate.js +3592 -0
- package/scripts/flow-output.js +123 -0
- package/scripts/flow-parallel-detector.js +399 -0
- package/scripts/flow-parallel-dispatch.js +987 -0
- package/scripts/flow-parallel.js +428 -0
- package/scripts/flow-pattern-enforcer.js +600 -0
- package/scripts/flow-prd-manager.js +282 -0
- package/scripts/flow-progress.js +323 -0
- package/scripts/flow-project-analyzer.js +975 -0
- package/scripts/flow-prompt-composer.js +487 -0
- package/scripts/flow-providers.js +1381 -0
- package/scripts/flow-queue.js +308 -0
- package/scripts/flow-ready +82 -0
- package/scripts/flow-ready.js +189 -0
- package/scripts/flow-regression.js +396 -0
- package/scripts/flow-response-parser.js +450 -0
- package/scripts/flow-resume.js +284 -0
- package/scripts/flow-rules-sync.js +439 -0
- package/scripts/flow-run-trace.js +718 -0
- package/scripts/flow-safety.js +587 -0
- package/scripts/flow-search +104 -0
- package/scripts/flow-security.js +481 -0
- package/scripts/flow-session-end +106 -0
- package/scripts/flow-session-end.js +437 -0
- package/scripts/flow-session-state.js +671 -0
- package/scripts/flow-setup-hooks +216 -0
- package/scripts/flow-setup-hooks.js +377 -0
- package/scripts/flow-skill-create.js +329 -0
- package/scripts/flow-skill-creator.js +572 -0
- package/scripts/flow-skill-generator.js +1046 -0
- package/scripts/flow-skill-learn.js +880 -0
- package/scripts/flow-skill-matcher.js +578 -0
- package/scripts/flow-spec-generator.js +820 -0
- package/scripts/flow-stack-wizard.js +895 -0
- package/scripts/flow-standup +162 -0
- package/scripts/flow-start +74 -0
- package/scripts/flow-start.js +235 -0
- package/scripts/flow-status +110 -0
- package/scripts/flow-status.js +301 -0
- package/scripts/flow-step-browser.js +83 -0
- package/scripts/flow-step-changelog.js +217 -0
- package/scripts/flow-step-comments.js +306 -0
- package/scripts/flow-step-complexity.js +234 -0
- package/scripts/flow-step-coverage.js +218 -0
- package/scripts/flow-step-knowledge.js +193 -0
- package/scripts/flow-step-pr-tests.js +364 -0
- package/scripts/flow-step-regression.js +89 -0
- package/scripts/flow-step-review.js +516 -0
- package/scripts/flow-step-security.js +162 -0
- package/scripts/flow-step-silent-failures.js +290 -0
- package/scripts/flow-step-simplifier.js +346 -0
- package/scripts/flow-story +105 -0
- package/scripts/flow-story.js +500 -0
- package/scripts/flow-suspend.js +252 -0
- package/scripts/flow-sync-daemon.js +654 -0
- package/scripts/flow-task-analyzer.js +606 -0
- package/scripts/flow-team-dashboard.js +748 -0
- package/scripts/flow-team-sync.js +752 -0
- package/scripts/flow-team.js +977 -0
- package/scripts/flow-tech-options.js +528 -0
- package/scripts/flow-templates.js +812 -0
- package/scripts/flow-tiered-learning.js +728 -0
- package/scripts/flow-trace +204 -0
- package/scripts/flow-transcript-chunking.js +1106 -0
- package/scripts/flow-transcript-digest.js +7918 -0
- package/scripts/flow-transcript-language.js +465 -0
- package/scripts/flow-transcript-parsing.js +1085 -0
- package/scripts/flow-transcript-stories.js +2194 -0
- package/scripts/flow-update-map +224 -0
- package/scripts/flow-utils.js +2242 -0
- package/scripts/flow-verification.js +644 -0
- package/scripts/flow-verify.js +1177 -0
- package/scripts/flow-voice-input.js +638 -0
- package/scripts/flow-watch +168 -0
- package/scripts/flow-workflow-steps.js +521 -0
- package/scripts/flow-workflow.js +1029 -0
- package/scripts/flow-worktree.js +489 -0
- package/scripts/hooks/adapters/base-adapter.js +102 -0
- package/scripts/hooks/adapters/claude-code.js +359 -0
- package/scripts/hooks/adapters/index.js +79 -0
- package/scripts/hooks/core/component-check.js +341 -0
- package/scripts/hooks/core/index.js +35 -0
- package/scripts/hooks/core/loop-check.js +241 -0
- package/scripts/hooks/core/session-context.js +294 -0
- package/scripts/hooks/core/task-gate.js +177 -0
- package/scripts/hooks/core/validation.js +230 -0
- package/scripts/hooks/entry/claude-code/post-tool-use.js +65 -0
- package/scripts/hooks/entry/claude-code/pre-tool-use.js +89 -0
- package/scripts/hooks/entry/claude-code/session-end.js +87 -0
- package/scripts/hooks/entry/claude-code/session-start.js +46 -0
- package/scripts/hooks/entry/claude-code/stop.js +43 -0
- package/scripts/postinstall.js +139 -0
- package/templates/browser-test-flow.json +56 -0
- package/templates/bug-report.md +43 -0
- package/templates/component-detail.md +42 -0
- package/templates/component.stories.tsx +49 -0
- package/templates/context/constraints.md +83 -0
- package/templates/context/conventions.md +177 -0
- package/templates/context/stack.md +60 -0
- package/templates/correction-report.md +90 -0
- package/templates/feature-proposal.md +35 -0
- package/templates/hybrid/_base.md +254 -0
- package/templates/hybrid/_patterns.md +45 -0
- package/templates/hybrid/create-component.md +127 -0
- package/templates/hybrid/create-file.md +56 -0
- package/templates/hybrid/create-hook.md +145 -0
- package/templates/hybrid/create-service.md +70 -0
- package/templates/hybrid/fix-bug.md +33 -0
- package/templates/hybrid/modify-file.md +55 -0
- package/templates/story.md +68 -0
- package/templates/task.json +56 -0
- package/templates/trace.md +69 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Project Constraints
|
|
2
|
+
|
|
3
|
+
**IMMUTABLE** - These rules cannot be changed without explicit human approval.
|
|
4
|
+
AI assistants must follow these constraints absolutely.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Architecture Constraints
|
|
9
|
+
|
|
10
|
+
### AC-001: Template Constraint
|
|
11
|
+
**Added**: {{date}}
|
|
12
|
+
**Reason**: [why this constraint exists]
|
|
13
|
+
**Rule**: [the specific constraint]
|
|
14
|
+
|
|
15
|
+
<!-- Add more architecture constraints as needed -->
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Security Constraints
|
|
20
|
+
|
|
21
|
+
### SC-001: No Secrets in Code
|
|
22
|
+
**Added**: {{date}}
|
|
23
|
+
**Reason**: Security best practice
|
|
24
|
+
**Rule**: Never hardcode API keys, passwords, tokens, or secrets. Use environment variables.
|
|
25
|
+
|
|
26
|
+
### SC-002: Input Validation Required
|
|
27
|
+
**Added**: {{date}}
|
|
28
|
+
**Reason**: Prevent injection attacks
|
|
29
|
+
**Rule**: All user input must be validated and sanitized before use.
|
|
30
|
+
|
|
31
|
+
<!-- Add more security constraints as needed -->
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Performance Constraints
|
|
36
|
+
|
|
37
|
+
<!-- Add performance constraints here -->
|
|
38
|
+
<!-- Example:
|
|
39
|
+
### PC-001: Bundle Size Limit
|
|
40
|
+
**Added**: {{date}}
|
|
41
|
+
**Reason**: Performance budget
|
|
42
|
+
**Rule**: Main bundle must not exceed 200KB gzipped.
|
|
43
|
+
-->
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Compatibility Constraints
|
|
48
|
+
|
|
49
|
+
<!-- Add compatibility constraints here -->
|
|
50
|
+
<!-- Example:
|
|
51
|
+
### CC-001: Browser Support
|
|
52
|
+
**Added**: {{date}}
|
|
53
|
+
**Reason**: User base requirements
|
|
54
|
+
**Rule**: Must support last 2 versions of Chrome, Firefox, Safari, Edge.
|
|
55
|
+
-->
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Process Constraints
|
|
60
|
+
|
|
61
|
+
### PR-001: No Direct Main Commits
|
|
62
|
+
**Added**: {{date}}
|
|
63
|
+
**Reason**: Code review requirement
|
|
64
|
+
**Rule**: All changes must go through pull requests. No direct commits to main/master.
|
|
65
|
+
|
|
66
|
+
<!-- Add more process constraints as needed -->
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Data Constraints
|
|
71
|
+
|
|
72
|
+
<!-- Add data constraints here -->
|
|
73
|
+
<!-- Example:
|
|
74
|
+
### DC-001: PII Handling
|
|
75
|
+
**Added**: {{date}}
|
|
76
|
+
**Reason**: Privacy compliance
|
|
77
|
+
**Rule**: Personal identifiable information must be encrypted at rest and in transit.
|
|
78
|
+
-->
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
*This file is append-only. To modify existing constraints, request explicit human review.*
|
|
83
|
+
*Constraints can only be removed or modified by a human, never by AI.*
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Coding Conventions
|
|
2
|
+
|
|
3
|
+
Patterns and conventions for this project. AI can propose updates via diff.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Naming Conventions
|
|
8
|
+
|
|
9
|
+
### Files & Directories
|
|
10
|
+
| Type | Convention | Example |
|
|
11
|
+
|------|------------|---------|
|
|
12
|
+
| Components | PascalCase | `UserProfile.tsx` |
|
|
13
|
+
| Hooks | camelCase with `use` prefix | `useAuth.ts` |
|
|
14
|
+
| Utilities | camelCase | `formatDate.ts` |
|
|
15
|
+
| Constants | SCREAMING_SNAKE_CASE file | `API_ENDPOINTS.ts` |
|
|
16
|
+
| Types | PascalCase with `.types.ts` | `User.types.ts` |
|
|
17
|
+
| Tests | Same name with `.test.ts` | `UserProfile.test.tsx` |
|
|
18
|
+
|
|
19
|
+
### Variables & Functions
|
|
20
|
+
| Type | Convention | Example |
|
|
21
|
+
|------|------------|---------|
|
|
22
|
+
| Variables | camelCase | `userName` |
|
|
23
|
+
| Constants | SCREAMING_SNAKE_CASE | `MAX_RETRIES` |
|
|
24
|
+
| Booleans | `is/has/should/can` prefix | `isLoading`, `hasError` |
|
|
25
|
+
| Event handlers | `handle` prefix | `handleSubmit` |
|
|
26
|
+
| Async functions | verb-noun pattern | `fetchUser`, `createPost` |
|
|
27
|
+
| Private | underscore prefix (optional) | `_internalHelper` |
|
|
28
|
+
|
|
29
|
+
### Components & Classes
|
|
30
|
+
| Type | Convention | Example |
|
|
31
|
+
|------|------------|---------|
|
|
32
|
+
| React Components | PascalCase | `UserProfile` |
|
|
33
|
+
| Classes | PascalCase | `ApiClient` |
|
|
34
|
+
| Interfaces | PascalCase, no `I` prefix | `User`, `Config` |
|
|
35
|
+
| Type aliases | PascalCase | `UserId`, `ApiResponse` |
|
|
36
|
+
| Enums | PascalCase, UPPER members | `Status.ACTIVE` |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Code Structure
|
|
41
|
+
|
|
42
|
+
### File Organization
|
|
43
|
+
```
|
|
44
|
+
// 1. External imports (React, libraries)
|
|
45
|
+
// 2. Internal imports (absolute paths)
|
|
46
|
+
// 3. Relative imports
|
|
47
|
+
// 4. Type imports
|
|
48
|
+
// 5. Asset imports (styles, images)
|
|
49
|
+
|
|
50
|
+
// Component/Module code
|
|
51
|
+
|
|
52
|
+
// Exports
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Component Structure (React)
|
|
56
|
+
```typescript
|
|
57
|
+
// 1. Imports
|
|
58
|
+
// 2. Types/Interfaces
|
|
59
|
+
// 3. Constants
|
|
60
|
+
// 4. Helper functions
|
|
61
|
+
// 5. Component definition
|
|
62
|
+
// 6. Styles (if CSS-in-JS)
|
|
63
|
+
// 7. Export
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Import Order
|
|
69
|
+
|
|
70
|
+
1. React/framework core imports
|
|
71
|
+
2. Third-party library imports
|
|
72
|
+
3. Internal modules (absolute paths like `@/`)
|
|
73
|
+
4. Relative imports (`./`, `../`)
|
|
74
|
+
5. Type-only imports
|
|
75
|
+
6. Style imports
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Code Patterns
|
|
80
|
+
|
|
81
|
+
### Error Handling
|
|
82
|
+
```typescript
|
|
83
|
+
// Prefer try-catch with specific error handling
|
|
84
|
+
try {
|
|
85
|
+
await riskyOperation();
|
|
86
|
+
} catch (error) {
|
|
87
|
+
if (error instanceof SpecificError) {
|
|
88
|
+
// Handle specific case
|
|
89
|
+
}
|
|
90
|
+
throw error; // Re-throw if unhandled
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Async/Await
|
|
95
|
+
```typescript
|
|
96
|
+
// Prefer async/await over .then() chains
|
|
97
|
+
const data = await fetchData();
|
|
98
|
+
|
|
99
|
+
// Use Promise.all for parallel operations
|
|
100
|
+
const [users, posts] = await Promise.all([
|
|
101
|
+
fetchUsers(),
|
|
102
|
+
fetchPosts()
|
|
103
|
+
]);
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Null Handling
|
|
107
|
+
```typescript
|
|
108
|
+
// Use optional chaining
|
|
109
|
+
const name = user?.profile?.name;
|
|
110
|
+
|
|
111
|
+
// Use nullish coalescing for defaults
|
|
112
|
+
const value = input ?? defaultValue;
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Documentation
|
|
118
|
+
|
|
119
|
+
### Comments
|
|
120
|
+
- Use JSDoc for public APIs
|
|
121
|
+
- Explain "why" not "what"
|
|
122
|
+
- Remove commented-out code
|
|
123
|
+
- Keep comments up to date
|
|
124
|
+
|
|
125
|
+
### Code Comments Example
|
|
126
|
+
```typescript
|
|
127
|
+
// BAD: Increments counter
|
|
128
|
+
counter++;
|
|
129
|
+
|
|
130
|
+
// GOOD: Track retry attempts for rate limit backoff
|
|
131
|
+
retryCount++;
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Testing Conventions
|
|
137
|
+
|
|
138
|
+
### Test File Location
|
|
139
|
+
- Co-located with source: `Component.test.tsx`
|
|
140
|
+
- Or in `__tests__` directory
|
|
141
|
+
|
|
142
|
+
### Test Structure
|
|
143
|
+
```typescript
|
|
144
|
+
describe('ComponentName', () => {
|
|
145
|
+
describe('methodName', () => {
|
|
146
|
+
it('should do expected behavior', () => {
|
|
147
|
+
// Arrange
|
|
148
|
+
// Act
|
|
149
|
+
// Assert
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Git Conventions
|
|
158
|
+
|
|
159
|
+
### Commit Messages
|
|
160
|
+
```
|
|
161
|
+
<type>(<scope>): <subject>
|
|
162
|
+
|
|
163
|
+
<body>
|
|
164
|
+
|
|
165
|
+
<footer>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
|
|
169
|
+
|
|
170
|
+
### Branch Naming
|
|
171
|
+
- Feature: `feature/description`
|
|
172
|
+
- Bugfix: `fix/description`
|
|
173
|
+
- Hotfix: `hotfix/description`
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
*AI can propose updates to this file via diff. Human approval required for changes.*
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Technology Stack
|
|
2
|
+
|
|
3
|
+
Auto-detected and human-verified technology stack for this project.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Runtime
|
|
8
|
+
- **Language**: [auto-detect or specify]
|
|
9
|
+
- **Runtime**: [e.g., Node.js 20.x, Bun, Deno, Python 3.11]
|
|
10
|
+
- **Package Manager**: [npm, yarn, pnpm, pip, cargo]
|
|
11
|
+
|
|
12
|
+
## Frameworks
|
|
13
|
+
- **Frontend**: [e.g., React 18, Vue 3, Svelte, Angular, None]
|
|
14
|
+
- **Backend**: [e.g., Express, Fastify, NestJS, Django, None]
|
|
15
|
+
- **Full-Stack**: [e.g., Next.js 14, Nuxt, SvelteKit, None]
|
|
16
|
+
|
|
17
|
+
## Key Dependencies
|
|
18
|
+
<!-- List important dependencies and their purposes -->
|
|
19
|
+
| Dependency | Purpose |
|
|
20
|
+
|------------|---------|
|
|
21
|
+
| example | description |
|
|
22
|
+
|
|
23
|
+
## Build & Tooling
|
|
24
|
+
- **Bundler**: [e.g., Vite, Webpack, esbuild, Rollup]
|
|
25
|
+
- **Testing**: [e.g., Jest, Vitest, Playwright, pytest]
|
|
26
|
+
- **Linting**: [e.g., ESLint, Biome, Ruff]
|
|
27
|
+
- **Formatting**: [e.g., Prettier, Biome, Black]
|
|
28
|
+
- **Type Checking**: [e.g., TypeScript, mypy, None]
|
|
29
|
+
|
|
30
|
+
## Infrastructure
|
|
31
|
+
- **Database**: [e.g., PostgreSQL, MongoDB, SQLite, None]
|
|
32
|
+
- **ORM/ODM**: [e.g., Prisma, Drizzle, TypeORM, SQLAlchemy]
|
|
33
|
+
- **Cache**: [e.g., Redis, Memcached, None]
|
|
34
|
+
- **Queue**: [e.g., BullMQ, Celery, None]
|
|
35
|
+
- **Hosting**: [e.g., Vercel, AWS, GCP, Self-hosted]
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Version Requirements
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"node": ">=20.0.0",
|
|
44
|
+
"npm": ">=10.0.0"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Environment Variables
|
|
51
|
+
|
|
52
|
+
| Variable | Required | Description |
|
|
53
|
+
|----------|----------|-------------|
|
|
54
|
+
| DATABASE_URL | Yes | Database connection string |
|
|
55
|
+
| API_KEY | No | External API key |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
*Last updated: {{timestamp}}*
|
|
60
|
+
*Updated by: {{author}}*
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Correction Report: [wf-XXXXXXXX]-Correction-[N]
|
|
2
|
+
|
|
3
|
+
## Meta
|
|
4
|
+
|
|
5
|
+
| Field | Value |
|
|
6
|
+
|-------|-------|
|
|
7
|
+
| Task ID | [wf-XXXXXXXX] |
|
|
8
|
+
| Correction # | [N] |
|
|
9
|
+
| Date | [YYYY-MM-DD] |
|
|
10
|
+
| Severity | [minor/moderate/critical] |
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Problem Description
|
|
15
|
+
|
|
16
|
+
### What Was Expected
|
|
17
|
+
|
|
18
|
+
[Describe the expected behavior]
|
|
19
|
+
|
|
20
|
+
### What Actually Happened
|
|
21
|
+
|
|
22
|
+
[Describe the actual behavior]
|
|
23
|
+
|
|
24
|
+
### Error Message (if any)
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
[paste error message]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Root Cause Analysis
|
|
33
|
+
|
|
34
|
+
### Investigation Steps
|
|
35
|
+
|
|
36
|
+
1. [Step taken to investigate]
|
|
37
|
+
2. [Step taken to investigate]
|
|
38
|
+
|
|
39
|
+
### Identified Cause
|
|
40
|
+
|
|
41
|
+
[Why did this happen - the actual root cause]
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Solution Applied
|
|
46
|
+
|
|
47
|
+
### Changes Made
|
|
48
|
+
|
|
49
|
+
| File | Change Description |
|
|
50
|
+
|------|-------------------|
|
|
51
|
+
| [path/to/file.ts] | [What was changed] |
|
|
52
|
+
|
|
53
|
+
### Code Summary
|
|
54
|
+
|
|
55
|
+
```diff
|
|
56
|
+
- [old code]
|
|
57
|
+
+ [new code]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Verification
|
|
63
|
+
|
|
64
|
+
### Test Result After Fix
|
|
65
|
+
|
|
66
|
+
| Test | Before | After |
|
|
67
|
+
|------|--------|-------|
|
|
68
|
+
| [Test name] | FAIL | PASS |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Prevention Measures
|
|
73
|
+
|
|
74
|
+
### How to Avoid in Future
|
|
75
|
+
|
|
76
|
+
1. [Preventive measure 1]
|
|
77
|
+
2. [Preventive measure 2]
|
|
78
|
+
|
|
79
|
+
### Documentation Updates
|
|
80
|
+
|
|
81
|
+
- [ ] Update decisions.md with pattern
|
|
82
|
+
- [ ] Update relevant agent instructions
|
|
83
|
+
- [ ] Add test case to prevent regression
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Linked
|
|
88
|
+
|
|
89
|
+
- **Request Log**: R-[XXX]
|
|
90
|
+
- **Task**: [wf-XXXXXXXX]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Feature: [Name]
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
[Brief description of the feature]
|
|
5
|
+
|
|
6
|
+
## Problem
|
|
7
|
+
[What problem does this solve?]
|
|
8
|
+
|
|
9
|
+
## Solution
|
|
10
|
+
[How will this feature solve the problem?]
|
|
11
|
+
|
|
12
|
+
## User Stories
|
|
13
|
+
- As a [user type], I want to [action] so that [benefit]
|
|
14
|
+
|
|
15
|
+
## Acceptance Criteria
|
|
16
|
+
- [ ] [Criterion 1]
|
|
17
|
+
- [ ] [Criterion 2]
|
|
18
|
+
- [ ] [Criterion 3]
|
|
19
|
+
|
|
20
|
+
## Dependencies
|
|
21
|
+
- [List any dependencies on other features or components]
|
|
22
|
+
|
|
23
|
+
## Technical Notes
|
|
24
|
+
[Any technical considerations, constraints, or decisions]
|
|
25
|
+
|
|
26
|
+
## Components Needed
|
|
27
|
+
Check app-map.md before listing:
|
|
28
|
+
- [ ] [Component 1] - exists / needs variant / needs creation
|
|
29
|
+
- [ ] [Component 2]
|
|
30
|
+
|
|
31
|
+
## Estimated Effort
|
|
32
|
+
[Small / Medium / Large]
|
|
33
|
+
|
|
34
|
+
## Risks
|
|
35
|
+
- [Potential risks or blockers]
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
## ⚠️ CRITICAL OUTPUT RULES (READ FIRST)
|
|
2
|
+
|
|
3
|
+
**Your output will be written directly to a file. Follow these rules EXACTLY:**
|
|
4
|
+
|
|
5
|
+
1. Output ONLY valid code - no explanations, no markdown
|
|
6
|
+
2. Do NOT wrap code in ``` code blocks
|
|
7
|
+
3. Do NOT include any text before the code
|
|
8
|
+
4. Do NOT include any text after the code
|
|
9
|
+
5. Start with imports (or 'use client' directive if needed)
|
|
10
|
+
6. Do NOT include thinking or reasoning text in your output
|
|
11
|
+
|
|
12
|
+
**WRONG OUTPUT:**
|
|
13
|
+
```
|
|
14
|
+
Here's the code you need:
|
|
15
|
+
import React from 'react'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**CORRECT OUTPUT:**
|
|
19
|
+
import { useState } from 'react';
|
|
20
|
+
|
|
21
|
+
**You MAY use `<thinking>...</thinking>` tags to reason through complex problems.**
|
|
22
|
+
Only the code OUTSIDE these tags will be extracted and written to the file.
|
|
23
|
+
|
|
24
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
25
|
+
|
|
26
|
+
# Project Context
|
|
27
|
+
|
|
28
|
+
You are generating code for this project.
|
|
29
|
+
|
|
30
|
+
{{#if uiFramework}}
|
|
31
|
+
## Framework: {{uiFramework}}
|
|
32
|
+
{{/if}}
|
|
33
|
+
|
|
34
|
+
{{#if stylingApproach}}
|
|
35
|
+
## Styling: {{stylingApproach}}
|
|
36
|
+
{{/if}}
|
|
37
|
+
|
|
38
|
+
## Import Rules
|
|
39
|
+
|
|
40
|
+
{{#if doNotImport}}
|
|
41
|
+
### Forbidden Imports (DO NOT USE)
|
|
42
|
+
DO NOT import these: {{doNotImport}}
|
|
43
|
+
{{/if}}
|
|
44
|
+
|
|
45
|
+
### Available Project Imports
|
|
46
|
+
|
|
47
|
+
**Use ONLY imports listed below for project code. Other paths are FORBIDDEN.**
|
|
48
|
+
|
|
49
|
+
{{#if availableComponents}}
|
|
50
|
+
#### Components
|
|
51
|
+
```typescript
|
|
52
|
+
{{availableComponents}}
|
|
53
|
+
```
|
|
54
|
+
{{/if}}
|
|
55
|
+
|
|
56
|
+
{{#if availableHooks}}
|
|
57
|
+
#### Hooks
|
|
58
|
+
```typescript
|
|
59
|
+
{{availableHooks}}
|
|
60
|
+
```
|
|
61
|
+
{{/if}}
|
|
62
|
+
|
|
63
|
+
{{#if availableServices}}
|
|
64
|
+
#### Services
|
|
65
|
+
```typescript
|
|
66
|
+
{{availableServices}}
|
|
67
|
+
```
|
|
68
|
+
{{/if}}
|
|
69
|
+
|
|
70
|
+
{{#if availableTypes}}
|
|
71
|
+
#### Types
|
|
72
|
+
```typescript
|
|
73
|
+
{{availableTypes}}
|
|
74
|
+
```
|
|
75
|
+
{{/if}}
|
|
76
|
+
|
|
77
|
+
{{#if availableUtils}}
|
|
78
|
+
#### Utilities
|
|
79
|
+
```typescript
|
|
80
|
+
{{availableUtils}}
|
|
81
|
+
```
|
|
82
|
+
{{/if}}
|
|
83
|
+
|
|
84
|
+
{{#if typeLocations}}
|
|
85
|
+
### Type Import Paths
|
|
86
|
+
{{typeLocations}}
|
|
87
|
+
{{/if}}
|
|
88
|
+
|
|
89
|
+
### Standard Library Imports (Always Allowed)
|
|
90
|
+
|
|
91
|
+
These imports are always safe to use without being listed above:
|
|
92
|
+
|
|
93
|
+
**React:**
|
|
94
|
+
- `useState`, `useEffect`, `useCallback`, `useMemo`, `useRef`, `useContext`
|
|
95
|
+
- `useReducer`, `useLayoutEffect`, `useImperativeHandle`, `useDebugValue`
|
|
96
|
+
- `forwardRef`, `memo`, `lazy`, `Suspense`, `Fragment`
|
|
97
|
+
|
|
98
|
+
**Next.js:**
|
|
99
|
+
- `Link`, `Image`, `Script` from `next/link`, `next/image`, `next/script`
|
|
100
|
+
- `useRouter`, `usePathname`, `useSearchParams` from `next/navigation`
|
|
101
|
+
- `notFound`, `redirect` from `next/navigation`
|
|
102
|
+
- `headers`, `cookies` from `next/headers`
|
|
103
|
+
|
|
104
|
+
**Node.js (for server code):**
|
|
105
|
+
- `fs`, `path`, `os`, `crypto`, `util`, `stream`, `events`
|
|
106
|
+
- `child_process`, `http`, `https`, `url`, `querystring`
|
|
107
|
+
|
|
108
|
+
{{#if projectWarnings}}
|
|
109
|
+
### Project-Specific Warnings
|
|
110
|
+
{{projectWarnings}}
|
|
111
|
+
{{/if}}
|
|
112
|
+
|
|
113
|
+
**If you're unsure about a project import path:**
|
|
114
|
+
- DON'T USE IT
|
|
115
|
+
- Write the code inline instead
|
|
116
|
+
- Use a TODO comment: `// TODO: import X from '?'`
|
|
117
|
+
|
|
118
|
+
## Component Usage Rules
|
|
119
|
+
|
|
120
|
+
These rules prevent the most common LLM mistakes:
|
|
121
|
+
|
|
122
|
+
### 1. String Literals for Variants/Sizes (MANDATORY)
|
|
123
|
+
|
|
124
|
+
**CORRECT:**
|
|
125
|
+
```tsx
|
|
126
|
+
<Button variant="primary" size="md">Click</Button>
|
|
127
|
+
<Card variant="default">Content</Card>
|
|
128
|
+
<Input size="lg" />
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**WRONG (NEVER DO THIS):**
|
|
132
|
+
```tsx
|
|
133
|
+
<Button variant={buttonVariants.primary}>Click</Button> // ❌ WRONG
|
|
134
|
+
<Card variant={cardVariants.default}>Content</Card> // ❌ WRONG
|
|
135
|
+
<Input size={inputSizes.lg} /> // ❌ WRONG
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 2. Exported Arrays Are for Iteration Only
|
|
139
|
+
|
|
140
|
+
Constants like `buttonVariants`, `cardVariants`, `inputSizes` are **ARRAYS** like `['sm', 'md', 'lg']`:
|
|
141
|
+
- ✅ Use them for: `buttonVariants.map(v => ...)` (iteration)
|
|
142
|
+
- ❌ NOT for: `variant={buttonVariants.primary}` (object access)
|
|
143
|
+
|
|
144
|
+
### 3. Hook Names ≠ File Names
|
|
145
|
+
|
|
146
|
+
File: `use-auth-store.ts` might export: `useAuthState()`, NOT `useAuthStore()`
|
|
147
|
+
- Always use the exact function name shown in the imports above
|
|
148
|
+
- Never guess hook names based on file names
|
|
149
|
+
|
|
150
|
+
### 4. When in Doubt, Use String Literals
|
|
151
|
+
|
|
152
|
+
If you're unsure whether something is an array or object:
|
|
153
|
+
```tsx
|
|
154
|
+
// Always safe - string literals
|
|
155
|
+
variant="primary"
|
|
156
|
+
size="md"
|
|
157
|
+
type="submit"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Code Rules
|
|
161
|
+
|
|
162
|
+
1. Use TypeScript with proper types.
|
|
163
|
+
2. Follow the existing patterns shown in _patterns.md
|
|
164
|
+
3. Include all necessary imports at the top.
|
|
165
|
+
4. Add brief JSDoc comments for exported functions/components.
|
|
166
|
+
5. Do NOT create files that weren't requested.
|
|
167
|
+
6. Match the project's naming conventions exactly.
|
|
168
|
+
7. Define types inline if unsure about import path.
|
|
169
|
+
|
|
170
|
+
{{#if customRules}}
|
|
171
|
+
### Project-Specific Rules
|
|
172
|
+
{{customRules}}
|
|
173
|
+
{{/if}}
|
|
174
|
+
|
|
175
|
+
## Context Level: {{richnessLevel}}
|
|
176
|
+
|
|
177
|
+
You have been given comprehensive context to ensure high success rate.
|
|
178
|
+
All imports, types, and patterns above are accurate and verified.
|
|
179
|
+
|
|
180
|
+
{{#if verbosityGuidance}}
|
|
181
|
+
### Implementation Guidance
|
|
182
|
+
{{verbosityGuidance}}
|
|
183
|
+
{{/if}}
|
|
184
|
+
|
|
185
|
+
Use ALL the context provided above. The imports, props, and types shown are
|
|
186
|
+
the source of truth. Do not guess or invent alternatives.
|
|
187
|
+
|
|
188
|
+
{{#if requiresPlan}}
|
|
189
|
+
## Planning Requirement
|
|
190
|
+
|
|
191
|
+
**IMPORTANT: This task requires explicit planning before implementation.**
|
|
192
|
+
|
|
193
|
+
Task complexity: {{complexity}}
|
|
194
|
+
|
|
195
|
+
Before writing any code, first output your plan inside `<thinking>` tags:
|
|
196
|
+
1. What changes are needed
|
|
197
|
+
2. Which imports you will use
|
|
198
|
+
3. Key implementation decisions
|
|
199
|
+
4. Any potential edge cases
|
|
200
|
+
|
|
201
|
+
Example:
|
|
202
|
+
```
|
|
203
|
+
<thinking>
|
|
204
|
+
Plan:
|
|
205
|
+
1. Create UserCard component with name/email props
|
|
206
|
+
2. Import Button from @/components/ui/Button
|
|
207
|
+
3. Use useState for hover state
|
|
208
|
+
4. Handle optional onEdit callback
|
|
209
|
+
</thinking>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Then output ONLY the code (outside the thinking tags).
|
|
213
|
+
{{/if}}
|
|
214
|
+
|
|
215
|
+
## Validation
|
|
216
|
+
|
|
217
|
+
After you output code, it will be automatically validated:
|
|
218
|
+
- TypeScript compilation check
|
|
219
|
+
- ESLint check
|
|
220
|
+
|
|
221
|
+
If validation fails, you'll receive the error and must fix it.
|
|
222
|
+
Fix the error and output ONLY the corrected code. No explanations.
|
|
223
|
+
|
|
224
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
225
|
+
TASK BOUNDARY - YOUR TASK STARTS BELOW
|
|
226
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
227
|
+
|
|
228
|
+
**CRITICAL**: Everything ABOVE this line is PROJECT CONTEXT for REFERENCE ONLY.
|
|
229
|
+
- Do NOT implement types/components from the project context
|
|
230
|
+
- Do NOT confuse project patterns with your actual task
|
|
231
|
+
- ONLY implement what is described in YOUR TASK below
|
|
232
|
+
|
|
233
|
+
## YOUR TASK (IMPLEMENT THIS)
|
|
234
|
+
|
|
235
|
+
{{#if taskDescription}}
|
|
236
|
+
{{taskDescription}}
|
|
237
|
+
{{else}}
|
|
238
|
+
[Task description will be inserted here by the orchestrator]
|
|
239
|
+
{{/if}}
|
|
240
|
+
|
|
241
|
+
{{#if targetFile}}
|
|
242
|
+
**Target File**: `{{targetFile}}`
|
|
243
|
+
{{/if}}
|
|
244
|
+
|
|
245
|
+
{{#if existingContent}}
|
|
246
|
+
**Current File Content**:
|
|
247
|
+
```
|
|
248
|
+
{{existingContent}}
|
|
249
|
+
```
|
|
250
|
+
{{/if}}
|
|
251
|
+
|
|
252
|
+
═══════════════════════════════════════════════════════════════════════════════
|
|
253
|
+
END OF TASK
|
|
254
|
+
═══════════════════════════════════════════════════════════════════════════════
|