@sorenllm/opencode-forge 0.1.0 → 0.2.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/README.md +115 -21
- package/dist/index.js +1222 -54
- package/package.json +3 -4
- package/SKILL.md +0 -91
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sorenllm/opencode-forge",
|
|
3
|
-
"version": "0.1
|
|
4
|
-
"description": "Single general-purpose forge agent with a plan harness
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Single general-purpose forge agent for opencode with two orthogonal harnesses: a plan harness (file-backed plans in .opencode/plan/, approve/close confirmation gates, tick discipline, hard write-ban while planning) and a goal harness (autonomous, host-verified objectives in .opencode/goal/ — idle continuation under turn/minute budgets, shell + file-contract checks re-run by the plugin at the completion gate, no-progress/transport/budget auto-pause, queueing).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
|
-
"SKILL.md",
|
|
18
17
|
"README.md"
|
|
19
18
|
],
|
|
20
19
|
"scripts": {
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
"planning",
|
|
30
29
|
"workflow",
|
|
31
30
|
"single-agent",
|
|
32
|
-
"
|
|
31
|
+
"goal"
|
|
33
32
|
],
|
|
34
33
|
"license": "MIT",
|
|
35
34
|
"author": "chengsongren",
|
package/SKILL.md
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: plan
|
|
3
|
-
description: >-
|
|
4
|
-
The plan discipline for the forge agent. You **MUST** load this skill when
|
|
5
|
-
the /plan command routes a task goal to you, OR the user asks to "plan
|
|
6
|
-
first", "make a plan", "think before coding" before implementation. It
|
|
7
|
-
governs the whole plan lifecycle: read-only reconnaissance, clarifying
|
|
8
|
-
questions, plan_write (structured, tool-rendered), user-approval via
|
|
9
|
-
plan_approve, tick-as-you-go execution via plan_tick, per-criterion
|
|
10
|
-
self-check at plan_close, and the OpenSpec boundary for long-horizon work.
|
|
11
|
-
Do NOT load it for direct implementation requests with no planning intent.
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Plan Discipline (forge)
|
|
15
|
-
|
|
16
|
-
Plans are short-horizon, single-task-goal documents on disk
|
|
17
|
-
(`.opencode/plan/<date>-<slug>.md`). The harness (tools + permission layer)
|
|
18
|
-
enforces the hard parts; you supply the engineering judgment.
|
|
19
|
-
|
|
20
|
-
## Phase 1 — Reconnaissance (read-only)
|
|
21
|
-
|
|
22
|
-
- Explore with read/grep/glob only. **All write tools, bash, and task
|
|
23
|
-
(subagents) are denied while a draft exists** — do not attempt them, do not
|
|
24
|
-
ask the user to bypass.
|
|
25
|
-
- Gather concrete evidence with `file:line` references; the plan's Context
|
|
26
|
-
Findings section must contain findings you actually verified, not guesses.
|
|
27
|
-
- If the goal is ambiguous on scope, behavior, or acceptance — ask the user
|
|
28
|
-
1-3 focused questions FIRST. Do not plan against assumptions the user could
|
|
29
|
-
settle in one line.
|
|
30
|
-
|
|
31
|
-
## Phase 2 — Write the plan (plan_write)
|
|
32
|
-
|
|
33
|
-
Call `plan_write` with structured fields; the tool renders and validates the
|
|
34
|
-
fixed sections (Goal / Non-Goals / Context Findings / Approach and
|
|
35
|
-
Alternatives / Task List / Risks / Acceptance Criteria), so a malformed plan
|
|
36
|
-
cannot exist.
|
|
37
|
-
|
|
38
|
-
Quality bar for each field:
|
|
39
|
-
|
|
40
|
-
- **goal**: one line, the outcome — not the activity.
|
|
41
|
-
- **context**: verified findings with `file:line` evidence; include what you
|
|
42
|
-
ruled out and why.
|
|
43
|
-
- **approach**: the chosen approach AND at least one rejected alternative
|
|
44
|
-
with the reason. A plan with no considered alternative is a guess.
|
|
45
|
-
- **tasks**: 3-8 concrete, independently verifiable steps, each doable in one
|
|
46
|
-
sitting. A task like "improve the code" is invalid; "extract timeout
|
|
47
|
-
constant into config.ts and default it to 3000" is valid.
|
|
48
|
-
- **risks**: what could break, blast radius, rollback path.
|
|
49
|
-
- **acceptance**: criteria you can verify with a command, a file, or an
|
|
50
|
-
observable behavior. Vague criteria will fail the plan_close self-check.
|
|
51
|
-
- **nonGoals**: explicit out-of-scope items (what the user might expect but
|
|
52
|
-
will NOT get).
|
|
53
|
-
|
|
54
|
-
Revising: calling `plan_write` again while still in draft overwrites the same
|
|
55
|
-
file. Do this after user feedback instead of hand-editing.
|
|
56
|
-
|
|
57
|
-
## Phase 3 — Approval gate (plan_approve)
|
|
58
|
-
|
|
59
|
-
Present to the user, briefly: goal, chosen approach (one line why), the
|
|
60
|
-
numbered task list, and the acceptance criteria. Then call `plan_approve`.
|
|
61
|
-
The user confirms in a dialog — that confirmation IS the approval. If they
|
|
62
|
-
object, revise with `plan_write` and present again. Never proceed to
|
|
63
|
-
implementation before approval succeeds.
|
|
64
|
-
|
|
65
|
-
## Phase 4 — Execution (tick as you go)
|
|
66
|
-
|
|
67
|
-
- Execute tasks in order; after EACH task's work is actually done, call
|
|
68
|
-
`plan_tick` with its number immediately. Never batch ticks; never tick
|
|
69
|
-
ahead of reality — the tick timestamp is an audit trail.
|
|
70
|
-
- If mid-execution you discover the plan is wrong, do not silently improvise:
|
|
71
|
-
tell the user what changed and either finish the affected task anyway or
|
|
72
|
-
ask whether to revise (/plan with the same goal re-enters planning).
|
|
73
|
-
|
|
74
|
-
## Phase 5 — Completion gate (plan_close)
|
|
75
|
-
|
|
76
|
-
When all tasks are ticked: self-check EVERY acceptance criterion with
|
|
77
|
-
concrete evidence (`file:line`, command output, test result). Call
|
|
78
|
-
`plan_close` with one check per criterion, `pass` honest — a ✗ fails the
|
|
79
|
-
close and that is the design working, not an inconvenience. The user
|
|
80
|
-
confirms closure in a dialog.
|
|
81
|
-
|
|
82
|
-
## Boundaries
|
|
83
|
-
|
|
84
|
-
- **Abandon**: user cancels → `/plan discard` (or plan_discard). Terminal,
|
|
85
|
-
file kept as history, writes restored.
|
|
86
|
-
- **Resume**: new session with unfinished plan → the system notice carries
|
|
87
|
-
the path; `/plan resume` continues from the remaining tasks.
|
|
88
|
-
- **Spec-workflow boundary**: work expected to span multiple sessions, days
|
|
89
|
-
of multi-file change, or multi-round requirement review is spec work, not
|
|
90
|
-
plan work. Say so once (e.g. "this fits a spec workflow like OpenSpec
|
|
91
|
-
better"), let the user choose, and proceed with a plan only if they insist.
|