forge-workflow 0.0.1

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 (105) hide show
  1. package/.claude/commands/dev.md +314 -0
  2. package/.claude/commands/plan.md +389 -0
  3. package/.claude/commands/premerge.md +179 -0
  4. package/.claude/commands/research.md +42 -0
  5. package/.claude/commands/review.md +442 -0
  6. package/.claude/commands/rollback.md +721 -0
  7. package/.claude/commands/ship.md +134 -0
  8. package/.claude/commands/sonarcloud.md +152 -0
  9. package/.claude/commands/status.md +77 -0
  10. package/.claude/commands/validate.md +237 -0
  11. package/.claude/commands/verify.md +221 -0
  12. package/.claude/rules/greptile-review-process.md +285 -0
  13. package/.claude/rules/workflow.md +105 -0
  14. package/.claude/scripts/greptile-resolve.sh +526 -0
  15. package/.claude/scripts/load-env.sh +32 -0
  16. package/.forge/hooks/check-tdd.js +240 -0
  17. package/.github/PLUGIN_TEMPLATE.json +32 -0
  18. package/.mcp.json.example +12 -0
  19. package/AGENTS.md +169 -0
  20. package/CLAUDE.md +99 -0
  21. package/LICENSE +21 -0
  22. package/README.md +414 -0
  23. package/bin/forge-cmd.js +313 -0
  24. package/bin/forge-validate.js +303 -0
  25. package/bin/forge.js +4228 -0
  26. package/docs/AGENT_INSTALL_PROMPT.md +342 -0
  27. package/docs/ENHANCED_ONBOARDING.md +602 -0
  28. package/docs/EXAMPLES.md +482 -0
  29. package/docs/GREPTILE_SETUP.md +400 -0
  30. package/docs/MANUAL_REVIEW_GUIDE.md +106 -0
  31. package/docs/ROADMAP.md +359 -0
  32. package/docs/SETUP.md +632 -0
  33. package/docs/TOOLCHAIN.md +849 -0
  34. package/docs/VALIDATION.md +363 -0
  35. package/docs/WORKFLOW.md +400 -0
  36. package/docs/planning/PROGRESS.md +396 -0
  37. package/docs/plans/.gitkeep +0 -0
  38. package/docs/plans/2026-02-27-forge-test-suite-v2-decisions.md +21 -0
  39. package/docs/plans/2026-02-27-forge-test-suite-v2-design.md +362 -0
  40. package/docs/plans/2026-02-27-forge-test-suite-v2-tasks.md +343 -0
  41. package/docs/plans/2026-03-02-superpowers-gaps-decisions.md +26 -0
  42. package/docs/plans/2026-03-02-superpowers-gaps-design.md +239 -0
  43. package/docs/plans/2026-03-02-superpowers-gaps-tasks.md +260 -0
  44. package/docs/plans/2026-03-04-agent-command-parity-design.md +163 -0
  45. package/docs/plans/2026-03-04-verify-worktree-cleanup-decisions.md +7 -0
  46. package/docs/plans/2026-03-04-verify-worktree-cleanup-design.md +165 -0
  47. package/docs/plans/2026-03-05-forge-uto-decisions.md +6 -0
  48. package/docs/plans/2026-03-05-forge-uto-design.md +116 -0
  49. package/docs/plans/2026-03-05-forge-uto-tasks.md +244 -0
  50. package/docs/plans/2026-03-10-command-creator-and-eval-decisions.md +52 -0
  51. package/docs/plans/2026-03-10-command-creator-and-eval-design.md +350 -0
  52. package/docs/plans/2026-03-10-command-creator-and-eval-tasks.md +426 -0
  53. package/docs/plans/2026-03-10-stale-workflow-refs-decisions.md +8 -0
  54. package/docs/plans/2026-03-10-stale-workflow-refs-design.md +80 -0
  55. package/docs/plans/2026-03-10-stale-workflow-refs-tasks.md +90 -0
  56. package/docs/plans/2026-03-14-beads-plan-context-decisions.md +9 -0
  57. package/docs/plans/2026-03-14-beads-plan-context-design.md +171 -0
  58. package/docs/plans/2026-03-14-beads-plan-context-tasks.md +160 -0
  59. package/docs/plans/2026-03-14-skill-eval-loop-decisions.md +33 -0
  60. package/docs/plans/2026-03-14-skill-eval-loop-design.md +118 -0
  61. package/docs/plans/2026-03-14-skill-eval-loop-results.md +78 -0
  62. package/docs/plans/2026-03-14-skill-eval-loop-tasks.md +160 -0
  63. package/docs/plans/2026-03-15-agent-command-parity-v2-decisions.md +11 -0
  64. package/docs/plans/2026-03-15-agent-command-parity-v2-design.md +145 -0
  65. package/docs/plans/2026-03-15-agent-command-parity-v2-tasks.md +211 -0
  66. package/docs/research/TEMPLATE.md +292 -0
  67. package/docs/research/advanced-testing.md +297 -0
  68. package/docs/research/agent-permissions.md +167 -0
  69. package/docs/research/dependency-chain.md +328 -0
  70. package/docs/research/forge-workflow-v2.md +550 -0
  71. package/docs/research/plugin-architecture.md +772 -0
  72. package/docs/research/pr4-cli-automation.md +326 -0
  73. package/docs/research/premerge-verify-restructure.md +205 -0
  74. package/docs/research/skills-restructure.md +508 -0
  75. package/docs/research/sonarcloud-perfection-plan.md +166 -0
  76. package/docs/research/sonarcloud-quality-gate.md +184 -0
  77. package/docs/research/superpowers-integration.md +403 -0
  78. package/docs/research/superpowers.md +319 -0
  79. package/docs/research/test-environment.md +519 -0
  80. package/install.sh +1062 -0
  81. package/lefthook.yml +39 -0
  82. package/lib/agents/README.md +198 -0
  83. package/lib/agents/claude.plugin.json +28 -0
  84. package/lib/agents/cline.plugin.json +22 -0
  85. package/lib/agents/codex.plugin.json +19 -0
  86. package/lib/agents/copilot.plugin.json +24 -0
  87. package/lib/agents/cursor.plugin.json +25 -0
  88. package/lib/agents/kilocode.plugin.json +22 -0
  89. package/lib/agents/opencode.plugin.json +20 -0
  90. package/lib/agents/roo.plugin.json +23 -0
  91. package/lib/agents-config.js +2112 -0
  92. package/lib/commands/dev.js +513 -0
  93. package/lib/commands/plan.js +696 -0
  94. package/lib/commands/recommend.js +119 -0
  95. package/lib/commands/ship.js +377 -0
  96. package/lib/commands/status.js +378 -0
  97. package/lib/commands/validate.js +602 -0
  98. package/lib/context-merge.js +359 -0
  99. package/lib/plugin-catalog.js +360 -0
  100. package/lib/plugin-manager.js +166 -0
  101. package/lib/plugin-recommender.js +141 -0
  102. package/lib/project-discovery.js +491 -0
  103. package/lib/setup.js +118 -0
  104. package/lib/workflow-profiles.js +203 -0
  105. package/package.json +115 -0
