opencode-swarm 7.121.0 → 7.121.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.
- package/.opencode/skills/commit-pr/SKILL.md +4 -0
- package/.opencode/skills/issue-ingest/SKILL.md +9 -7
- package/dist/cli/{curator-llm-factory-jta9tggm.js → curator-llm-factory-jkbachdb.js} +1 -1
- package/dist/cli/{curator-8m0pf9cz.js → curator-tesgq6ye.js} +1 -1
- package/dist/cli/{guardrail-explain-nsfm5ksb.js → guardrail-explain-hqz48re6.js} +2 -2
- package/dist/cli/{hive-promoter-8303gnfk.js → hive-promoter-4vfe1rcs.js} +1 -1
- package/dist/cli/{index-3je67dcz.js → index-8cp19x15.js} +1 -1
- package/dist/cli/{index-gmc34yzt.js → index-e7yqazk3.js} +741 -647
- package/dist/cli/{index-3ygv9535.js → index-k7gvykn4.js} +2 -2
- package/dist/cli/index.js +1 -1
- package/dist/commands/issue.d.ts +12 -0
- package/dist/hooks/delegation-gate.d.ts +5 -0
- package/dist/hooks/issue-trace-reducer.d.ts +66 -0
- package/dist/hooks/issue-trace-state.d.ts +64 -0
- package/dist/hooks/issue-trace.d.ts +31 -0
- package/dist/index.js +241 -225
- package/package.json +1 -1
|
@@ -80,6 +80,10 @@ exists, fill in its sections. Otherwise write a body with at least:
|
|
|
80
80
|
|
|
81
81
|
Use a PR title in the same conventional-commit form as your commit.
|
|
82
82
|
|
|
83
|
+
Before generating the PR body, check if `.swarm/issue-reference.json` exists. If it
|
|
84
|
+
does and contains a `number` field, auto-populate `Closes #<number>` as the first line
|
|
85
|
+
of the PR body. If the file does not exist, fall back to `Closes #<issue-number>`.
|
|
86
|
+
|
|
83
87
|
## Step 6 — Close out CI
|
|
84
88
|
|
|
85
89
|
After the PR is open, watch its checks. If CI fails, read the logs, reproduce
|
|
@@ -16,21 +16,22 @@ Purpose: ingest a GitHub issue, localize root cause, and produce a resolution sp
|
|
|
16
16
|
|
|
17
17
|
Flags parsed from signal:
|
|
18
18
|
- `plan=true` → after spec generation, transition to MODE: PLAN (create implementation plan)
|
|
19
|
-
- `trace=true` →
|
|
19
|
+
- `trace=true` → the issue-trace hook (src/hooks/issue-trace.ts) automatically drives the standard PLAN → CRITIC-GATE → EXECUTE → commit-pr ladder (implies plan=true)
|
|
20
20
|
- `noRepro=true` → skip the reproduction step below
|
|
21
21
|
|
|
22
22
|
#### Phase 1: INTAKE
|
|
23
23
|
1. Fetch the issue body using the GitHub CLI (`gh issue view <N> --repo <owner>/<repo> --json title,body,labels,assignees,comments`) or web fetch.
|
|
24
24
|
- If the issue cannot be fetched (404, private repo, no `gh` auth, or the argument resolves to a PR not an issue), report the blocked operation explicitly and do not proceed on empty intake; fall back to any pasted issue text the user provided. Closed-issue cases proceed but note the closed state.
|
|
25
|
-
2.
|
|
25
|
+
2. Read `.swarm/issue-reference.json` as the authoritative source for the issue URL, owner, repo, number, and flags (`plan`/`trace`/`noRepro`). If absent, fall back to the URL from the mode signal string.
|
|
26
|
+
3. Parse the issue into a normalized **Intake Note** with four required fields:
|
|
26
27
|
- **Observed behavior**: what the issue reports
|
|
27
28
|
- **Expected behavior**: what should happen instead
|
|
28
29
|
- **Reproduction steps**: how to trigger the issue (may be absent; flag with `[NEEDS REPRO]` if missing)
|
|
29
30
|
- **Environment**: platform, version, configuration context
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
4. If any required field is missing and cannot be inferred from context, flag as `[NEEDS REPRO]`.
|
|
32
|
+
5. Attempt a minimal reproduction of the reported issue: record the exact commands and their output. Skip this step when `noRepro=true` (set via `--no-repro`); in that case, note that reproduction was skipped and proceed on the issue text alone.
|
|
33
|
+
6. Ask the user clarifying questions one at a time, max 6 per intake, when the issue text is ambiguous; otherwise flag the item with markers like `[NEEDS REPRO]` or `[NEEDS CLARIFICATION]` and proceed.
|
|
34
|
+
7. Exit when the Intake Note is complete or all missing fields are flagged.
|
|
34
35
|
|
|
35
36
|
#### Phase 2: LOCALIZATION
|
|
36
37
|
1. Delegate to `the active swarm's explorer agent` to scan the codebase for code areas related to the issue's observed behavior.
|
|
@@ -44,6 +45,7 @@ Flags parsed from signal:
|
|
|
44
45
|
|
|
45
46
|
#### Phase 3: SPEC GENERATION
|
|
46
47
|
0. Include a **Root Cause** section derived from Phase 2 localization results: concise statement of the identified root cause, location, and confidence score; the `location` field (file/function from Phase 2 localization) is the sole exception to the no-implementation-detail rule. Include a **Fix Strategy** section at product/behavior level (what the fix must accomplish, not how to implement it).
|
|
48
|
+
0a. Include a `## Source Issue` section at the top of `.swarm/spec.md` containing the GitHub issue URL and number, read from `.swarm/issue-reference.json`.
|
|
47
49
|
1. If `.swarm/spec.md` already exists, route through MODE: SPECIFY step 1's classification (overwrite / refine / archive / non-shadowing check) before writing — do not clobber an existing spec. (This protects the drift-gate which consumes spec.md.)
|
|
48
50
|
2. Generate `.swarm/spec.md` using the same SPEC CONTENT RULES as MODE: SPECIFY:
|
|
49
51
|
- WHAT users need and WHY — never HOW to implement
|
|
@@ -61,7 +63,7 @@ Flags parsed from signal:
|
|
|
61
63
|
Based on flags:
|
|
62
64
|
- No flags → report spec summary and suggest `PLAN` or `CLARIFY-SPEC`
|
|
63
65
|
- `plan=true` → transition to MODE: PLAN using the generated spec
|
|
64
|
-
- `trace=true` →
|
|
66
|
+
- `trace=true` → the issue-trace hook (`src/hooks/issue-trace.ts`) automatically emits `[MODE: PLAN]` after spec generation. The standard PLAN → CRITIC-GATE → EXECUTE ladder follows deterministically.
|
|
65
67
|
|
|
66
68
|
RULES:
|
|
67
69
|
- One question per message in INTAKE dialogue (max 6 questions)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-8cp19x15.js";
|
|
5
|
+
import"./index-e7yqazk3.js";
|
|
6
6
|
import"./index-kyvg2cmp.js";
|
|
7
7
|
import"./index-vqcgmy4y.js";
|
|
8
8
|
import"./index-j5xv8zbp.js";
|