forge-workflow 0.1.0-beta.3 → 0.1.0-beta.4

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 (122) hide show
  1. package/AGENTS.md +1 -1
  2. package/bin/forge-cmd.js +1 -1
  3. package/bin/forge.js +5 -0
  4. package/docs/reference/COMMANDS.md +3 -1
  5. package/docs/reference/shepherd.md +72 -1
  6. package/lib/adapters/greptile-review-adapter.js +1 -1
  7. package/lib/adapters/pr-state-adapter.js +103 -8
  8. package/lib/agents-config.js +5 -0
  9. package/lib/commands/_issue.js +31 -46
  10. package/lib/commands/_manifest.js +1 -1
  11. package/lib/commands/_resolve-command-opts.js +36 -29
  12. package/lib/commands/claim.js +2 -4
  13. package/lib/commands/hooks.js +155 -8
  14. package/lib/commands/plan.js +23 -115
  15. package/lib/commands/prime.js +8 -1
  16. package/lib/commands/release.js +1 -2
  17. package/lib/commands/serve.js +5 -2
  18. package/lib/commands/setup.js +0 -1
  19. package/lib/commands/shepherd.js +36 -3
  20. package/lib/commands/skill.js +275 -0
  21. package/lib/commands/status.js +37 -32
  22. package/lib/commands/test.js +32 -0
  23. package/lib/commands/worktree.js +27 -1
  24. package/lib/core/runtime-graph.js +88 -14
  25. package/lib/forge-issues.js +13 -464
  26. package/lib/harness-capability-matrix.js +2 -2
  27. package/lib/hook-renderer.js +54 -12
  28. package/lib/issue-backend.js +42 -3
  29. package/lib/kernel/broker.js +28 -0
  30. package/lib/kernel/migrations.js +30 -2
  31. package/lib/kernel/schema.js +35 -0
  32. package/lib/kernel/sqlite-driver.js +150 -0
  33. package/lib/memory-recall.js +151 -0
  34. package/lib/orientation.js +303 -6
  35. package/lib/pr-bundle.js +6 -2
  36. package/lib/pr-monitor/reconcile-executor.js +659 -0
  37. package/lib/pr-monitor/reconcile-tick.js +138 -0
  38. package/lib/pr-monitor/reconcile.js +0 -0
  39. package/lib/pr-monitor/render-sticky.js +14 -0
  40. package/lib/pr-monitor/shepherd-lease.js +243 -0
  41. package/lib/pr-monitor/upsert-sticky.js +1 -1
  42. package/lib/pr-monitor/watch-lifecycle.js +1 -1
  43. package/lib/pr-pull.js +70 -15
  44. package/lib/project-memory.js +8 -0
  45. package/lib/rules-sync.js +4 -0
  46. package/lib/runtime-health.js +15 -46
  47. package/lib/skill-eval.js +750 -0
  48. package/lib/status/identity.js +46 -0
  49. package/lib/status/presenter.js +0 -35
  50. package/lib/status/snapshot.js +11 -16
  51. package/lib/upgrade-safety.js +8 -9
  52. package/lib/using-forge.js +315 -0
  53. package/lib/workflow/enforce-stage.js +5 -5
  54. package/lib/workflow/state-manager.js +23 -23
  55. package/package.json +1 -1
  56. package/rules/using-forge.md +24 -0
  57. package/scripts/forge-team/index.sh +0 -5
  58. package/scripts/forge-team/tests/dispatcher.test.sh +1 -1
  59. package/scripts/forge-team/tests/workflow-integration.test.sh +0 -1
  60. package/scripts/test.js +8 -1
  61. package/skills/claim-safety/SKILL.md +4 -0
  62. package/skills/claim-safety/evals/scorecard.json +41 -0
  63. package/skills/coverage.json +83 -0
  64. package/skills/dev/SKILL.md +4 -0
  65. package/skills/dev/evals/scorecard.json +41 -0
  66. package/skills/gates/SKILL.md +80 -0
  67. package/skills/gates/evals/evals.json +38 -0
  68. package/skills/gates/evals/scorecard.json +41 -0
  69. package/skills/hermes-forge/SKILL.md +1 -0
  70. package/skills/hermes-forge/evals/scorecard.json +41 -0
  71. package/skills/issue-basics/SKILL.md +1 -0
  72. package/skills/issue-basics/evals/scorecard.json +41 -0
  73. package/skills/kernel/SKILL.md +38 -0
  74. package/skills/kernel/evals/scorecard.json +41 -0
  75. package/skills/memory/SKILL.md +16 -1
  76. package/skills/memory/evals/scorecard.json +41 -0
  77. package/skills/parallel-deep-research/SKILL.md +1 -0
  78. package/skills/parallel-deep-research/evals/scorecard.json +41 -0
  79. package/skills/plan/SKILL.md +6 -0
  80. package/skills/plan/evals/scorecard.json +41 -0
  81. package/skills/portability/SKILL.md +47 -0
  82. package/skills/portability/evals/evals.json +34 -0
  83. package/skills/portability/evals/scorecard.json +41 -0
  84. package/skills/research/SKILL.md +1 -0
  85. package/skills/research/evals/scorecard.json +41 -0
  86. package/skills/review/SKILL.md +6 -0
  87. package/skills/review/evals/scorecard.json +41 -0
  88. package/skills/rollback/SKILL.md +1 -0
  89. package/skills/rollback/evals/scorecard.json +41 -0
  90. package/skills/setup/SKILL.md +91 -0
  91. package/skills/setup/evals/evals.json +42 -0
  92. package/skills/setup/evals/scorecard.json +41 -0
  93. package/skills/shepherd/SKILL.md +76 -36
  94. package/skills/shepherd/evals/evals.json +21 -9
  95. package/skills/shepherd/evals/scorecard.json +41 -0
  96. package/skills/ship/SKILL.md +6 -0
  97. package/skills/ship/evals/scorecard.json +41 -0
  98. package/skills/smith/SKILL.md +8 -0
  99. package/skills/smith/evals/scorecard.json +41 -0
  100. package/skills/sonarcloud/SKILL.md +1 -0
  101. package/skills/sonarcloud/evals/scorecard.json +41 -0
  102. package/skills/sonarcloud-analysis/SKILL.md +1 -0
  103. package/skills/sonarcloud-analysis/evals/scorecard.json +41 -0
  104. package/skills/status/SKILL.md +3 -0
  105. package/skills/status/evals/scorecard.json +41 -0
  106. package/skills/triage-ready/SKILL.md +2 -0
  107. package/skills/triage-ready/evals/scorecard.json +41 -0
  108. package/skills/using-forge/SKILL.md +104 -0
  109. package/skills/using-forge/evals/scorecard.json +41 -0
  110. package/skills/validate/SKILL.md +4 -0
  111. package/skills/validate/evals/scorecard.json +41 -0
  112. package/skills/verify/SKILL.md +4 -0
  113. package/skills/verify/evals/scorecard.json +41 -0
  114. package/skills/worktree/SKILL.md +87 -0
  115. package/skills/worktree/evals/evals.json +38 -0
  116. package/skills/worktree/evals/scorecard.json +41 -0
  117. package/lib/adapters/beads-issue-adapter.js +0 -127
  118. package/lib/beads-nudge.js +0 -91
  119. package/lib/commands/board.js +0 -64
  120. package/lib/status/beads-snapshot.js +0 -145
  121. package/scripts/forge-team/lib/dashboard.sh +0 -316
  122. package/scripts/forge-team/tests/dashboard.test.sh +0 -155
