@ccx-agent/opencode-ccx 0.2.5 → 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 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] -.->|Inject Verification Reminders| OP
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 & Remind| OP
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** | Injects `<system-reminder>` with verification contract, edit tracking |
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 + chat.message reminders |
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` |
@@ -17,5 +17,5 @@ type ChatMessageOutput = {
17
17
  }>;
18
18
  };
19
19
  export declare function recordToolCall(sessionID: string, tool: string, file?: string): void;
20
- export declare function createChatMessageHook(config: OhMyCCAgentConfig): (input: ChatMessageInput, output: ChatMessageOutput) => Promise<void>;
20
+ export declare function createChatMessageHook(_config: OhMyCCAgentConfig): (input: ChatMessageInput, _output: ChatMessageOutput) => Promise<void>;
21
21
  export {};
@@ -1,2 +1,2 @@
1
1
  import type { OhMyCCAgentConfig } from "../config/schema";
2
- export declare function createVerificationReminder(config: OhMyCCAgentConfig): (input: unknown, output: unknown) => Promise<void>;
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(1)
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: 1
13566
+ min_file_edits: 3
13567
13567
  })
13568
13568
  });
13569
13569
 
@@ -13714,9 +13714,9 @@ function recordToolCall(sessionID, tool, file2) {
13714
13714
  calls.shift();
13715
13715
  recentToolCalls.set(sessionID, calls);
13716
13716
  }
13717
- function createChatMessageHook(config2) {
13718
- return async (input, output) => {
13719
- if (!config2.enabled)
13717
+ function createChatMessageHook(_config) {
13718
+ return async (input, _output) => {
13719
+ if (!_config.enabled)
13720
13720
  return;
13721
13721
  const { sessionID, agent } = input;
13722
13722
  if (!sessionID)
@@ -13730,19 +13730,6 @@ function createChatMessageHook(config2) {
13730
13730
  }
13731
13731
  if (agent && !agent.startsWith("ccx"))
13732
13732
  return;
13733
- const reminders = [];
13734
- if (config2.verification.auto_remind && calls && calls.filter((c) => EDIT_TOOLS.has(c.tool)).length >= config2.verification.min_file_edits) {
13735
- reminders.push(`<system-reminder>You have made file edits. Remember the verification contract: run ccx-verification before declaring completion if you have 3+ file edits, backend/API changes, or infrastructure changes.</system-reminder>`);
13736
- }
13737
- if (reminders.length > 0) {
13738
- output.parts.push({
13739
- type: "text",
13740
- text: reminders.join(`
13741
- `),
13742
- sessionID,
13743
- messageID: input.messageID
13744
- });
13745
- }
13746
13733
  };
13747
13734
  }
13748
13735
 
@@ -14755,8 +14742,7 @@ function getSessionState(sessionID) {
14755
14742
  return existing;
14756
14743
  }
14757
14744
  const created = {
14758
- editedFiles: new Set,
14759
- reminded: false
14745
+ editedFiles: new Set
14760
14746
  };
14761
14747
  sessionStateById.set(sessionID, created);
14762
14748
  return created;
@@ -14768,20 +14754,8 @@ function getFilePath(value) {
14768
14754
  const candidates = [value.filePath, value.path, value.filename];
14769
14755
  return candidates.find((candidate) => typeof candidate === "string");
14770
14756
  }
14771
- function appendReminder(output, message) {
14772
- if (!isRecord3(output)) {
14773
- return;
14774
- }
14775
- const existingOutput = typeof output.output === "string" ? output.output : "";
14776
- output.output = existingOutput ? `${existingOutput}
14777
-
14778
- ${message}` : message;
14779
- const metadata = isRecord3(output.metadata) ? output.metadata : {};
14780
- metadata.verificationReminder = { message };
14781
- output.metadata = metadata;
14782
- }
14783
14757
  function createVerificationReminder(config2) {
14784
- return async (input, output) => {
14758
+ return async (input, _output) => {
14785
14759
  if (!config2.verification.auto_remind || !isRecord3(input)) {
14786
14760
  return;
14787
14761
  }
@@ -14796,11 +14770,6 @@ function createVerificationReminder(config2) {
14796
14770
  }
14797
14771
  const state = getSessionState(sessionID);
14798
14772
  state.editedFiles.add(filePath);
14799
- if (state.reminded || state.editedFiles.size < config2.verification.min_file_edits) {
14800
- return;
14801
- }
14802
- state.reminded = true;
14803
- appendReminder(output, `You have edited ${state.editedFiles.size} files. Consider running verification before reporting completion.`);
14804
14773
  };
14805
14774
  }
14806
14775
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccx-agent/opencode-ccx",
3
- "version": "0.2.5",
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",