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
@@ -0,0 +1,41 @@
1
+ {
2
+ "skill": "setup",
3
+ "fixtures": "present",
4
+ "static": {
5
+ "token_cost": {
6
+ "desc_chars": 1021,
7
+ "body_lines": 74,
8
+ "score": 43
9
+ },
10
+ "caps": {
11
+ "desc_within": true,
12
+ "body_within": true,
13
+ "score": 100
14
+ },
15
+ "description_quality": {
16
+ "has_trigger_cues": true,
17
+ "has_disambiguation_cues": true,
18
+ "adequate_length": true,
19
+ "score": 100
20
+ }
21
+ },
22
+ "router_reachability": {
23
+ "has_curated_rule": true,
24
+ "router_exempt": false,
25
+ "fixtures": "present",
26
+ "fixtures_total": 6,
27
+ "fixtures_best_hit": 6,
28
+ "reachable": true,
29
+ "keyword_alignment": 1
30
+ },
31
+ "behavioral": {
32
+ "trigger_recall": null,
33
+ "trigger_precision": null,
34
+ "disambiguation": null,
35
+ "chain_correctness": null,
36
+ "outcome_quality": null,
37
+ "variance": null,
38
+ "note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
39
+ },
40
+ "composite": 83
41
+ }
@@ -1,66 +1,106 @@
1
1
  ---
2
2
  name: shepherd
3
3
  description: >
4
- Monitor an already-reviewed OPEN pull request toward merge: read the CI/check rollup and the
5
- branch-protection required-check set, take at most one idempotent action (re-run a flaky
6
- required check, or post a status reply to a thread), then declare MERGE_READY, PENDING, or
7
- escalate. Use when the user says "is PR #123 ready to merge yet?", "poll/watch the checks on
8
- my PR", "the required CI job is flaky — kick off a re-run", "keep an eye on this PR until
9
- it's green", "babysit the checks after /review", "shepherd PR 45", or "monitor the PR toward
10
- merge (rebase if behind, --auto-rebase)". NEVER merges (the human merges in the GitHub UI),
11
- edits code, or resolves review threads. Do NOT use to fix or reply-and-resolve PR feedback
12
- from Greptile/CodeRabbit/SonarCloud — that is `review`; nor to open/push the PR — that is
13
- `ship`; nor for the post-merge "CI green on master + close issues" check — that is `verify`;
14
- nor for a general "where am I / what's in flight" report — that is `status`.
4
+ Own open PRs to merge-readiness — autonomously. Forge provides a singleton
5
+ shepherd daemon — start it with `forge shepherd daemon` — that then watches every
6
+ open PR, converges CI check state into kernel verdicts, re-runs flaky required
7
+ checks, reaps orphan watchers, and self-retires when no PRs remain; one-shot
8
+ passes (forge shepherd <pr>) exist for a single bounded check. Use when a PR was
9
+ just opened or shipped; when a session starts with open PRs (start the daemon in
10
+ a background shell — the singleton lease makes a duplicate start a safe no-op);
11
+ when the user asks "why isn't my PR merging", "what's
12
+ blocking the PR", "is the PR ready", "did a check fail / go red"; when asked to
13
+ "keep watching / keep an eye on / babysit my PRs"; or to read PR verdicts
14
+ (forge shepherd <pr> --pull --json, forge shepherd events). NEVER merges and
15
+ never resolves review threads — fixing review feedback is `review`; opening the
16
+ PR is `ship`; post-merge health is `verify`; general orientation is `status`.
15
17
  allowed-tools: Bash, Read, Grep, Glob
18
+ terminal: true
19
+ handoffs:
20
+ - review
16
21
  ---
17
22
 
18
- Run one bounded monitor pass over a pull request: read CI and check state, take at most one idempotent action, then hand off. Never merges and never resolves review threads.
23
+ Forge owns your open PRs. A singleton daemon converges every open PR toward merge-readiness; you read its verdicts and only step in on escalations. Never merges, never resolves review threads.
19
24
 
20
25
  # Shepherd
21
26
 
22
- `shepherd` is a **utility command, not a workflow stage.** It automates the polling / rerun / escalation loop that today is done by hand after `/review`. It does **not** replace `/review` (which still owns semantic review and its stage transition) and does **not** perform the pre-merge doc gate (embedded in `/ship` and `/review`).
27
+ `shepherd` is the PR-ownership utility, not a workflow stage. It has two modes over the **single `forge shepherd` verb**:
23
28
 