@@ -0,0 +1,396 @@
1
+ # Project Progress
2
+
3
+ ## Current Focus
4
+ <!-- What you're working on -->
5
+ PR#52: Agent command parity design doc + ESLint worktrees fix. PR #50 (superpowers-gaps) and PR #51 (agent configs) both merged.
6
+
7
+ ### Chore: Agent Configs and Research Docs (2026-03-03)
8
+ - **PR**: #51
9
+ - **Branch**: chore/agent-configs-and-research-docs
10
+ - **Description**: Committed agent permission configs for Aider, Codex CLI, OpenCode, and Cursor that were generated during prior sessions. Also committed research docs and a test suite v2 decision log.
11
+ - **Deliverables**:
12
+ - **`.aider.conf.yml`**: Aider config — `yes-always: false`, `auto-accept-architect: true`, `auto-commits: false`, `read: AGENTS.md`
13
+ - **`.codex/config.toml`**: Codex CLI — `approval_policy = "on-request"`, `sandbox_mode = "workspace-write"`
14
+ - **`opencode.json`**: OpenCode permissions — allow/ask/deny tiers matching research doc classification
15
+ - **`.cursor/rules/permissions-guidance.mdc`**: Cursor YOLO mode allow/confirm/deny guidance
16
+ - **`docs/research/agent-permissions.md`**, **`agent-instructions-sync.md`**: Permission tier research and sync research
17
+ - **`docs/plans/2026-02-27-forge-test-suite-v2-decisions.md`**: Test suite v2 decision log
18
+ - **Key Decisions**: `git rebase` → `ask`; `git push -f` added to deny; `auto-commits: false` to preserve commitlint hooks
19
+
20
+ ## Completed
21
+
22
+ ### PR5.7: Fix Skills Sync — All 11 Agents + Dual-Source Reading (2026-02-24)
23
+ - **PR**: #46
24
+ - **Beads**: forge-ab6 (closed)
25
+ - **Research**: [docs/research/skills-restructure.md](../research/skills-restructure.md)
26
+ - **Description**: After PR5.5 moved skills to `skills/` root, `bunx skills sync` stopped distributing to any agent. Fixed all 3 root causes with TDD.
27
+ - **Root Causes Fixed**:
28
+ 1. `AGENT_DEFINITIONS` had only 4 of 11 agents — expanded to all 11 (claude, kilocode, aider, roo, windsurf, opencode, antigravity added)
29
+ 2. `getValidSkills()` only read from `.skills/` (empty) — now reads `skills/` root + `.skills/` with Map deduplication (`.skills/` wins)
30
+ 3. copilot, roo, aider `plugin.json` had `skills: false` — all corrected to `true`
31
+ - **Deliverables**:
32
+ - **`packages/skills/src/lib/agents.js`**: All 11 agents in `AGENT_DEFINITIONS`, all `enabled: true`; `configFile` passthrough for agents needing config-file updates
33
+ - **`packages/skills/src/commands/sync.js`**: Dual-source `getValidSkills()` via Map; `_collectSkillsFrom()` helper; `syncSkillsToAgents()` uses `skill.sourcePath`; new `updateAiderConfig()` writes `read:` entries to `.aider.conf.yml`
34
+ - **`lib/agents/copilot.plugin.json`**, **`roo.plugin.json`**, **`aider.plugin.json`**: Fixed `skills: false → true`
35
+ - **`.gitignore`**: Added `.agents/`, `.skills/`, `skills-lock.json`, all agent skill junction dirs (`.aider/skills/`, `.claude/skills/`, etc.)
36
+ - **`.claude/commands/sonarcloud.md`**: Updated skill reference path from `.claude/skills/sonarcloud/` → `skills/sonarcloud-analysis/`
37
+ - **12 new tests**: 7 agent detection tests + 5 sync validation tests (dual-source, dedup, claude/kilocode/aider sync)
38
+ - **skills.sh mechanism understood**: Real files in `.agents/skills/`; agent dirs get OS-level junctions (not copies); junctions not committed to git
39
+ - **Validation**: 105 pass in skills package, all CI checks green, Greptile 4/5 (Quality Gate passed), SonarCloud passed
40
+ - **Files**: `packages/skills/src/lib/agents.js`, `packages/skills/src/commands/sync.js`, `packages/skills/test/agents.test.js`, `packages/skills/test/sync.test.js`, `lib/agents/copilot.plugin.json`, `lib/agents/roo.plugin.json`, `lib/agents/aider.plugin.json`, `.claude/commands/sonarcloud.md`, `.gitignore`
41
+
42
+ ### PR5.6: Cross-Platform Install Fixes (2026-02-23)
43
+ - **PR**: #45
44
+ - **Beads**: forge-k6p, forge-63c, forge-jxb, forge-92t, forge-4zz, forge-0xb, forge-cvr, forge-6q4 (all closed)
45
+ - **Research**: [docs/research/dependency-chain.md](../research/dependency-chain.md)
46
+ - **Description**: Fixed 8 cross-platform installation bugs covering Windows Beads EPERM bug, hardcoded `bun`/`bunx` in hooks and error messages, bash-only syntax in lefthook, and unpinned MCP versions
47
+ - **Deliverables**:
48
+ - **Windows Beads install** (`bin/forge.js`): `installBeadsOnWindows()` uses PowerShell `irm install.ps1 | iex` on `win32` — bypasses `npm @beads/bd` EPERM postinstall bug (Issue #1031). All 3 install methods (global, local, method '2') detect win32 and delegate to `installBeadsOnWindows()`
49
+ - **`BEADS_INSTALL_PS1_URL` constant**: Centralised URL for PowerShell installer — used in `installBeadsOnWindows()`, error messages, and printed before execution for transparency
50
+ - **`autoInstallLefthook` PKG_MANAGER flags** (`bin/forge.js`): Removed hardcoded `bun add -d lefthook`; now uses `PKG_MANAGER` with correct flags per manager: `bun add -d`, `pnpm add -D`, `yarn add --dev`, `npm install --save-dev`
51
+ - **Error messages** (`bin/forge.js`): All "run manually" error messages now use `${PKG_MANAGER}` with correct flag instead of hardcoded `bun add -g`
52
+ - **OpenSpec/Skills messaging** (`bin/forge.js`): Shows explicit "not found — install with:" message when tools are not pre-installed (instead of silent skip)
53
+ - **Post-install verification** (`bin/forge.js`): `verifyToolInstall()` called after install, runs `bd version` to confirm tool is callable
54
+ - **Cross-platform lefthook hooks** (`lefthook.yml`): Replaced `bunx commitlint` → `npx --yes commitlint`, replaced `bunx eslint` + bash `if [$?]`/`command -v` syntax → `node scripts/lint.js` and `node scripts/test.js`
55
+ - **`scripts/lint.js`** (new): Cross-platform ESLint runner using `spawnSync('npx', ..., { shell: isWindows })` with `result.error` check
56
+ - **`scripts/test.js`** (new): Cross-platform test runner with `detectPackageManager()` lock file detection, `result.error` check
57
+ - **`.mcp.json.example`**: Pinned `context7-mcp@2` and `grep_app_mcp@1` instead of `@latest`
58
+ - **22 tests** (`test/cross-platform-install.test.js`): Source-inspection tests covering all 8 beads issues (forge-k6p through forge-6q4)
59
+ - **Impact**: Forge `setup` command now works on Windows, npm/pnpm/yarn users, and any CI environment — not just bun/macOS/Linux
60
+ - **Files**: `bin/forge.js`, `lefthook.yml`, `scripts/lint.js` (new), `scripts/test.js` (new), `test/cross-platform-install.test.js` (new), `.mcp.json.example`, `docs/research/dependency-chain.md` (new)
61
+ - **Validation**: 22 new tests, 997+ passing total, all 26 CI checks passing (Windows, macOS, Linux × Node 20/22), Greptile Quality Gate PASSED, SonarCloud PASSED, CodeQL PASSED
62
+ - **Security**: OWASP Top 10 reviewed, `BEADS_INSTALL_PS1_URL` printed before PowerShell execution for transparency, `spawnSync` uses `result.error` check (no silent failures), no shell injection (explicit args arrays)
63
+
64
+ ### PR5.5: Skills Restructure for skills.sh (2026-02-23)
65
+ - **PR**: #43
66
+ - **Beads**: forge-qst (closed)
67
+ - **Research**: [docs/research/skills-restructure.md](../research/skills-restructure.md)
68
+ - **Description**: Migrated skills to `skills/` (repo root, skills.sh standard), split monolithic `parallel-ai` into 4 focused curl-based skills, added dual CLI/curl install paths in catalog and `forge recommend` output, removed legacy `.claude/skills/` directories
69
+ - **Deliverables**:
70
+ - **skills/ directory** (6 skills, downloadable on-demand via `npx skills add harshanandak/forge --skill <name>`):
71
+ - `parallel-web-search` — curl-based Parallel AI Search API
72
+ - `parallel-web-extract` — curl-based Parallel AI Extract API
73
+ - `parallel-deep-research` — curl-based Parallel AI Task API (pro/ultra processors)
74
+ - `parallel-data-enrichment` — curl-based Parallel AI Task API (core/base processors)
75
+ - `sonarcloud-analysis` — migrated from `.claude/skills/sonarcloud/` with corrected name
76
+ - `citation-standards` — new internal rule skill for research docs
77
+ - **Catalog changes** (lib/plugin-catalog.js):
78
+ - `parallel-web-search` replaces `parallel-ai` — dual install paths (`install.cmd` CLI + `install.cmdCurl` curl)
79
+ - `sonarcloud-analysis` replaces `sonarcloud`
80
+ - `parallel-cli` added to PREREQUISITES registry
81
+ - **Recommend output** (lib/commands/recommend.js):
82
+ - Shows "CLI (recommended)" and "Curl (no install)" options for dual-path tools
83
+ - **Skills structure validation** (test/skills-structure.test.js): 34 new tests
84
+ - **Legacy cleanup**: Deleted `.claude/skills/parallel-ai/` (5 files) and `.claude/skills/sonarcloud/` (2 files)
85
+ - **Impact**: 67 new PR5.5-specific tests, skills.sh compatible structure, users can download individual skills on demand without bloating npm package
86
+ - **Files**: skills/ (7 new files), lib/plugin-catalog.js, lib/commands/recommend.js, test/skills-structure.test.js (new), test/plugin-catalog.test.js (+6 tests), test/plugin-recommend.test.js (new), package.json, .claude/commands/research.md
87
+ - **Validation**: 974/1012 tests passing (2 pre-existing failures in packages/skills unrelated to PR5.5), all 18 CI checks passing, Greptile Quality Gate PASSED, SonarCloud Quality Gate PASSED (0 issues after fix), CodeQL false positive dismissed
88
+ - **Security**: OWASP Top 10 reviewed (all N/A or PASS for static data + display-only changes), skills excluded from npm package by default, catalog frozen immutable data
89
+
90
+ ### PR6: Plugin Architecture & Smart Recommendations (2026-02-21)
91
+ - **PR**: #41
92
+ - **Beads**: forge-a7n (closed)
93
+ - **Research**: [docs/research/plugin-architecture.md](../research/plugin-architecture.md)
94
+ - **Description**: Read-only plugin catalog with 30 curated tools, tech stack detection across 9 categories, recommendation engine with 5 budget modes, and `forge recommend` CLI command
95
+ - **Deliverables**:
96
+ - **Plugin Catalog** (lib/plugin-catalog.js):
97
+ - 30 tools across 7 workflow stages (research → merge)
98
+ - 4 pricing tiers: free, free-public, free-limited, paid
99
+ - 5 tool types: cli, skill, mcp, config, lsp
100
+ - 5 budget modes: free, open-source, startup, professional, custom
101
+ - Prerequisite registry (data-only, runtime deferred to PR7)
102
+ - Frozen immutable data, zero runtime I/O
103
+ - Every paid/free-limited tool has free alternatives
104
+ - CLI-first principle: MCPs only when no CLI equivalent exists
105
+ - 21 comprehensive tests
106
+ - **Tech Stack Detection** (lib/project-discovery.js, additive):
107
+ - `detectTechStack()` covering 9 categories: frameworks, languages, databases, auth, payments, CI/CD, testing, linting, LSPs
108
+ - 50+ technologies recognized across 12 internal helper functions
109
+ - Backward compatible: existing `detectFramework()`, `autoDetect()`, `detectLanguage()` unchanged
110
+ - 20 comprehensive tests (temp dir fixtures, backward compat)
111
+ - **Recommendation Engine** (lib/plugin-recommender.js):
112
+ - `recommend(techStack, budgetMode)` → `{ recommended, skipped }`
113
+ - `matchesDetection(conditions, techStack)` — OR logic for dep/file/framework conditions
114
+ - CLI-first enforcement, tier-based sorting (free first)
115
+ - Budget mode validation
116
+ - 26 comprehensive tests
117
+ - **CLI Command** (lib/commands/recommend.js, bin/forge.js):
118
+ - `forge recommend` with `--budget <mode>` flag
119
+ - Stage-grouped output with tier labels [F]/[FP]/[FL]/[P]
120
+ - Free alternatives shown inline for paid tools
121
+ - Default budget: startup
122
+ - 11 comprehensive tests
123
+ - **Impact**: 78 new tests (930 total), read-only architecture with zero side effects, foundation for PR7 installation orchestrator
124
+ - **Files**: lib/plugin-catalog.js (new), lib/plugin-recommender.js (new), lib/commands/recommend.js (new), lib/project-discovery.js (+149 lines), bin/forge.js (+22 lines), test/plugin-catalog.test.js, test/plugin-detection.test.js, test/plugin-recommender.test.js, test/commands/recommend.test.js
125
+ - **Validation**: 930/930 tests passing, 0 ESLint warnings, all 19 CI checks passing, Greptile PASSED (0 comments), SonarCloud Quality Gate PASSED (0 open issues)
126
+ - **Security**: OWASP Top 10 reviewed (all N/A or PASS for read-only data module), Object.freeze() on all catalog data, no user input flows to subprocess calls
127
+
128
+ ### PR5: Advanced Testing Expansion (2026-02-20)
129
+ - **PR**: #40
130
+ - **Beads**: forge-01p (closed)
131
+ - **Research**: [docs/research/advanced-testing.md](../research/advanced-testing.md) (PR #36, merged 2026-02-20)
132
+ - **Description**: Advanced testing infrastructure with Stryker mutation testing, performance benchmarks, OWASP A02/A07 security tests, and test quality dashboard
133
+ - **Deliverables**:
134
+ - **Stryker Mutation Testing** (stryker.config.json):
135
+ - Command runner mode with `bun test` for Bun compatibility
136
+ - Scope: `lib/**/*.js` (excludes `bin/forge.js` CLI entry point)
137
+ - Thresholds: high 80, low 60, break 50
138
+ - Incremental mode for faster CI re-runs
139
+ - Weekly schedule (Sunday 3am UTC) + manual dispatch
140
+ - 10 comprehensive tests validating configuration
141
+ - **Performance Benchmarks** (scripts/benchmark.js):
142
+ - CLI startup benchmark (`node bin/forge.js --help`)
143
+ - `autoDetect()` and `detectFramework()` timing
144
+ - Safe subprocess handling with `execFileSync` (no shell injection)
145
+ - JSON output for CI integration
146
+ - 6 comprehensive tests
147
+ - **OWASP A02 Cryptographic Failure Tests** (test-env/edge-cases/crypto-security.test.js):
148
+ - .gitignore patterns for .env files (3 tests)
149
+ - No hardcoded secrets in lib/ and bin/ (2 tests)
150
+ - AGENTS.md template and MCP config clean (2 tests)
151
+ - No tracked .env files (1 test)
152
+ - 8 comprehensive tests
153
+ - **OWASP A07 Authentication Security Tests** (test-env/edge-cases/auth-security.test.js):
154
+ - Branch protection validates main/master
155
+ - No default credentials in templates
156
+ - Config files use process.env for tokens
157
+ - 6 comprehensive tests
158
+ - **Test Quality Dashboard** (scripts/test-dashboard.js):
159
+ - File-based test counting (avoids recursive `bun test`)
160
+ - Coverage threshold from c8 config
161
+ - Mutation score from Stryker report
162
+ - Skipped test detection
163
+ - CI job with artifact upload (needs test+coverage)
164
+ - 6 comprehensive tests
165
+ - **CI Workflow Enhancements** (.github/workflows/test.yml):
166
+ - `mutation` job: weekly + manual, Stryker run, 30-day artifact retention
167
+ - `dashboard` job: depends on test+coverage, generates dashboard, 7-day retention
168
+ - `schedule` trigger: cron `0 3 * * 0` (Sunday 3am UTC)
169
+ - 8 new CI validation tests
170
+ - **Impact**: 44 new tests (851 total), mutation testing infrastructure, OWASP security validation, automated quality dashboard
171
+ - **Files**: stryker.config.json, scripts/benchmark.js, scripts/test-dashboard.js, test/mutation-config.test.js, test/benchmarks.test.js, test/test-dashboard.test.js, test-env/edge-cases/crypto-security.test.js, test-env/edge-cases/auth-security.test.js, test/ci-workflow.test.js, .github/workflows/test.yml, package.json, .gitignore, .forge/hooks/check-tdd.js
172
+ - **Validation**: 851/852 tests passing (1 pre-existing flaky), 0 ESLint warnings, all 22 CI checks passing, Greptile PASSED, SonarCloud Quality Gate PASSED (0 issues, 0 hotspots)
173
+ - **Security**: OWASP A02+A07 automated tests, no hardcoded secrets, safe subprocess handling, branch protection validated
174
+
175
+ ### Pre-PR5 Code Quality Cleanup (2026-02-20)
176
+ - **PR**: #34
177
+ - **Beads**: forge-y8z (closed), forge-eb5 (closed)
178
+ - **Description**: Resolved all pending code quality issues before starting PR5
179
+ - **Deliverables**:
180
+ - **ESLint Strict Mode**:
181
+ - Resolved all 27 remaining `no-unused-vars` warnings across 11 test/validation files
182
+ - Enabled `--max-warnings 0` in lefthook.yml pre-push hook
183
+ - Zero warnings enforced going forward
184
+ - **SonarCloud Cognitive Complexity** (rework of closed PR #32):
185
+ - Extracted 15+ helper functions from `bin/forge.js` to reduce cognitive complexity
186
+ - Phase 7A: `installViaBunx`, `detectFromLockFile`, `detectFromCommand`, `validateCommonSecurity`, `getSkillsInstallArgs`, `installSkillsWithMethod`
187
+ - Phase 7B: `displayMcpStatus`, `displayEnvTokenResults`, `autoInstallLefthook`, `autoSetupToolsInQuickMode`, `configureDefaultExternalServices`
188
+ - Phase 7C: S6509 `Boolean()`, S3800 return consistency, S3516 error handling, S4144 duplicate function delegation
189
+ - **Cleanup**: Removed 15 redundant `.gitkeep` files, vestigial XML tags, scratch research docs
190
+ - **Tests**: 10 new structural tests in `test/cli/forge.test.js` verifying extracted helpers
191
+ - **Impact**: Clean codebase for PR5, zero ESLint warnings, SonarCloud quality improvements
192
+ - **Files**: bin/forge.js (870 lines changed), lefthook.yml, .claude/commands/sonarcloud.md, test/cli/forge.test.js (new), 11 test/validation files
193
+ - **Validation**: 808/808 tests passing, 0 ESLint warnings, all 20 CI checks passing, Greptile PASSED, SonarCloud PASSED
194
+
195
+ ### PR4: CLI Command Automation (2026-02-19)
196
+ - **PR**: #33
197
+ - **Beads**: forge-01p (epic)
198
+ - **Description**: Comprehensive CLI automation framework with 9-stage Forge workflow commands, parallel-ai integration, and beads/openspec toolchain support
199
+ - **Validation**: 796+ tests passing, all CI checks green, Greptile PASSED, SonarCloud PASSED
200
+
201
+ ### PR3: Testing Infrastructure Foundation (2026-02-14)
202
+ - **PR**: #30
203
+ - **Beads**: forge-5uh
204
+ - **Plan**: [.claude/plans/enumerated-watching-chipmunk.md](../../.claude/plans/enumerated-watching-chipmunk.md) (Phase 1 - PR3)
205
+ - **Description**: Comprehensive testing infrastructure with code coverage integration, E2E testing framework, snapshot testing, and enhanced CI/CD workflows
206
+ - **Deliverables**:
207
+ - **Code Coverage Integration** (c8):
208
+ - c8@10.1.3 with 80% thresholds (lines, branches, functions, statements)
209
+ - Coverage exclusions: test files, fixtures, coverage directory
210
+ - HTML, lcov, and text reporters for comprehensive reporting
211
+ - 9 comprehensive tests (dependencies, scripts, thresholds, badge, gitignore)
212
+ - **E2E Testing Framework** (test/e2e/):
213
+ - Scaffold utilities: createTempProject, cleanupTempProject
214
+ - Safety checks prevent accidental deletion of non-test directories
215
+ - Cross-platform temp directory handling (Windows, macOS, Linux)
216
+ - Test fixtures: empty-project, existing-project, large-project
217
+ - 8 E2E tests covering scaffold, fixtures, and snapshots
218
+ - **Snapshot Testing**:
219
+ - Node.js built-in snapshot testing (no external dependencies)
220
+ - Cross-platform compatibility (sorted arrays for consistent ordering)
221
+ - Snapshot validation for project structure
222
+ - Auto-generation and validation of snapshots
223
+ - **CI Workflow Enhancements** (.github/workflows/test.yml):
224
+ - Separate coverage job with artifact upload (7-day retention)
225
+ - Separate E2E job for isolated testing
226
+ - Parallel execution: test (6 platforms) + coverage + e2e
227
+ - 20 comprehensive tests validating workflow structure
228
+ - **Security Fix**:
229
+ - Fixed CodeQL Alert #90: Incomplete URL substring sanitization (test/coverage-config.test.js:98)
230
+ - Replaced insecure `readme.includes('shields.io')` with proper URL validation
231
+ - Validates hostname using URL API, trusts only known badge providers
232
+ - Prevents malicious URLs like `evil.com/shields.io/malware`
233
+ - **Impact**: Foundation for comprehensive testing with 80%+ coverage thresholds, E2E testing infrastructure for workflow validation, parallel CI jobs for faster feedback
234
+ - **Files**: package.json (c8 config), test/coverage-config.test.js, test/e2e/helpers/scaffold.js, test/e2e/helpers/cleanup.js, test/e2e/fixtures.test.js, test/e2e/snapshot.test.js, test/ci-workflow.test.js, .github/workflows/test.yml (coverage + e2e jobs), eslint.config.js (fixture ignores)
235
+ - **Validation**: 695/695 tests passing (97%+ coverage), 0 ESLint errors, all 19 CI checks passing, Greptile PASSED, SonarCloud Quality Gate PASSED, CodeQL security alert resolved
236
+ - **Security**: OWASP Top 10 validated, CodeQL Alert #90 fixed (proper URL validation), temp directory safety checks, no command injection risks
237
+
238
+ ### PR2: Branch Protection & Security Enhancements (2026-02-14)
239
+ - **PR**: #29
240
+ - **Plan**: [.claude/plans/enumerated-watching-chipmunk.md](../../.claude/plans/enumerated-watching-chipmunk.md) (Phase 1 - PR2)
241
+ - **Description**: Comprehensive security enhancements including code ownership, commit message validation, vulnerability reporting process, commit signing guidance, and security badges
242
+ - **Deliverables**:
243
+ - **CODEOWNERS File** (.github/CODEOWNERS):
244
+ - Team-based code ownership for critical directories
245
+ - 6 teams: core, workflow, docs, devops, testing, security
246
+ - Protected dirs: /bin/, /lib/, /.claude/, /docs/, .github/, security-sensitive files
247
+ - 8 comprehensive tests (file validation, directory protection, team syntax)
248
+ - **Commitlint Integration** (.commitlintrc.json, lefthook.yml):
249
+ - Enforce conventional commit message format (feat, fix, docs, etc.)
250
+ - Dependencies: @commitlint/cli@20.4.1, @commitlint/config-conventional@20.4.1
251
+ - Integrated with lefthook commit-msg hook
252
+ - 9 comprehensive tests (config, dependencies, hook integration)
253
+ - **SECURITY.md Policy**:
254
+ - Comprehensive vulnerability reporting process
255
+ - GitHub Security Advisories + email contact methods
256
+ - Response timeline: 48h initial, 5 days update
257
+ - Responsible disclosure process, security best practices
258
+ - 9 comprehensive tests (required sections, contact info, response timeline)
259
+ - **Branch Protection Guide Updates** (.github/BRANCH_PROTECTION_GUIDE.md):
260
+ - Added comprehensive commit signing section (228 lines)
261
+ - GPG signing setup (step-by-step)
262
+ - SSH signing setup (alternative, simpler)
263
+ - Troubleshooting guide (3 common issues)
264
+ - Team commit signing policy
265
+ - **Security Badges** (README.md):
266
+ - CodeQL security scanning badge
267
+ - Security Policy badge (links to SECURITY.md)
268
+ - **Security Fix**:
269
+ - Fixed markdown-it ReDoS vulnerability (GHSA-38c4-r59v-3vqw)
270
+ - Updated markdown-it from ^14.1.0 → ^14.1.1
271
+ - Security audit: No vulnerabilities found
272
+ - **Impact**: Enhanced security with team-based access control, commit validation, vulnerability reporting, and commit signing guidance. Zero new vulnerabilities introduced.
273
+ - **Files**: .github/CODEOWNERS, .commitlintrc.json, SECURITY.md, lefthook.yml (commit-msg hook), .github/BRANCH_PROTECTION_GUIDE.md (+228 lines), README.md (security badges), packages/skills/package.json (security fix), test/codeowners.test.js, test/commitlint.test.js, test/security-policy.test.js
274
+ - **Validation**: 633/633 tests passing (26 new PR2 tests), 0 ESLint errors, 0 security vulnerabilities, Greptile PASSED (no issues), SonarCloud Quality Gate PASSED, all 18 CI checks passing
275
+ - **Security**: OWASP Top 10 validated (A01-A10), markdown-it ReDoS fixed, commit signing prevents impersonation, CODEOWNERS adds access control, commitlint prevents malicious commit messages
276
+
277
+ ### PR1: Critical Fixes & Immediate Improvements (2026-02-13)
278
+ - **PR**: #28
279
+ - **Plan**: [.claude/plans/enumerated-watching-chipmunk.md](../../.claude/plans/enumerated-watching-chipmunk.md) (Phase 1)
280
+ - **Description**: Quick wins to fix broken features and add immediate value - unified check script, Windows compatibility, package size monitoring, manual review guidance
281
+ - **Deliverables**:
282
+ - **Unified Check Script** (scripts/check.sh):
283
+ - Orchestrates all validation: typecheck → lint → security → tests
284
+ - Single command: `bun run check`
285
+ - Cross-platform compatible (bash with fallback)
286
+ - 9 comprehensive tests covering orchestration, output, error handling
287
+ - **Lefthook Windows Compatibility** (scripts/branch-protection.js):
288
+ - Replaced bash script with Node.js for cross-platform support
289
+ - Works on Windows, macOS, Linux
290
+ - 11 tests covering branch logic, exit codes, platform execution
291
+ - **Package Size Monitoring** (.github/workflows/size-check.yml):
292
+ - Automated package size checks on PRs
293
+ - 10MB threshold with automated PR comments
294
+ - README badge integration
295
+ - 11 tests validating workflow configuration
296
+ - Fixed 3 Greptile issues: permissions, await, type coercion
297
+ - **Manual Review Guide** (docs/MANUAL_REVIEW_GUIDE.md):
298
+ - Comprehensive guidance for AI-assisted code review
299
+ - Best practices for Greptile, CodeRabbit, SonarCloud
300
+ - OWASP Top 10 security checklist
301
+ - Integration with /review stage
302
+ - **Security Fix**:
303
+ - Updated inquirer to v13.2.2 (fixed tmp vulnerability)
304
+ - **Impact**: Immediate workflow improvements, cross-platform git hooks, automated size monitoring, enhanced review quality
305
+ - **Files**: scripts/check.sh, scripts/branch-protection.js, .github/workflows/size-check.yml, docs/MANUAL_REVIEW_GUIDE.md, lefthook.yml, package.json, packages/skills/package.json, .claude/commands/check.md, test/check-script.test.js, test/branch-protection.test.js, test/workflows/size-check.test.js
306
+ - **Validation**: 607/607 tests passing, 0 ESLint errors, Greptile 5/5 (all threads resolved), SonarCloud ✅, all 17 CI checks passing
307
+ - **Security**: tmp vulnerability fixed (inquirer upgrade), OWASP Top 10 validated, shell injection prevented (Node.js scripts), no new attack surfaces
308
+
309
+ ### PR0: Architecture Simplification & Multi-Agent Support (2026-02-12)
310
+ - **PR**: #26
311
+ - **Beads**: forge-wp2
312
+ - **Plan**: [.claude/plans/enumerated-watching-chipmunk.md](../../.claude/plans/enumerated-watching-chipmunk.md)
313
+ - **Description**: Simplified Forge architecture from 11 agents to 5 Tier 1 + 3 Tier 2 agents with universal AGENTS.md configuration
314
+ - **Deliverables**:
315
+ - **New Modules** (2,346 lines):
316
+ - lib/agents-config.js (2,228 lines): 6 generators + 3 doc generators
317
+ - lib/setup.js (118 lines): Resumable setup state management
318
+ - **Test Suite** (104 new tests):
319
+ - 9 new test files covering agent detection, config generation, E2E workflows
320
+ - All 576 tests passing (100% pass rate)
321
+ - **Multi-Agent Support**:
322
+ - Tier 1: Claude Code, GitHub Copilot, Kilo Code, Cursor, Aider
323
+ - Tier 2: OpenCode, Goose, Antigravity
324
+ - Universal AGENTS.md + optional agent-specific configs
325
+ - **Documentation**:
326
+ - Updated CLAUDE.md with Multi-Agent Support section
327
+ - Smart setup with auto-detection (30-second setup)
328
+ - Resumable setup state (.forge/setup-state.json)
329
+ - **Impact**: Foundation for all subsequent PRs, zero coordination complexity, 67% reduction in multi-agent coordination issues
330
+ - **Files**: lib/agents-config.js, lib/setup.js, lib/project-discovery.js, CLAUDE.md, test/*.test.js, test/e2e/setup-workflow.test.js
331
+ - **Validation**: 576/576 tests passing, 0 ESLint errors, OWASP Top 10 verified, Greptile ✅, SonarCloud ✅
332
+ - **Security**: No new dependencies, file-based state management, overwrite protection, OWASP A03/A04/A05/A06/A08 validated
333
+
334
+ ### YAML Validation Workflow (2026-02-10)
335
+ - **PR**: #23
336
+ - **Description**: Added automated YAML syntax validation to prevent configuration errors in CI/CD workflows
337
+ - **Deliverables**:
338
+ - New GitHub Actions workflow: `.github/workflows/yaml-lint.yml`
339
+ - Local validation script: `bun run validate:yaml`
340
+ - Committed dev dependency: js-yaml@^4.1.1
341
+ - Security hardening: Fixed shell injection, proper quoting, idempotent design
342
+ - Comprehensive validation: All `.yml` and `.yaml` files across entire repository
343
+ - **Impact**: Prevents YAML syntax errors from reaching production, automated CI/CD validation
344
+ - **Files**: .github/workflows/yaml-lint.yml, package.json, bun.lock
345
+ - **Validation**: 471/472 tests passing, 0 ESLint errors, 0 SonarCloud issues, Greptile Quality Gate passed (≥4/5)
346
+ - **Security**: OWASP Top 10 verified, all injection vulnerabilities fixed (4 rounds of Greptile review)
347
+
348
+ ### Package Manager Documentation Consistency (2026-02-09)
349
+ - **PR**: #21
350
+ - **Description**: Standardized all documentation to reference Bun as primary package manager with npm as fallback
351
+ - **Deliverables**:
352
+ - Updated 14 documentation files: commands, rules, workflows, templates, README
353
+ - Updated lefthook.yml: pre-push hook now uses `bunx eslint .`
354
+ - Command replacements: 90+ instances (npm → bun, npx → bunx)
355
+ - Maintained backwards compatibility: npm shown as fallback option
356
+ - **Impact**: 100% documentation consistency, improved user experience, aligned with project design
357
+ - **Files**: .claude/commands/*, .claude/rules/workflow.md, .github/pull_request_template.md, CLAUDE.md, README.md, docs/*.md, lefthook.yml, openspec/AGENTS.md
358
+ - **Validation**: 472/472 tests passing, 0 errors (ESLint), OWASP Top 10 verified, all 16 CI/CD checks passed
359
+
360
+ ### Comprehensive Test Environment (2026-02-05)
361
+ - **PR**: #8
362
+ - **Beads**: forge-hql (EPIC)
363
+ - **Research**: [docs/research/test-environment.md](../research/test-environment.md)
364
+ - **OpenSpec**: openspec/changes/test-environment/ (to be archived)
365
+ - **Description**: Production-grade test infrastructure with 189 tests across edge cases, integration scenarios, and validation helpers
366
+ - **Deliverables**:
367
+ - 8 edge case test files (120 tests): prerequisites, permissions, git states, network, JSON, file limits, security, env preservation
368
+ - 3 rollback test files (69 tests): edge cases, user sections, validation
369
+ - 4 validation helpers (52 tests): git-state-checker, env-validator, agent-validator, file-checker
370
+ - 15 test fixtures: covering fresh install, upgrades, conflicts, permissions, git states, frameworks, security
371
+ - Unified test infrastructure: Migrated all tests to test-env/, deleted old test/ directory
372
+ - Bug fixes: Critical path validation bug (bin/forge.js:116), git submodule cleanup
373
+ - **Impact**: ~95% test coverage, automated CI/CD testing (18 jobs), comprehensive edge case validation
374
+ - **Files**: test-env/edge-cases/*, test-env/validation/*, test-env/fixtures/*, test-env/README.md, lib/plugin-manager.js
375
+
376
+ ### Meta-Development Documentation (2026-02-03)
377
+ - **PR**: #7
378
+ - **Beads**: forge-66q
379
+ - **Description**: Added contributor documentation enabling Forge workflow for Forge development (dogfooding)
380
+ - **Files**: DEVELOPMENT.md, .github/CONTRIBUTING.md, .clinerules, .npmignore
381
+
382
+ ## Upcoming
383
+ <!-- Next priorities -->
384
+
385
+ ### PR5.5: Skills Restructure for skills.sh
386
+ - **Deliverables**: Restructure parallel-ai into 4 focused skills, publish to skills.sh, add citation-standards rule
387
+ - **Status**: ✅ Merged as PR #43
388
+
389
+ ### PR7: Installation Orchestrator + Skill Extraction
390
+ - **Deliverables**: `forge install <tool>` command, prerequisite runtime verification, skill extraction from npm `files`, cross-platform installer
391
+ - **Status**: Blocked on PR5.5 (skills.sh publishing)
392
+ - **Research**: Risk analysis R1-R6 in [docs/research/plugin-architecture.md](../research/plugin-architecture.md)
393
+
394
+ ### PR8: Catalog Expansion
395
+ - **Deliverables**: Expand catalog from 30 to 90+ tools, language-specific LSPs, community feedback integration
396
+ - **Status**: After PR7
File without changes
@@ -0,0 +1,21 @@
1
+ # Decisions Log: Forge Test Suite v2
2
+
3
+ **Feature**: forge-test-suite-v2
4
+ **Beads**: forge-5vf
5
+ **Started**: 2026-02-27
6
+
7
+ ---
8
+
9
+ <!-- Decisions appended below as they arise during /dev -->
10
+
11
+ ## Decision 1
12
+ **Date**: 2026-02-27
13
+ **Task**: Task 1 — Audit and delete stale lib exports
14
+ **Gap**: `lib/commands/research.js` has a live non-test reference in `bin/forge-cmd.js` line 14. The `forge research` CLI command is still registered in VALID_COMMANDS, COMMAND_DESCRIPTIONS, REQUIRED_ARGS, dispatch handler, and help text. Deleting lib only requires also removing the CLI registration — user-visible behavior change not specified in Task 1.
15
+ **Score**: 7/14 (SPEC-REVIEWER range) — also matches explicit "SHOULD pause and ask" example in ambiguity policy
16
+ **Route**: BLOCKED — PENDING-DEVELOPER-INPUT
17
+ **Choice made**: Option A — full deletion. User confirmed lib/commands/research.js is a stub (conductResearch() returns empty arrays, forge research CLI produces useless empty documents).
18
+ **Options**:
19
+ A. Full deletion: remove lib/commands/research.js AND all forge research CLI registration from bin/forge-cmd.js (removes forge research as a user command) ← CHOSEN
20
+ B. Partial: keep lib/commands/research.js and the CLI command — skip deletion, only remove OpenSpec functions from lib/commands/plan.js
21
+ **Status**: RESOLVED