@@ -172,17 +172,6 @@ function invokesForgeHook(line) {
172
172
  });
173
173
  }
174
174
 
175
- function invokesBeadsHook(line, hookName) {
176
- const tokens = commandTokens(line);
177
- return tokens.some((token, index) => (
178
- commandName(token) === 'bd'
179
- && toText(tokens[index + 1]).toLowerCase() === 'hooks'
180
- && toText(tokens[index + 2]).toLowerCase() === 'run'
181
- && toText(tokens[index + 3]).toLowerCase() === hookName
182
- && isExecutingTokenPosition(tokens, index)
183
- ));
184
- }
185
-
186
175
  function createDiagnostic(code, subject, message, repair, severity = 'hard-stop') {
187
176
  return {
188
177
  code,
@@ -216,7 +205,7 @@ function isUsableWindowsShellCandidate(candidate, options = {}) {
216
205
  function checkHookInstallation(projectRoot, options = {}) {
217
206
  const exec = options._exec || defaultExecFileSync;
218
207
  const platform = options.platform || process.platform;
219
- const expectedRelativeHooksPaths = ['.lefthook/hooks', '.beads/hooks'];
208
+ const expectedRelativeHooksPaths = ['.lefthook/hooks'];
220
209
  const requiredHooks = ['pre-commit', 'pre-push'];
221
210
 
222
211
  function resolveGitRoot() {
@@ -269,23 +258,10 @@ function checkHookInstallation(projectRoot, options = {}) {
269
258
  const content = fs.readFileSync(filePath, 'utf8');
270
259
  const runsLefthook = hasExecutableHookCommand(content, invokesLefthook);
271
260
  const runsForgeHook = hasExecutableHookCommand(content, invokesForgeHook);
272
- const runsBeadsHook = hasExecutableHookCommand(content, (line) => invokesBeadsHook(line, hookName));
273
261
 
274
262
  if (runsLefthook) return { active: true, provider: 'lefthook' };
275
263
  if (runsForgeHook) return { active: true, provider: 'forge' };
276
264
 
277
- if (runsBeadsHook) {
278
- const chainedHookPath = path.join(gitRoot, '.beads', 'hooks', hookName);
279
- if (path.resolve(chainedHookPath) !== normalizedFilePath && fs.existsSync(chainedHookPath)) {
280
- const chained = classifyHookFile(chainedHookPath, hookName, visited);
281
- if (chained.active) {
282
- return { active: true, provider: `beads->${chained.provider}` };
283
- }
284
- }
285
-
286
- return { active: false, provider: 'beads-unverified' };
287
- }
288
-
289
265
  return { active: false, provider: 'unknown' };
290
266
  } catch {
291
267
  return { active: false, provider: 'missing' };
@@ -333,7 +309,7 @@ function checkHookInstallation(projectRoot, options = {}) {
333
309
  state: 'inactive',
334
310
  verification: 'core.hooksPath',
335
311
  hooksPath,
336
- message: `Git core.hooksPath is set to "${hooksPath}", not ".lefthook/hooks" or ".beads/hooks".`
312
+ message: `Git core.hooksPath is set to "${hooksPath}", not ".lefthook/hooks".`
337
313
  };
338
314
  }
339
315
  } catch {
@@ -488,9 +464,11 @@ function normalizeProjectRoot(projectRoot) {
488
464
  // shared resolver (env > .forge/config.yaml > default 'kernel'). Never throws and
489
465
  // never warns from the health path.
490
466
  function resolveHealthIssueBackend(options, projectRoot) {
491
- if (options.issueBackend === 'kernel' || options.issueBackend === 'beads') {
467
+ if (options.issueBackend === 'kernel') {
492
468
  return options.issueBackend;
493
469
  }
470
+ // Anything else — including the retired `beads` value — falls through to the
471
+ // shared resolver, which answers 'kernel' for every unrecognized selector.
494
472
  return resolveIssueBackend({
495
473
  deps: options.backendDeps || {},
496
474
  env: options.env || process.env,
@@ -540,25 +518,16 @@ function checkRuntimeHealth(projectRoot, options = {}) {
540
518
  }
541
519
 
542
520
  if (!bd.available) {
543
- if (issueBackend === 'beads') {
544
- // Beads is the active issue backend, so bd is a genuine hard prerequisite.
545
- diagnostics.push(createDiagnostic(
546
- 'BD_MISSING',
547
- 'bd',
548
- 'bd is required for stage-entry workflow checks when the beads issue backend is selected.'
549
- ));
550
- } else {
551
- // Kernel is the default issue backend and needs no bd binary, so a missing bd
552
- // must NOT hard-stop stage entry (the "no Beads install required" contract).
553
- // Surface it as a non-blocking advisory instead.
554
- advisories.push(createDiagnostic(
555
- 'BD_MISSING',
556
- 'bd',
557
- 'bd is not installed. The kernel issue backend does not require it; install bd only if you switch to the beads backend.',
558
- undefined,
559
- 'advisory'
560
- ));
561
- }
521
+ // The kernel is the only issue backend and needs no bd binary, so bd is never a
522
+ // prerequisite and a missing bd must NOT hard-stop stage entry (the "no Beads
523
+ // install required" contract). It stays a non-blocking advisory.
524
+ advisories.push(createDiagnostic(
525
+ 'BD_MISSING',
526
+ 'bd',
527
+ 'bd is not installed. Forge does not require it — the kernel issue backend is the only backend.',
528
+ undefined,
529
+ 'advisory'
530
+ ));
562
531
  }
563
532
 
564
533
  if (!gh.available) {