24
- ## Usage
29
+ - **Daemon (default ownership):** `forge shepherd daemon` is a machine-wide singleton for this repo. It heartbeats and converges the whole PR world every ~60s — self-registering hand-opened PRs, restarting killed watchers, reaping verified orphans, converging CI check state into kernel verdicts, retiring merged/closed PRs — then self-retires (releases the lease, kills its children, exits) once no PRs remain open. You do NOT poll by hand; the daemon does.
30
+ - **One-shot pass:** `forge shepherd <pr>` reads one PR's state, takes at most one idempotent Tier-A action, and exits. Use it for a point-in-time question about a single PR.
31
+
32
+ ## Which mode? (decision rule)
33
+
34
+ - User asks about **one PR, right now** ("is #212 ready?", "why is this blocked?") → **one-shot** (`forge shepherd <pr> --pull`).
35
+ - Anything **ongoing** — "keep", "until it merges", "watch", "babysit", multiple PRs, or a session that starts with PRs already open → **ensure the daemon is running**.
36
+
37
+ ## Session-start ritual
38
+
39
+ When a session starts and the repo has open PRs, ensure the daemon is running:
25
40
 
26
41
  ```bash
27
- forge shepherd <pr-number>
28
- forge shepherd <pr-number> --auto-rebase # opt-in, default OFF
42
+ forge shepherd daemon # start it in the HARNESS BACKGROUND SHELL
29
43
  ```
30
44
 
31
- ## Bounded-pass model (one pass = one invocation)
45
+ The daemon is a **repo singleton** guarded by an O_EXCL lease, so you do NOT need a liveness check first — a second start when one is already running simply exits (the lease is already held). Start it in the harness background shell (Claude Code / Codex background-shell) so it is session-scoped and reaped with the session. NEVER launch a detached spawn from the agent: the detached path is Forge's bare-CLI fallback only. (Automatic per-command launch and a `forge prime` daemon-liveness line are planned follow-ups — W-S4c/W-S5 — not yet wired; until then you start the daemon explicitly as above.)
32
46
 
33
- Each `forge shepherd <pr>` invocation is **ONE discrete bounded pass**: it reads PR state, takes at most the allowed Tier-A action, then **exits**. It never sits in-process polling "until merge-ready."
47
+ ## Reading verdicts (the common case)
34
48
 
35
- This mirrors the project's documented ergonomic from `/review`, the pre-merge gate, and the Greptile process: **poll briefly, then stop and hand off.** Any pass that finds checks still pending exits as `PENDING`, and the next scheduled pass picks up where it left off.
49
+ ```bash
50
+ forge shepherd <pr> --pull --json # actionable payload: WHY blocked + exactly what to fix
51
+ forge shepherd <pr> --bundle --json # the COMPLETE read-only PR-state bundle
52
+ forge shepherd events <pr> --since <seq> # only the new events since sequence <seq>
53
+ ```
54
+
55
+ `--pull` is strictly read-only (dry-run pass: no rerun, no rebase, no merge, no thread resolution). It returns one bounded, actionable-only payload — `blockers[]`, classified `requiredChecks`, failed-check log `failures[]` (matrix-deduped), and every unresolved `reviewThreads[]` — so you get "everything blocking this PR + what to fix" in one call. Passing checks and satisfied policy are omitted.
36
56
 
37
- A `--watch` affordance, if you want one, lives in an **external scheduler** (e.g. cron or a `/loop`) that re-invokes the bounded pass on an interval with debounce (>= 60s between passes, cancel-in-progress). There is no in-process infinite loop.
57
+ ### Verdict vocabulary (collapsed, W-S1)
38
58
 
