@jadeit/forge-ai 0.0.0 → 1.4.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/agents/build-agent.md +206 -0
- package/agents/deploy-agent.md +256 -0
- package/agents/design-agent.md +261 -0
- package/agents/feature-dev/approach.md +169 -0
- package/agents/feature-dev/clarify.md +131 -0
- package/agents/feature-dev/discover.md +113 -0
- package/agents/feature-dev/explore.md +124 -0
- package/agents/feature-dev/implement.md +211 -0
- package/agents/feature-dev/review.md +208 -0
- package/agents/feature-dev/summarise.md +199 -0
- package/agents/feature-dev/validate.md +211 -0
- package/agents/forge-orchestrator.md +188 -0
- package/agents/maintain-agent.md +251 -0
- package/agents/plan-agent.md +192 -0
- package/agents/test-agent.md +215 -0
- package/commands/forge-1-plan.md +48 -0
- package/commands/forge-2-design.md +51 -0
- package/commands/forge-3-build-1-discover.md +34 -0
- package/commands/forge-3-build-2-explore.md +30 -0
- package/commands/forge-3-build-3-clarify.md +39 -0
- package/commands/forge-3-build-4-approach.md +38 -0
- package/commands/forge-3-build-5-implement.md +38 -0
- package/commands/forge-3-build-6-review.md +50 -0
- package/commands/forge-3-build-7-validate.md +49 -0
- package/commands/forge-3-build-8-summarise.md +49 -0
- package/commands/forge-3-build.md +54 -0
- package/commands/forge-4-test.md +45 -0
- package/commands/forge-5-deploy.md +50 -0
- package/commands/forge-6-maintain.md +66 -0
- package/commands/forge-init.md +111 -0
- package/commands/forge-status.md +94 -0
- package/commands/forge.md +77 -0
- package/dist/agents/build-agent.md +29 -44
- package/dist/agents/design-agent.md +41 -1
- package/dist/agents/feature-dev/implement.md +11 -0
- package/dist/agents/feature-dev/review.md +3 -0
- package/dist/agents/feature-dev/summarise.md +12 -0
- package/dist/agents/plan-agent.md +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +171 -2
- package/dist/index.js.map +1 -1
- package/dist/skills/forge-build/SKILL.md +48 -0
- package/dist/skills/forge-build-approach/SKILL.md +39 -0
- package/dist/skills/forge-build-clarify/SKILL.md +40 -0
- package/dist/skills/forge-build-discover/SKILL.md +35 -0
- package/dist/skills/forge-build-explore/SKILL.md +31 -0
- package/dist/skills/forge-build-implement/SKILL.md +39 -0
- package/dist/skills/forge-build-review/SKILL.md +51 -0
- package/dist/skills/forge-build-summarise/SKILL.md +51 -0
- package/dist/skills/forge-build-validate/SKILL.md +50 -0
- package/dist/skills/forge-deploy/SKILL.md +52 -0
- package/dist/skills/forge-design/SKILL.md +53 -0
- package/dist/skills/forge-init/SKILL.md +83 -0
- package/dist/skills/forge-maintain/SKILL.md +53 -0
- package/dist/skills/forge-plan/SKILL.md +50 -0
- package/dist/skills/forge-status/SKILL.md +59 -0
- package/dist/skills/forge-test/SKILL.md +47 -0
- package/package.json +7 -3
- package/skills/forge-build/SKILL.md +48 -0
- package/skills/forge-build-approach/SKILL.md +39 -0
- package/skills/forge-build-clarify/SKILL.md +40 -0
- package/skills/forge-build-discover/SKILL.md +35 -0
- package/skills/forge-build-explore/SKILL.md +31 -0
- package/skills/forge-build-implement/SKILL.md +39 -0
- package/skills/forge-build-review/SKILL.md +51 -0
- package/skills/forge-build-summarise/SKILL.md +51 -0
- package/skills/forge-build-validate/SKILL.md +50 -0
- package/skills/forge-context-loader/SKILL.md +99 -0
- package/skills/forge-deploy/SKILL.md +52 -0
- package/skills/forge-design/SKILL.md +53 -0
- package/skills/forge-init/SKILL.md +83 -0
- package/skills/forge-maintain/SKILL.md +53 -0
- package/skills/forge-plan/SKILL.md +50 -0
- package/skills/forge-quality-checker/SKILL.md +227 -0
- package/skills/forge-state-manager/SKILL.md +235 -0
- package/skills/forge-status/SKILL.md +59 -0
- package/skills/forge-template-loader/SKILL.md +162 -0
- package/skills/forge-test/SKILL.md +47 -0
- package/templates/defects/DEFECT_TEMPLATE.md +96 -0
- package/templates/design/design-decisions.md +64 -0
- package/templates/design/task-list.md +56 -0
- package/templates/design/tasks/TASK_TEMPLATE.md +87 -0
- package/templates/planning/implementation-plan.md +59 -0
- package/templates/planning/project-scope.md +53 -0
- package/templates/planning/technology-and-architecture.md +80 -0
- package/templates/planning/user-stories.md +48 -0
- package/templates/testing/uat-results.md +68 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-build-approach
|
|
3
|
+
description: Forge Feature Dev - Sub-phase 4: Design/validate approach
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 3 - Sub-phase 4: Approach
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-approach` subagent for Feature Dev sub-phase 4.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Design (greenfield) or validate (brownfield) the implementation approach.
|
|
15
|
+
|
|
16
|
+
## Approach Activities
|
|
17
|
+
|
|
18
|
+
### Brownfield Mode
|
|
19
|
+
- Validate existing approach against current code
|
|
20
|
+
- Check for changes in dependencies or patterns
|
|
21
|
+
- Flag any deviations from original design
|
|
22
|
+
|
|
23
|
+
### Greenfield Mode
|
|
24
|
+
- Identify components needed
|
|
25
|
+
- Define interfaces between components
|
|
26
|
+
- Choose appropriate patterns (SOLID principles)
|
|
27
|
+
- Plan file structure and module boundaries
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
Document in task document:
|
|
32
|
+
- Implementation plan with steps
|
|
33
|
+
- Micro-decisions with rationale
|
|
34
|
+
- File structure
|
|
35
|
+
- SOLID compliance approach
|
|
36
|
+
|
|
37
|
+
## Next Steps
|
|
38
|
+
|
|
39
|
+
After approach confirmed by user, proceed to `/forge-build-implement`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-build-clarify
|
|
3
|
+
description: Forge Feature Dev - Sub-phase 3: Resolve ambiguities
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 3 - Sub-phase 3: Clarify
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-clarify` subagent for Feature Dev sub-phase 3.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Fill in gaps and resolve ambiguities. Output updates the task document.
|
|
15
|
+
|
|
16
|
+
## Clarify Activities
|
|
17
|
+
|
|
18
|
+
- Review findings from discover and explore phases
|
|
19
|
+
- Identify gaps in requirements
|
|
20
|
+
- Form questions for user
|
|
21
|
+
- Update acceptance criteria
|
|
22
|
+
|
|
23
|
+
## Question Format
|
|
24
|
+
|
|
25
|
+
Present questions clearly:
|
|
26
|
+
```
|
|
27
|
+
**Q1:** [Specific question]
|
|
28
|
+
**Context:** [Why this matters]
|
|
29
|
+
**Options:** [If multiple solutions exist]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Prioritization
|
|
33
|
+
|
|
34
|
+
- **Must** - Blockers for implementation
|
|
35
|
+
- **Should** - Important for optimal solution
|
|
36
|
+
- **Could** - Nice to have clarification
|
|
37
|
+
|
|
38
|
+
## Next Steps
|
|
39
|
+
|
|
40
|
+
After clarify complete (all "Must" questions answered), proceed to `/forge-build-approach`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-build-discover
|
|
3
|
+
description: Forge Feature Dev - Sub-phase 1: Understand what needs to be built
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 3 - Sub-phase 1: Discover
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-discover` subagent for Feature Dev sub-phase 1.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Understand what needs to be built by orienting within existing context.
|
|
15
|
+
|
|
16
|
+
## Discover Activities
|
|
17
|
+
|
|
18
|
+
- Read existing task document (brownfield) or create new one (greenfield)
|
|
19
|
+
- Understand the problem, scope, and approach
|
|
20
|
+
- Identify what needs clarification
|
|
21
|
+
|
|
22
|
+
## Operating Modes
|
|
23
|
+
|
|
24
|
+
**Brownfield:** Task document exists with implementation detail
|
|
25
|
+
**Greenfield:** No task document or stub only
|
|
26
|
+
|
|
27
|
+
## Mode Detection
|
|
28
|
+
|
|
29
|
+
1. Check for task document in `docs/design/tasks/{task-slug}.md`
|
|
30
|
+
2. Propose mode with reasoning
|
|
31
|
+
3. Wait for confirmation before proceeding
|
|
32
|
+
|
|
33
|
+
## Next Steps
|
|
34
|
+
|
|
35
|
+
After discover complete, proceed to `/forge-build-explore`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-build-explore
|
|
3
|
+
description: Forge Feature Dev - Sub-phase 2: Explore relevant existing code
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 3 - Sub-phase 2: Explore
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-explore` subagent for Feature Dev sub-phase 2.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Understand relevant existing code, patterns, and conventions.
|
|
15
|
+
|
|
16
|
+
## Explore Activities
|
|
17
|
+
|
|
18
|
+
- Read affected modules from task frontmatter
|
|
19
|
+
- Identify coding style and patterns
|
|
20
|
+
- Find related code and shared utilities
|
|
21
|
+
- Understand dependencies and integration points
|
|
22
|
+
|
|
23
|
+
## Context
|
|
24
|
+
|
|
25
|
+
Load from task document:
|
|
26
|
+
- `affected_modules` - directories to explore
|
|
27
|
+
- `dependencies` - related task documents
|
|
28
|
+
|
|
29
|
+
## Next Steps
|
|
30
|
+
|
|
31
|
+
After explore complete, proceed to `/forge-build-clarify`.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-build-implement
|
|
3
|
+
description: Forge Feature Dev - Sub-phase 5: Build the feature
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 3 - Sub-phase 5: Implement
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-implement` subagent for Feature Dev sub-phase 5.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Build the feature following the validated approach.
|
|
15
|
+
|
|
16
|
+
## Implementation Order
|
|
17
|
+
|
|
18
|
+
1. Foundation (types, constants, utilities)
|
|
19
|
+
2. Core domain/business logic
|
|
20
|
+
3. Data layer (if applicable)
|
|
21
|
+
4. API layer (if applicable)
|
|
22
|
+
5. Integration points
|
|
23
|
+
6. Tests
|
|
24
|
+
|
|
25
|
+
## Quality Checks
|
|
26
|
+
|
|
27
|
+
After implementation:
|
|
28
|
+
- Run linting
|
|
29
|
+
- Run type checking
|
|
30
|
+
- Write tests
|
|
31
|
+
|
|
32
|
+
## Flags
|
|
33
|
+
|
|
34
|
+
- `--task {slug}` - Specific task to implement
|
|
35
|
+
- `--model {tier}` - Override model tier
|
|
36
|
+
|
|
37
|
+
## Next Steps
|
|
38
|
+
|
|
39
|
+
After implementation complete, proceed to `/forge-build-review`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-build-review
|
|
3
|
+
description: Forge Feature Dev - Sub-phase 6: Quality review
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 3 - Sub-phase 6: Review
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-review` subagent for Feature Dev sub-phase 6.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Quality review using automated checks followed by AI code review.
|
|
15
|
+
|
|
16
|
+
## Quality Gates
|
|
17
|
+
|
|
18
|
+
Run these automated checks:
|
|
19
|
+
1. **Lint Check** - Code style
|
|
20
|
+
2. **Type Check** - Type safety
|
|
21
|
+
3. **Security Audit** - Vulnerabilities
|
|
22
|
+
4. **Tests** - All must pass
|
|
23
|
+
5. **Coverage** - Must meet threshold (default 80%)
|
|
24
|
+
|
|
25
|
+
## AI Code Review
|
|
26
|
+
|
|
27
|
+
After automated checks pass, review for:
|
|
28
|
+
- SOLID principles compliance
|
|
29
|
+
- Design pattern usage
|
|
30
|
+
- Error handling
|
|
31
|
+
- Security
|
|
32
|
+
- Performance
|
|
33
|
+
- Maintainability
|
|
34
|
+
|
|
35
|
+
## Issue Severity
|
|
36
|
+
|
|
37
|
+
| Severity | Action |
|
|
38
|
+
|----------|--------|
|
|
39
|
+
| Critical | Must fix before proceeding |
|
|
40
|
+
| High | Should fix |
|
|
41
|
+
| Medium | Consider fixing |
|
|
42
|
+
| Low | Nice to have |
|
|
43
|
+
|
|
44
|
+
## Rework Decision
|
|
45
|
+
|
|
46
|
+
- **Minor issues** → Loop to `/forge-build-implement`
|
|
47
|
+
- **Approach issues** → Loop to `/forge-build-approach`
|
|
48
|
+
|
|
49
|
+
## Next Steps
|
|
50
|
+
|
|
51
|
+
After review passes, proceed to `/forge-build-validate`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-build-summarise
|
|
3
|
+
description: Forge Feature Dev - Sub-phase 8: Document accomplishments
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 3 - Sub-phase 8: Summarise
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-summarise` subagent for Feature Dev sub-phase 8.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Document what was accomplished.
|
|
15
|
+
|
|
16
|
+
## Summary Content
|
|
17
|
+
|
|
18
|
+
### Document in task document:
|
|
19
|
+
|
|
20
|
+
1. **What Was Built** - Brief description
|
|
21
|
+
2. **Changes Made** - Table of files modified
|
|
22
|
+
3. **Decisions Made** - Any deviations from approach
|
|
23
|
+
4. **Known Limitations** - Deferred items, technical debt
|
|
24
|
+
5. **Next Steps** - What comes next
|
|
25
|
+
|
|
26
|
+
### Update task document frontmatter:
|
|
27
|
+
```yaml
|
|
28
|
+
status: complete
|
|
29
|
+
completed: [timestamp]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Update state file:
|
|
33
|
+
```yaml
|
|
34
|
+
features:
|
|
35
|
+
task-slug:
|
|
36
|
+
status: complete
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Lifecycle Complete
|
|
40
|
+
|
|
41
|
+
Feature Development Lifecycle is complete when:
|
|
42
|
+
- ✓ All 8 sub-phases completed
|
|
43
|
+
- ✓ Task document updated with summary
|
|
44
|
+
- ✓ State file updated
|
|
45
|
+
|
|
46
|
+
## Next Actions
|
|
47
|
+
|
|
48
|
+
After lifecycle complete:
|
|
49
|
+
1. Run full test suite
|
|
50
|
+
2. Manual testing
|
|
51
|
+
3. Next feature or use `/forge-test` for Phase 4
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-build-validate
|
|
3
|
+
description: Forge Feature Dev - Sub-phase 7: Test validation
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 3 - Sub-phase 7: Validate
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-validate` subagent for Feature Dev sub-phase 7.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Validate tests against the task document's acceptance criteria.
|
|
15
|
+
|
|
16
|
+
## Validation Checklist
|
|
17
|
+
|
|
18
|
+
### 1. Coverage Mapping
|
|
19
|
+
For each acceptance criterion, identify which test(s) validate it.
|
|
20
|
+
|
|
21
|
+
| Acceptance Criterion | Test(s) | Covered |
|
|
22
|
+
|---------------------|---------|---------|
|
|
23
|
+
| AC1: ... | *.test.ts | ✓ |
|
|
24
|
+
| AC2: ... | - | ✗ |
|
|
25
|
+
|
|
26
|
+
### 2. Assertion Quality
|
|
27
|
+
- Meaningful assertions (not just "no error")
|
|
28
|
+
- Appropriate mocking
|
|
29
|
+
- Error path testing
|
|
30
|
+
|
|
31
|
+
### 3. Negative Testing
|
|
32
|
+
- Invalid input handling
|
|
33
|
+
- Edge cases
|
|
34
|
+
- Error scenarios
|
|
35
|
+
|
|
36
|
+
### 4. Independence Check
|
|
37
|
+
Would tests fail if implementation removed?
|
|
38
|
+
|
|
39
|
+
## Validation Thresholds
|
|
40
|
+
|
|
41
|
+
From `.forge/config.yaml`:
|
|
42
|
+
- Test coverage minimum: 80% (configurable)
|
|
43
|
+
|
|
44
|
+
## Rework Decision
|
|
45
|
+
|
|
46
|
+
If validation fails → Loop to `/forge-build-implement` for test fixes
|
|
47
|
+
|
|
48
|
+
## Next Steps
|
|
49
|
+
|
|
50
|
+
After validation passes, proceed to `/forge-build-summarise`.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-context-loader
|
|
3
|
+
description: Load minimum necessary context for Forge operations based on current phase
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
metadata:
|
|
7
|
+
audience: forge-users
|
|
8
|
+
workflow: phase-execution
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Forge Context Loader
|
|
12
|
+
|
|
13
|
+
Load the **minimum context needed** for the current Forge operation, not everything the project has ever produced.
|
|
14
|
+
|
|
15
|
+
## Context Loading Rules
|
|
16
|
+
|
|
17
|
+
| Phase | Load These |
|
|
18
|
+
|-------|-----------|
|
|
19
|
+
| `forge 1:plan` | User input, existing README or project brief |
|
|
20
|
+
| `forge 2:design` | All Phase 1 outputs. Existing codebase structure if applicable |
|
|
21
|
+
| `forge 3:build` | Specific task doc, technology & architecture doc, relevant source files |
|
|
22
|
+
| `forge 4:test` | User stories, task docs for implemented features, test results |
|
|
23
|
+
| `forge 5:deploy` | Technology & architecture doc, infrastructure-related task docs |
|
|
24
|
+
| `forge 6:maintain` | Specific error/incident context, relevant source files, defect history |
|
|
25
|
+
|
|
26
|
+
## Context by Sub-Phase
|
|
27
|
+
|
|
28
|
+
| Sub-Phase | Additional Context |
|
|
29
|
+
|-----------|-------------------|
|
|
30
|
+
| `3:build 1:discover` | Task document, state file |
|
|
31
|
+
| `3:build 2:explore` | Affected modules from task, existing codebase |
|
|
32
|
+
| `3:build 3:clarify` | Discovery findings, exploration notes |
|
|
33
|
+
| `3:build 4:approach` | Task document, design decisions |
|
|
34
|
+
| `3:build 5:implement` | Task document, approach plan |
|
|
35
|
+
| `3:build 6:review` | Implementation, test files, lint config |
|
|
36
|
+
| `3:build 7:validate` | Task document, test files, coverage reports |
|
|
37
|
+
| `3:build 8:summarise` | All phase artifacts |
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
### Loading Context for Phase 1
|
|
42
|
+
```
|
|
43
|
+
Read: README.md, PROJECT_SCOPE.md (if exists)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Loading Context for Phase 2
|
|
47
|
+
```
|
|
48
|
+
Read: docs/planning/project-scope.md
|
|
49
|
+
Read: docs/planning/user-stories.md
|
|
50
|
+
Read: docs/planning/implementation-plan.md
|
|
51
|
+
Read: docs/planning/technology-and-architecture.md
|
|
52
|
+
Glob: src/**/* (codebase structure)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Loading Context for Feature Dev
|
|
56
|
+
```
|
|
57
|
+
Read: .forge/state.yaml
|
|
58
|
+
Read: docs/planning/technology-and-architecture.md
|
|
59
|
+
Read: docs/design/tasks/{task-slug}.md
|
|
60
|
+
Glob: {affected_modules} (from task frontmatter)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Context Budget
|
|
64
|
+
|
|
65
|
+
Read `.forge/config.yaml` for context_budget settings:
|
|
66
|
+
```yaml
|
|
67
|
+
context_budget:
|
|
68
|
+
warning_threshold: 150000 # Warn if exceeded
|
|
69
|
+
max_threshold: 180000 # Hard limit
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### If Context Exceeds Threshold
|
|
73
|
+
|
|
74
|
+
1. **Warn the user** about the exceeded context budget
|
|
75
|
+
2. **Suggest trimming strategies:**
|
|
76
|
+
- Focus on most recent changes
|
|
77
|
+
- Remove boilerplate and generated files
|
|
78
|
+
- Exclude node_modules, vendor, etc.
|
|
79
|
+
3. **Prioritise:**
|
|
80
|
+
- Task document over other documents
|
|
81
|
+
- Core business logic over infrastructure
|
|
82
|
+
- Tests for the specific feature over full test suite
|
|
83
|
+
|
|
84
|
+
## Implementation
|
|
85
|
+
|
|
86
|
+
Use Glob and Grep to identify relevant files:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Get affected modules from task frontmatter
|
|
90
|
+
# Glob those directories
|
|
91
|
+
# Grep for key patterns if needed
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Principles
|
|
95
|
+
|
|
96
|
+
1. **Minimum Viable Context** - Only load what is necessary
|
|
97
|
+
2. **Lazy Loading** - Load files when needed, not upfront
|
|
98
|
+
3. **Incremental** - Context grows as you progress through sub-phases
|
|
99
|
+
4. **Clean State** - Reset context when starting new phases/tasks
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-deploy
|
|
3
|
+
description: Forge AI Phase 5 - Deployment
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 5 - Deployment
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-deploy` agent to execute deployment.
|
|
11
|
+
|
|
12
|
+
## What Happens
|
|
13
|
+
|
|
14
|
+
1. Deployment documentation is loaded from `docs/deployment/`
|
|
15
|
+
2. Infrastructure task documents reviewed
|
|
16
|
+
3. Deployment steps executed
|
|
17
|
+
4. Verification of deployment success
|
|
18
|
+
5. Post-deployment monitoring confirmed
|
|
19
|
+
6. State updated
|
|
20
|
+
|
|
21
|
+
## Pre-Deployment Checklist
|
|
22
|
+
|
|
23
|
+
- [ ] All tests pass in staging
|
|
24
|
+
- [ ] Environment variables configured
|
|
25
|
+
- [ ] Database migrations ready
|
|
26
|
+
- [ ] Secrets configured
|
|
27
|
+
- [ ] Monitoring/alerting configured
|
|
28
|
+
- [ ] Rollback plan documented
|
|
29
|
+
|
|
30
|
+
## Deployment Targets
|
|
31
|
+
|
|
32
|
+
- Development: `npm run dev`
|
|
33
|
+
- Staging: `npm run deploy:staging`
|
|
34
|
+
- Production: `npm run deploy:production`
|
|
35
|
+
|
|
36
|
+
## Verification
|
|
37
|
+
|
|
38
|
+
After deployment:
|
|
39
|
+
- Health endpoint check
|
|
40
|
+
- Version verification
|
|
41
|
+
- Critical feature smoke test
|
|
42
|
+
|
|
43
|
+
## Rollback
|
|
44
|
+
|
|
45
|
+
If deployment fails:
|
|
46
|
+
1. Identify issue
|
|
47
|
+
2. Execute rollback procedure
|
|
48
|
+
3. Verify recovery
|
|
49
|
+
|
|
50
|
+
## Next Steps
|
|
51
|
+
|
|
52
|
+
After Phase 5 complete, use `/forge-maintain` for Phase 6: Maintenance.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-design
|
|
3
|
+
description: Forge AI Phase 2 - System design and task breakdown
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 2 - Design
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-design` agent to begin Phase 2: Design.
|
|
11
|
+
|
|
12
|
+
## What Happens
|
|
13
|
+
|
|
14
|
+
1. Phase 1 artifacts are loaded and reviewed
|
|
15
|
+
2. Design agent creates required documents:
|
|
16
|
+
- `docs/design/design-decisions.md`
|
|
17
|
+
- `docs/design/task-list.md`
|
|
18
|
+
- `docs/design/tasks/{task-slug}.md` (one per task)
|
|
19
|
+
3. Agent validates all task documents have required frontmatter
|
|
20
|
+
4. State is updated in `.forge/state.yaml`
|
|
21
|
+
5. You confirm transition to Phase 3
|
|
22
|
+
|
|
23
|
+
## Phase 2 Outputs
|
|
24
|
+
|
|
25
|
+
| Document | Purpose |
|
|
26
|
+
|----------|---------|
|
|
27
|
+
| design-decisions.md | Documented design decisions |
|
|
28
|
+
| task-list.md | Summary list of all tasks |
|
|
29
|
+
| tasks/{task-slug}.md | One document per task with implementation detail |
|
|
30
|
+
|
|
31
|
+
## Task Document Requirements
|
|
32
|
+
|
|
33
|
+
Each task document includes:
|
|
34
|
+
- Required frontmatter (title, status, mode, complexity, categories)
|
|
35
|
+
- Summary / Objective
|
|
36
|
+
- Acceptance Criteria (testable)
|
|
37
|
+
- Implementation Detail (illustrative code permitted)
|
|
38
|
+
- Testing Criteria
|
|
39
|
+
|
|
40
|
+
## Flags
|
|
41
|
+
|
|
42
|
+
- `--only {task}` - Work on specific task only
|
|
43
|
+
- `--model {tier}` - Override model tier
|
|
44
|
+
|
|
45
|
+
## Prerequisites
|
|
46
|
+
|
|
47
|
+
Phase 1 must be complete. Check `.forge/state.yaml`.
|
|
48
|
+
|
|
49
|
+
If prerequisites not met, warning is shown but you may override and proceed.
|
|
50
|
+
|
|
51
|
+
## Next Steps
|
|
52
|
+
|
|
53
|
+
After Phase 2 complete, use `/forge-build` for Phase 3: Development.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-init
|
|
3
|
+
description: Forge AI - Initialize Forge in a new project
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge Init - Bootstrap Command
|
|
9
|
+
|
|
10
|
+
Initialize Forge AI in a new project directory.
|
|
11
|
+
|
|
12
|
+
## What It Does
|
|
13
|
+
|
|
14
|
+
### 1. Create Directory Structure
|
|
15
|
+
|
|
16
|
+
Creates:
|
|
17
|
+
```
|
|
18
|
+
.forge/
|
|
19
|
+
├── config.yaml
|
|
20
|
+
├── state.yaml
|
|
21
|
+
└── templates/
|
|
22
|
+
├── planning/
|
|
23
|
+
├── design/tasks/
|
|
24
|
+
├── testing/
|
|
25
|
+
└── defects/
|
|
26
|
+
|
|
27
|
+
docs/
|
|
28
|
+
├── planning/
|
|
29
|
+
├── design/tasks/
|
|
30
|
+
├── testing/
|
|
31
|
+
├── deployment/
|
|
32
|
+
└── defects/
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. Initialize State
|
|
36
|
+
|
|
37
|
+
Sets `.forge/state.yaml`:
|
|
38
|
+
```yaml
|
|
39
|
+
project_phase: 0
|
|
40
|
+
phase_history: []
|
|
41
|
+
features: {}
|
|
42
|
+
context:
|
|
43
|
+
last_updated: null
|
|
44
|
+
current_task: null
|
|
45
|
+
current_sub_phase: null
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 3. Copy Default Config
|
|
49
|
+
|
|
50
|
+
Creates `.forge/config.yaml` with defaults:
|
|
51
|
+
- Model tiers
|
|
52
|
+
- Phase mappings
|
|
53
|
+
- Quality thresholds
|
|
54
|
+
- Task categories
|
|
55
|
+
- Gate behavior
|
|
56
|
+
|
|
57
|
+
### 4. Copy Templates
|
|
58
|
+
|
|
59
|
+
Creates document templates in `.forge/templates/`:
|
|
60
|
+
- Planning templates (4 docs)
|
|
61
|
+
- Design templates (task template)
|
|
62
|
+
- Testing templates
|
|
63
|
+
- Defect templates
|
|
64
|
+
|
|
65
|
+
### 5. Scan Existing Artifacts
|
|
66
|
+
|
|
67
|
+
Detects existing project files:
|
|
68
|
+
- `docs/planning/*`
|
|
69
|
+
- `docs/design/*`
|
|
70
|
+
- Existing task documents
|
|
71
|
+
|
|
72
|
+
Offers to import into state.
|
|
73
|
+
|
|
74
|
+
## Flags
|
|
75
|
+
|
|
76
|
+
- `--force` - Overwrite existing .forge directory
|
|
77
|
+
- `--no-templates` - Don't copy templates
|
|
78
|
+
|
|
79
|
+
## Next Steps
|
|
80
|
+
|
|
81
|
+
After init:
|
|
82
|
+
1. Review `.forge/config.yaml` and customize
|
|
83
|
+
2. Use `/forge-plan` to begin Phase 1
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge-maintain
|
|
3
|
+
description: Forge AI Phase 6 - Maintenance triage, routing, and audit
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Forge AI: Phase 6 - Maintenance
|
|
9
|
+
|
|
10
|
+
Invoke the `@forge-maintain` agent for maintenance operations.
|
|
11
|
+
|
|
12
|
+
## Important Note
|
|
13
|
+
|
|
14
|
+
**No new code is written in Phase 6.** Issues are routed to appropriate phases for resolution.
|
|
15
|
+
|
|
16
|
+
## Maintenance Operations
|
|
17
|
+
|
|
18
|
+
### 1. Triage
|
|
19
|
+
|
|
20
|
+
Take an incident, error, or observation and produce a structured defect report in `docs/defects/`.
|
|
21
|
+
|
|
22
|
+
**Input Sources:**
|
|
23
|
+
- Error logs
|
|
24
|
+
- APM alerts (Sentry, DataDog)
|
|
25
|
+
- User reports
|
|
26
|
+
- Test failures
|
|
27
|
+
- UAT findings
|
|
28
|
+
|
|
29
|
+
### 2. Route
|
|
30
|
+
|
|
31
|
+
Based on classification:
|
|
32
|
+
|
|
33
|
+
| Classification | Route To | Mode |
|
|
34
|
+
|----------------|----------|------|
|
|
35
|
+
| Design flaw | `/forge-design` | Brownfield |
|
|
36
|
+
| Implementation bug | `/forge-build` | Greenfield |
|
|
37
|
+
| Configuration issue | `/forge-deploy` | - |
|
|
38
|
+
|
|
39
|
+
### 3. Audit
|
|
40
|
+
|
|
41
|
+
Scan existing defect reports and summarise status:
|
|
42
|
+
- Open defects
|
|
43
|
+
- Routed defects
|
|
44
|
+
- Resolved defects
|
|
45
|
+
|
|
46
|
+
## Severity Levels
|
|
47
|
+
|
|
48
|
+
| Severity | Criteria | Response Time |
|
|
49
|
+
|----------|----------|---------------|
|
|
50
|
+
| Critical | System down, data loss | Immediate |
|
|
51
|
+
| High | Major feature broken | 24 hours |
|
|
52
|
+
| Medium | Feature broken, workaround | 1 week |
|
|
53
|
+
| Low | Minor issue | Next sprint |
|