oh-my-opencode-lite 0.1.3 → 0.1.5
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.
|
@@ -4,8 +4,8 @@ interface ComposeAgentPromptOptions {
|
|
|
4
4
|
customAppendPrompt?: string;
|
|
5
5
|
placeholders?: Record<string, string | number | undefined>;
|
|
6
6
|
}
|
|
7
|
-
export declare const QUESTION_PROTOCOL = "<questions>\nUse the `question` tool for blocking decisions. NEVER ask in plain text.\nPut the recommended option first with \"(Recommended)\". Short headers (<=30 chars).\nAfter calling question, STOP \u2014 do not continue execution.\n</questions>";
|
|
8
|
-
export declare const SUBAGENT_RULES = "- Do not call thoth-mem
|
|
7
|
+
export declare const QUESTION_PROTOCOL = "<questions>\nUse the `question` tool for blocking decisions. NEVER ask in plain text.\n\nAsk only when one of these is true:\n1. The request is ambiguous in a way that materially changes the result AND you cannot resolve it by reading the codebase.\n2. The action is destructive/irreversible, touches production, or changes security posture.\n3. You need a secret, credential, or value that cannot be inferred.\n\nWhen you must ask: do all non-blocked work first, then ask exactly one targeted question. Include your recommended default and state what changes based on the answer.\nPut the recommended option first with \"(Recommended)\". Short headers (<=30 chars).\nAfter calling question, STOP \u2014 do not continue execution.\n</questions>";
|
|
8
|
+
export declare const SUBAGENT_RULES = "- Do not call ANY thoth-mem tools \u2014 memory is exclusively orchestrator-owned.\n- Do not call `todowrite` \u2014 task progress tracking is exclusively orchestrator-owned.\n- Use `question` tool for blocking decisions, never plain text.\n- NEVER run destructive git commands that discard working-tree changes: `git restore`, `git checkout -- <path>`, `git reset --hard`, `git clean`, `git stash`. During SDD execution, files modified by prior tasks are intentional progress \u2014 reverting them destroys the pipeline.\n- NEVER run `git restore` to \"clean up\" tracked file changes you did not make. Those changes belong to earlier tasks in the same pipeline.";
|
|
9
9
|
export declare const RESPONSE_BUDGET = "Your response returns to an expensive orchestrator model. Be ruthlessly concise:\n- Return insights and conclusions, NEVER raw file contents or full code blocks.\n- Structured results (status, summary, files, issues) over prose.\n- If the orchestrator needs more detail, it will ask in a follow-up.";
|
|
10
10
|
export declare function appendPromptSections(...sections: Array<string | undefined>): string;
|
|
11
11
|
export declare function replacePromptPlaceholders(template: string, placeholders?: Record<string, string | number | undefined>): string;
|
package/dist/index.js
CHANGED
|
@@ -17361,11 +17361,21 @@ function getAgentOverride(config2, name) {
|
|
|
17361
17361
|
// src/agents/prompt-utils.ts
|
|
17362
17362
|
var QUESTION_PROTOCOL = `<questions>
|
|
17363
17363
|
Use the \`question\` tool for blocking decisions. NEVER ask in plain text.
|
|
17364
|
+
|
|
17365
|
+
Ask only when one of these is true:
|
|
17366
|
+
1. The request is ambiguous in a way that materially changes the result AND you cannot resolve it by reading the codebase.
|
|
17367
|
+
2. The action is destructive/irreversible, touches production, or changes security posture.
|
|
17368
|
+
3. You need a secret, credential, or value that cannot be inferred.
|
|
17369
|
+
|
|
17370
|
+
When you must ask: do all non-blocked work first, then ask exactly one targeted question. Include your recommended default and state what changes based on the answer.
|
|
17364
17371
|
Put the recommended option first with "(Recommended)". Short headers (<=30 chars).
|
|
17365
17372
|
After calling question, STOP \u2014 do not continue execution.
|
|
17366
17373
|
</questions>`;
|
|
17367
|
-
var SUBAGENT_RULES = `- Do not call thoth-mem
|
|
17368
|
-
-
|
|
17374
|
+
var SUBAGENT_RULES = `- Do not call ANY thoth-mem tools \u2014 memory is exclusively orchestrator-owned.
|
|
17375
|
+
- Do not call \`todowrite\` \u2014 task progress tracking is exclusively orchestrator-owned.
|
|
17376
|
+
- Use \`question\` tool for blocking decisions, never plain text.
|
|
17377
|
+
- NEVER run destructive git commands that discard working-tree changes: \`git restore\`, \`git checkout -- <path>\`, \`git reset --hard\`, \`git clean\`, \`git stash\`. During SDD execution, files modified by prior tasks are intentional progress \u2014 reverting them destroys the pipeline.
|
|
17378
|
+
- NEVER run \`git restore\` to "clean up" tracked file changes you did not make. Those changes belong to earlier tasks in the same pipeline.`;
|
|
17369
17379
|
var RESPONSE_BUDGET = `Your response returns to an expensive orchestrator model. Be ruthlessly concise:
|
|
17370
17380
|
- Return insights and conclusions, NEVER raw file contents or full code blocks.
|
|
17371
17381
|
- Structured results (status, summary, files, issues) over prose.
|
|
@@ -17675,14 +17685,16 @@ You are the orchestrator for oh-my-opencode-lite.
|
|
|
17675
17685
|
<rules>
|
|
17676
17686
|
You are delegate-first.
|
|
17677
17687
|
|
|
17678
|
-
NEVER
|
|
17688
|
+
NEVER read or write any file in the workspace \u2014 delegate all file operations. The only permitted file operations are on openspec/ coordination artifacts (see below). Reading a non-openspec file is an emergency-only last resort when delegation is genuinely impossible; it must remain exceptional.
|
|
17679
17689
|
Delegate all inspection, writing, searching, debugging, and verification.
|
|
17680
17690
|
|
|
17681
17691
|
Never build after changes.
|
|
17682
17692
|
|
|
17683
17693
|
Do only coordination yourself: think, choose agents, sequence true dependencies, launch independent delegations together, ask the user via \`question\`, summarize results, and manage memory/progress.
|
|
17684
17694
|
|
|
17685
|
-
|
|
17695
|
+
NEVER request full file contents from sub-agents. Sub-agents analyze files internally and return insights \u2014 they do not relay raw content.
|
|
17696
|
+
|
|
17697
|
+
Always request only what you need to decide: insights, symbol locations, line ranges, diff summaries, or verification outcomes \u2014 never raw file dumps. Sub-agents handle large content; you handle decisions.
|
|
17686
17698
|
|
|
17687
17699
|
\`question\` is orchestrator-owned. Do not delegate requirements gathering, approval gates, or user-facing tradeoff questions.
|
|
17688
17700
|
|
|
@@ -17690,6 +17702,8 @@ Exception: openspec/ coordination artifacts are not source code. You may read/ed
|
|
|
17690
17702
|
|
|
17691
17703
|
If you mention a specialist and execution is required, dispatch that specialist in the same turn.
|
|
17692
17704
|
Never serialize independent ready delegations across multiple responses.
|
|
17705
|
+
|
|
17706
|
+
NEVER instruct sub-agents to restore, reset, or discard working-tree changes. During SDD execution, modified files are cumulative progress from prior tasks \u2014 reverting them destroys the pipeline.
|
|
17693
17707
|
</rules>
|
|
17694
17708
|
|
|
17695
17709
|
<verification>
|
|
@@ -17741,7 +17755,7 @@ Routing tiebreakers:
|
|
|
17741
17755
|
</agents>
|
|
17742
17756
|
|
|
17743
17757
|
<parallel-dispatch>
|
|
17744
|
-
-
|
|
17758
|
+
- If delegations are independent and ready now, launch all in one response.
|
|
17745
17759
|
- If you say "in parallel", emit all ready tool calls immediately.
|
|
17746
17760
|
- background_task is fire-and-forget: launch it, then continue with other ready coordination work.
|
|
17747
17761
|
- Use task only when you need the result before the next step.
|
|
@@ -17751,6 +17765,7 @@ Routing tiebreakers:
|
|
|
17751
17765
|
<delegation-failure>
|
|
17752
17766
|
- Empty, contradictory, or low-confidence background results: retry once with a sharper prompt.
|
|
17753
17767
|
- Failed or suspect sync/write results: route to oracle before retrying.
|
|
17768
|
+
- If a sub-agent does not return the detail you expected, refine your request with specific questions \u2014 NEVER fall back to reading the file yourself. The orchestrator reading workspace files is an emergency-only last resort.
|
|
17754
17769
|
- Maximum one retry after the initial attempt. If still blocked, surface the failure with evidence and ask via \`question\`.
|
|
17755
17770
|
</delegation-failure>
|
|
17756
17771
|
|
|
@@ -17760,6 +17775,7 @@ Routing tiebreakers:
|
|
|
17760
17775
|
- Oracle is READ-ONLY. NEVER use oracle to execute SDD artifact phases (propose, spec, design, tasks, apply). Oracle is ONLY for plan-review.
|
|
17761
17776
|
- NEVER skip artifact creation. Each phase MUST produce its persistent artifact before the next phase begins.
|
|
17762
17777
|
- NEVER jump from requirements-interview directly to implementation. The approved SDD route MUST be followed phase by phase.
|
|
17778
|
+
- NEVER execute SDD tasks without first loading the \`executing-plans\` skill via the skill tool. Reading artifacts and delegating directly is a protocol violation. The skill MUST be loaded BEFORE the first task dispatch.
|
|
17763
17779
|
|
|
17764
17780
|
## Entry
|
|
17765
17781
|
- Non-trivial work starts with requirements-interview. Skip it only for truly trivial, unambiguous work.
|
|
@@ -17770,7 +17786,8 @@ Routing tiebreakers:
|
|
|
17770
17786
|
1. Dispatch @deep with skill \`sdd-propose\`. Wait for result. Verify artifact was persisted.
|
|
17771
17787
|
2. Dispatch @deep with skill \`sdd-tasks\`. Wait for result. Verify artifact was persisted.
|
|
17772
17788
|
3. Plan-review gate (see "Plan Review Gate" below).
|
|
17773
|
-
4.
|
|
17789
|
+
4. **Load the \`executing-plans\` skill** via the skill tool. This is mandatory and must happen before any task dispatch.
|
|
17790
|
+
5. **Execute tasks** following the loaded skill exactly: for each task, follow the \`<progress>\` protocol for state tracking, use the 6-part dispatch envelope (TASK, CONTEXT, REQUIREMENTS, BOUNDARIES, VERIFICATION, RETURN ENVELOPE), dispatch @deep or @quick with skill \`sdd-apply\`, and follow the escalation policy on failure.
|
|
17774
17791
|
|
|
17775
17792
|
## Pipeline: Full SDD (propose -> spec -> design -> tasks)
|
|
17776
17793
|
1. Dispatch @deep with skill \`sdd-propose\`. Wait for result. Verify artifact was persisted.
|
|
@@ -17778,7 +17795,8 @@ Routing tiebreakers:
|
|
|
17778
17795
|
3. Dispatch @deep with skill \`sdd-design\`. Wait for result. Verify artifact was persisted.
|
|
17779
17796
|
4. Dispatch @deep with skill \`sdd-tasks\`. Wait for result. Verify artifact was persisted.
|
|
17780
17797
|
5. Plan-review gate (see "Plan Review Gate" below).
|
|
17781
|
-
6.
|
|
17798
|
+
6. **Load the \`executing-plans\` skill** via the skill tool. This is mandatory and must happen before any task dispatch.
|
|
17799
|
+
7. **Execute tasks** following the loaded skill exactly: for each task, follow the \`<progress>\` protocol for state tracking, use the 6-part dispatch envelope (TASK, CONTEXT, REQUIREMENTS, BOUNDARIES, VERIFICATION, RETURN ENVELOPE), dispatch @deep or @quick with skill \`sdd-apply\`, and follow the escalation policy on failure.
|
|
17782
17800
|
|
|
17783
17801
|
## Plan Review Gate
|
|
17784
17802
|
After tasks are generated, use \`question\` to ask the user:
|
|
@@ -17826,9 +17844,11 @@ Sub-agents own phase execution and artifact persistence. You own sequencing, pro
|
|
|
17826
17844
|
</sdd-dispatch>
|
|
17827
17845
|
|
|
17828
17846
|
<progress>
|
|
17829
|
-
-
|
|
17830
|
-
-
|
|
17831
|
-
-
|
|
17847
|
+
- You are the ONLY agent responsible for task progress. Sub-agents NEVER call \`todowrite\`.
|
|
17848
|
+
- For multi-step work, maintain two layers: todowrite (visual UI for user) plus the persistent SDD artifact when SDD is active.
|
|
17849
|
+
- Before dispatch: MUST mark the task in progress in every active layer.
|
|
17850
|
+
- After result: MUST immediately mark completed in every active layer before the next dispatch.
|
|
17851
|
+
- On error or blocker: mark as skipped and document the reason inline before continuing.
|
|
17832
17852
|
- Use one in-progress todo for sequential work; multiple only for truly parallel launches.
|
|
17833
17853
|
- Keep todowrite top-level and lean. Skip it for trivial one-step work.
|
|
17834
17854
|
</progress>
|
|
@@ -17896,6 +17916,7 @@ ${SUBAGENT_RULES}
|
|
|
17896
17916
|
- Read only the context you need.
|
|
17897
17917
|
- Avoid multi-step planning; if the task stops being bounded, surface it.
|
|
17898
17918
|
- Ask only for implementation-local ambiguity, not orchestrator-level routing.
|
|
17919
|
+
- NEVER run git commands that discard changes (\`git restore\`, \`git checkout --\`, \`git reset\`, \`git clean\`). Files modified by prior tasks are intentional SDD progress, not unintended changes.
|
|
17899
17920
|
</rules>
|
|
17900
17921
|
|
|
17901
17922
|
${QUESTION_PROTOCOL}
|
|
@@ -17986,7 +18007,7 @@ var BUILTIN_PERMISSION_PRESETS = {
|
|
|
17986
18007
|
lsp: "allow",
|
|
17987
18008
|
skill: "allow",
|
|
17988
18009
|
question: "allow",
|
|
17989
|
-
todowrite: "
|
|
18010
|
+
todowrite: "deny",
|
|
17990
18011
|
external_directory: {
|
|
17991
18012
|
"~/.config/opencode/skills/**": "allow"
|
|
17992
18013
|
}
|
|
@@ -18001,12 +18022,30 @@ var BUILTIN_PERMISSION_PRESETS = {
|
|
|
18001
18022
|
question: "allow",
|
|
18002
18023
|
codesearch: "allow",
|
|
18003
18024
|
lsp: "allow",
|
|
18004
|
-
todowrite: "
|
|
18025
|
+
todowrite: "deny",
|
|
18005
18026
|
external_directory: {
|
|
18006
18027
|
"~/.config/opencode/skills/**": "allow"
|
|
18007
18028
|
}
|
|
18008
18029
|
},
|
|
18009
|
-
deep:
|
|
18030
|
+
deep: {
|
|
18031
|
+
read: "allow",
|
|
18032
|
+
edit: "allow",
|
|
18033
|
+
glob: "allow",
|
|
18034
|
+
grep: "allow",
|
|
18035
|
+
list: "allow",
|
|
18036
|
+
bash: "allow",
|
|
18037
|
+
codesearch: "allow",
|
|
18038
|
+
lsp: "allow",
|
|
18039
|
+
skill: "allow",
|
|
18040
|
+
question: "allow",
|
|
18041
|
+
webfetch: "allow",
|
|
18042
|
+
websearch: "allow",
|
|
18043
|
+
todowrite: "deny",
|
|
18044
|
+
task: "deny",
|
|
18045
|
+
external_directory: {
|
|
18046
|
+
"~/.config/opencode/skills/**": "allow"
|
|
18047
|
+
}
|
|
18048
|
+
}
|
|
18010
18049
|
};
|
|
18011
18050
|
function normalizeModelArray(model) {
|
|
18012
18051
|
return model.map((entry) => typeof entry === "string" ? { id: entry } : entry);
|
package/package.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requirements-interview
|
|
3
|
-
description:
|
|
4
|
-
Mandatory step-0 requirements discovery for non-trivial work before any
|
|
5
|
-
implementation or SDD routing decisions.
|
|
3
|
+
description: Mandatory step-0 requirements discovery for non-trivial work before any implementation or SDD routing decisions.
|
|
6
4
|
metadata:
|
|
7
5
|
author: oh-my-opencode-lite
|
|
8
6
|
version: '1.0'
|