39
- ## What it never does
59
+ | Verdict | Meaning |
60
+ | --- | --- |
61
+ | `MERGE_READY` | Required checks green, branch up to date — hand off to a human to merge. |
62
+ | `PENDING` | A Tier-A action was taken, or checks are still running — await the next tick/pass. |
63
+ | `BLOCKED` | Something actionable blocks merge (failing/missing/skipped required check, conflict, behind, unresolved threads, changes requested). Read `blockers[]`. |
64
+ | `CI_DEAD_HEAD` | The head has no required checks running (e.g. an auto-update authored by `GITHUB_TOKEN` never re-triggered CI). Recovery is an **escalation, not an autonomous Tier-A rerun**: it needs a maintainer-provided `FORGE_PR_TOKEN` (contents + pull-requests + checks) to re-author the push so CI re-triggers. |
65
+ | `ESCALATE` | A Tier-C condition (conflict, unreadable required set, persistent failure, oscillation, budget exhaustion). Context is posted to the PR. |
66
+ | `HARD_STOP` | A permanent auth/scope failure retrying cannot fix — a human must widen token scope. |
40
67
 
41
- - **Never merges.** There is no merge action and no server-side auto-merge latch. The shepherd terminates at `MERGE_READY` and hands off to the human, who merges in the GitHub UI (mirroring the pre-merge gate's merge handoff).
42
- - **Never resolves review threads.** It may post a status **reply** to a thread (via the existing `.claude/scripts/review-resolve.sh reply` helper), but thread **resolution** is semantic and stays with `/review`.
68
+ ## Trigger scenario → command
43
69
 
44
- ## Action ladder
70
+ | Situation | Command |
71
+ | --- | --- |
72
+ | PR just opened / shipped | ensure `forge shepherd daemon` running |
73
+ | Session starts, open PRs exist, daemon dead | `forge shepherd daemon` (background shell) |
74
+ | "Why isn't my PR merging / what's blocking it" | `forge shepherd <pr> --pull` |
75
+ | "Is the PR ready?" | `forge shepherd <pr> --pull` (read `MERGE_READY`) |
76
+ | "A check failed / went red" | `forge shepherd <pr> --pull --json` (read `failures[]`) |
77
+ | "Keep watching / babysit my PRs" | ensure `forge shepherd daemon` running |
78
+ | Read incremental deltas | `forge shepherd events <pr> --since <seq>` |
45
79
 
46
- - **Tier-A (autonomous, idempotent, reversible):** re-run a flaky **required** check via `gh run rerun --failed` (capped by a rerun budget). Post status replies to threads (reply only).
47
- - **Tier-B (opt-in per-flag, default OFF):** `--auto-rebase` rebases onto the base and force-pushes with lease. Preconditions: clean working tree, HEAD unchanged during the pass. A lease rejection is a **hard-stop + escalate** — the shepherd never re-arms the lease, because doing so would clobber the concurrent human push the lease exists to protect.
48
- - **Tier-C (human escalation):** merge conflicts, required-check failures a rerun did not fix, an unreadable required-check set, unknown mergeability, auth/scope failures, oscillation, and budget exhaustion all stop and escalate with context posted to the PR.
80
+ ## Boundaries (kept — true of both modes)
49
81
 
50
- ## Merge-readiness gate
82
+ - **Never merges.** No merge action, no server-side auto-merge latch. Terminates at `MERGE_READY` and hands off — a human merges in the GitHub UI.
83
+ - **Never resolves review threads.** It refreshes a single **sticky** status comment; thread *resolution* is semantic and stays with `review`.
84
+ - **Action ladder.** Tier-A (autonomous, idempotent): re-run a flaky **required** check (rerun-budget capped); refresh the single **sticky** status comment — an *upsert*, never an append, so the ~60s daemon loop cannot post duplicate comments. Tier-B (opt-in, default OFF): `--auto-rebase` rebases onto base and force-pushes with lease — a lease rejection is a hard-stop, never re-armed. Tier-C: everything else escalates (incl. `CI_DEAD_HEAD` recovery, which needs the maintainer `FORGE_PR_TOKEN`).
85
+ - **Required-check gate.** `MERGE_READY` only when the branch-protection required set is *known* and all green; if protection is unreadable, it escalates rather than guessing.
86
+ - **HEAD-changed abort.** Before any mutating action it re-reads the head SHA and aborts if HEAD moved.
51
87
 
52
- Merge-ready is declared **only** when the branch-protection required-check set is **known** AND all of it is green AND the branch is not behind base. The required set is read from `gh api repos/{owner}/{repo}/branches/{base}/protection/required_status_checks`. If branch protection is unreadable (insufficient token scope, or the branch is not protected), the shepherd does **not** guess — it escalates with the readable rollup attached.
88
+ ## Adjacent skills
53
89
 
54
- ## Concurrency & safety
90
+ - Fixing review feedback (CodeRabbit/Greptile/human comments, resolving threads) → `review`.
91
+ - Opening or pushing the PR → `ship`.
92
+ - Post-merge health (CI green on main, close issues) → `verify`.
93
+ - "Where am I / what's in flight" orientation → `status`.
55
94
 
56
- - The advisory `shepherd:active` marker is **not** mutual exclusion. The real guard is a per-action HEAD-SHA re-read: before any mutating action the shepherd re-reads the head SHA, and if HEAD moved since the pass started it **aborts** the action.
57
- - Auth taxonomy: token expiry (401) pauses and surfaces; insufficient scope (403) is a permanent **hard-stop**; a secondary rate limit (403 + `Retry-After`) honors the delay and resumes on the next pass.
95
+ ## Kill-switches
58
96
 
59
- ## Per-harness behavior
97
+ ```bash
98
+ FORGE_SHEPHERD_DISABLE=1 # env: makes the shepherd trigger inert (once the auto-fire wiring lands, W-S4c)
99
+ forge gate disable rail.auto_shepherd # config gate honored by the trigger + ship/push arming
100
+ ```
60
101
 
61
- - **Claude Code / Codex:** invoke `forge shepherd <pr>` directly; an external scheduler may drive repeated bounded passes.
62
- - **Cursor:** manually-invoked only. Run `forge shepherd <pr>` from a terminal — there is no polling-loop affordance and no hook reliance on this surface.
102
+ Both leave the manual `forge shepherd` surface usable; they only stop the automatic daemon fire.
63
103
 
64
104
  ## State
65
105
 
66
- Progress is durable in GitHub: PR **comments** and **labels** plus `git`. There is no separate local state store.
106
+ Progress is durable in GitHub (PR comments, labels, `git`). The one local store is the per-PR journal under `.forge/pr-monitor/<repo>-<pr>/` (append-only `events.ndjson` + snapshot/consumer cursors) — the replay surface for `events --since`. The bounded one-shot pass keeps no separate local state.
@@ -1,30 +1,42 @@
1
1
  [
2
+ {
3
+ "query": "A PR just got shipped — keep watching it until every required check is green.",
4
+ "should_trigger": true
5
+ },
6
+ {
7
+ "query": "Why isn't my PR merging? Tell me exactly what's blocking the PR.",
8
+ "should_trigger": true
9
+ },
2
10
  {
3
11
  "query": "Is PR #212 ready to merge yet?",
4
12
  "should_trigger": true
5
13
  },
6
14
  {
7
- "query": "The lint check on my PR keeps failing intermittently — kick off a re-run of the failed jobs.",
15
+ "query": "My PR has been sitting for an hour with no merge — poll the PR and tell me what's wrong.",
8
16
  "should_trigger": true
9
17
  },
10
18
  {
11
- "query": "Keep an eye on pull request 88 and tell me when all the required checks pass.",
19
+ "query": "One of the checks failed on my pull request — kick off a re-run of the required job.",
12
20
  "should_trigger": true
13
21
  },
14
22
  {
15
- "query": "I just wrapped up /review on this PR — babysit the checks and escalate if it isn't mergeable.",
23
+ "query": "Keep an eye on my open PRs and babysit them toward merge.",
16
24
  "should_trigger": true
17
25
  },
18
26
  {
19
- "query": "Shepherd PR 300 and rebase it onto master if it's behind.",
27
+ "query": "Start the shepherd daemon so my open PRs get watched.",
20
28
  "should_trigger": true
21
29
  },
22
30
  {
23
- "query": "Fix all the CodeRabbit and Greptile comments on my PR and resolve each review thread.",
24
- "should_trigger": false
31
+ "query": "Watch the pull request and let me know when it's mergeable.",
32
+ "should_trigger": true
33
+ },
34
+ {
35
+ "query": "What's the current PR verdict on #90 — read it back for me.",
36
+ "should_trigger": true
25
37
  },
26
38
  {
27
- "query": "The PR just merged to master — confirm CI is green there and close the linked issue.",
39
+ "query": "Fix all the CodeRabbit and Greptile comments on my PR and resolve each review thread.",
28
40
  "should_trigger": false
29
41
  },
30
42
  {
@@ -32,11 +44,11 @@
32
44
  "should_trigger": false
33
45
  },
34
46
  {
35
- "query": "Where am I in the workflow and what work is still in flight right now?",
47
+ "query": "The PR merged to master — run the post-merge health check and close the linked issue.",
36
48
  "should_trigger": false
37
49
  },
38
50
  {
39
- "query": "Show me the SonarCloud issues flagged on this PR.",
51
+ "query": "Where am I in the workflow and what work is still in flight right now?",
40
52
  "should_trigger": false
41
53
  }
42
54
  ]
@@ -0,0 +1,41 @@
1
+ {
2
+ "skill": "shepherd",
3
+ "fixtures": "present",
4
+ "static": {
5
+ "token_cost": {
6
+ "desc_chars": 997,
7
+ "body_lines": 86,
8
+ "score": 43
9
+ },
10
+ "caps": {
11
+ "desc_within": true,
12
+ "body_within": true,
13
+ "score": 100
14
+ },
15
+ "description_quality": {
16
+ "has_trigger_cues": true,
17
+ "has_disambiguation_cues": true,
18
+ "adequate_length": true,
19
+ "score": 100
20
+ }
21
+ },
22
+ "router_reachability": {
23
+ "has_curated_rule": true,
24
+ "router_exempt": false,
25
+ "fixtures": "present",
26
+ "fixtures_total": 9,
27
+ "fixtures_best_hit": 6,
28
+ "reachable": true,
29
+ "keyword_alignment": 0.67
30
+ },
31
+ "behavioral": {
32
+ "trigger_recall": null,
33
+ "trigger_precision": null,
34
+ "disambiguation": null,
35
+ "chain_correctness": null,
36
+ "outcome_quality": null,
37
+ "variance": null,
38
+ "note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
39
+ },
40
+ "composite": 83
41
+ }
@@ -14,12 +14,18 @@ description: >
14
14
  (verify); reverting an already-shipped change (rollback). If the PR already exists, this is
15
15
  not the skill.
16
16
  allowed-tools: Bash, Read, Edit, Grep, Glob
17
+ next: review
18
+ terminal: false
19
+ handoffs:
20
+ - shepherd
17
21
  ---
18
22
 
19
23
  Push code and create a pull request with full context and documentation links.
20
24
 
21
25
  # Ship
22
26
 
27
+ > **Chain (HARD-GATE):** the successor depends on the change classification (source of truth: lib/workflow/stages.js) — Standard → `review`; Critical → `review` → `verify`; Simple/Hotfix/Refactor/Docs END at `ship`. `review` is the default/critical-path next; `shepherd` may monitor the PR's checks. `ship` never merges.
28
+
23
29
  This skill creates a PR after validation passes.
24
30
 
25
31
  ## Usage
@@ -0,0 +1,41 @@
1
+ {
2
+ "skill": "ship",
3
+ "fixtures": "present",
4
+ "static": {
5
+ "token_cost": {
6
+ "desc_chars": 993,
7
+ "body_lines": 237,
8
+ "score": 28
9
+ },
10
+ "caps": {
11
+ "desc_within": true,
12
+ "body_within": true,
13
+ "score": 100
14
+ },
15
+ "description_quality": {
16
+ "has_trigger_cues": true,
17
+ "has_disambiguation_cues": true,
18
+ "adequate_length": true,
19
+ "score": 100
20
+ }
21
+ },
22
+ "router_reachability": {
23
+ "has_curated_rule": true,
24
+ "router_exempt": false,
25
+ "fixtures": "present",
26
+ "fixtures_total": 5,
27
+ "fixtures_best_hit": 3,
28
+ "reachable": true,
29
+ "keyword_alignment": 0.6
30
+ },
31
+ "behavioral": {
32
+ "trigger_recall": null,
33
+ "trigger_precision": null,
34
+ "disambiguation": null,
35
+ "chain_correctness": null,
36
+ "outcome_quality": null,
37
+ "variance": null,
38
+ "note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
39
+ },
40
+ "composite": 78
41
+ }
@@ -13,6 +13,14 @@ description: >
13
13
  skill only when the user explicitly wants just that one step (e.g. "just open the
14
14
  PR").
15
15
  allowed-tools: Read, Bash(forge:*)
16
+ terminal: true
17
+ subskills:
18
+ - plan
19
+ - dev
20
+ - validate
21
+ - ship
22
+ - review
23
+ - verify
16
24
  ---
17
25
 
18
26
  # Smith — the orchestrator super-skill
@@ -0,0 +1,41 @@
1
+ {
2
+ "skill": "smith",
3
+ "fixtures": "present",
4
+ "static": {
5
+ "token_cost": {
6
+ "desc_chars": 819,
7
+ "body_lines": 127,
8
+ "score": 47
9
+ },
10
+ "caps": {
11
+ "desc_within": true,
12
+ "body_within": true,
13
+ "score": 100
14
+ },
15
+ "description_quality": {
16
+ "has_trigger_cues": true,
17
+ "has_disambiguation_cues": true,
18
+ "adequate_length": true,
19
+ "score": 100
20
+ }
21
+ },
22
+ "router_reachability": {
23
+ "has_curated_rule": true,
24
+ "router_exempt": false,
25
+ "fixtures": "present",
26
+ "fixtures_total": 6,
27
+ "fixtures_best_hit": 0,
28
+ "reachable": false,
29
+ "keyword_alignment": 0
30
+ },
31
+ "behavioral": {
32
+ "trigger_recall": null,
33
+ "trigger_precision": null,
34
+ "disambiguation": null,
35
+ "chain_correctness": null,
36
+ "outcome_quality": null,
37
+ "variance": null,
38
+ "note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
39
+ },
40
+ "composite": 84
41
+ }
@@ -13,6 +13,7 @@ description: >
13
13
  Not for local SAST scans of your own code, nor the Forge issue tracker (`forge issue ...`,
14
14
  "open/ready issues") — here those bare words always mean SonarCloud.
15
15
  allowed-tools: Bash, Read, Grep, Glob, WebFetch
16
+ terminal: true
16
17
  ---
17
18
 
18
19
  # SonarCloud Query Command
@@ -0,0 +1,41 @@
1
+ {
2
+ "skill": "sonarcloud",
3
+ "fixtures": "present",
4
+ "static": {
5
+ "token_cost": {
6
+ "desc_chars": 977,
7
+ "body_lines": 147,
8
+ "score": 38
9
+ },
10
+ "caps": {
11
+ "desc_within": true,
12
+ "body_within": true,
13
+ "score": 100
14
+ },
15
+ "description_quality": {
16
+ "has_trigger_cues": false,
17
+ "has_disambiguation_cues": true,
18
+ "adequate_length": true,
19
+ "score": 60
20
+ }
21
+ },
22
+ "router_reachability": {
23
+ "has_curated_rule": true,
24
+ "router_exempt": false,
25
+ "fixtures": "present",
26
+ "fixtures_total": 6,
27
+ "fixtures_best_hit": 6,
28
+ "reachable": true,
29
+ "keyword_alignment": 1
30
+ },
31
+ "behavioral": {
32
+ "trigger_recall": null,
33
+ "trigger_precision": null,
34
+ "disambiguation": null,
35
+ "chain_correctness": null,
36
+ "outcome_quality": null,
37
+ "variance": null,
38
+ "note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
39
+ },
40
+ "composite": 61
41
+ }
@@ -18,6 +18,7 @@ tags: [sonarcloud, code-quality, issues, metrics, security]
18
18
  context: fork
19
19
  tools: [Bash, WebFetch, Read, Grep, Glob]
20
20
  model: sonnet
21
+ terminal: true
21
22
  ---
22
23
 
23
24
  <role>
@@ -0,0 +1,41 @@
1
+ {
2
+ "skill": "sonarcloud-analysis",
3
+ "fixtures": "present",
4
+ "static": {
5
+ "token_cost": {
6
+ "desc_chars": 993,
7
+ "body_lines": 156,
8
+ "score": 36
9
+ },
10
+ "caps": {
11
+ "desc_within": true,
12
+ "body_within": true,
13
+ "score": 100
14
+ },
15
+ "description_quality": {
16
+ "has_trigger_cues": true,
17
+ "has_disambiguation_cues": true,
18
+ "adequate_length": true,
19
+ "score": 100
20
+ }
21
+ },
22
+ "router_reachability": {
23
+ "has_curated_rule": true,
24
+ "router_exempt": false,
25
+ "fixtures": "present",
26
+ "fixtures_total": 6,
27
+ "fixtures_best_hit": 0,
28
+ "reachable": false,
29
+ "keyword_alignment": 0
30
+ },
31
+ "behavioral": {
32
+ "trigger_recall": null,
33
+ "trigger_precision": null,
34
+ "disambiguation": null,
35
+ "chain_correctness": null,
36
+ "outcome_quality": null,
37
+ "variance": null,
38
+ "note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
39
+ },
40
+ "composite": 81
41
+ }
@@ -12,6 +12,7 @@ description: >
12
12
  (issue-basics); the Hermes harness's token-bounded orient/recap contract (hermes-forge); or
13
13
  the post-merge CI health check that closes issues after a merge lands (verify).
14
14
  allowed-tools: Bash, Read, Grep, Glob
15
+ terminal: true
15
16
  ---
16
17
 
17
18
  Check where you are in the project and what work is in progress.
@@ -44,6 +45,8 @@ This command dynamically computes and displays all issues ranked by composite sc
44
45
 
45
46
  For full context on any issue: `forge show <id>`
46
47
 
48
+ For the full workflow contract and command reference at session start, run `forge prime`.
49
+
47
50
  ### Step 1b: Reconcile stale in-progress issues
48
51
 
49
52
  Check if any in-progress issues were already merged but not closed (can happen if `/verify` was skipped or backup was restored from stale snapshot):
@@ -0,0 +1,41 @@
1
+ {
2
+ "skill": "status",
3
+ "fixtures": "present",
4
+ "static": {
5
+ "token_cost": {
6
+ "desc_chars": 954,
7
+ "body_lines": 90,
8
+ "score": 44
9
+ },
10
+ "caps": {
11
+ "desc_within": true,
12
+ "body_within": true,
13
+ "score": 100
14
+ },
15
+ "description_quality": {
16
+ "has_trigger_cues": false,
17
+ "has_disambiguation_cues": true,
18
+ "adequate_length": true,
19
+ "score": 60
20
+ }
21
+ },
22
+ "router_reachability": {
23
+ "has_curated_rule": true,
24
+ "router_exempt": false,
25
+ "fixtures": "present",
26
+ "fixtures_total": 6,
27
+ "fixtures_best_hit": 2,
28
+ "reachable": true,
29
+ "keyword_alignment": 0.33
30
+ },
31
+ "behavioral": {
32
+ "trigger_recall": null,
33
+ "trigger_precision": null,
34
+ "disambiguation": null,
35
+ "chain_correctness": null,
36
+ "outcome_quality": null,
37
+ "variance": null,
38
+ "note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
39
+ },
40
+ "composite": 63
41
+ }
@@ -14,6 +14,8 @@ description: >
14
14
  whole session or routing to stage skills (use kernel), not for driving an issue to a merged
15
15
  PR (use smith).
16
16
  allowed-tools: Read, Bash(forge:*)
17
+ next: claim-safety
18
+ terminal: false
17
19
  ---
18
20
 
19
21
  # Triage: what should I work on next
@@ -0,0 +1,41 @@
1
+ {
2
+ "skill": "triage-ready",
3
+ "fixtures": "present",
4
+ "static": {
5
+ "token_cost": {
6
+ "desc_chars": 977,
7
+ "body_lines": 105,
8
+ "score": 42
9
+ },
10
+ "caps": {
11
+ "desc_within": true,
12
+ "body_within": true,
13
+ "score": 100
14
+ },
15
+ "description_quality": {
16
+ "has_trigger_cues": true,
17
+ "has_disambiguation_cues": true,
18
+ "adequate_length": true,
19
+ "score": 100
20
+ }
21
+ },
22
+ "router_reachability": {
23
+ "has_curated_rule": true,
24
+ "router_exempt": false,
25
+ "fixtures": "present",
26
+ "fixtures_total": 5,
27
+ "fixtures_best_hit": 1,
28
+ "reachable": true,
29
+ "keyword_alignment": 0.2
30
+ },
31
+ "behavioral": {
32
+ "trigger_recall": null,
33
+ "trigger_precision": null,
34
+ "disambiguation": null,
35
+ "chain_correctness": null,
36
+ "outcome_quality": null,
37
+ "variance": null,
38
+ "note": "behavioral — W5 (LLM judge): semantic recall/precision/chain/outcome/variance, not deterministic"
39
+ },
40
+ "composite": 83
41
+ }