@lifeaitools/rdc-skills 0.13.7 → 0.14.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdc",
3
- "version": "0.13.6",
3
+ "version": "0.14.0",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight unattended builds with work-item tracking and TDD enforcement.",
5
5
  "author": {
6
6
  "name": "LIFEAI",
@@ -37,19 +37,56 @@
37
37
  "usage": "rdc:brochure <input> [--out path] [--template name] [--format Letter|A4]",
38
38
  "args": {
39
39
  "positional": [
40
- { "name": "input", "required": true, "description": "Path to .zip, folder, .html, .md, or http(s)://... URL", "accepts": "path|url" }
40
+ {
41
+ "name": "input",
42
+ "required": true,
43
+ "description": "Path to .zip, folder, .html, .md, or http(s)://... URL",
44
+ "accepts": "path|url"
45
+ }
41
46
  ],
42
47
  "flags": [
43
- { "name": "--out", "type": "path", "default": null, "description": "Output PDF path. Defaults to <input-basename>.pdf next to the input." },
44
- { "name": "--template", "type": "string", "default": "studio-default", "description": "Compose-mode template (scaffold/templates/brochure-<name>.html)." },
45
- { "name": "--format", "type": "string", "default": "Letter", "description": "Page size: Letter or A4." },
46
- { "name": "--margin", "type": "string", "default": null, "description": "Override CSS @page margin (e.g. \"0.5in\")." },
47
- { "name": "--no-print-emulate", "type": "bool", "default": false, "description": "Render with screen media instead of print." },
48
- { "name": "--keep-workdir", "type": "bool", "default": false, "description": "Keep the staged working directory for inspection." }
48
+ {
49
+ "name": "--out",
50
+ "type": "path",
51
+ "default": null,
52
+ "description": "Output PDF path. Defaults to <input-basename>.pdf next to the input."
53
+ },
54
+ {
55
+ "name": "--template",
56
+ "type": "string",
57
+ "default": "studio-default",
58
+ "description": "Compose-mode template (scaffold/templates/brochure-<name>.html)."
59
+ },
60
+ {
61
+ "name": "--format",
62
+ "type": "string",
63
+ "default": "Letter",
64
+ "description": "Page size: Letter or A4."
65
+ },
66
+ {
67
+ "name": "--margin",
68
+ "type": "string",
69
+ "default": null,
70
+ "description": "Override CSS @page margin (e.g. \"0.5in\")."
71
+ },
72
+ {
73
+ "name": "--no-print-emulate",
74
+ "type": "bool",
75
+ "default": false,
76
+ "description": "Render with screen media instead of print."
77
+ },
78
+ {
79
+ "name": "--keep-workdir",
80
+ "type": "bool",
81
+ "default": false,
82
+ "description": "Keep the staged working directory for inspection."
83
+ }
49
84
  ]
50
85
  },
51
86
  "requires": [],
52
- "produces": ["pdf_artifact"],
87
+ "produces": [
88
+ "pdf_artifact"
89
+ ],
53
90
  "default_model": "sonnet",
54
91
  "triggers": [
55
92
  "make a brochure",
@@ -0,0 +1,125 @@
1
+ # Truth-Gain Escalation Protocol — Claude ↔ Codex
2
+
3
+ > Shared governance protocol for peer agent collaboration. Referenced by
4
+ > `rdc:co-develop` and (when built) `rdc:ccandme`.
5
+ > Approved: option-1 — shared guide + ref from both skills; trigger = two
6
+ > consecutive sub-threshold rounds. Interview: 2026-06-07 in this session.
7
+
8
+ ---
9
+
10
+ ## Purpose
11
+
12
+ Two capable agents debating a question can spend unbounded rounds for shrinking
13
+ returns. This protocol bounds the debate: when an exchange stops materially
14
+ moving the answer, the agents **stop arguing and decide** — via a scored rubric
15
+ for ordinary decisions, or by escalating to the human for critical ones. Every
16
+ decision leaves an auditable record (bridge-mode Rule 4: deterministic,
17
+ replayable, human-in-the-loop).
18
+
19
+ It governs any governed co-development or deep-planning exchange:
20
+
21
+ - `rdc:co-develop` — headless clauth/HTTP JSON-envelope transport
22
+ - `rdc:ccandme` — visible WezTerm routing (proposed)
23
+
24
+ ---
25
+
26
+ ## 1. Truth-gain (Δ) per round
27
+
28
+ After each peer round, the **receiving** agent rates the round's marginal
29
+ truth-gain:
30
+
31
+ > **Δ = the fraction of remaining decision-relevant uncertainty that this
32
+ > exchange actually closed** — through new evidence, a corrected error, a
33
+ > resolved disagreement, or a narrowed option set.
34
+
35
+ Δ measures whether the **answer moved**, not whether the agents talked.
36
+ Restating a position, agreeing without adding, or circling = Δ ≈ 0.
37
+
38
+ ---
39
+
40
+ ## 2. Stop trigger — two consecutive sub-5% rounds
41
+
42
+ A round is **sub-threshold** only when **both** agents independently rate
43
+ Δ < 5%. If either agent still sees ≥ 5% gain, the dialogue continues — this
44
+ resolves "who owns Δ?": neither agent owns it unilaterally; the debate stops
45
+ only when both agree it is thin.
46
+
47
+ The trigger fires after **two consecutive sub-threshold rounds**. One thin round
48
+ can be rescued by a strong follow-up; two in a row means the dialogue has
49
+ converged or stalled.
50
+
51
+ Convergence counts: mutual agreement at Δ < 5% is a valid stop (the answer is
52
+ settled, not stalled). Record it as a decision and proceed — no rubric needed.
53
+
54
+ ---
55
+
56
+ ## 3. On trigger → scored rubric (stop debating)
57
+
58
+ When the trigger fires on an *unresolved* question, do **not** keep debating.
59
+ Jointly construct a rubric:
60
+
61
+ 1. **Enumerate live options**, including the status quo / do-nothing.
62
+ 2. **Define 3–6 weighted criteria.** Default set: correctness, reversibility,
63
+ bridge-mode fit, cost, risk, time. Weights sum to 1.0.
64
+ 3. **Each agent scores every option independently** (no peeking at the peer's
65
+ sheet) on each criterion.
66
+ 4. **Combine** by weighted sum; the higher combined score wins.
67
+ 5. **Record both scoresheets** verbatim as evidence — they are the audit trail.
68
+
69
+ ---
70
+
71
+ ## 4. Criticality gate
72
+
73
+ Classify the pending decision:
74
+
75
+ - **Non-critical** → adopt the rubric winner. Record the decision plus both
76
+ scoresheets. Proceed.
77
+ - **Critical** → do **not** auto-adopt. Escalate **HITL** (human-in-the-loop):
78
+ emit a human decision item containing the rubric, both scoresheets,
79
+ agreements, disagreements, and a single recommendation. Then **wait** for the
80
+ human's decision.
81
+
82
+ ### Critical = any of:
83
+
84
+ - a trigger in `.claude/rules/architectural-change-approval.md`
85
+ - production / deploy-facing change
86
+ - security / credentials
87
+ - destructive schema (DROP / RENAME / reshape)
88
+ - money, credits, valuations
89
+ - governance or source-of-truth definition
90
+ - **rubric tie**, or agents still diverge past a one-rank margin after scoring
91
+ - high irreversibility (hard or impossible to undo)
92
+
93
+ When in doubt, treat it as critical.
94
+
95
+ ---
96
+
97
+ ## 5. HITL sink — interim reality
98
+
99
+ The intended sink is the `human_items` **decision table** described in
100
+ `docs/systems/claude-workflow/HUMAN-INBOX.md`.
101
+
102
+ **As of 2026-06-07 that table is not built** (verified: no `human_items`
103
+ relation exists; only `codeflow_policy_decisions`). Until it ships:
104
+
105
+ - HITL = surface the rubric + both scoresheets + recommendation to Dave
106
+ in-session, and record it as a `work_item` note and/or CodeFlow memory.
107
+ - Migrate these records to `human_items` decision rows once that surface exists.
108
+
109
+ Do **not** treat the missing table as a reason to auto-adopt a critical
110
+ decision (bridge-mode: absence of an artifact is not licence for drift —
111
+ build/route around it, keep the human in the loop).
112
+
113
+ ---
114
+
115
+ ## Acceptance criteria
116
+
117
+ A session that uses this protocol must, in its report, show:
118
+
119
+ 1. Δ ratings per round from both agents (or a note that convergence was reached).
120
+ 2. If the trigger fired: the rubric — options, weighted criteria, both
121
+ scoresheets, combined result.
122
+ 3. The criticality classification and which trigger(s) matched.
123
+ 4. For critical decisions: the HITL record (human item / interim note) and the
124
+ human's decision, or `status: awaiting_human`.
125
+ 5. No critical decision auto-adopted without a human decision on record.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.13.7",
3
+ "version": "0.14.0",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code - plan, build, review, overnight builds",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -158,6 +158,19 @@ Invoke co-development when:
158
158
  Do not invoke by default for simple read-only explanations, one-line command
159
159
  output, one-file typo fixes, or already decomposed low-risk work.
160
160
 
161
+ ## In-Session Escalation — Truth-Gain Protocol
162
+
163
+ Once a co-development session is running, bound the debate with the shared
164
+ escalation protocol: `guides/escalation-protocol.md`.
165
+
166
+ In short: after each peer round, both agents rate marginal truth-gain (Δ). When
167
+ two consecutive rounds are sub-5% for both agents, stop debating and decide —
168
+ build a scored rubric (options × weighted criteria, both scoresheets recorded).
169
+ Non-critical decisions adopt the rubric winner; critical decisions escalate HITL
170
+ to the human decision table (interim: surface to Dave + record as work-item
171
+ note / CodeFlow memory until `human_items` ships). See the guide for the full
172
+ criticality list and acceptance criteria.
173
+
161
174
  ## Workflow
162
175
 
163
176
  1. Start or resume a session with `codevelop_start` / `codevelop_join`.