forge-orkes 0.1.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/bin/create-forge.js +103 -0
- package/package.json +28 -0
- package/template/.claude/agents/executor.md +177 -0
- package/template/.claude/agents/planner.md +148 -0
- package/template/.claude/agents/researcher.md +111 -0
- package/template/.claude/agents/reviewer.md +211 -0
- package/template/.claude/agents/verifier.md +210 -0
- package/template/.claude/settings.json +40 -0
- package/template/.claude/skills/architecting/SKILL.md +121 -0
- package/template/.claude/skills/auditing/SKILL.md +302 -0
- package/template/.claude/skills/beads-integration/SKILL.md +125 -0
- package/template/.claude/skills/debugging/SKILL.md +130 -0
- package/template/.claude/skills/designing/SKILL.md +134 -0
- package/template/.claude/skills/discussing/SKILL.md +229 -0
- package/template/.claude/skills/executing/SKILL.md +154 -0
- package/template/.claude/skills/forge/SKILL.md +524 -0
- package/template/.claude/skills/planning/SKILL.md +225 -0
- package/template/.claude/skills/quick-tasking/SKILL.md +74 -0
- package/template/.claude/skills/refactoring/SKILL.md +168 -0
- package/template/.claude/skills/researching/SKILL.md +117 -0
- package/template/.claude/skills/securing/SKILL.md +104 -0
- package/template/.claude/skills/verifying/SKILL.md +201 -0
- package/template/.forge/templates/constitution.md +123 -0
- package/template/.forge/templates/context.md +53 -0
- package/template/.forge/templates/design-systems/material-ui.md +44 -0
- package/template/.forge/templates/design-systems/primereact.md +46 -0
- package/template/.forge/templates/design-systems/shadcn-ui.md +47 -0
- package/template/.forge/templates/framework-absorption/generic.md +52 -0
- package/template/.forge/templates/framework-absorption/gsd.md +174 -0
- package/template/.forge/templates/framework-absorption/spec-kit.md +52 -0
- package/template/.forge/templates/plan.md +84 -0
- package/template/.forge/templates/project.yml +40 -0
- package/template/.forge/templates/refactor-backlog.yml +16 -0
- package/template/.forge/templates/requirements.yml +49 -0
- package/template/.forge/templates/roadmap.yml +44 -0
- package/template/.forge/templates/state/index.yml +51 -0
- package/template/.forge/templates/state/milestone.yml +42 -0
- package/template/CLAUDE.md +150 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verifying
|
|
3
|
+
description: "Use when work is complete and you need to prove it actually works. Trigger after execution: does the code meet original requirements? Not 'did we complete tasks' but 'does it work?' This skill enforces goal-backward verification with 3 levels: Observable Truths, Artifacts, and Key Links."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verifying
|
|
7
|
+
|
|
8
|
+
Prove completed work actually delivers what was promised. Task completion ≠ goal achievement.
|
|
9
|
+
|
|
10
|
+
## Core Question
|
|
11
|
+
|
|
12
|
+
Don't ask: "Did we complete all the tasks?"
|
|
13
|
+
Ask: "Does the user get what they were promised?"
|
|
14
|
+
|
|
15
|
+
## 3-Level Goal-Backward Verification
|
|
16
|
+
|
|
17
|
+
### Level 1: Observable Truths
|
|
18
|
+
|
|
19
|
+
Read the plan's `must_haves.truths`. For each truth:
|
|
20
|
+
|
|
21
|
+
1. Design a test (automated or manual) that proves/disproves it
|
|
22
|
+
2. Run the test
|
|
23
|
+
3. Record result: **VERIFIED** | **FAILED** | **UNCERTAIN**
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
| Truth | Test | Result |
|
|
27
|
+
|-------|------|--------|
|
|
28
|
+
| User can see their profile | Navigate to /profile, check render | VERIFIED |
|
|
29
|
+
| User can edit their bio | Click edit, type, save, verify persistence | VERIFIED |
|
|
30
|
+
| Profile photo uploads correctly | Upload image, check display | FAILED — 413 error on large files |
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Level 2: Artifacts (Exists → Substantive → Wired)
|
|
34
|
+
|
|
35
|
+
Read the plan's `must_haves.artifacts`. For each artifact:
|
|
36
|
+
|
|
37
|
+
| Check | Question | Pass Criteria |
|
|
38
|
+
|-------|----------|---------------|
|
|
39
|
+
| **Exists** | Does the file exist? | File present at specified path |
|
|
40
|
+
| **Substantive** | Is it real code, not a stub? | Exceeds min_lines, no placeholder text, real logic |
|
|
41
|
+
| **Wired** | Is it imported and used by other code? | Has importers, called in production paths |
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
| Artifact | Exists | Substantive | Wired | Status |
|
|
45
|
+
|----------|--------|-------------|-------|--------|
|
|
46
|
+
| src/components/Profile.tsx | ✓ | ✓ (87 lines) | ✓ (imported in routes) | VERIFIED |
|
|
47
|
+
| src/api/users/[id].ts | ✓ | ✓ (43 lines) | ✓ (called by Profile) | VERIFIED |
|
|
48
|
+
| src/hooks/useProfile.ts | ✓ | ✗ (returns {}) | - | STUB |
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Stub Detection Red Flags
|
|
52
|
+
|
|
53
|
+
Watch for these patterns that indicate stubs, not real implementations:
|
|
54
|
+
|
|
55
|
+
**React components:**
|
|
56
|
+
- `<div>Component</div>` or `<div>Placeholder</div>`
|
|
57
|
+
- `onClick={() => {}}` (empty handler)
|
|
58
|
+
- `onChange={() => console.log()}` (logging-only handler)
|
|
59
|
+
- Hardcoded data instead of API calls
|
|
60
|
+
|
|
61
|
+
**API endpoints:**
|
|
62
|
+
- `return Response.json({ message: "Not implemented" })`
|
|
63
|
+
- Empty arrays without database queries
|
|
64
|
+
- TODO comments in response path
|
|
65
|
+
|
|
66
|
+
**Wiring:**
|
|
67
|
+
- `fetch()` without await/then
|
|
68
|
+
- Query without returning result
|
|
69
|
+
- Form with only `preventDefault`
|
|
70
|
+
|
|
71
|
+
### Level 3: Key Links
|
|
72
|
+
|
|
73
|
+
Read the plan's `must_haves.key_links`. Verify each connection:
|
|
74
|
+
|
|
75
|
+
| Pattern | How to Verify |
|
|
76
|
+
|---------|---------------|
|
|
77
|
+
| Component → API | Find fetch/axios call in component pointing to API route |
|
|
78
|
+
| API → Database | Find ORM/query call in API handler returning data |
|
|
79
|
+
| Form → Handler | Find onSubmit with API call and response handling |
|
|
80
|
+
| State → Render | Find state variable used in JSX (not just declared) |
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
| From | To | Via | Pattern | Status |
|
|
84
|
+
|------|----|-----|---------|--------|
|
|
85
|
+
| Profile.tsx | /api/users/[id] | fetch in useEffect | fetch.*api/users | VERIFIED |
|
|
86
|
+
| ProfileForm.tsx | /api/users/[id] | PUT on submit | method.*PUT | VERIFIED |
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Anti-Pattern Scan
|
|
90
|
+
|
|
91
|
+
After 3-level verification, scan for common issues:
|
|
92
|
+
|
|
93
|
+
- [ ] No `TODO` or `FIXME` in production code paths
|
|
94
|
+
- [ ] No `console.log` as error handling
|
|
95
|
+
- [ ] No empty catch blocks
|
|
96
|
+
- [ ] No hardcoded credentials or secrets
|
|
97
|
+
- [ ] No commented-out code blocks
|
|
98
|
+
|
|
99
|
+
## Requirements Coverage
|
|
100
|
+
|
|
101
|
+
Cross-reference verified work against `.forge/requirements.yml`:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
| Requirement | Status | Evidence |
|
|
105
|
+
|-------------|--------|----------|
|
|
106
|
+
| FR-001 | Verified | Profile renders, tests pass |
|
|
107
|
+
| FR-002 | Verified | Edit flow works end-to-end |
|
|
108
|
+
| FR-003 | Partial | Upload works for small files, fails > 5MB |
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Verdict
|
|
112
|
+
|
|
113
|
+
Based on all verification levels:
|
|
114
|
+
|
|
115
|
+
### PASSED
|
|
116
|
+
All truths verified, all artifacts substantive and wired, all key links connected, requirements covered.
|
|
117
|
+
→ Route to `auditing` skill for health audit before milestone completion.
|
|
118
|
+
|
|
119
|
+
### GAPS FOUND
|
|
120
|
+
Some truths failed or artifacts are stubs.
|
|
121
|
+
→ Document gaps in YAML format:
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
gaps:
|
|
125
|
+
- truth: "Profile photo uploads correctly"
|
|
126
|
+
status: failed
|
|
127
|
+
reason: "413 error on files > 5MB"
|
|
128
|
+
artifacts:
|
|
129
|
+
- path: "src/api/upload.ts"
|
|
130
|
+
issue: "No file size validation or chunked upload"
|
|
131
|
+
fix_needed:
|
|
132
|
+
- "Add file size validation with user-friendly error"
|
|
133
|
+
- "Implement chunked upload for large files"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
→ Return to `planning` skill in gap-closure mode.
|
|
137
|
+
|
|
138
|
+
### HUMAN VERIFICATION NEEDED
|
|
139
|
+
Some items can't be verified automatically (visual appearance, real-time behavior, external service integration).
|
|
140
|
+
→ List items for user to verify manually:
|
|
141
|
+
|
|
142
|
+
```markdown
|
|
143
|
+
## Human Verification Items
|
|
144
|
+
1. [ ] Visual: Profile layout matches design on mobile
|
|
145
|
+
2. [ ] Real-time: Notifications appear within 2 seconds
|
|
146
|
+
3. [ ] External: Email sends correctly via SendGrid
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Re-Verification Mode
|
|
150
|
+
|
|
151
|
+
When re-verifying after gap closure:
|
|
152
|
+
1. Load previous verification results
|
|
153
|
+
2. Full 3-level check on previously failed items
|
|
154
|
+
3. Quick regression check on previously passed items (exists + basic sanity)
|
|
155
|
+
4. Merge results and issue updated verdict
|
|
156
|
+
|
|
157
|
+
## Desire Paths Retrospective
|
|
158
|
+
|
|
159
|
+
After completing verification (PASSED or GAPS FOUND), do a quick retrospective on framework usage patterns. This takes 1-2 minutes and feeds the framework's self-improvement loop.
|
|
160
|
+
|
|
161
|
+
### Collect Signals
|
|
162
|
+
|
|
163
|
+
Review the current session and update `.forge/state/index.yml → desire_paths` (desire paths are global, not per-milestone):
|
|
164
|
+
|
|
165
|
+
**1. Deviation patterns**: Read `.forge/state/milestone-{id}.yml → deviations` from this session. Are any repeating?
|
|
166
|
+
- Same Rule 1 fix in multiple places → maybe the plan template should include this check
|
|
167
|
+
- Same Rule 2 addition everywhere → maybe the constitution needs a new article
|
|
168
|
+
- Same Rule 3 issue → maybe the project setup is missing something
|
|
169
|
+
|
|
170
|
+
**2. Tier overrides**: Did the user override tier detection this session? Log what was detected vs. chosen. Repeated overrides mean the detection heuristics are wrong.
|
|
171
|
+
|
|
172
|
+
**3. Skipped steps**: Did the user ask to skip any workflow steps? (e.g., "skip the constitution check", "don't need a full research phase"). Repeated skips mean the step adds friction without value for this project type.
|
|
173
|
+
|
|
174
|
+
**4. Recurring friction**: Did the same problem come up that appeared in previous sessions? Check previous `desire_paths` entries. Increment occurrence counts.
|
|
175
|
+
|
|
176
|
+
**5. Agent struggles**: Did any agent need multiple attempts or human intervention to complete a task? Log the task type and failure pattern.
|
|
177
|
+
|
|
178
|
+
**6. User corrections**: Did the user correct the same thing multiple times? (e.g., "remember to use the Card component, not a div", "always add error boundaries"). These are implicit rules that should become explicit.
|
|
179
|
+
|
|
180
|
+
### Surface Recommendations
|
|
181
|
+
|
|
182
|
+
When any pattern reaches **3+ occurrences**, surface it to the user:
|
|
183
|
+
|
|
184
|
+
*"I've noticed a recurring pattern: [{description}] has come up {N} times now. This suggests we should evolve the framework. Options:"*
|
|
185
|
+
|
|
186
|
+
| Pattern Type | Suggested Evolution |
|
|
187
|
+
|-------------|-------------------|
|
|
188
|
+
| Repeated deviations | Add pre-check to planning skill, or new constitutional article |
|
|
189
|
+
| Tier overrides | Adjust detection heuristics in forge skill |
|
|
190
|
+
| Skipped steps | Make step optional for this project type, or merge into another step |
|
|
191
|
+
| Recurring friction | Add specific guidance to relevant skill, or create a new template |
|
|
192
|
+
| Agent struggles | Add examples or anti-patterns to the skill that handles this task |
|
|
193
|
+
| User corrections | Add as a rule to constitution, context.md, or the relevant skill |
|
|
194
|
+
|
|
195
|
+
**Concrete actions the user can approve:**
|
|
196
|
+
- *"Should I add 'always use Card component for content containers' to the design-system.md?"*
|
|
197
|
+
- *"Should I add a null-check verification step to the planning template?"*
|
|
198
|
+
- *"Should I make the research phase optional for Standard tier in this project?"*
|
|
199
|
+
- *"Should I add a new constitutional article: 'Error Boundaries Required'?"*
|
|
200
|
+
|
|
201
|
+
Only suggest changes when there's clear evidence (3+ occurrences). One-off issues are noise, not signal.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Project Constitution
|
|
2
|
+
|
|
3
|
+
Immutable architectural gates. Every plan and execution must satisfy active articles.
|
|
4
|
+
If an article is violated, planning stops until the gate is re-cleared or the article is formally amended.
|
|
5
|
+
|
|
6
|
+
During project init, select which articles apply. Delete or comment out articles that don't apply.
|
|
7
|
+
You can also add project-specific articles at the end.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Code Quality Articles
|
|
12
|
+
|
|
13
|
+
_Most projects benefit from these. Recommended as defaults._
|
|
14
|
+
|
|
15
|
+
### Article I: Library-First
|
|
16
|
+
|
|
17
|
+
Prefer proven libraries over custom implementations. Only build custom when no adequate library exists or integration cost exceeds building cost.
|
|
18
|
+
|
|
19
|
+
**Gate:**
|
|
20
|
+
- [ ] Checked ecosystem for existing solutions before planning custom code
|
|
21
|
+
- [ ] If custom code planned, documented WHY libraries were rejected
|
|
22
|
+
|
|
23
|
+
### Article II: Test-First
|
|
24
|
+
|
|
25
|
+
Tests are written before or alongside implementation, never as an afterthought. Tests must fail before code makes them pass.
|
|
26
|
+
|
|
27
|
+
**Gate:**
|
|
28
|
+
- [ ] Test strategy defined before implementation begins
|
|
29
|
+
- [ ] Acceptance criteria are testable (Given/When/Then format)
|
|
30
|
+
|
|
31
|
+
### Article III: Simplicity
|
|
32
|
+
|
|
33
|
+
The simplest solution that meets requirements wins. Complexity requires documented justification with alternatives considered.
|
|
34
|
+
|
|
35
|
+
**Gate:**
|
|
36
|
+
- [ ] No speculative features (YAGNI)
|
|
37
|
+
- [ ] No premature abstraction
|
|
38
|
+
- [ ] Complexity justified in writing if introduced
|
|
39
|
+
|
|
40
|
+
### Article IV: Consistency
|
|
41
|
+
|
|
42
|
+
New code follows existing project patterns. Deviations from established conventions require rationale.
|
|
43
|
+
|
|
44
|
+
**Gate:**
|
|
45
|
+
- [ ] Follows existing naming conventions
|
|
46
|
+
- [ ] Matches existing file structure patterns
|
|
47
|
+
- [ ] Uses existing utilities rather than creating duplicates
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Design & UI Articles
|
|
52
|
+
|
|
53
|
+
_Enable if the project has a user interface. Requires design system configuration in project.yml._
|
|
54
|
+
|
|
55
|
+
### Article V: Design System Fidelity
|
|
56
|
+
|
|
57
|
+
UI implementations use the project's design system components exclusively. No custom HTML/CSS for patterns the design system already provides. Component mapping is defined in `.forge/design-system.md`.
|
|
58
|
+
|
|
59
|
+
**Gate:**
|
|
60
|
+
- [ ] All UI elements mapped to design system components (see `.forge/design-system.md`)
|
|
61
|
+
- [ ] No custom markup replacing design system primitives
|
|
62
|
+
- [ ] Theme tokens used instead of hardcoded colors/spacing
|
|
63
|
+
- [ ] Configured icon set used consistently
|
|
64
|
+
|
|
65
|
+
_Note: If `design_system.library` is `none` in project.yml, this article is automatically inactive._
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Security & Data Articles
|
|
70
|
+
|
|
71
|
+
_Enable if the project handles authentication, user data, or external APIs._
|
|
72
|
+
|
|
73
|
+
### Article VI: Security by Default
|
|
74
|
+
|
|
75
|
+
Authentication, authorization, input validation, and secret management are never optional. Security is a requirement, not a feature.
|
|
76
|
+
|
|
77
|
+
**Gate:**
|
|
78
|
+
- [ ] Secrets stored in environment variables, never in code
|
|
79
|
+
- [ ] User input validated and sanitized
|
|
80
|
+
- [ ] Authentication/authorization checked before data access
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Architecture Articles
|
|
85
|
+
|
|
86
|
+
_Enable based on project complexity and team needs._
|
|
87
|
+
|
|
88
|
+
### Article VII: Integration-First
|
|
89
|
+
|
|
90
|
+
Components are tested with real dependencies (real database, real API calls) before mocking is introduced. Mocks are a last resort, not a first choice.
|
|
91
|
+
|
|
92
|
+
**Gate:**
|
|
93
|
+
- [ ] Integration tests planned before unit tests
|
|
94
|
+
- [ ] Mocks used only for external services outside our control
|
|
95
|
+
|
|
96
|
+
### Article VIII: Documentation-Driven
|
|
97
|
+
|
|
98
|
+
Architectural decisions, API contracts, and non-obvious behavior are documented where the code lives, not in separate docs that drift.
|
|
99
|
+
|
|
100
|
+
**Gate:**
|
|
101
|
+
- [ ] Key decisions documented as ADRs or inline comments with rationale
|
|
102
|
+
- [ ] API contracts defined before implementation
|
|
103
|
+
|
|
104
|
+
### Article IX: Observability
|
|
105
|
+
|
|
106
|
+
Production code must be debuggable. Logging, error reporting, and health checks are first-class concerns.
|
|
107
|
+
|
|
108
|
+
**Gate:**
|
|
109
|
+
- [ ] Error handling includes meaningful messages (not empty catches)
|
|
110
|
+
- [ ] Key operations have logging or tracing
|
|
111
|
+
- [ ] Failure modes are documented
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Project-Specific Articles
|
|
116
|
+
|
|
117
|
+
_Add custom articles below during project init. Follow the same format: rule + gate checkboxes._
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Amending the Constitution
|
|
122
|
+
|
|
123
|
+
Articles can be amended only by explicit user decision during a discuss phase. Amendments are recorded in `.forge/context.md` with rationale. No agent may unilaterally override a constitutional article.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Locked Context
|
|
2
|
+
|
|
3
|
+
Created during the discuss phase. This document is a contract between the user and all downstream agents.
|
|
4
|
+
|
|
5
|
+
**Rules:**
|
|
6
|
+
- **Locked Decisions** → MUST be implemented exactly as stated. No alternatives. No "better" solutions.
|
|
7
|
+
- **Deferred Ideas** → MUST NOT appear in plans, tasks, or code. Not even as TODOs.
|
|
8
|
+
- **Discretion Areas** → Agent uses judgment. Research the options, pick the best, document why.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Locked Decisions
|
|
13
|
+
|
|
14
|
+
<!-- Add one per line. Be specific. Include the WHY if it helps agents understand intent. -->
|
|
15
|
+
|
|
16
|
+
- **[Topic]**: [Decision]. Reason: [Why this was chosen]
|
|
17
|
+
- **[Topic]**: [Decision]. Reason: [Why this was chosen]
|
|
18
|
+
|
|
19
|
+
## Deferred Ideas
|
|
20
|
+
|
|
21
|
+
<!-- These are explicitly out of scope. Agents must not implement or plan for these. -->
|
|
22
|
+
|
|
23
|
+
- [Idea] — Deferred because: [reason]. Revisit: [when]
|
|
24
|
+
- [Idea] — Deferred because: [reason]. Revisit: [when]
|
|
25
|
+
|
|
26
|
+
## Discretion Areas
|
|
27
|
+
|
|
28
|
+
<!-- Agent picks the best approach. Document the choice and rationale after deciding. -->
|
|
29
|
+
|
|
30
|
+
- [Topic]: [Options under consideration]. Agent should research and recommend.
|
|
31
|
+
- [Topic]: [Options under consideration]. Agent should research and recommend.
|
|
32
|
+
|
|
33
|
+
## Carried Forward
|
|
34
|
+
|
|
35
|
+
<!-- Knowledge from a previous framework or session that didn't map cleanly to Forge files. -->
|
|
36
|
+
<!-- Review during planning — some items may become requirements, decisions, or deferrals. -->
|
|
37
|
+
|
|
38
|
+
## Needs Resolution
|
|
39
|
+
|
|
40
|
+
<!-- Discrepancies found during brownfield init or absorption that need user input. -->
|
|
41
|
+
<!-- BLOCKING: Planning cannot proceed until all items here are resolved or moved to another section. -->
|
|
42
|
+
<!-- When resolved, move item to Locked Decisions, Deferred Ideas, or delete with rationale. -->
|
|
43
|
+
|
|
44
|
+
- [ ] [Discrepancy description] — Found: [what code shows]. Documented: [what old docs said]. Action needed: [question for user]
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Amendment Log
|
|
49
|
+
|
|
50
|
+
<!-- If a locked decision changes, record it here with date and rationale. -->
|
|
51
|
+
|
|
52
|
+
| Date | Change | Rationale | Approved By |
|
|
53
|
+
|------|--------|-----------|-------------|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Design System: Material UI (MUI)
|
|
2
|
+
|
|
3
|
+
Docs: https://mui.com/material-ui/
|
|
4
|
+
|
|
5
|
+
## Component Mapping
|
|
6
|
+
|
|
7
|
+
| UI Need | Component | Key Props | Example |
|
|
8
|
+
|---------|-----------|-----------|---------|
|
|
9
|
+
| Data table | `<DataGrid>` | `rows`, `columns`, `pageSizeOptions` | `<DataGrid rows={data} columns={cols} pageSizeOptions={[10, 25]} />` |
|
|
10
|
+
| Modal dialog | `<Dialog>` | `open`, `onClose` | `<Dialog open={show} onClose={() => setShow(false)}><DialogTitle>Confirm</DialogTitle><DialogContent>...</DialogContent></Dialog>` |
|
|
11
|
+
| Dropdown/select | `<Select>` | `value`, `onChange`, `label` | `<FormControl><InputLabel>Role</InputLabel><Select value={val} onChange={e => setVal(e.target.value)}><MenuItem value="admin">Admin</MenuItem></Select></FormControl>` |
|
|
12
|
+
| Autocomplete | `<Autocomplete>` | `options`, `value`, `onChange`, `renderInput` | `<Autocomplete options={items} renderInput={p => <TextField {...p} />} />` |
|
|
13
|
+
| Toast/snackbar | `<Snackbar>` + `<Alert>` | `open`, `onClose`, `severity` | `<Snackbar open={show}><Alert severity="success">Saved</Alert></Snackbar>` |
|
|
14
|
+
| Button | `<Button>` | `variant`, `color`, `onClick`, `startIcon` | `<Button variant="contained" startIcon={<SaveIcon />} onClick={save}>Save</Button>` |
|
|
15
|
+
| Text input | `<TextField>` | `value`, `onChange`, `label`, `variant` | `<TextField value={text} onChange={e => setText(e.target.value)} label="Name" />` |
|
|
16
|
+
| Number input | `<TextField>` | `type="number"`, `inputProps` | `<TextField type="number" inputProps={{min: 0}} />` |
|
|
17
|
+
| Date picker | `<DatePicker>` | `value`, `onChange` | `<DatePicker value={date} onChange={setDate} />` (requires @mui/x-date-pickers) |
|
|
18
|
+
| Sidebar/drawer | `<Drawer>` | `open`, `onClose`, `anchor` | `<Drawer open={show} onClose={() => setShow(false)} anchor="right">...</Drawer>` |
|
|
19
|
+
| Tabs | `<Tabs>` + `<Tab>` | `value`, `onChange` | `<Tabs value={tab} onChange={(e,v) => setTab(v)}><Tab label="Tab 1" /></Tabs>` |
|
|
20
|
+
| Accordion | `<Accordion>` | `expanded`, `onChange` | `<Accordion expanded={open}><AccordionSummary>Title</AccordionSummary><AccordionDetails>Content</AccordionDetails></Accordion>` |
|
|
21
|
+
| App bar | `<AppBar>` + `<Toolbar>` | `position` | `<AppBar position="static"><Toolbar>...</Toolbar></AppBar>` |
|
|
22
|
+
| Breadcrumb | `<Breadcrumbs>` | `separator` | `<Breadcrumbs><Link>Home</Link><Typography>Current</Typography></Breadcrumbs>` |
|
|
23
|
+
| Progress bar | `<LinearProgress>` | `variant`, `value` | `<LinearProgress variant="determinate" value={50} />` |
|
|
24
|
+
| Chip/tag | `<Chip>` | `label`, `color`, `onDelete` | `<Chip label="Active" color="primary" />` |
|
|
25
|
+
| Card | `<Card>` | — | `<Card><CardContent><Typography>...</Typography></CardContent><CardActions>...</CardActions></Card>` |
|
|
26
|
+
| Skeleton loader | `<Skeleton>` | `variant`, `width`, `height` | `<Skeleton variant="rectangular" width="100%" height={40} />` |
|
|
27
|
+
| Spinner | `<CircularProgress>` | `size`, `color` | `<CircularProgress size={40} />` |
|
|
28
|
+
|
|
29
|
+
## Style Rules
|
|
30
|
+
|
|
31
|
+
- **Theme tokens**: Use MUI's `sx` prop with theme tokens (`sx={{ color: 'primary.main', p: 3 }}`)
|
|
32
|
+
- **Layout**: Use MUI Grid (`<Grid container spacing={2}><Grid item xs={12} md={6}>`)
|
|
33
|
+
- **Spacing**: Theme-based spacing (`sx={{ p: 2, m: 1, gap: 2 }}` where 1 unit = 8px)
|
|
34
|
+
- **Colors**: Always reference theme palette (`primary.main`, `error.light`, `text.secondary`)
|
|
35
|
+
- **Theme customization**: Use `createTheme()` and `ThemeProvider`, never inline color values
|
|
36
|
+
- **Styled components**: Use `styled()` utility or `sx` prop, avoid external CSS files
|
|
37
|
+
|
|
38
|
+
## Icon Reference
|
|
39
|
+
|
|
40
|
+
Material Icons: `import { IconName } from "@mui/icons-material"`
|
|
41
|
+
|
|
42
|
+
Common: `Save`, `Delete`, `Edit`, `Add`, `Search`, `Close`, `Check`, `Person`, `Settings`, `Download`, `Upload`, `Refresh`, `FilterList`, `Sort`, `Visibility`, `VisibilityOff`
|
|
43
|
+
|
|
44
|
+
Full list: https://mui.com/material-ui/material-icons/
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Design System: PrimeReact
|
|
2
|
+
|
|
3
|
+
Docs: https://primereact.org
|
|
4
|
+
|
|
5
|
+
## Component Mapping
|
|
6
|
+
|
|
7
|
+
| UI Need | Component | Key Props | Example |
|
|
8
|
+
|---------|-----------|-----------|---------|
|
|
9
|
+
| Data table | `<DataTable>` | `value`, `paginator`, `sortMode`, `selectionMode` | `<DataTable value={data} paginator rows={10} sortMode="multiple" />` |
|
|
10
|
+
| Sortable columns | `<Column>` | `field`, `header`, `sortable`, `filter` | `<Column field="name" header="Name" sortable filter />` |
|
|
11
|
+
| Row selection | DataTable | `selectionMode="checkbox"`, `selection`, `onSelectionChange` | `<DataTable selectionMode="checkbox" selection={selected} onSelectionChange={e => setSelected(e.value)} />` |
|
|
12
|
+
| Modal dialog | `<Dialog>` | `visible`, `onHide`, `header`, `modal` | `<Dialog visible={show} onHide={() => setShow(false)} header="Confirm" modal />` |
|
|
13
|
+
| Dropdown/select | `<Dropdown>` | `value`, `onChange`, `options`, `optionLabel` | `<Dropdown value={val} onChange={e => setVal(e.value)} options={items} optionLabel="name" />` |
|
|
14
|
+
| Multi-select | `<MultiSelect>` | `value`, `onChange`, `options`, `display` | `<MultiSelect value={vals} onChange={e => setVals(e.value)} options={items} display="chip" />` |
|
|
15
|
+
| Toast | `<Toast>` + ref | `ref`, then `toast.current.show({severity, summary, detail})` | `<Toast ref={toast} />` |
|
|
16
|
+
| Button | `<Button>` | `label`, `icon`, `onClick`, `severity`, `outlined` | `<Button label="Save" icon="pi pi-check" severity="success" />` |
|
|
17
|
+
| Text input | `<InputText>` | `value`, `onChange`, `placeholder` | `<InputText value={text} onChange={e => setText(e.target.value)} />` |
|
|
18
|
+
| Text area | `<InputTextarea>` | `value`, `onChange`, `rows`, `autoResize` | `<InputTextarea value={text} onChange={e => setText(e.target.value)} autoResize />` |
|
|
19
|
+
| Number input | `<InputNumber>` | `value`, `onValueChange`, `mode`, `min`, `max` | `<InputNumber value={num} onValueChange={e => setNum(e.value)} />` |
|
|
20
|
+
| Date picker | `<Calendar>` | `value`, `onChange`, `showIcon`, `dateFormat` | `<Calendar value={date} onChange={e => setDate(e.value)} showIcon />` |
|
|
21
|
+
| Sidebar/drawer | `<Sidebar>` | `visible`, `onHide`, `position` | `<Sidebar visible={show} onHide={() => setShow(false)} position="right" />` |
|
|
22
|
+
| Tabs | `<TabView>` + `<TabPanel>` | `activeIndex`, `onTabChange` | `<TabView><TabPanel header="Tab 1">Content</TabPanel></TabView>` |
|
|
23
|
+
| Accordion | `<Accordion>` + `<AccordionTab>` | `activeIndex`, `multiple` | `<Accordion multiple><AccordionTab header="Section">Content</AccordionTab></Accordion>` |
|
|
24
|
+
| Menu bar | `<Menubar>` | `model` | `<Menubar model={[{label:'File', items:[{label:'New'}]}]} />` |
|
|
25
|
+
| Breadcrumb | `<BreadCrumb>` | `model`, `home` | `<BreadCrumb model={items} home={{icon:'pi pi-home', url:'/'}} />` |
|
|
26
|
+
| Progress bar | `<ProgressBar>` | `value`, `showValue` | `<ProgressBar value={50} />` |
|
|
27
|
+
| Chip/tag | `<Chip>` | `label`, `icon`, `removable` | `<Chip label="Active" icon="pi pi-check" />` |
|
|
28
|
+
| File upload | `<FileUpload>` | `mode`, `accept`, `maxFileSize` | `<FileUpload mode="basic" accept="image/*" maxFileSize={5000000} />` |
|
|
29
|
+
| Skeleton loader | `<Skeleton>` | `width`, `height`, `shape` | `<Skeleton width="100%" height="2rem" />` |
|
|
30
|
+
| Spinner | `<ProgressSpinner>` | `style`, `strokeWidth` | `<ProgressSpinner style={{width:'50px'}} />` |
|
|
31
|
+
|
|
32
|
+
## Style Rules
|
|
33
|
+
|
|
34
|
+
- **Theme tokens**: Use PrimeReact CSS classes (`text-primary`, `p-3`, `surface-card`) not inline styles
|
|
35
|
+
- **Layout**: Use PrimeFlex (`className="grid"` with `col-12 md:col-6 lg:col-3`)
|
|
36
|
+
- **Flex**: `className="flex align-items-center justify-content-between gap-3"`
|
|
37
|
+
- **Spacing**: PrimeFlex utilities (`p-3`, `m-2`, `gap-3`)
|
|
38
|
+
- **Theme customization**: Override in `_variables.scss` or theme config, never inline
|
|
39
|
+
|
|
40
|
+
## Icon Reference
|
|
41
|
+
|
|
42
|
+
PrimeIcons: `<i className="pi pi-{name}"></i>` or `icon="pi pi-{name}"` on Button
|
|
43
|
+
|
|
44
|
+
Common: `pi-check`, `pi-times`, `pi-search`, `pi-plus`, `pi-trash`, `pi-pencil`, `pi-user`, `pi-cog`, `pi-download`, `pi-upload`, `pi-refresh`, `pi-filter`, `pi-sort-alt`, `pi-eye`, `pi-eye-slash`
|
|
45
|
+
|
|
46
|
+
Full list: https://primereact.org/icons
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Design System: shadcn/ui
|
|
2
|
+
|
|
3
|
+
Docs: https://ui.shadcn.com
|
|
4
|
+
|
|
5
|
+
## Component Mapping
|
|
6
|
+
|
|
7
|
+
| UI Need | Component | Key Props | Example |
|
|
8
|
+
|---------|-----------|-----------|---------|
|
|
9
|
+
| Data table | `<DataTable>` (custom) | `columns`, `data` | Use TanStack Table + shadcn styling |
|
|
10
|
+
| Modal dialog | `<Dialog>` | `open`, `onOpenChange` | `<Dialog open={show} onOpenChange={setShow}><DialogContent>...</DialogContent></Dialog>` |
|
|
11
|
+
| Dropdown/select | `<Select>` | `value`, `onValueChange` | `<Select value={val} onValueChange={setVal}><SelectTrigger><SelectValue /></SelectTrigger><SelectContent>...</SelectContent></Select>` |
|
|
12
|
+
| Command menu | `<Command>` | — | `<Command><CommandInput /><CommandList><CommandItem>...</CommandItem></CommandList></Command>` |
|
|
13
|
+
| Toast | `useToast()` hook | `toast({ title, description })` | `const { toast } = useToast(); toast({ title: "Saved" })` |
|
|
14
|
+
| Button | `<Button>` | `variant`, `size`, `onClick` | `<Button variant="default" onClick={save}>Save</Button>` |
|
|
15
|
+
| Text input | `<Input>` | `value`, `onChange`, `placeholder` | `<Input value={text} onChange={e => setText(e.target.value)} />` |
|
|
16
|
+
| Text area | `<Textarea>` | `value`, `onChange`, `rows` | `<Textarea value={text} onChange={e => setText(e.target.value)} />` |
|
|
17
|
+
| Date picker | `<DatePicker>` | `date`, `setDate` | `<DatePicker date={date} setDate={setDate} />` |
|
|
18
|
+
| Sidebar/sheet | `<Sheet>` | `open`, `onOpenChange` | `<Sheet open={show} onOpenChange={setShow}><SheetContent>...</SheetContent></Sheet>` |
|
|
19
|
+
| Tabs | `<Tabs>` | `value`, `onValueChange` | `<Tabs value={tab} onValueChange={setTab}><TabsList><TabsTrigger>...</TabsTrigger></TabsList></Tabs>` |
|
|
20
|
+
| Accordion | `<Accordion>` | `type`, `collapsible` | `<Accordion type="multiple"><AccordionItem>...</AccordionItem></Accordion>` |
|
|
21
|
+
| Navigation | `<NavigationMenu>` | — | `<NavigationMenu><NavigationMenuList>...</NavigationMenuList></NavigationMenu>` |
|
|
22
|
+
| Breadcrumb | `<Breadcrumb>` | — | `<Breadcrumb><BreadcrumbList><BreadcrumbItem>...</BreadcrumbItem></BreadcrumbList></Breadcrumb>` |
|
|
23
|
+
| Progress bar | `<Progress>` | `value` | `<Progress value={50} />` |
|
|
24
|
+
| Badge/tag | `<Badge>` | `variant` | `<Badge variant="secondary">Active</Badge>` |
|
|
25
|
+
| Alert | `<Alert>` | `variant` | `<Alert variant="destructive"><AlertTitle>Error</AlertTitle></Alert>` |
|
|
26
|
+
| Card | `<Card>` | — | `<Card><CardHeader><CardTitle>...</CardTitle></CardHeader><CardContent>...</CardContent></Card>` |
|
|
27
|
+
| Checkbox | `<Checkbox>` | `checked`, `onCheckedChange` | `<Checkbox checked={val} onCheckedChange={setVal} />` |
|
|
28
|
+
| Switch | `<Switch>` | `checked`, `onCheckedChange` | `<Switch checked={val} onCheckedChange={setVal} />` |
|
|
29
|
+
| Skeleton loader | `<Skeleton>` | `className` | `<Skeleton className="h-4 w-full" />` |
|
|
30
|
+
| Dropdown menu | `<DropdownMenu>` | — | `<DropdownMenu><DropdownMenuTrigger>...</DropdownMenuTrigger><DropdownMenuContent>...</DropdownMenuContent></DropdownMenu>` |
|
|
31
|
+
|
|
32
|
+
## Style Rules
|
|
33
|
+
|
|
34
|
+
- **Theme tokens**: Use CSS variables from `globals.css` (`--primary`, `--secondary`, `--muted`, etc.)
|
|
35
|
+
- **Layout**: Use Tailwind CSS utilities (`grid grid-cols-12`, `flex items-center justify-between gap-3`)
|
|
36
|
+
- **Spacing**: Tailwind utilities (`p-3`, `m-2`, `space-y-4`)
|
|
37
|
+
- **Colors**: Always use theme variables (`bg-primary`, `text-muted-foreground`), never hardcoded hex
|
|
38
|
+
- **Theme customization**: Modify CSS variables in `globals.css` or `tailwind.config`
|
|
39
|
+
- **Component variants**: Use the `cn()` utility for conditional classes
|
|
40
|
+
|
|
41
|
+
## Icon Reference
|
|
42
|
+
|
|
43
|
+
Lucide React: `import { IconName } from "lucide-react"`
|
|
44
|
+
|
|
45
|
+
Common: `Check`, `X`, `Search`, `Plus`, `Trash2`, `Pencil`, `User`, `Settings`, `Download`, `Upload`, `RefreshCw`, `Filter`, `ArrowUpDown`, `Eye`, `EyeOff`
|
|
46
|
+
|
|
47
|
+
Full list: https://lucide.dev/icons
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Generic Framework Absorption Reference
|
|
2
|
+
|
|
3
|
+
This file is used when the `forge` skill detects an unknown or custom meta-prompting framework during brownfield init.
|
|
4
|
+
|
|
5
|
+
## Detection Signals
|
|
6
|
+
|
|
7
|
+
Any of these suggest a meta-prompting framework is present:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
.claude/agents/ or agents/ # Agent definitions
|
|
11
|
+
.claude/skills/ or skills/ # Skill definitions
|
|
12
|
+
CLAUDE.md with routing tables # Framework entry point
|
|
13
|
+
workflows/ or commands/ # Workflow definitions
|
|
14
|
+
templates/ with spec/plan files # Structured templates
|
|
15
|
+
Any *.md files describing agent roles, workflows, or governance rules
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Discovery Process
|
|
19
|
+
|
|
20
|
+
Since the framework is unknown, use the `researching` skill to understand it:
|
|
21
|
+
|
|
22
|
+
1. **Identify the entry point** — Look for CLAUDE.md, README.md, or the largest markdown file
|
|
23
|
+
2. **Map the structure** — List all directories and key files
|
|
24
|
+
3. **Classify content** — For each file, determine if it contains:
|
|
25
|
+
- Project information (→ `.forge/project.yml`)
|
|
26
|
+
- Requirements or specifications (→ `.forge/requirements.yml`)
|
|
27
|
+
- Plans or roadmaps (→ `.forge/roadmap.yml`)
|
|
28
|
+
- State or progress tracking (→ `.forge/state/index.yml` + `.forge/state/milestone-{id}.yml`)
|
|
29
|
+
- Decisions or constraints (→ `.forge/context.md`)
|
|
30
|
+
- Governance rules (→ `.forge/constitution.md`)
|
|
31
|
+
- Design/UI rules (→ `.forge/design-system.md`)
|
|
32
|
+
- Agent definitions (→ `.claude/agents/`)
|
|
33
|
+
- Workflow/skill logic (→ `.claude/skills/`)
|
|
34
|
+
4. **Present findings** — Show the mapping to the user before converting
|
|
35
|
+
|
|
36
|
+
## Conversion Principles
|
|
37
|
+
|
|
38
|
+
- **Preserve all project knowledge** — Nothing gets discarded. If it doesn't fit a Forge file, add it to `.forge/context.md` under "Carried Forward".
|
|
39
|
+
- **YAML for machine state** — If the original used prose for state tracking, convert to YAML.
|
|
40
|
+
- **Markdown for human content** — Keep human-facing docs as markdown.
|
|
41
|
+
- **Ask when uncertain** — If a file's purpose is unclear, ask the user rather than guessing.
|
|
42
|
+
|
|
43
|
+
## Absorption Checklist
|
|
44
|
+
|
|
45
|
+
- [ ] Framework structure mapped and understood
|
|
46
|
+
- [ ] All content files classified by type
|
|
47
|
+
- [ ] Project info extracted to `.forge/project.yml`
|
|
48
|
+
- [ ] Requirements extracted to `.forge/requirements.yml`
|
|
49
|
+
- [ ] Governance rules mapped to `.forge/constitution.md`
|
|
50
|
+
- [ ] Remaining knowledge captured in `.forge/context.md`
|
|
51
|
+
- [ ] Original framework files archived in `.forge/archive/{name}/`
|
|
52
|
+
- [ ] User confirmed conversion results
|