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.
- package/AGENTS.md +1 -1
- package/bin/forge-cmd.js +1 -1
- package/bin/forge.js +5 -0
- package/docs/reference/COMMANDS.md +3 -1
- package/docs/reference/shepherd.md +72 -1
- package/lib/adapters/greptile-review-adapter.js +1 -1
- package/lib/adapters/pr-state-adapter.js +103 -8
- package/lib/agents-config.js +5 -0
- package/lib/commands/_issue.js +31 -46
- package/lib/commands/_manifest.js +1 -1
- package/lib/commands/_resolve-command-opts.js +36 -29
- package/lib/commands/claim.js +2 -4
- package/lib/commands/hooks.js +155 -8
- package/lib/commands/plan.js +23 -115
- package/lib/commands/prime.js +8 -1
- package/lib/commands/release.js +1 -2
- package/lib/commands/serve.js +5 -2
- package/lib/commands/setup.js +0 -1
- package/lib/commands/shepherd.js +36 -3
- package/lib/commands/skill.js +275 -0
- package/lib/commands/status.js +37 -32
- package/lib/commands/test.js +32 -0
- package/lib/commands/worktree.js +27 -1
- package/lib/core/runtime-graph.js +88 -14
- package/lib/forge-issues.js +13 -464
- package/lib/harness-capability-matrix.js +2 -2
- package/lib/hook-renderer.js +54 -12
- package/lib/issue-backend.js +42 -3
- package/lib/kernel/broker.js +28 -0
- package/lib/kernel/migrations.js +30 -2
- package/lib/kernel/schema.js +35 -0
- package/lib/kernel/sqlite-driver.js +150 -0
- package/lib/memory-recall.js +151 -0
- package/lib/orientation.js +303 -6
- package/lib/pr-bundle.js +6 -2
- package/lib/pr-monitor/reconcile-executor.js +659 -0
- package/lib/pr-monitor/reconcile-tick.js +138 -0
- package/lib/pr-monitor/reconcile.js +0 -0
- package/lib/pr-monitor/render-sticky.js +14 -0
- package/lib/pr-monitor/shepherd-lease.js +243 -0
- package/lib/pr-monitor/upsert-sticky.js +1 -1
- package/lib/pr-monitor/watch-lifecycle.js +1 -1
- package/lib/pr-pull.js +70 -15
- package/lib/project-memory.js +8 -0
- package/lib/rules-sync.js +4 -0
- package/lib/runtime-health.js +15 -46
- package/lib/skill-eval.js +750 -0
- package/lib/status/identity.js +46 -0
- package/lib/status/presenter.js +0 -35
- package/lib/status/snapshot.js +11 -16
- package/lib/upgrade-safety.js +8 -9
- package/lib/using-forge.js +315 -0
- package/lib/workflow/enforce-stage.js +5 -5
- package/lib/workflow/state-manager.js +23 -23
- package/package.json +1 -1
- package/rules/using-forge.md +24 -0
- package/scripts/forge-team/index.sh +0 -5
- package/scripts/forge-team/tests/dispatcher.test.sh +1 -1
- package/scripts/forge-team/tests/workflow-integration.test.sh +0 -1
- package/scripts/test.js +8 -1
- package/skills/claim-safety/SKILL.md +4 -0
- package/skills/claim-safety/evals/scorecard.json +41 -0
- package/skills/coverage.json +83 -0
- package/skills/dev/SKILL.md +4 -0
- package/skills/dev/evals/scorecard.json +41 -0
- package/skills/gates/SKILL.md +80 -0
- package/skills/gates/evals/evals.json +38 -0
- package/skills/gates/evals/scorecard.json +41 -0
- package/skills/hermes-forge/SKILL.md +1 -0
- package/skills/hermes-forge/evals/scorecard.json +41 -0
- package/skills/issue-basics/SKILL.md +1 -0
- package/skills/issue-basics/evals/scorecard.json +41 -0
- package/skills/kernel/SKILL.md +38 -0
- package/skills/kernel/evals/scorecard.json +41 -0
- package/skills/memory/SKILL.md +16 -1
- package/skills/memory/evals/scorecard.json +41 -0
- package/skills/parallel-deep-research/SKILL.md +1 -0
- package/skills/parallel-deep-research/evals/scorecard.json +41 -0
- package/skills/plan/SKILL.md +6 -0
- package/skills/plan/evals/scorecard.json +41 -0
- package/skills/portability/SKILL.md +47 -0
- package/skills/portability/evals/evals.json +34 -0
- package/skills/portability/evals/scorecard.json +41 -0
- package/skills/research/SKILL.md +1 -0
- package/skills/research/evals/scorecard.json +41 -0
- package/skills/review/SKILL.md +6 -0
- package/skills/review/evals/scorecard.json +41 -0
- package/skills/rollback/SKILL.md +1 -0
- package/skills/rollback/evals/scorecard.json +41 -0
- package/skills/setup/SKILL.md +91 -0
- package/skills/setup/evals/evals.json +42 -0
- package/skills/setup/evals/scorecard.json +41 -0
- package/skills/shepherd/SKILL.md +76 -36
- package/skills/shepherd/evals/evals.json +21 -9
- package/skills/shepherd/evals/scorecard.json +41 -0
- package/skills/ship/SKILL.md +6 -0
- package/skills/ship/evals/scorecard.json +41 -0
- package/skills/smith/SKILL.md +8 -0
- package/skills/smith/evals/scorecard.json +41 -0
- package/skills/sonarcloud/SKILL.md +1 -0
- package/skills/sonarcloud/evals/scorecard.json +41 -0
- package/skills/sonarcloud-analysis/SKILL.md +1 -0
- package/skills/sonarcloud-analysis/evals/scorecard.json +41 -0
- package/skills/status/SKILL.md +3 -0
- package/skills/status/evals/scorecard.json +41 -0
- package/skills/triage-ready/SKILL.md +2 -0
- package/skills/triage-ready/evals/scorecard.json +41 -0
- package/skills/using-forge/SKILL.md +104 -0
- package/skills/using-forge/evals/scorecard.json +41 -0
- package/skills/validate/SKILL.md +4 -0
- package/skills/validate/evals/scorecard.json +41 -0
- package/skills/verify/SKILL.md +4 -0
- package/skills/verify/evals/scorecard.json +41 -0
- package/skills/worktree/SKILL.md +87 -0
- package/skills/worktree/evals/evals.json +38 -0
- package/skills/worktree/evals/scorecard.json +41 -0
- package/lib/adapters/beads-issue-adapter.js +0 -127
- package/lib/beads-nudge.js +0 -91
- package/lib/commands/board.js +0 -64
- package/lib/status/beads-snapshot.js +0 -145
- package/scripts/forge-team/lib/dashboard.sh +0 -316
- package/scripts/forge-team/tests/dashboard.test.sh +0 -155
package/lib/runtime-health.js
CHANGED
|
@@ -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'
|
|
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"
|
|
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'
|
|
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
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
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) {
|