@jadeit/forge-ai 1.2.1 → 1.5.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.
Files changed (52) hide show
  1. package/agents/audit-agent.md +171 -0
  2. package/agents/build-agent.md +29 -44
  3. package/agents/design-agent.md +41 -1
  4. package/agents/feature-dev/implement.md +11 -0
  5. package/agents/feature-dev/review.md +3 -0
  6. package/agents/feature-dev/summarise.md +12 -0
  7. package/agents/plan-agent.md +12 -1
  8. package/commands/forge-audit.md +54 -0
  9. package/dist/agents/audit-agent.md +171 -0
  10. package/dist/agents/build-agent.md +29 -44
  11. package/dist/agents/design-agent.md +41 -1
  12. package/dist/agents/feature-dev/implement.md +11 -0
  13. package/dist/agents/feature-dev/review.md +3 -0
  14. package/dist/agents/feature-dev/summarise.md +12 -0
  15. package/dist/agents/plan-agent.md +12 -1
  16. package/dist/commands/forge-audit.md +54 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +13 -10
  19. package/dist/index.js.map +1 -1
  20. package/dist/skills/forge-build/SKILL.md +48 -0
  21. package/dist/skills/forge-build-approach/SKILL.md +39 -0
  22. package/dist/skills/forge-build-clarify/SKILL.md +40 -0
  23. package/dist/skills/forge-build-discover/SKILL.md +35 -0
  24. package/dist/skills/forge-build-explore/SKILL.md +31 -0
  25. package/dist/skills/forge-build-implement/SKILL.md +39 -0
  26. package/dist/skills/forge-build-review/SKILL.md +51 -0
  27. package/dist/skills/forge-build-summarise/SKILL.md +51 -0
  28. package/dist/skills/forge-build-validate/SKILL.md +50 -0
  29. package/dist/skills/forge-deploy/SKILL.md +52 -0
  30. package/dist/skills/forge-design/SKILL.md +53 -0
  31. package/dist/skills/forge-init/SKILL.md +83 -0
  32. package/dist/skills/forge-maintain/SKILL.md +53 -0
  33. package/dist/skills/forge-plan/SKILL.md +50 -0
  34. package/dist/skills/forge-status/SKILL.md +59 -0
  35. package/dist/skills/forge-test/SKILL.md +47 -0
  36. package/package.json +1 -1
  37. package/skills/forge-build/SKILL.md +48 -0
  38. package/skills/forge-build-approach/SKILL.md +39 -0
  39. package/skills/forge-build-clarify/SKILL.md +40 -0
  40. package/skills/forge-build-discover/SKILL.md +35 -0
  41. package/skills/forge-build-explore/SKILL.md +31 -0
  42. package/skills/forge-build-implement/SKILL.md +39 -0
  43. package/skills/forge-build-review/SKILL.md +51 -0
  44. package/skills/forge-build-summarise/SKILL.md +51 -0
  45. package/skills/forge-build-validate/SKILL.md +50 -0
  46. package/skills/forge-deploy/SKILL.md +52 -0
  47. package/skills/forge-design/SKILL.md +53 -0
  48. package/skills/forge-init/SKILL.md +83 -0
  49. package/skills/forge-maintain/SKILL.md +53 -0
  50. package/skills/forge-plan/SKILL.md +50 -0
  51. package/skills/forge-status/SKILL.md +59 -0
  52. package/skills/forge-test/SKILL.md +47 -0
