@jadeit/forge-ai 0.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/README.md +57 -0
- package/dist/agents/build-agent.md +221 -0
- package/dist/agents/deploy-agent.md +256 -0
- package/dist/agents/design-agent.md +221 -0
- package/dist/agents/feature-dev/approach.md +169 -0
- package/dist/agents/feature-dev/clarify.md +131 -0
- package/dist/agents/feature-dev/discover.md +113 -0
- package/dist/agents/feature-dev/explore.md +124 -0
- package/dist/agents/feature-dev/implement.md +200 -0
- package/dist/agents/feature-dev/review.md +205 -0
- package/dist/agents/feature-dev/summarise.md +187 -0
- package/dist/agents/feature-dev/validate.md +211 -0
- package/dist/agents/forge-orchestrator.md +188 -0
- package/dist/agents/maintain-agent.md +251 -0
- package/dist/agents/plan-agent.md +181 -0
- package/dist/agents/test-agent.md +215 -0
- package/dist/commands/forge-1-plan.md +48 -0
- package/dist/commands/forge-2-design.md +51 -0
- package/dist/commands/forge-3-build-1-discover.md +34 -0
- package/dist/commands/forge-3-build-2-explore.md +30 -0
- package/dist/commands/forge-3-build-3-clarify.md +39 -0
- package/dist/commands/forge-3-build-4-approach.md +38 -0
- package/dist/commands/forge-3-build-5-implement.md +38 -0
- package/dist/commands/forge-3-build-6-review.md +50 -0
- package/dist/commands/forge-3-build-7-validate.md +49 -0
- package/dist/commands/forge-3-build-8-summarise.md +49 -0
- package/dist/commands/forge-3-build.md +54 -0
- package/dist/commands/forge-4-test.md +45 -0
- package/dist/commands/forge-5-deploy.md +50 -0
- package/dist/commands/forge-6-maintain.md +66 -0
- package/dist/commands/forge-init.md +111 -0
- package/dist/commands/forge-status.md +94 -0
- package/dist/commands/forge.md +77 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/skills/forge-context-loader/SKILL.md +99 -0
- package/dist/skills/forge-quality-checker/SKILL.md +227 -0
- package/dist/skills/forge-state-manager/SKILL.md +235 -0
- package/dist/skills/forge-template-loader/SKILL.md +162 -0
- package/dist/templates/defects/DEFECT_TEMPLATE.md +96 -0
- package/dist/templates/design/design-decisions.md +64 -0
- package/dist/templates/design/task-list.md +56 -0
- package/dist/templates/design/tasks/TASK_TEMPLATE.md +87 -0
- package/dist/templates/planning/implementation-plan.md +59 -0
- package/dist/templates/planning/project-scope.md +53 -0
- package/dist/templates/planning/technology-and-architecture.md +80 -0
- package/dist/templates/planning/user-stories.md +48 -0
- package/dist/templates/testing/uat-results.md +68 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge Feature Dev - Sub-phase 6 Review
|
|
3
|
+
agent: forge-build
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge AI: Phase 3 - Sub-phase 6: Review
|
|
7
|
+
|
|
8
|
+
Invoke the `@forge-review` subagent for Feature Dev sub-phase 6.
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Quality review using automated checks followed by AI code review.
|
|
13
|
+
|
|
14
|
+
## Quality Gates
|
|
15
|
+
|
|
16
|
+
Run these automated checks:
|
|
17
|
+
1. **Lint Check** - Code style
|
|
18
|
+
2. **Type Check** - Type safety
|
|
19
|
+
3. **Security Audit** - Vulnerabilities
|
|
20
|
+
4. **Tests** - All must pass
|
|
21
|
+
5. **Coverage** - Must meet threshold (default 80%)
|
|
22
|
+
|
|
23
|
+
## AI Code Review
|
|
24
|
+
|
|
25
|
+
After automated checks pass, review for:
|
|
26
|
+
- SOLID principles compliance
|
|
27
|
+
- Design pattern usage
|
|
28
|
+
- Error handling
|
|
29
|
+
- Security
|
|
30
|
+
- Performance
|
|
31
|
+
- Maintainability
|
|
32
|
+
|
|
33
|
+
## Issue Severity
|
|
34
|
+
|
|
35
|
+
| Severity | Action |
|
|
36
|
+
|----------|--------|
|
|
37
|
+
| Critical | Must fix before proceeding |
|
|
38
|
+
| High | Should fix |
|
|
39
|
+
| Medium | Consider fixing |
|
|
40
|
+
| Low | Nice to have |
|
|
41
|
+
|
|
42
|
+
## Rework Decision
|
|
43
|
+
|
|
44
|
+
- **Minor issues** → Loop to `/forge-3-build-5-implement`
|
|
45
|
+
- **Approach issues** → Loop to `/forge-3-build-4-approach`
|
|
46
|
+
|
|
47
|
+
## Next Steps
|
|
48
|
+
|
|
49
|
+
After review passes, proceed to:
|
|
50
|
+
- `/forge-3-build-7-validate`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge Feature Dev - Sub-phase 7 Validate
|
|
3
|
+
agent: forge-build
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge AI: Phase 3 - Sub-phase 7: Validate
|
|
7
|
+
|
|
8
|
+
Invoke the `@forge-validate` subagent for Feature Dev sub-phase 7.
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Validate tests against the task document's acceptance criteria.
|
|
13
|
+
|
|
14
|
+
## Validation Checklist
|
|
15
|
+
|
|
16
|
+
### 1. Coverage Mapping
|
|
17
|
+
For each acceptance criterion, identify which test(s) validate it.
|
|
18
|
+
|
|
19
|
+
| Acceptance Criterion | Test(s) | Covered |
|
|
20
|
+
|---------------------|---------|---------|
|
|
21
|
+
| AC1: Users can authenticate | auth.test.ts | ✓ |
|
|
22
|
+
| AC2: Session expires | - | ✗ |
|
|
23
|
+
|
|
24
|
+
### 2. Assertion Quality
|
|
25
|
+
- Meaningful assertions (not just "no error")
|
|
26
|
+
- Appropriate mocking
|
|
27
|
+
- Error path testing
|
|
28
|
+
|
|
29
|
+
### 3. Negative Testing
|
|
30
|
+
- Invalid input handling
|
|
31
|
+
- Edge cases
|
|
32
|
+
- Error scenarios
|
|
33
|
+
|
|
34
|
+
### 4. Independence Check
|
|
35
|
+
Would tests fail if implementation removed?
|
|
36
|
+
|
|
37
|
+
## Validation Thresholds
|
|
38
|
+
|
|
39
|
+
From `.forge/config.yaml`:
|
|
40
|
+
- Test coverage minimum: 80% (configurable)
|
|
41
|
+
|
|
42
|
+
## Rework Decision
|
|
43
|
+
|
|
44
|
+
If validation fails → Loop to `/forge-3-build-5-implement` for test fixes
|
|
45
|
+
|
|
46
|
+
## Next Steps
|
|
47
|
+
|
|
48
|
+
After validation passes, proceed to:
|
|
49
|
+
- `/forge-3-build-8-summarise`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge Feature Dev - Sub-phase 8 Summarise
|
|
3
|
+
agent: forge-build
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge AI: Phase 3 - Sub-phase 8: Summarise
|
|
7
|
+
|
|
8
|
+
Invoke the `@forge-summarise` subagent for Feature Dev sub-phase 8.
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Document what was accomplished.
|
|
13
|
+
|
|
14
|
+
## Summary Content
|
|
15
|
+
|
|
16
|
+
### Document in task document:
|
|
17
|
+
|
|
18
|
+
1. **What Was Built** - Brief description
|
|
19
|
+
2. **Changes Made** - Table of files modified
|
|
20
|
+
3. **Decisions Made** - Any deviations from approach
|
|
21
|
+
4. **Known Limitations** - Deferred items, technical debt
|
|
22
|
+
5. **Next Steps** - What comes next
|
|
23
|
+
|
|
24
|
+
### Update task document frontmatter:
|
|
25
|
+
```yaml
|
|
26
|
+
status: complete
|
|
27
|
+
completed: [timestamp]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Update state file:
|
|
31
|
+
```yaml
|
|
32
|
+
features:
|
|
33
|
+
task-slug:
|
|
34
|
+
status: complete
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Lifecycle Complete
|
|
38
|
+
|
|
39
|
+
Feature Development Lifecycle is complete when:
|
|
40
|
+
- ✓ All 8 sub-phases completed
|
|
41
|
+
- ✓ Task document updated with summary
|
|
42
|
+
- ✓ State file updated
|
|
43
|
+
|
|
44
|
+
## Next Actions
|
|
45
|
+
|
|
46
|
+
After lifecycle complete:
|
|
47
|
+
1. Run full test suite
|
|
48
|
+
2. Manual testing
|
|
49
|
+
3. Next feature or Phase 4: Testing
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge AI Phase 3 - Development via Feature Dev lifecycle
|
|
3
|
+
agent: forge-build
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge AI: Phase 3 - Development
|
|
7
|
+
|
|
8
|
+
Invoke the `@forge-build` agent to begin Feature Development.
|
|
9
|
+
|
|
10
|
+
## Feature Dev Lifecycle
|
|
11
|
+
|
|
12
|
+
| Sub-Phase | Command | Description |
|
|
13
|
+
|-----------|---------|-------------|
|
|
14
|
+
| 1 | `/forge-3-build-1-discover` | Understand what needs to be built |
|
|
15
|
+
| 2 | `/forge-3-build-2-explore` | Explore relevant existing code |
|
|
16
|
+
| 3 | `/forge-3-build-3-clarify` | Resolve ambiguities |
|
|
17
|
+
| 4 | `/forge-3-build-4-approach` | Design/validate approach |
|
|
18
|
+
| 5 | `/forge-3-build-5-implement` | Build the feature |
|
|
19
|
+
| 6 | `/forge-3-build-6-review` | Quality review |
|
|
20
|
+
| 7 | `/forge-3-build-7-validate` | Test validation |
|
|
21
|
+
| 8 | `/forge-3-build-8-summarise` | Document accomplishments |
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
Run `/forge-3-build` for full lifecycle, or use specific sub-phase commands:
|
|
26
|
+
- `/forge-3-build-1-discover`
|
|
27
|
+
- `/forge-3-build-2-explore`
|
|
28
|
+
- `/forge-3-build-3-clarify`
|
|
29
|
+
- `/forge-3-build-4-approach`
|
|
30
|
+
- `/forge-3-build-5-implement`
|
|
31
|
+
- `/forge-3-build-6-review`
|
|
32
|
+
- `/forge-3-build-7-validate`
|
|
33
|
+
- `/forge-3-build-8-summarise`
|
|
34
|
+
|
|
35
|
+
## Operating Modes
|
|
36
|
+
|
|
37
|
+
| Mode | Condition | Behaviour |
|
|
38
|
+
|------|-----------|-----------|
|
|
39
|
+
| Brownfield | Task document exists with detail | Lighter discovery, validate approach |
|
|
40
|
+
| Greenfield | No task document | Full scoping, create task doc |
|
|
41
|
+
|
|
42
|
+
## Flags
|
|
43
|
+
|
|
44
|
+
- `--only {sub-phase}` - Run specific sub-phase
|
|
45
|
+
- `--task {slug}` - Work on specific task
|
|
46
|
+
- `--model {tier}` - Override model tier
|
|
47
|
+
|
|
48
|
+
## Prerequisites
|
|
49
|
+
|
|
50
|
+
Phase 2 must be complete. Check `.forge/state.yaml`.
|
|
51
|
+
|
|
52
|
+
## Next Steps
|
|
53
|
+
|
|
54
|
+
After Phase 3 complete, use `/forge-4-test` for Phase 4: Testing.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge AI Phase 4 - Functional testing and UAT
|
|
3
|
+
agent: forge-test
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge AI: Phase 4 - Testing
|
|
7
|
+
|
|
8
|
+
Invoke the `@forge-test` agent to begin User Acceptance Testing.
|
|
9
|
+
|
|
10
|
+
## What Happens
|
|
11
|
+
|
|
12
|
+
1. User stories and acceptance criteria are loaded
|
|
13
|
+
2. UAT checklist is presented
|
|
14
|
+
3. For each item, you confirm: passed / failed / skipped
|
|
15
|
+
4. Failed items → defect reports created in `docs/defects/`
|
|
16
|
+
5. Results → `docs/testing/uat-results.md`
|
|
17
|
+
6. State updated after your sign-off
|
|
18
|
+
|
|
19
|
+
## UAT Gate Process
|
|
20
|
+
|
|
21
|
+
1. Present checklist of user stories with acceptance criteria
|
|
22
|
+
2. You verify each by running the project locally
|
|
23
|
+
3. For each item: PASSED / FAILED / SKIPPED
|
|
24
|
+
4. Failed items produce defect reports
|
|
25
|
+
5. Skipped items logged with reason
|
|
26
|
+
6. Phase 5 proceeds only after your sign-off
|
|
27
|
+
|
|
28
|
+
## Requirements
|
|
29
|
+
|
|
30
|
+
User acceptance testing MUST be done by:
|
|
31
|
+
- Running the project locally
|
|
32
|
+
- Validating each user story against implementation
|
|
33
|
+
- NOT just running automated tests
|
|
34
|
+
|
|
35
|
+
## Defect Handling
|
|
36
|
+
|
|
37
|
+
For failed items:
|
|
38
|
+
1. Create defect report in `docs/defects/`
|
|
39
|
+
2. Document reproduction steps
|
|
40
|
+
3. Classify: design or implementation
|
|
41
|
+
4. Route to appropriate phase
|
|
42
|
+
|
|
43
|
+
## Next Steps
|
|
44
|
+
|
|
45
|
+
After Phase 4 complete, use `/forge-5-deploy` for Phase 5: Deployment.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge AI Phase 5 - Deployment
|
|
3
|
+
agent: forge-deploy
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge AI: Phase 5 - Deployment
|
|
7
|
+
|
|
8
|
+
Invoke the `@forge-deploy` agent to execute deployment.
|
|
9
|
+
|
|
10
|
+
## What Happens
|
|
11
|
+
|
|
12
|
+
1. Deployment documentation is loaded from `docs/deployment/`
|
|
13
|
+
2. Infrastructure task documents reviewed
|
|
14
|
+
3. Deployment steps executed
|
|
15
|
+
4. Verification of deployment success
|
|
16
|
+
5. Post-deployment monitoring confirmed
|
|
17
|
+
6. State updated
|
|
18
|
+
|
|
19
|
+
## Pre-Deployment Checklist
|
|
20
|
+
|
|
21
|
+
- [ ] All tests pass in staging
|
|
22
|
+
- [ ] Environment variables configured
|
|
23
|
+
- [ ] Database migrations ready
|
|
24
|
+
- [ ] Secrets configured
|
|
25
|
+
- [ ] Monitoring/alerting configured
|
|
26
|
+
- [ ] Rollback plan documented
|
|
27
|
+
|
|
28
|
+
## Deployment Targets
|
|
29
|
+
|
|
30
|
+
- Development: `npm run dev`
|
|
31
|
+
- Staging: `npm run deploy:staging`
|
|
32
|
+
- Production: `npm run deploy:production`
|
|
33
|
+
|
|
34
|
+
## Verification
|
|
35
|
+
|
|
36
|
+
After deployment:
|
|
37
|
+
- Health endpoint check
|
|
38
|
+
- Version verification
|
|
39
|
+
- Critical feature smoke test
|
|
40
|
+
|
|
41
|
+
## Rollback
|
|
42
|
+
|
|
43
|
+
If deployment fails:
|
|
44
|
+
1. Identify issue
|
|
45
|
+
2. Execute rollback procedure
|
|
46
|
+
3. Verify recovery
|
|
47
|
+
|
|
48
|
+
## Next Steps
|
|
49
|
+
|
|
50
|
+
After Phase 5 complete, use `/forge-6-maintain` for Phase 6: Maintenance.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge AI Phase 6 - Maintenance triage, routing, and audit
|
|
3
|
+
agent: forge-maintain
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge AI: Phase 6 - Maintenance
|
|
7
|
+
|
|
8
|
+
Invoke the `@forge-maintain` agent for maintenance operations.
|
|
9
|
+
|
|
10
|
+
## Important Note
|
|
11
|
+
|
|
12
|
+
**No new code is written in Phase 6.** Issues are routed to appropriate phases for resolution.
|
|
13
|
+
|
|
14
|
+
## Maintenance Operations
|
|
15
|
+
|
|
16
|
+
### 1. Triage
|
|
17
|
+
|
|
18
|
+
Take an incident, error, or observation and produce a structured defect report in `docs/defects/`.
|
|
19
|
+
|
|
20
|
+
**Input Sources:**
|
|
21
|
+
- Error logs
|
|
22
|
+
- APM alerts (Sentry, DataDog)
|
|
23
|
+
- User reports
|
|
24
|
+
- Test failures
|
|
25
|
+
- UAT findings
|
|
26
|
+
|
|
27
|
+
### 2. Route
|
|
28
|
+
|
|
29
|
+
Based on classification:
|
|
30
|
+
|
|
31
|
+
| Classification | Route To | Mode |
|
|
32
|
+
|----------------|----------|------|
|
|
33
|
+
| Design flaw | `/forge-2-design` | Brownfield |
|
|
34
|
+
| Implementation bug | `/forge-3-build` | Greenfield |
|
|
35
|
+
| Configuration issue | `/forge-5-deploy` | - |
|
|
36
|
+
|
|
37
|
+
### 3. Audit
|
|
38
|
+
|
|
39
|
+
Scan existing defect reports and summarise status:
|
|
40
|
+
- Open defects
|
|
41
|
+
- Routed defects
|
|
42
|
+
- Resolved defects
|
|
43
|
+
|
|
44
|
+
## Severity Levels
|
|
45
|
+
|
|
46
|
+
| Severity | Criteria | Response Time |
|
|
47
|
+
|----------|----------|---------------|
|
|
48
|
+
| Critical | System down, data loss | Immediate |
|
|
49
|
+
| High | Major feature broken | 24 hours |
|
|
50
|
+
| Medium | Feature broken, workaround | 1 week |
|
|
51
|
+
| Low | Minor issue | Next sprint |
|
|
52
|
+
|
|
53
|
+
## Defect Routing
|
|
54
|
+
|
|
55
|
+
When you encounter an issue:
|
|
56
|
+
|
|
57
|
+
1. Investigate and gather information
|
|
58
|
+
2. Create defect report with severity and classification
|
|
59
|
+
3. Propose routing based on classification
|
|
60
|
+
4. You confirm before routing
|
|
61
|
+
|
|
62
|
+
## Commands
|
|
63
|
+
|
|
64
|
+
- `/forge-maintain-audit` - Run defect audit
|
|
65
|
+
- `/forge-maintain-triage` - Triage new issue
|
|
66
|
+
- `/forge-maintain-route` - Route existing defect
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge AI - Initialize Forge in a new project
|
|
3
|
+
agent: forge-orchestrator
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge Init - Bootstrap Command
|
|
7
|
+
|
|
8
|
+
Initialize Forge AI in a new project directory.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
`/forge-init`
|
|
13
|
+
|
|
14
|
+
## What It Does
|
|
15
|
+
|
|
16
|
+
### 1. Create Directory Structure
|
|
17
|
+
|
|
18
|
+
Creates:
|
|
19
|
+
```
|
|
20
|
+
.forge/
|
|
21
|
+
├── config.yaml
|
|
22
|
+
├── state.yaml
|
|
23
|
+
├── adapters/opencode/
|
|
24
|
+
│ ├── agents/
|
|
25
|
+
│ ├── commands/
|
|
26
|
+
│ └── skills/
|
|
27
|
+
└── templates/
|
|
28
|
+
├── planning/
|
|
29
|
+
├── design/tasks/
|
|
30
|
+
├── testing/
|
|
31
|
+
└── defects/
|
|
32
|
+
|
|
33
|
+
docs/
|
|
34
|
+
├── planning/
|
|
35
|
+
├── design/tasks/
|
|
36
|
+
├── testing/
|
|
37
|
+
├── deployment/
|
|
38
|
+
└── defects/
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 2. Initialize State
|
|
42
|
+
|
|
43
|
+
Sets `.forge/state.yaml`:
|
|
44
|
+
```yaml
|
|
45
|
+
project_phase: 0
|
|
46
|
+
phase_history: []
|
|
47
|
+
features: {}
|
|
48
|
+
context:
|
|
49
|
+
last_updated: null
|
|
50
|
+
current_task: null
|
|
51
|
+
current_sub_phase: null
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. Copy Default Config
|
|
55
|
+
|
|
56
|
+
Creates `.forge/config.yaml` with defaults:
|
|
57
|
+
- Model tiers
|
|
58
|
+
- Phase mappings
|
|
59
|
+
- Quality thresholds
|
|
60
|
+
- Task categories
|
|
61
|
+
- Gate behavior
|
|
62
|
+
|
|
63
|
+
### 4. Copy Templates
|
|
64
|
+
|
|
65
|
+
Creates document templates in `.forge/templates/`:
|
|
66
|
+
- Planning templates (4 docs)
|
|
67
|
+
- Design templates (task template)
|
|
68
|
+
- Testing templates
|
|
69
|
+
- Defect templates
|
|
70
|
+
|
|
71
|
+
### 5. Create Symlinks
|
|
72
|
+
|
|
73
|
+
Links `.opencode/` to `.forge/adapters/opencode/`:
|
|
74
|
+
```bash
|
|
75
|
+
ln -s .forge/adapters/opencode/skills .opencode/skills
|
|
76
|
+
ln -s .forge/adapters/opencode/commands .opencode/commands
|
|
77
|
+
ln -s .forge/adapters/opencode/agents .opencode/agents
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 6. Scan Existing Artifacts
|
|
81
|
+
|
|
82
|
+
Detects existing project files:
|
|
83
|
+
- `docs/planning/*`
|
|
84
|
+
- `docs/design/*`
|
|
85
|
+
- Existing task documents
|
|
86
|
+
|
|
87
|
+
Offers to import into state.
|
|
88
|
+
|
|
89
|
+
## Flags
|
|
90
|
+
|
|
91
|
+
- `--force` - Overwrite existing .forge directory
|
|
92
|
+
- `--no-links` - Don't create .opencode symlinks
|
|
93
|
+
- `--no-templates` - Don't copy templates
|
|
94
|
+
|
|
95
|
+
## Prerequisites
|
|
96
|
+
|
|
97
|
+
- Empty or fresh project directory
|
|
98
|
+
- No existing .forge directory (unless --force)
|
|
99
|
+
|
|
100
|
+
## Next Steps
|
|
101
|
+
|
|
102
|
+
After init:
|
|
103
|
+
1. Review `.forge/config.yaml` and customize
|
|
104
|
+
2. Use `/forge-1-plan` to begin Phase 1
|
|
105
|
+
|
|
106
|
+
## Notes
|
|
107
|
+
|
|
108
|
+
If running in existing project:
|
|
109
|
+
1. Scan for existing artifacts
|
|
110
|
+
2. Offer to import them
|
|
111
|
+
3. Update state accordingly
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge AI - Diagnose and recover from state inconsistencies
|
|
3
|
+
agent: forge-orchestrator
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge Status - State Recovery
|
|
7
|
+
|
|
8
|
+
Diagnose and recover from Forge state inconsistencies.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
`/forge-status`
|
|
13
|
+
|
|
14
|
+
## What It Checks
|
|
15
|
+
|
|
16
|
+
### 1. Phase Consistency
|
|
17
|
+
- Verify `project_phase` matches phase_history
|
|
18
|
+
- Check for orphaned phase entries
|
|
19
|
+
- Validate phase transitions are logical
|
|
20
|
+
|
|
21
|
+
### 2. Feature State Integrity
|
|
22
|
+
- Validate all features have required fields
|
|
23
|
+
- Check current_sub_phase is valid (1_discover through 8_summarise)
|
|
24
|
+
- Verify task_document paths exist
|
|
25
|
+
|
|
26
|
+
### 3. Task Document References
|
|
27
|
+
- Verify all referenced task documents exist
|
|
28
|
+
- Check for broken references
|
|
29
|
+
- Validate frontmatter consistency
|
|
30
|
+
|
|
31
|
+
### 4. Rework Tracking
|
|
32
|
+
- Report rework loop counts
|
|
33
|
+
- Warn if approaching thresholds
|
|
34
|
+
|
|
35
|
+
### 5. Context Budget
|
|
36
|
+
- Report context usage
|
|
37
|
+
- Warn if approaching limits
|
|
38
|
+
|
|
39
|
+
## Diagnostic Output Format
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Forge Status Report
|
|
43
|
+
====================
|
|
44
|
+
|
|
45
|
+
Phase: 3 (Development)
|
|
46
|
+
Phase History:
|
|
47
|
+
- Phase 1: complete ✓
|
|
48
|
+
- Phase 2: complete ✓
|
|
49
|
+
- Phase 3: in-progress (started: 2026-03-22)
|
|
50
|
+
|
|
51
|
+
Active Features: 2
|
|
52
|
+
- auth-system: 5_implement (loops: 1/3)
|
|
53
|
+
- api-gateway: 3_clarify (loops: 0/3)
|
|
54
|
+
|
|
55
|
+
Issues Found: 1
|
|
56
|
+
⚠ WARN: docs/design/tasks/legacy-task.md references non-existent task
|
|
57
|
+
|
|
58
|
+
Context Budget: 45,000 / 150,000 chars (30%)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Recovery Actions
|
|
62
|
+
|
|
63
|
+
| Issue | Recovery |
|
|
64
|
+
|-------|----------|
|
|
65
|
+
| Missing phase history | Rebuild from artifacts |
|
|
66
|
+
| Invalid sub-phase | Reset to valid state |
|
|
67
|
+
| Broken task ref | Remove orphaned reference |
|
|
68
|
+
| Corrupted state | Offer state reset |
|
|
69
|
+
|
|
70
|
+
## Interactive Flow
|
|
71
|
+
|
|
72
|
+
1. Run diagnostics
|
|
73
|
+
2. Present issues found
|
|
74
|
+
3. Offer recovery options:
|
|
75
|
+
- `[F]ix` - Apply automatic fixes
|
|
76
|
+
- `[M]anual` - Fix manually
|
|
77
|
+
- `[I]gnore` - Continue anyway
|
|
78
|
+
4. Apply selected fix
|
|
79
|
+
5. Confirm recovery
|
|
80
|
+
|
|
81
|
+
## Automatic Fixes
|
|
82
|
+
|
|
83
|
+
These can be applied automatically:
|
|
84
|
+
- Remove orphaned feature references
|
|
85
|
+
- Reset invalid sub-phase values
|
|
86
|
+
- Add missing phase history entries
|
|
87
|
+
- Fix corrupted YAML (basic)
|
|
88
|
+
|
|
89
|
+
## Manual Fixes Required
|
|
90
|
+
|
|
91
|
+
These require user intervention:
|
|
92
|
+
- State file reset
|
|
93
|
+
- Phase transition correction
|
|
94
|
+
- Feature removal decisions
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Forge AI - Structured AI-augmented coding methodology
|
|
3
|
+
agent: forge-orchestrator
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Forge AI
|
|
7
|
+
|
|
8
|
+
Forge AI is a structured methodology for AI-augmented coding built on 6 project phases.
|
|
9
|
+
|
|
10
|
+
## Project Phases
|
|
11
|
+
|
|
12
|
+
| Phase | Command | Description |
|
|
13
|
+
|-------|---------|-------------|
|
|
14
|
+
| 1 | `/forge-1-plan` | Planning and requirement analysis |
|
|
15
|
+
| 2 | `/forge-2-design` | System design and task breakdown |
|
|
16
|
+
| 3 | `/forge-3-build` | Development via Feature Dev lifecycle |
|
|
17
|
+
| 4 | `/forge-4-test` | Functional testing and UAT |
|
|
18
|
+
| 5 | `/forge-5-deploy` | Deployment |
|
|
19
|
+
| 6 | `/forge-6-maintain` | Maintenance triage, routing, and audit |
|
|
20
|
+
|
|
21
|
+
## Utility Commands
|
|
22
|
+
|
|
23
|
+
| Command | Description |
|
|
24
|
+
|---------|-------------|
|
|
25
|
+
| `/forge-init` | Initialize Forge in a new project |
|
|
26
|
+
| `/forge-status` | Diagnose and recover from state inconsistencies |
|
|
27
|
+
|
|
28
|
+
## Feature Development (Phase 3 Sub-Phases)
|
|
29
|
+
|
|
30
|
+
| Sub-Phase | Command | Description |
|
|
31
|
+
|-----------|---------|-------------|
|
|
32
|
+
| 1 | `/forge-3-build-1-discover` | Understand what needs to be built |
|
|
33
|
+
| 2 | `/forge-3-build-2-explore` | Explore relevant existing code |
|
|
34
|
+
| 3 | `/forge-3-build-3-clarify` | Resolve ambiguities |
|
|
35
|
+
| 4 | `/forge-3-build-4-approach` | Design/validate approach |
|
|
36
|
+
| 5 | `/forge-3-build-5-implement` | Build the feature |
|
|
37
|
+
| 6 | `/forge-3-build-6-review` | Quality review |
|
|
38
|
+
| 7 | `/forge-3-build-7-validate` | Test validation |
|
|
39
|
+
| 8 | `/forge-3-build-8-summarise` | Document accomplishments |
|
|
40
|
+
|
|
41
|
+
## Current State
|
|
42
|
+
|
|
43
|
+
@.forge/state.yaml
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
1. Run `/forge-1-plan` to begin Phase 1: Planning
|
|
48
|
+
2. Progress through phases as needed
|
|
49
|
+
3. Use `/forge-3-build` for development with Feature Dev lifecycle
|
|
50
|
+
|
|
51
|
+
## Flags
|
|
52
|
+
|
|
53
|
+
- `--only {sub-operation}` - Run specific sub-operation within a phase
|
|
54
|
+
- `--model {tier}` - Override model tier (high, medium, low)
|
|
55
|
+
- `--task {slug}` - Work on specific task (for Phase 3)
|
|
56
|
+
|
|
57
|
+
## Design Principles
|
|
58
|
+
|
|
59
|
+
- Single Responsibility — each tool does one thing well
|
|
60
|
+
- Composability — tools can be chained
|
|
61
|
+
- Minimal Coupling — tools depend on artifact structure
|
|
62
|
+
- Transparency — log all actions and changes
|
|
63
|
+
- Deterministic tooling preferred — use linters, formatters, validators
|
|
64
|
+
|
|
65
|
+
## Git Commit Hooks
|
|
66
|
+
|
|
67
|
+
After completing sub-phases, commit your changes:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
git add -A
|
|
71
|
+
git commit -m "forge: {type} - {description}"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Learn More
|
|
75
|
+
|
|
76
|
+
See `.forge/state.yaml` for current project state.
|
|
77
|
+
See `.forge/config.yaml` for Forge configuration.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,eAAO,MAAM,OAAO,EAAE,MAErB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAW,KAAK,IAAI,EAAE;IACxC,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|