@jadeit/forge-ai 1.4.0 → 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.
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: forge-audit
3
+ description: Audit Forge methodology compliance and offer remediation
4
+ mode: subagent
5
+ permission:
6
+ skill:
7
+ "forge-*": allow
8
+ "documents-*": allow
9
+ "code-*": allow
10
+ "*": deny
11
+ tools:
12
+ read: true
13
+ write: true
14
+ edit: true
15
+ bash: true
16
+ glob: true
17
+ grep: true
18
+ model: medium
19
+ ---
20
+
21
+ # Forge AI: Audit — Methodology Compliance
22
+
23
+ Assess the project's compliance with the Forge AI methodology and offer remediation
24
+ for any gaps found.
25
+
26
+ ## Load Skills
27
+
28
+ Use these skills:
29
+ - `@forge-quality-checker` — Detect code quality tooling configuration
30
+ - `@forge-state-manager` — Read current phase and feature state
31
+
32
+ ## Audit Sequence
33
+
34
+ ```
35
+ 1. Forge Structure — scaffolding and directory layout
36
+ 2. Planning Artifacts — Phase 1 docs exist and are complete
37
+ 3. Design Artifacts — Phase 2 docs and task documents
38
+ 4. Phase State — state.yaml consistent with artifacts on disk
39
+ 5. Code Quality Tooling — linter, type checker, tests, semgrep configured
40
+ 6. 12-Factor Compliance — heuristic scan for common violations
41
+ ```
42
+
43
+ ## Check 1: Forge Structure
44
+
45
+ Verify the following exist:
46
+
47
+ | Path | Required |
48
+ |------|----------|
49
+ | `.forge/config.yaml` | Yes |
50
+ | `.forge/state.yaml` | Yes |
51
+ | `.forge/templates/` | Yes |
52
+ | `docs/planning/` | Yes |
53
+ | `docs/design/tasks/` | Yes |
54
+ | `docs/testing/` | Yes |
55
+ | `docs/defects/` | Yes |
56
+
57
+ ## Check 2: Planning Artifacts
58
+
59
+ For each doc, check existence then scan for required sections:
60
+
61
+ | Document | Required Sections |
62
+ |----------|------------------|
63
+ | `docs/planning/project-scope.md` | Aim, Stakeholders, User Personas, Goals, Constraints, Success Criteria |
64
+ | `docs/planning/user-stories.md` | ≥3 user stories in "As a / I want / So that" format |
65
+ | `docs/planning/implementation-plan.md` | Phase Breakdown, Parallel Execution Groups, Timeline, Risk Assessment |
66
+ | `docs/planning/technology-and-architecture.md` | Technology Research, C4 diagram, Tech Stack, 12-Factor Compliance checklist |
67
+
68
+ ## Check 3: Design Artifacts
69
+
70
+ ### design-decisions.md
71
+ - Exists at `docs/design/design-decisions.md`
72
+ - Contains ≥1 documented decision (ADDR-XXX format)
73
+
74
+ ### task-list.md
75
+ - Exists at `docs/design/task-list.md`
76
+ - Has Branch and Group columns in task tables
77
+ - Has Parallel Execution Groups table
78
+
79
+ ### Task documents (`docs/design/tasks/*.md`)
80
+
81
+ Each must have these frontmatter fields:
82
+ ```yaml
83
+ title, status, mode, complexity, categories, affected_modules,
84
+ dependencies, parallel_group, branch, worktree, acceptance_criteria,
85
+ created, last_updated
86
+ ```
87
+
88
+ And these body sections: Summary, Acceptance Criteria, Implementation Detail,
89
+ Testing Criteria.
90
+
91
+ ## Check 4: Phase State
92
+
93
+ Use `@forge-state-manager` to read `.forge/state.yaml` and cross-reference:
94
+ - `project_phase` is consistent with which artifacts exist on disk
95
+ - Every feature slug in `features:` has a corresponding task document
96
+ - No task documents exist without a state entry
97
+
98
+ ## Check 5: Code Quality Tooling
99
+
100
+ Use `@forge-quality-checker` to detect tooling from project files:
101
+
102
+ | File | Implies |
103
+ |------|---------|
104
+ | `package.json` with eslint | Linter ✓ |
105
+ | `pyproject.toml` with ruff | Linter ✓ |
106
+ | `tsconfig.json` or `pyproject.toml` with mypy | Type checker ✓ |
107
+ | `jest.config.*` / `pytest.ini` / `pyproject.toml [tool.pytest]` | Tests ✓ |
108
+ | `.semgrepignore` / semgrep in CI config | semgrep ✓ |
109
+
110
+ Flag any missing tools and note what to install.
111
+
112
+ ## Check 6: 12-Factor Spot Check
113
+
114
+ Heuristic grep scan for common violations:
115
+
116
+ | Factor | Check |
117
+ |--------|-------|
118
+ | III. Config | Search for hardcoded secrets/URLs/ports (`password =`, `api_key =`, `localhost:`, bare IP addresses in source) |
119
+ | II. Dependencies | Verify `requirements.txt`, `package.json`, `go.mod`, or equivalent exists |
120
+ | XI. Logs | Search for `logging.FileHandler`, `fs.createWriteStream`, or log file path patterns in source |
121
+
122
+ Flag file:line for each violation. Do not auto-fix — these require manual review.
123
+
124
+ ## Report Output
125
+
126
+ Load template: `.forge/templates/audit/AUDIT_REPORT_TEMPLATE.md`
127
+
128
+ Write report to: `docs/audit/forge-audit-{YYYY-MM-DD}.md`
129
+
130
+ Create `docs/audit/` if it does not exist.
131
+
132
+ Calculate overall compliance score:
133
+ ```
134
+ score = (passed checks / total checks) × 100
135
+ ```
136
+
137
+ ## Remediation
138
+
139
+ After presenting the report, offer to take action on each gap:
140
+
141
+ | Gap | Action |
142
+ |-----|--------|
143
+ | No `.forge/` structure | "Run `forge init` to bootstrap" |
144
+ | Missing planning docs | "Run `forge 1:plan` — will generate missing docs" |
145
+ | Missing/incomplete design docs | "Run `forge 2:design` — will generate missing docs" |
146
+ | Task frontmatter gaps | "Auto-fix: add missing fields from template defaults" (with `--fix`) |
147
+ | State inconsistency | "Run `forge status` to recover state" |
148
+ | Missing quality tooling | List installation commands |
149
+ | 12-factor violations | "Review flagged locations manually" |
150
+
151
+ Never auto-apply fixes that modify existing content — only add missing fields to
152
+ frontmatter or create missing files/directories.
153
+
154
+ ## Flags
155
+
156
+ - `--fix` — Automatically apply safe remediations (add missing frontmatter fields,
157
+ create missing empty docs, create missing directories)
158
+ - `--only {category}` — Run only one check category:
159
+ `structure`, `planning`, `design`, `state`, `quality`, `12factor`
160
+ - `--report-only` — Write report but do not offer interactive remediation
161
+
162
+ ## State Update
163
+
164
+ Update `.forge/state.yaml` with audit metadata:
165
+
166
+ ```yaml
167
+ context:
168
+ last_audit: {ISO timestamp}
169
+ last_audit_score: {percentage}
170
+ last_audit_report: docs/audit/forge-audit-{date}.md
171
+ ```
@@ -0,0 +1,54 @@
1
+ ---
2
+ description: "Forge AI - Audit methodology compliance and offer remediation"
3
+ argument-hint: "[--fix] [--only <category>] [--report-only]"
4
+ ---
5
+
6
+ # Forge Audit — Methodology Compliance
7
+
8
+ Scan the project for Forge AI methodology compliance and offer to remediate gaps.
9
+
10
+ ## What It Checks
11
+
12
+ | # | Category | What |
13
+ |---|----------|------|
14
+ | 1 | **Forge Structure** | `.forge/` scaffolding, `docs/` directories, templates |
15
+ | 2 | **Planning Artifacts** | Phase 1 docs exist and contain required sections |
16
+ | 3 | **Design Artifacts** | task-list, design-decisions, and each task document |
17
+ | 4 | **Phase State** | `state.yaml` consistent with artifacts on disk |
18
+ | 5 | **Code Quality Tooling** | Linter, type checker, test framework, semgrep |
19
+ | 6 | **12-Factor Compliance** | Heuristic scan for config, deps, and log violations |
20
+
21
+ ## Usage
22
+
23
+ ```
24
+ forge audit
25
+ forge audit --fix
26
+ forge audit --only planning
27
+ forge audit --report-only
28
+ ```
29
+
30
+ ## Remediation Routing
31
+
32
+ | Gap | Route |
33
+ |-----|-------|
34
+ | No Forge structure | `forge init` |
35
+ | Missing planning docs | `forge 1:plan` |
36
+ | Missing/incomplete design docs | `forge 2:design` |
37
+ | Task frontmatter gaps | Auto-fix with `--fix` |
38
+ | State inconsistency | `forge status` |
39
+ | Missing quality tooling | Installation instructions |
40
+ | 12-factor violations | Flagged for manual review |
41
+
42
+ ## Flags
43
+
44
+ - `--fix` — Auto-apply safe remediations
45
+ - `--only {category}` — Run one check: `structure`, `planning`, `design`, `state`, `quality`, `12factor`
46
+ - `--report-only` — Write report without interactive remediation
47
+
48
+ ## Output
49
+
50
+ Report written to: `docs/audit/forge-audit-{YYYY-MM-DD}.md`
51
+
52
+ ## Prerequisites
53
+
54
+ None — can be run on any project, with or without existing Forge structure.
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: forge-audit
3
+ description: Audit Forge methodology compliance and offer remediation
4
+ mode: subagent
5
+ permission:
6
+ skill:
7
+ "forge-*": allow
8
+ "documents-*": allow
9
+ "code-*": allow
10
+ "*": deny
11
+ tools:
12
+ read: true
13
+ write: true
14
+ edit: true
15
+ bash: true
16
+ glob: true
17
+ grep: true
18
+ model: medium
19
+ ---
20
+
21
+ # Forge AI: Audit — Methodology Compliance
22
+
23
+ Assess the project's compliance with the Forge AI methodology and offer remediation
24
+ for any gaps found.
25
+
26
+ ## Load Skills
27
+
28
+ Use these skills:
29
+ - `@forge-quality-checker` — Detect code quality tooling configuration
30
+ - `@forge-state-manager` — Read current phase and feature state
31
+
32
+ ## Audit Sequence
33
+
34
+ ```
35
+ 1. Forge Structure — scaffolding and directory layout
36
+ 2. Planning Artifacts — Phase 1 docs exist and are complete
37
+ 3. Design Artifacts — Phase 2 docs and task documents
38
+ 4. Phase State — state.yaml consistent with artifacts on disk
39
+ 5. Code Quality Tooling — linter, type checker, tests, semgrep configured
40
+ 6. 12-Factor Compliance — heuristic scan for common violations
41
+ ```
42
+
43
+ ## Check 1: Forge Structure
44
+
45
+ Verify the following exist:
46
+
47
+ | Path | Required |
48
+ |------|----------|
49
+ | `.forge/config.yaml` | Yes |
50
+ | `.forge/state.yaml` | Yes |
51
+ | `.forge/templates/` | Yes |
52
+ | `docs/planning/` | Yes |
53
+ | `docs/design/tasks/` | Yes |
54
+ | `docs/testing/` | Yes |
55
+ | `docs/defects/` | Yes |
56
+
57
+ ## Check 2: Planning Artifacts
58
+
59
+ For each doc, check existence then scan for required sections:
60
+
61
+ | Document | Required Sections |
62
+ |----------|------------------|
63
+ | `docs/planning/project-scope.md` | Aim, Stakeholders, User Personas, Goals, Constraints, Success Criteria |
64
+ | `docs/planning/user-stories.md` | ≥3 user stories in "As a / I want / So that" format |
65
+ | `docs/planning/implementation-plan.md` | Phase Breakdown, Parallel Execution Groups, Timeline, Risk Assessment |
66
+ | `docs/planning/technology-and-architecture.md` | Technology Research, C4 diagram, Tech Stack, 12-Factor Compliance checklist |
67
+
68
+ ## Check 3: Design Artifacts
69
+
70
+ ### design-decisions.md
71
+ - Exists at `docs/design/design-decisions.md`
72
+ - Contains ≥1 documented decision (ADDR-XXX format)
73
+
74
+ ### task-list.md
75
+ - Exists at `docs/design/task-list.md`
76
+ - Has Branch and Group columns in task tables
77
+ - Has Parallel Execution Groups table
78
+
79
+ ### Task documents (`docs/design/tasks/*.md`)
80
+
81
+ Each must have these frontmatter fields:
82
+ ```yaml
83
+ title, status, mode, complexity, categories, affected_modules,
84
+ dependencies, parallel_group, branch, worktree, acceptance_criteria,
85
+ created, last_updated
86
+ ```
87
+
88
+ And these body sections: Summary, Acceptance Criteria, Implementation Detail,
89
+ Testing Criteria.
90
+
91
+ ## Check 4: Phase State
92
+
93
+ Use `@forge-state-manager` to read `.forge/state.yaml` and cross-reference:
94
+ - `project_phase` is consistent with which artifacts exist on disk
95
+ - Every feature slug in `features:` has a corresponding task document
96
+ - No task documents exist without a state entry
97
+
98
+ ## Check 5: Code Quality Tooling
99
+
100
+ Use `@forge-quality-checker` to detect tooling from project files:
101
+
102
+ | File | Implies |
103
+ |------|---------|
104
+ | `package.json` with eslint | Linter ✓ |
105
+ | `pyproject.toml` with ruff | Linter ✓ |
106
+ | `tsconfig.json` or `pyproject.toml` with mypy | Type checker ✓ |
107
+ | `jest.config.*` / `pytest.ini` / `pyproject.toml [tool.pytest]` | Tests ✓ |
108
+ | `.semgrepignore` / semgrep in CI config | semgrep ✓ |
109
+
110
+ Flag any missing tools and note what to install.
111
+
112
+ ## Check 6: 12-Factor Spot Check
113
+
114
+ Heuristic grep scan for common violations:
115
+
116
+ | Factor | Check |
117
+ |--------|-------|
118
+ | III. Config | Search for hardcoded secrets/URLs/ports (`password =`, `api_key =`, `localhost:`, bare IP addresses in source) |
119
+ | II. Dependencies | Verify `requirements.txt`, `package.json`, `go.mod`, or equivalent exists |
120
+ | XI. Logs | Search for `logging.FileHandler`, `fs.createWriteStream`, or log file path patterns in source |
121
+
122
+ Flag file:line for each violation. Do not auto-fix — these require manual review.
123
+
124
+ ## Report Output
125
+
126
+ Load template: `.forge/templates/audit/AUDIT_REPORT_TEMPLATE.md`
127
+
128
+ Write report to: `docs/audit/forge-audit-{YYYY-MM-DD}.md`
129
+
130
+ Create `docs/audit/` if it does not exist.
131
+
132
+ Calculate overall compliance score:
133
+ ```
134
+ score = (passed checks / total checks) × 100
135
+ ```
136
+
137
+ ## Remediation
138
+
139
+ After presenting the report, offer to take action on each gap:
140
+
141
+ | Gap | Action |
142
+ |-----|--------|
143
+ | No `.forge/` structure | "Run `forge init` to bootstrap" |
144
+ | Missing planning docs | "Run `forge 1:plan` — will generate missing docs" |
145
+ | Missing/incomplete design docs | "Run `forge 2:design` — will generate missing docs" |
146
+ | Task frontmatter gaps | "Auto-fix: add missing fields from template defaults" (with `--fix`) |
147
+ | State inconsistency | "Run `forge status` to recover state" |
148
+ | Missing quality tooling | List installation commands |
149
+ | 12-factor violations | "Review flagged locations manually" |
150
+
151
+ Never auto-apply fixes that modify existing content — only add missing fields to
152
+ frontmatter or create missing files/directories.
153
+
154
+ ## Flags
155
+
156
+ - `--fix` — Automatically apply safe remediations (add missing frontmatter fields,
157
+ create missing empty docs, create missing directories)
158
+ - `--only {category}` — Run only one check category:
159
+ `structure`, `planning`, `design`, `state`, `quality`, `12factor`
160
+ - `--report-only` — Write report but do not offer interactive remediation
161
+
162
+ ## State Update
163
+
164
+ Update `.forge/state.yaml` with audit metadata:
165
+
166
+ ```yaml
167
+ context:
168
+ last_audit: {ISO timestamp}
169
+ last_audit_score: {percentage}
170
+ last_audit_report: docs/audit/forge-audit-{date}.md
171
+ ```
@@ -0,0 +1,54 @@
1
+ ---
2
+ description: "Forge AI - Audit methodology compliance and offer remediation"
3
+ argument-hint: "[--fix] [--only <category>] [--report-only]"
4
+ ---
5
+
6
+ # Forge Audit — Methodology Compliance
7
+
8
+ Scan the project for Forge AI methodology compliance and offer to remediate gaps.
9
+
10
+ ## What It Checks
11
+
12
+ | # | Category | What |
13
+ |---|----------|------|
14
+ | 1 | **Forge Structure** | `.forge/` scaffolding, `docs/` directories, templates |
15
+ | 2 | **Planning Artifacts** | Phase 1 docs exist and contain required sections |
16
+ | 3 | **Design Artifacts** | task-list, design-decisions, and each task document |
17
+ | 4 | **Phase State** | `state.yaml` consistent with artifacts on disk |
18
+ | 5 | **Code Quality Tooling** | Linter, type checker, test framework, semgrep |
19
+ | 6 | **12-Factor Compliance** | Heuristic scan for config, deps, and log violations |
20
+
21
+ ## Usage
22
+
23
+ ```
24
+ forge audit
25
+ forge audit --fix
26
+ forge audit --only planning
27
+ forge audit --report-only
28
+ ```
29
+
30
+ ## Remediation Routing
31
+
32
+ | Gap | Route |
33
+ |-----|-------|
34
+ | No Forge structure | `forge init` |
35
+ | Missing planning docs | `forge 1:plan` |
36
+ | Missing/incomplete design docs | `forge 2:design` |
37
+ | Task frontmatter gaps | Auto-fix with `--fix` |
38
+ | State inconsistency | `forge status` |
39
+ | Missing quality tooling | Installation instructions |
40
+ | 12-factor violations | Flagged for manual review |
41
+
42
+ ## Flags
43
+
44
+ - `--fix` — Auto-apply safe remediations
45
+ - `--only {category}` — Run one check: `structure`, `planning`, `design`, `state`, `quality`, `12factor`
46
+ - `--report-only` — Write report without interactive remediation
47
+
48
+ ## Output
49
+
50
+ Report written to: `docs/audit/forge-audit-{YYYY-MM-DD}.md`
51
+
52
+ ## Prerequisites
53
+
54
+ None — can be run on any project, with or without existing Forge structure.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jadeit/forge-ai",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Forge AI - Structured AI-augmented coding methodology for OpenCode",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",