@@ -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,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 |
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: forge-plan
3
+ description: Forge AI Phase 1 - Planning and requirement analysis
4
+ license: MIT
5
+ compatibility: opencode
6
+ ---
7
+
8
+ # Forge AI: Phase 1 - Planning
9
+
10
+ Invoke the `@forge-plan` agent to begin Phase 1: Planning.
11
+
12
+ ## What Happens
13
+
14
+ 1. Context is loaded (existing README/brief if present)
15
+ 2. Planning agent creates required documents:
16
+ - `docs/planning/project-scope.md`
17
+ - `docs/planning/user-stories.md`
18
+ - `docs/planning/implementation-plan.md`
19
+ - `docs/planning/technology-and-architecture.md`
20
+ 3. Agent validates all required artifacts exist
21
+ 4. State is updated in `.forge/state.yaml`
22
+ 5. You confirm transition to Phase 2
23
+
24
+ ## Phase 1 Outputs
25
+
26
+ | Document | Purpose |
27
+ |----------|---------|
28
+ | project-scope.md | Project aim, high-level design, technology choices |
29
+ | user-stories.md | User stories that drive development |
30
+ | implementation-plan.md | High-level phases to be implemented |
31
+ | technology-and-architecture.md | Tech choices and architecture (C4 Model) |
32
+
33
+ ## Constraints
34
+
35
+ - NO executable code, scaffolding, or infrastructure
36
+ - Illustrative code snippets ARE permitted
37
+ - Use Mermaid diagrams for architecture
38
+
39
+ ## Flags
40
+
41
+ - `--only {artifact}` - Work on specific artifact only
42
+ - Options: project-scope, user-stories, implementation-plan, technology
43
+
44
+ ## Prerequisites
45
+
46
+ None — Phase 1 is the starting point.
47
+
48
+ ## Next Steps
49
+
50
+ After Phase 1 complete, use `/forge-design` for Phase 2: Design.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: forge-status
3
+ description: Forge AI - Diagnose and recover from state inconsistencies
4
+ license: MIT
5
+ compatibility: opencode
6
+ ---
7
+
8
+ # Forge Status - State Recovery
9
+
10
+ Diagnose and recover from Forge state inconsistencies.
11
+
12
+ ## What It Checks
13
+
14
+ ### 1. Phase Consistency
15
+ - Verify `project_phase` matches phase_history
16
+ - Check for orphaned phase entries
17
+ - Validate phase transitions are logical
18
+
19
+ ### 2. Feature State Integrity
20
+ - Validate all features have required fields
21
+ - Check current_sub_phase is valid (1_discover through 8_summarise)
22
+ - Verify task_document paths exist
23
+
24
+ ### 3. Task Document References
25
+ - Verify all referenced task documents exist
26
+ - Check for broken references
27
+ - Validate frontmatter consistency
28
+
29
+ ### 4. Rework Tracking
30
+ - Report rework loop counts
31
+ - Warn if approaching thresholds
32
+
33
+ ### 5. Context Budget
34
+ - Report context usage
35
+ - Warn if approaching limits
36
+
37
+ ## Diagnostic Output Format
38
+
39
+ ```
40
+ Forge Status Report
41
+ ====================
42
+
43
+ Phase: 3 (Development)
44
+ Active Features: 2
45
+ - auth-system: 5_implement (loops: 1/3)
46
+ - api-gateway: 3_clarify (loops: 0/3)
47
+
48
+ Issues Found: 1
49
+ ⚠ WARN: docs/design/tasks/legacy-task.md references non-existent task
50
+ ```
51
+
52
+ ## Recovery Actions
53
+
54
+ | Issue | Recovery |
55
+ |-------|----------|
56
+ | Missing phase history | Rebuild from artifacts |
57
+ | Invalid sub-phase | Reset to valid state |
58
+ | Broken task ref | Remove orphaned reference |
59
+ | Corrupted state | Offer state reset |
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: forge-test
3
+ description: Forge AI Phase 4 - Functional testing and UAT
4
+ license: MIT
5
+ compatibility: opencode
6
+ ---
7
+
8
+ # Forge AI: Phase 4 - Testing
9
+
10
+ Invoke the `@forge-test` agent to begin User Acceptance Testing.
11
+
12
+ ## What Happens
13
+
14
+ 1. User stories and acceptance criteria are loaded
15
+ 2. UAT checklist is presented
16
+ 3. For each item, you confirm: passed / failed / skipped
17
+ 4. Failed items → defect reports created in `docs/defects/`
18
+ 5. Results → `docs/testing/uat-results.md`
19
+ 6. State updated after your sign-off
20
+
21
+ ## UAT Gate Process
22
+
23
+ 1. Present checklist of user stories with acceptance criteria
24
+ 2. You verify each by running the project locally
25
+ 3. For each item: PASSED / FAILED / SKIPPED
26
+ 4. Failed items produce defect reports
27
+ 5. Skipped items logged with reason
28
+ 6. Phase 5 proceeds only after your sign-off
29
+
30
+ ## Requirements
31
+
32
+ User acceptance testing MUST be done by:
33
+ - Running the project locally
34
+ - Validating each user story against implementation
35
+ - NOT just running automated tests
36
+
37
+ ## Defect Handling
38
+
39
+ For failed items:
40
+ 1. Create defect report in `docs/defects/`
41
+ 2. Document reproduction steps
42
+ 3. Classify: design or implementation
43
+ 4. Route to appropriate phase
44
+
45
+ ## Next Steps
46
+
47
+ After Phase 4 complete, use `/forge-deploy` for Phase 5: Deployment.