@ccx-agent/opencode-ccx 0.2.6 → 0.2.7
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 +4 -5
- package/dist/hooks/verification-reminder.d.ts +1 -1
- package/dist/index.js +4 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ graph TD
|
|
|
90
90
|
User([User Request]) --> OP[OpenCode Agent Loop]
|
|
91
91
|
|
|
92
92
|
subgraph ccx Plugin
|
|
93
|
-
H1[chat.message] -.->|
|
|
93
|
+
H1[chat.message] -.->|Track File Edits| OP
|
|
94
94
|
H2[chat.system.transform] -.->|Load CLAUDE.md & Context| OP
|
|
95
95
|
H3[chat.params] -.->|Agent-specific Temp/TopP| OP
|
|
96
96
|
|
|
@@ -102,7 +102,7 @@ graph TD
|
|
|
102
102
|
ToolCall -->|Execute| Exec[Run Tool]
|
|
103
103
|
|
|
104
104
|
Exec -->|After| H5[tool.execute.after]
|
|
105
|
-
H5 -.->|Track Edits
|
|
105
|
+
H5 -.->|Track Edits| OP
|
|
106
106
|
|
|
107
107
|
OP -->|Context Full| H6[session.compacting]
|
|
108
108
|
H6 -.->|Preserve Plan & Verdict| OP
|
|
@@ -149,7 +149,7 @@ ccx uses every major hook point in the OpenCode plugin API to dynamically shape
|
|
|
149
149
|
|
|
150
150
|
| Hook | What it does |
|
|
151
151
|
|------|-------------|
|
|
152
|
-
| **chat.message** |
|
|
152
|
+
| **chat.message** | Tracks file edits across the session for verification threshold detection |
|
|
153
153
|
| **chat.params** | Tunes temperature/topP per agent — low for plan/verification (precision), higher for explore (creativity) |
|
|
154
154
|
| **experimental.chat.system.transform** | Dynamically injects project instructions (CLAUDE.md), session context (edited files list), and verification reminders into the system prompt |
|
|
155
155
|
| **tool.definition** | Appends safety rules to bash/edit/write tool descriptions, usage hints to glob/grep/read |
|
|
@@ -175,9 +175,8 @@ ccx was built by studying Claude Code's prompt architecture and adapting its cor
|
|
|
175
175
|
|--------------------|--------------------|
|
|
176
176
|
| 8-section system prompt | 8 composable prompt sections, near-identical content |
|
|
177
177
|
| 5 subagent types (explore, plan, verify, general, coordinator) | Same 5 agents with equivalent prompts |
|
|
178
|
-
| Verification contract (3+ file edits → mandatory review) | Dynamic system prompt injection
|
|
178
|
+
| Verification contract (3+ file edits → mandatory review) | Dynamic system prompt injection |
|
|
179
179
|
| VERDICT protocol (PASS/FAIL/PARTIAL) | Identical format and adversarial strategies |
|
|
180
|
-
| Per-turn `<system-reminder>` attachments | `chat.message` hook injects context each turn |
|
|
181
180
|
| Project instructions (CLAUDE.md) | Auto-loaded from CLAUDE.md / .claude/instructions.md / AGENTS.md |
|
|
182
181
|
| Tool safety hints | `tool.definition` hook appends rules to bash/edit/write descriptions |
|
|
183
182
|
| Context compaction preservation | Custom compaction prompt via `experimental.session.compacting` |
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { OhMyCCAgentConfig } from "../config/schema";
|
|
2
|
-
export declare function createVerificationReminder(config: OhMyCCAgentConfig): (input: unknown,
|
|
2
|
+
export declare function createVerificationReminder(config: OhMyCCAgentConfig): (input: unknown, _output: unknown) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -13554,7 +13554,7 @@ config(en_default());
|
|
|
13554
13554
|
// src/config/schema.ts
|
|
13555
13555
|
var verificationSchema = exports_external.object({
|
|
13556
13556
|
auto_remind: exports_external.boolean().default(true),
|
|
13557
|
-
min_file_edits: exports_external.int().nonnegative().default(
|
|
13557
|
+
min_file_edits: exports_external.int().nonnegative().default(3)
|
|
13558
13558
|
});
|
|
13559
13559
|
var configSchema = exports_external.object({
|
|
13560
13560
|
enabled: exports_external.boolean().default(true),
|
|
@@ -13563,7 +13563,7 @@ var configSchema = exports_external.object({
|
|
|
13563
13563
|
output_style: exports_external.string().min(1).nullable().default(null),
|
|
13564
13564
|
verification: verificationSchema.default({
|
|
13565
13565
|
auto_remind: true,
|
|
13566
|
-
min_file_edits:
|
|
13566
|
+
min_file_edits: 3
|
|
13567
13567
|
})
|
|
13568
13568
|
});
|
|
13569
13569
|
|
|
@@ -14742,8 +14742,7 @@ function getSessionState(sessionID) {
|
|
|
14742
14742
|
return existing;
|
|
14743
14743
|
}
|
|
14744
14744
|
const created = {
|
|
14745
|
-
editedFiles: new Set
|
|
14746
|
-
reminded: false
|
|
14745
|
+
editedFiles: new Set
|
|
14747
14746
|
};
|
|
14748
14747
|
sessionStateById.set(sessionID, created);
|
|
14749
14748
|
return created;
|
|
@@ -14755,20 +14754,8 @@ function getFilePath(value) {
|
|
|
14755
14754
|
const candidates = [value.filePath, value.path, value.filename];
|
|
14756
14755
|
return candidates.find((candidate) => typeof candidate === "string");
|
|
14757
14756
|
}
|
|
14758
|
-
function appendReminder(output, message) {
|
|
14759
|
-
if (!isRecord3(output)) {
|
|
14760
|
-
return;
|
|
14761
|
-
}
|
|
14762
|
-
const existingOutput = typeof output.output === "string" ? output.output : "";
|
|
14763
|
-
output.output = existingOutput ? `${existingOutput}
|
|
14764
|
-
|
|
14765
|
-
${message}` : message;
|
|
14766
|
-
const metadata = isRecord3(output.metadata) ? output.metadata : {};
|
|
14767
|
-
metadata.verificationReminder = { message };
|
|
14768
|
-
output.metadata = metadata;
|
|
14769
|
-
}
|
|
14770
14757
|
function createVerificationReminder(config2) {
|
|
14771
|
-
return async (input,
|
|
14758
|
+
return async (input, _output) => {
|
|
14772
14759
|
if (!config2.verification.auto_remind || !isRecord3(input)) {
|
|
14773
14760
|
return;
|
|
14774
14761
|
}
|
|
@@ -14783,11 +14770,6 @@ function createVerificationReminder(config2) {
|
|
|
14783
14770
|
}
|
|
14784
14771
|
const state = getSessionState(sessionID);
|
|
14785
14772
|
state.editedFiles.add(filePath);
|
|
14786
|
-
if (state.reminded || state.editedFiles.size < config2.verification.min_file_edits) {
|
|
14787
|
-
return;
|
|
14788
|
-
}
|
|
14789
|
-
state.reminded = true;
|
|
14790
|
-
appendReminder(output, `You have edited ${state.editedFiles.size} files. Consider running verification before reporting completion.`);
|
|
14791
14773
|
};
|
|
14792
14774
|
}
|
|
14793
14775
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccx-agent/opencode-ccx",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Production-grade prompt engineering for OpenCode — disciplined coding, risk-aware actions, adversarial verification",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|