rdap-q 1.2.1 → 1.2.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.
Files changed (68) hide show
  1. package/.agents/plugins/rdap-q/plugin.json +1 -1
  2. package/.agents/skills/rdap-q/README.md +1 -1
  3. package/.agents/skills/rdap-q/SKILL.md +17 -3
  4. package/.agents/skills/rdap-q/core/controller.md +3 -3
  5. package/.agents/skills/rdap-q/core/gates.md +1 -1
  6. package/.agents/skills/rdap-q/core/memory.md +37 -3
  7. package/.agents/skills/rdap-q/install/install-unix.sh +1 -1
  8. package/.agents/skills/rdap-q/manifest.json +1 -1
  9. package/.agents/skills/rdap-q/memory/README.md +3 -0
  10. package/.agents/skills/rdap-q/memory/index.md +3 -0
  11. package/.agents/skills/rdap-q/playbooks/00-bootstrap.md +5 -2
  12. package/.agents/skills/rdap-q/playbooks/06-final-audit.md +3 -2
  13. package/.agents/skills/rdap-q/state/README.md +2 -0
  14. package/.claude/commands/rdapq.md +1 -1
  15. package/.claude-plugin/marketplace.json +1 -1
  16. package/.claude-plugin/plugin-index.json +1 -1
  17. package/.claude-plugin/plugin.json +1 -1
  18. package/.clinerules +1 -1
  19. package/.codex/skill.json +1 -1
  20. package/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  21. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  22. package/.github/copilot-instructions.md +1 -1
  23. package/.goosehints +1 -1
  24. package/.grok/rules.md +1 -1
  25. package/.grok/skill.json +1 -1
  26. package/.grok-plugin/marketplace.json +1 -1
  27. package/.grok-plugin/plugin-index.json +1 -1
  28. package/AGENTS.md +1 -1
  29. package/CLAUDE.md +1 -1
  30. package/GEMINI.md +1 -1
  31. package/README.md +90 -224
  32. package/agentskills.json +1 -1
  33. package/install.ps1 +2 -2
  34. package/install.sh +2 -2
  35. package/lib/installer.js +43 -27
  36. package/manifest.json +1 -1
  37. package/marketplace.json +1 -1
  38. package/package.json +3 -2
  39. package/plugin.json +1 -1
  40. package/plugins/rdap-q/plugin.json +1 -1
  41. package/plugins/rdap-q/skills/rdap-q/README.md +1 -1
  42. package/plugins/rdap-q/skills/rdap-q/SKILL.md +17 -3
  43. package/plugins/rdap-q/skills/rdap-q/core/controller.md +3 -3
  44. package/plugins/rdap-q/skills/rdap-q/core/gates.md +1 -1
  45. package/plugins/rdap-q/skills/rdap-q/core/memory.md +37 -3
  46. package/plugins/rdap-q/skills/rdap-q/install/install-unix.sh +1 -1
  47. package/plugins/rdap-q/skills/rdap-q/manifest.json +1 -1
  48. package/plugins/rdap-q/skills/rdap-q/memory/README.md +3 -0
  49. package/plugins/rdap-q/skills/rdap-q/memory/index.md +3 -0
  50. package/plugins/rdap-q/skills/rdap-q/playbooks/00-bootstrap.md +5 -2
  51. package/plugins/rdap-q/skills/rdap-q/playbooks/06-final-audit.md +3 -2
  52. package/plugins/rdap-q/skills/rdap-q/state/README.md +2 -0
  53. package/rdap-q-skill/README.md +1 -1
  54. package/rdap-q-skill/SKILL.md +17 -3
  55. package/rdap-q-skill/core/controller.md +3 -3
  56. package/rdap-q-skill/core/gates.md +1 -1
  57. package/rdap-q-skill/core/memory.md +37 -3
  58. package/rdap-q-skill/install/install-unix.sh +1 -1
  59. package/rdap-q-skill/manifest.json +1 -1
  60. package/rdap-q-skill/memory/README.md +3 -0
  61. package/rdap-q-skill/memory/index.md +3 -0
  62. package/rdap-q-skill/playbooks/00-bootstrap.md +5 -2
  63. package/rdap-q-skill/playbooks/06-final-audit.md +3 -2
  64. package/rdap-q-skill/state/README.md +2 -0
  65. package/scripts/harness-audit/check.py +387 -0
  66. package/scripts/harness-audit/vendors.json +192 -0
  67. package/scripts/harness-audit/weekly.sh +22 -0
  68. package/skills.json +1 -1
package/lib/installer.js CHANGED
@@ -37,7 +37,6 @@ function readVersion(pkgRoot) {
37
37
 
38
38
  function resolveLayout(env) {
39
39
  const home = env.HOME || env.USERPROFILE || require('os').homedir();
40
- const roaming = env.APPDATA || path.join(home, 'AppData', 'Roaming');
41
40
  return {
42
41
  rdapq: env.RDAPQ_HOME || path.join(home, '.rdapq'),
43
42
  gemini: env.GEMINI_HOME || path.join(home, '.gemini'),
@@ -47,16 +46,15 @@ function resolveLayout(env) {
47
46
  cline: env.CLINE_HOME || path.join(home, '.cline'),
48
47
  codex: env.CODEX_HOME || path.join(home, '.codex'),
49
48
  grok: env.GROK_HOME || path.join(home, '.grok'),
50
- copilot: env.COPILOT_HOME || (process.platform === 'win32'
51
- ? path.join(roaming, 'github-copilot')
52
- : path.join(home, '.config', 'github-copilot')),
49
+ copilot: env.COPILOT_HOME || path.join(home, '.copilot'),
50
+ agents: env.AGENTS_HOME || path.join(home, '.agents'),
53
51
  };
54
52
  }
55
53
 
56
54
  function skillSource(pkgRoot) {
57
55
  const src = path.join(pkgRoot, 'rdap-q-skill');
58
56
  if (!exists(path.join(src, 'SKILL.md'))) {
59
- throw new Error(`RDAP-Q skill source is missing (${src}). Install from a full checkout or via npx --yes github:coldcanuk/rdapq.`);
57
+ throw new Error(`RDAP-Q skill source is missing (${src}). Install from a full checkout or via npx rdap-q.`);
60
58
  }
61
59
  return src;
62
60
  }
@@ -188,14 +186,16 @@ function harnessFiles(id, layout, pkgRoot) {
188
186
  case 'claude':
189
187
  return [[path.join(pkgRoot, '.claude', 'commands', 'rdapq.md'), path.join(layout.claude, 'commands', 'rdapq.md')]];
190
188
  case 'cline':
191
- return [[path.join(pkgRoot, '.clinerules'), path.join(layout.cline, 'rdapq.rules.md')]];
189
+ return [[path.join(pkgRoot, '.clinerules'), path.join(layout.cline, 'rules', 'rdapq.md')]];
192
190
  case 'copilot':
193
- return [[path.join(pkgRoot, '.github', 'copilot-instructions.md'), path.join(layout.copilot, 'rdapq-instructions.md')]];
191
+ return [[path.join(pkgRoot, '.github', 'copilot-instructions.md'), path.join(layout.copilot, 'copilot-instructions.md')]];
194
192
  case 'codex':
195
193
  return [[path.join(pkgRoot, 'AGENTS.md'), path.join(layout.codex, 'AGENTS.md')]];
194
+ case 'goose':
195
+ return [[path.join(pkgRoot, '.goosehints'), path.join(layout.goose, '.goosehints')]];
196
196
  case 'grok':
197
- return [[path.join(pkgRoot, '.grok', 'rules.md'), path.join(layout.grok, 'rules.md')]];
198
197
  case 'cursor':
198
+ case 'antigravity':
199
199
  return [];
200
200
  default:
201
201
  return [];
@@ -215,18 +215,27 @@ function harnessLabel(id) {
215
215
  }[id];
216
216
  }
217
217
 
218
- function harnessTreeDest(id, layout) {
219
- if (id === 'antigravity') return path.join(layout.gemini, 'antigravity-cli', 'skills', 'rdap-q');
220
- if (id === 'goose') return path.join(layout.goose, 'toolkits', 'rdap-q');
221
- if (id === 'cursor') return path.join(layout.cursor, 'skills', 'rdap-q');
222
- return null;
218
+ function harnessTreeDests(id, layout) {
219
+ if (id === 'antigravity') {
220
+ return [
221
+ path.join(layout.gemini, 'antigravity-cli', 'skills', 'rdap-q'),
222
+ path.join(layout.gemini, 'config', 'skills', 'rdap-q'),
223
+ ];
224
+ }
225
+ if (id === 'goose') return [];
226
+ if (id === 'cursor') return [path.join(layout.cursor, 'skills', 'rdap-q')];
227
+ if (id === 'grok') return [path.join(layout.grok, 'skills', 'rdap-q')];
228
+ if (id === 'claude') return [path.join(layout.claude, 'skills', 'rdap-q')];
229
+ if (id === 'copilot') return [path.join(layout.copilot, 'skills', 'rdap-q')];
230
+ if (id === 'codex') return [path.join(layout.agents, 'skills', 'rdap-q')];
231
+ return [];
223
232
  }
224
233
 
225
234
  const REPO_BRIDGES = [
226
235
  ['AGENTS.md', 'AGENTS.md'],
227
236
  ['CLAUDE.md', 'CLAUDE.md'],
228
237
  ['GEMINI.md', 'GEMINI.md'],
229
- ['.clinerules', '.clinerules'],
238
+ ['.clinerules', path.join('.clinerules', 'rdapq.md')],
230
239
  ['.goosehints', '.goosehints'],
231
240
  [path.join('.grok', 'rules.md'), path.join('.grok', 'rules.md')],
232
241
  [path.join('.github', 'copilot-instructions.md'), path.join('.github', 'copilot-instructions.md')],
@@ -237,12 +246,12 @@ function statusRows(layout) {
237
246
  return [
238
247
  ['Core Protocol ($RDAPQ_HOME)', path.join(layout.rdapq, 'skills', 'rdap-q', 'SKILL.md')],
239
248
  ['Google Antigravity', path.join(layout.gemini, 'antigravity-cli', 'skills', 'rdap-q', 'SKILL.md')],
240
- ['Anthropic Claude Code', path.join(layout.claude, 'commands', 'rdapq.md')],
241
- ['Cline / Roo Code', path.join(layout.cline, 'rdapq.rules.md')],
242
- ['GitHub Copilot', path.join(layout.copilot, 'rdapq-instructions.md')],
249
+ ['Anthropic Claude Code', path.join(layout.claude, 'skills', 'rdap-q', 'SKILL.md')],
250
+ ['Cline / Roo Code', path.join(layout.cline, 'rules', 'rdapq.md')],
251
+ ['GitHub Copilot', path.join(layout.copilot, 'copilot-instructions.md')],
243
252
  ['OpenAI Codex', path.join(layout.codex, 'AGENTS.md')],
244
- ['xAI Grok', path.join(layout.grok, 'rules.md')],
245
- ['Block Goose', path.join(layout.goose, 'toolkits', 'rdap-q', 'SKILL.md')],
253
+ ['xAI Grok', path.join(layout.grok, 'skills', 'rdap-q', 'SKILL.md')],
254
+ ['Block Goose', path.join(layout.goose, '.goosehints')],
246
255
  ['Cursor', path.join(layout.cursor, 'skills', 'rdap-q', 'SKILL.md')],
247
256
  ];
248
257
  }
@@ -290,7 +299,7 @@ function parseArgs(argv) {
290
299
 
291
300
  function helpText(version) {
292
301
  return `Usage: rdapq [COMMAND] [OPTIONS]
293
- npx --yes github:coldcanuk/rdapq [COMMAND] [OPTIONS]
302
+ npx rdap-q [COMMAND] [OPTIONS]
294
303
 
295
304
  Research-Driven Adaptive Planning with Quality Gates (v${version})
296
305
 
@@ -317,12 +326,12 @@ Options:
317
326
 
318
327
  There is no separate update command. Run install again with the same flags.
319
328
  Skill trees are replaced after the new copy verifies. Edited harness files
320
- are kept unless you pass --force. The npm name rdap-q is not published yet.
329
+ are kept unless you pass --force.
321
330
 
322
331
  Examples:
323
- npx --yes github:coldcanuk/rdapq install --claude
324
- npx --yes github:coldcanuk/rdapq install --cursor
325
- npx --yes github:coldcanuk/rdapq#v${version} install --all
332
+ npx rdap-q install --claude
333
+ npx rdap-q install --cursor
334
+ npx rdap-q@${version} install --all
326
335
  rdapq init
327
336
  rdapq init --force
328
337
  rdapq status
@@ -355,8 +364,7 @@ function installCore(pkgRoot, layout, log) {
355
364
 
356
365
  function installHarness(id, pkgRoot, layout, force, log) {
357
366
  log(`==> Configuring for ${harnessLabel(id)}...`);
358
- const treeDest = harnessTreeDest(id, layout);
359
- if (treeDest) {
367
+ for (const treeDest of harnessTreeDests(id, layout)) {
360
368
  publishTree(skillSource(pkgRoot), treeDest);
361
369
  log(` ✓ skill tree installed to ${treeDest}`);
362
370
  }
@@ -379,13 +387,21 @@ function installRepo(pkgRoot, repoArg, cwd, force, log) {
379
387
  const skillDest = path.join(abs, '.agents', 'skills', 'rdap-q');
380
388
  publishTree(skillSource(pkgRoot), skillDest);
381
389
  log(` ✓ skill tree installed to ${skillDest}`);
390
+ const claudeSkill = path.join(abs, '.claude', 'skills', 'rdap-q');
391
+ publishTree(skillSource(pkgRoot), claudeSkill);
392
+ log(` ✓ skill tree installed to ${claudeSkill}`);
382
393
  log(' ✓ Workspace bridges processed for Codex, Grok, Copilot, Antigravity, Goose, Claude, and Cline.');
383
394
  }
384
395
 
385
396
  function printStatus(layout, log) {
386
397
  log('==> Inspecting RDAP-Q Multi-Harness Status:');
387
398
  for (const [name, target] of statusRows(layout)) {
388
- const installed = exists(target) && fs.statSync(target).isFile();
399
+ let installed = false;
400
+ try {
401
+ installed = fs.lstatSync(target).isFile();
402
+ } catch {
403
+ installed = false;
404
+ }
389
405
  const icon = installed ? '✓' : '✗';
390
406
  const detail = installed ? `Installed (${target})` : 'Not installed';
391
407
  log(` [${icon}] ${name.padEnd(28)}: ${detail}`);
package/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdap-q",
3
- "version": "1.2.1",
3
+ "version": "1.2.5",
4
4
  "protocol_name": "RDAP-Q Agent Engineering Protocol",
5
5
  "entrypoint": "rdap-q-skill/SKILL.md",
6
6
  "invocation": "/rdapq",
package/marketplace.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/agent-skills/spec/main/marketplace.schema.json",
3
3
  "name": "rdap-q",
4
4
  "displayName": "RDAP-Q: Adaptive Planning with Quality Gates",
5
- "version": "1.2.1",
5
+ "version": "1.2.5",
6
6
  "protocol": "RDAP-Q Agent Engineering Protocol",
7
7
  "summary": "Universal AI agent engineering protocol for evidence-first software development, calibrated scoring, and quality gates across Codex, Grok, Copilot, Antigravity, Goose, Claude, Cline, and Cursor.",
8
8
  "description": "Vendor-neutral Research-Driven Adaptive Planning with Quality Gates (RDAP-Q) enables autonomous AI coding agents to execute non-trivial software tasks with disciplined evidence collection, deterministic phase execution, persistent project state, calibrated quality scoring (0-10 scale), and diminishing-return exit logic. Native support for OpenAI Codex, xAI Grok, GitHub Copilot, Google Antigravity, Block Goose, Anthropic Claude, Cline, and Cursor.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdap-q",
3
- "version": "1.2.1",
3
+ "version": "1.2.5",
4
4
  "description": "Research-Driven Adaptive Planning with Quality Gates (RDAP-Q) — Vendor-neutral AI agent engineering protocol & skill for Codex, Grok, Copilot, Antigravity, Goose, Claude, Cline, and Cursor. Evidence-first software engineering, persistent memory, and calibrated quality gates.",
5
5
  "main": "rdap-q-skill/SKILL.md",
6
6
  "bin": {
@@ -68,7 +68,8 @@
68
68
  "install:codex": "node bin/rdapq.js install --codex",
69
69
  "install:grok": "node bin/rdapq.js install --grok",
70
70
  "install:goose": "node bin/rdapq.js install --goose",
71
- "install:cursor": "node bin/rdapq.js install --cursor"
71
+ "install:cursor": "node bin/rdapq.js install --cursor",
72
+ "audit:harnesses": "python3 scripts/harness-audit/check.py"
72
73
  },
73
74
  "engines": {
74
75
  "node": ">=18.0.0"
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdap-q",
3
- "version": "1.2.1",
3
+ "version": "1.2.5",
4
4
  "description": "Research-Driven Adaptive Planning with Quality Gates protocol plugin for Google Antigravity & AI agents.",
5
5
  "rules": [
6
6
  "GEMINI.md",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdap-q",
3
- "version": "1.2.1",
3
+ "version": "1.2.5",
4
4
  "description": "Research-Driven Adaptive Planning with Quality Gates protocol for evidence-first software engineering and diminishing-return exit gates.",
5
5
  "author": {
6
6
  "name": "coldcanuk"
@@ -1,4 +1,4 @@
1
- # RDAP-Q Skill v1.2.1
1
+ # RDAP-Q Skill v1.2.5
2
2
 
3
3
  `SKILL.md` is the instruction source. This README is not a second copy of the protocol.
4
4
 
@@ -4,14 +4,26 @@ description: Run the RDAP-Q evidence-first engineering protocol. Invoke with /rd
4
4
  disable-model-invocation: true
5
5
  ---
6
6
  name: rdap-q
7
- version: "1.2.1"
7
+ version: "1.2.5"
8
8
  description: Evidence-first engineering protocol. Load this file, then the current phase playbook only.
9
9
  invocation: /rdapq
10
10
  home_env: RDAPQ_HOME
11
11
  home: RDAPQ_HOME else ~/.rdapq (Windows %USERPROFILE%\.rdapq)
12
12
  state: .rdapq/state
13
13
  memory: $RDAPQ_HOME/memory
14
+ memory_index: $RDAPQ_HOME/memory/index.md
14
15
  facts: [OBSERVED, USER_SPECIFIED, VERIFIED_EXTERNAL, INFERRED, UNKNOWN]
16
+ memory_caps:
17
+ load_full_records: 12
18
+ load_index_rows: 80
19
+ fact_chars: 240
20
+ evidence_chars: 160
21
+ file_bytes: 24576
22
+ global_active: 80
23
+ project_active: 40
24
+ state_evidence_records: 80
25
+ state_iteration_rounds: 20
26
+ state_file_bytes: 49152
15
27
  rules:
16
28
  - evidence before inference; never invent paths, APIs, versions, flags, tests, env, or architecture
17
29
  - INFERRED or UNKNOWN cannot decide implementation when verification is possible
@@ -21,12 +33,14 @@ rules:
21
33
  - task state stays in .rdapq/state; memory is reusable only; current evidence beats memory
22
34
  - never store secret values; a source plus an identifier is allowed
23
35
  - do not load manifest.json, other playbooks, diagrams, or bulk memory
36
+ - load memory/index.md first, then at most 12 matching full records; compact before work if over cap
37
+ - never bulk-read memory/ or projects/; never gzip, base64, or one-line-tarball memory
24
38
  commands:
25
39
  status: phase, quality, confidence, gates, blockers, iteration
26
40
  score: evidence-linked scorecard
27
41
  audit: adversarial final audit
28
- resume: reload memory and state, then check drift
29
- memory: relevant memories and status; never print secrets
42
+ resume: compact if over cap, reload index and hits plus state, then check drift
43
+ memory: relevant ACTIVE memories and status; never print secrets; never dump the store
30
44
  research: discovery
31
45
  explain: why this phase or exit
32
46
  weights: {correctness: 25, coverage: 15, verification: 15, integration: 10, security: 10, maintainability: 10, architecture: 8, operability: 7}
@@ -1,14 +1,14 @@
1
1
  when: whole_loop_or_ambiguous_next_state
2
2
  order:
3
3
  - resolve home; if unwritable, record it and use repo state
4
- - load SKILL.md, repo root, relevant memory, then .rdapq/state if present
4
+ - load SKILL.md, repo root, memory index, compact if over cap, then at most 12 hits, then .rdapq/state if present
5
5
  - load the current playbook only; observe before acting
6
6
  - update facts, assumptions, evidence, risks, decisions
7
7
  - milestone: verify, review, score, gate, decide, persist
8
8
  - invalid plan -> PLAN; worthwhile fix -> iterate
9
9
  - gates pass and diminishing -> audit, then COMPLETE
10
10
  - else emit the accurate non-complete terminal state
11
- - promote only durable lessons
11
+ - promote only durable lessons that pass write_forbid and caps
12
12
  precedence: [user_intent, direct_evidence, repo_state, project_memory, global_memory, external_for_this_version, inference]
13
13
  replan_if_changes: [scope, architecture, dependencies, sequencing, risk, verification, success_criteria]
14
- context: targeted reads; do not replay chat or load the whole skill tree
14
+ context: targeted reads; do not replay chat or load the whole skill tree; never bulk-read memory/
@@ -8,5 +8,5 @@ gates:
8
8
  regression: [existing_tests_pass, no_known_material_regression]
9
9
  security: [no_new_material_issue, no_secrets_stored, destructive_safeguards, risk_proportional_checks]
10
10
  repository: [diff_reviewed, no_unintended_files, no_conflicts, state_understood, unrelated_work_kept]
11
- memory: [no_secrets, promotion_test, stale_handled, state_not_promoted_as_global]
11
+ memory: [no_secrets, promotion_test, stale_handled, state_not_promoted_as_global, under_cap, index_current]
12
12
  quality: target_met_or_diminishing_returns_and_other_gates_pass
@@ -2,10 +2,44 @@ scopes:
2
2
  global: "$RDAPQ_HOME/memory/{engineering-preferences,tooling,lessons,patterns,constraints}.md"
3
3
  project: "$RDAPQ_HOME/projects/<id>/{project,architecture,lessons,decisions}.md"
4
4
  task: .rdapq/state
5
+ index: "$RDAPQ_HOME/memory/index.md"
6
+ load: index_then_hits
5
7
  promote_if_all: [durable, reusable, material, safe, grounded]
6
8
  record: {id: M-<id>, scope: "global|project:<id>", status: [ACTIVE, STALE, SUPERSEDED, INVALID], class: [USER_SPECIFIED, OBSERVED, VERIFIED_EXTERNAL, INFERRED], confidence: "0-10", verified: YYYY-MM-DD, supersedes: "id|none", superseded_by: "id|none", fact: str, evidence: str}
9
+ index_row: {id: M-<id>, kind: str, scope: "global|project:<id>", status: str, class: str, one_line: str}
7
10
  secrets: never values; source plus identifier only
8
11
  on_conflict: trust direct evidence; mark STALE, SUPERSEDED, or INVALID; link ids; do not silent-delete
9
- load: relevant project, then relevant global
10
- memory_cmd: relevant entries, status, conflicts; never print secrets
11
- resume: home, project memory, repo state, last phase, inspect drift, continue at first unverified step
12
+ load_order: relevant index rows, then matching full records, project before global
13
+ memory_cmd: relevant ACTIVE entries, status, conflicts; never print secrets; never dump the store
14
+ resume: home, index, compact if over cap, load hits, repo state, last phase, inspect drift, continue at first unverified step
15
+ caps:
16
+ load_full_records: 12
17
+ load_index_rows: 80
18
+ fact_chars: 240
19
+ evidence_chars: 160
20
+ file_bytes: 24576
21
+ global_active: 80
22
+ project_active: 40
23
+ state_evidence_records: 80
24
+ state_iteration_rounds: 20
25
+ state_file_bytes: 49152
26
+ refuse:
27
+ - bulk_read of memory/ or projects/
28
+ - diagrams (.mmd)
29
+ - manifest.json
30
+ - playbooks other than current phase
31
+ - gzip, base64, or one-line tarball encodings
32
+ write_forbid:
33
+ - secret values
34
+ - command output, diffs, logs, chat
35
+ - INFERRED when verification was possible
36
+ - duplicate of an ACTIVE one_line
37
+ - fact longer than fact_chars
38
+ - evidence longer than evidence_chars
39
+ - promoting .rdapq/state into global memory
40
+ on_cap:
41
+ stop_append: true
42
+ compact: [STALE, SUPERSEDED, INVALID]
43
+ overflow: archive to memory/archive/YYYY-MM.md
44
+ say: "MEMORY_CAP — compacted, not loaded"
45
+ over_cap_without_safe_compact: stop promoting; emit MEMORY_CAP; do not keep appending
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env sh
2
2
  # Install the skill tree into $RDAPQ_HOME. Stage first, swap only after SKILL.md
3
3
  # is present, so a failed copy cannot delete a working install.
4
- # Prefer the repo installer (./install.sh or npx --yes github:coldcanuk/rdapq) when you have the full checkout.
4
+ # Prefer the repo installer (./install.sh or npx rdap-q) when you have the full checkout.
5
5
  set -eu
6
6
 
7
7
  SOURCE_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdap-q",
3
- "version": "1.2.1",
3
+ "version": "1.2.5",
4
4
  "protocol_name": "RDAP-Q Agent Engineering Protocol",
5
5
  "entrypoint": "SKILL.md",
6
6
  "invocation": "/rdapq",
@@ -1,4 +1,7 @@
1
1
  role: durable memory
2
2
  path: $RDAPQ_HOME/memory
3
+ index: $RDAPQ_HOME/memory/index.md
3
4
  schema: core/memory.md
5
+ load: index_then_hits
4
6
  promote_if: [durable, reusable, material, safe, grounded]
7
+ caps: SKILL.md memory_caps
@@ -0,0 +1,3 @@
1
+ schema: core/memory.md
2
+ load: index_then_hits
3
+ records: []
@@ -1,7 +1,10 @@
1
1
  phase: BOOTSTRAP
2
2
  do:
3
3
  - resolve home from SKILL.md; if unwritable, record that and use repo state only
4
- - read task-relevant project memory, then global memory; do not bulk-load
4
+ - read memory/index.md; do not bulk-load memory/ or projects/
5
+ - if any memory or state file exceeds SKILL.md memory_caps, compact first: archive overflow, mark STALE/SUPERSEDED out of the load set, rewrite the index
6
+ - if compact would require guessing, emit MEMORY_CAP, stop promoting, continue with repo state only
7
+ - load at most 12 matching full records (project before global, ACTIVE only)
5
8
  - inspect root, status, branch, remotes, worktrees, languages, manifests, lockfiles, test, CI
6
9
  - do not assume main, a remote, or a package manager
7
10
  - create .rdapq/state files on first write; do not preload every template
@@ -14,4 +17,4 @@ inspect:
14
17
  git_mutation: playbooks/07-git-worktree.md # worktree, commit, push, or audit cleanup only
15
18
  out: [scope, assumptions, evidence, risks, iteration-log]
16
19
  next: DISCOVERY
17
- forbid: [imagined_repo, destroying_unrelated_work]
20
+ forbid: [imagined_repo, destroying_unrelated_work, bulk_memory, diagrams, gzip_memory]
@@ -1,7 +1,8 @@
1
1
  phase: AUDIT
2
2
  stance: disprove completion
3
- ask: [misread_requirement, unexercised_path, untested_failure, inferred_claim, stale_memory, false_dependency, regression, malformed_input, dependency_down, observable_errors, secrets, races, unintended_interface_change, extra_dependency, debug_or_unused, docs_match, diff_matches_scope]
4
- memory: [candidates, promotion_test, write_approved_only, invalidate_stale, no_secrets]
3
+ ask: [misread_requirement, unexercised_path, untested_failure, inferred_claim, stale_memory, false_dependency, regression, malformed_input, dependency_down, observable_errors, secrets, races, unintended_interface_change, extra_dependency, debug_or_unused, docs_match, diff_matches_scope, memory_over_cap, index_stale]
4
+ memory: [candidates, promotion_test, write_approved_only, invalidate_stale, no_secrets, under_cap, index_current]
5
5
  report: [quality, confidence, coverage, gates, defects, unknowns, history, best_remaining, aqc]
6
6
  complete_only_if: all_applicable_gates_pass
7
+ fail_memory_gate_if: [secrets_stored, over_cap_uncompacted, index_missing_when_records_exist, bulk_memory_loaded, state_promoted_as_global]
7
8
  say: "Vibe Code Build complete."
@@ -2,3 +2,5 @@ role: task state, not durable memory
2
2
  path: .rdapq/state
3
3
  create: on first write
4
4
  secrets: never
5
+ caps: {evidence_records: 80, iteration_rounds: 20, file_bytes: 49152}
6
+ store: ids and outcomes, not log bodies
@@ -1,4 +1,4 @@
1
- # RDAP-Q Skill v1.2.1
1
+ # RDAP-Q Skill v1.2.5
2
2
 
3
3
  `SKILL.md` is the instruction source. This README is not a second copy of the protocol.
4
4
 
@@ -4,14 +4,26 @@ description: Run the RDAP-Q evidence-first engineering protocol. Invoke with /rd
4
4
  disable-model-invocation: true
5
5
  ---
6
6
  name: rdap-q
7
- version: "1.2.1"
7
+ version: "1.2.5"
8
8
  description: Evidence-first engineering protocol. Load this file, then the current phase playbook only.
9
9
  invocation: /rdapq
10
10
  home_env: RDAPQ_HOME
11
11
  home: RDAPQ_HOME else ~/.rdapq (Windows %USERPROFILE%\.rdapq)
12
12
  state: .rdapq/state
13
13
  memory: $RDAPQ_HOME/memory
14
+ memory_index: $RDAPQ_HOME/memory/index.md
14
15
  facts: [OBSERVED, USER_SPECIFIED, VERIFIED_EXTERNAL, INFERRED, UNKNOWN]
16
+ memory_caps:
17
+ load_full_records: 12
18
+ load_index_rows: 80
19
+ fact_chars: 240
20
+ evidence_chars: 160
21
+ file_bytes: 24576
22
+ global_active: 80
23
+ project_active: 40
24
+ state_evidence_records: 80
25
+ state_iteration_rounds: 20
26
+ state_file_bytes: 49152
15
27
  rules:
16
28
  - evidence before inference; never invent paths, APIs, versions, flags, tests, env, or architecture
17
29
  - INFERRED or UNKNOWN cannot decide implementation when verification is possible
@@ -21,12 +33,14 @@ rules:
21
33
  - task state stays in .rdapq/state; memory is reusable only; current evidence beats memory
22
34
  - never store secret values; a source plus an identifier is allowed
23
35
  - do not load manifest.json, other playbooks, diagrams, or bulk memory
36
+ - load memory/index.md first, then at most 12 matching full records; compact before work if over cap
37
+ - never bulk-read memory/ or projects/; never gzip, base64, or one-line-tarball memory
24
38
  commands:
25
39
  status: phase, quality, confidence, gates, blockers, iteration
26
40
  score: evidence-linked scorecard
27
41
  audit: adversarial final audit
28
- resume: reload memory and state, then check drift
29
- memory: relevant memories and status; never print secrets
42
+ resume: compact if over cap, reload index and hits plus state, then check drift
43
+ memory: relevant ACTIVE memories and status; never print secrets; never dump the store
30
44
  research: discovery
31
45
  explain: why this phase or exit
32
46
  weights: {correctness: 25, coverage: 15, verification: 15, integration: 10, security: 10, maintainability: 10, architecture: 8, operability: 7}
@@ -1,14 +1,14 @@
1
1
  when: whole_loop_or_ambiguous_next_state
2
2
  order:
3
3
  - resolve home; if unwritable, record it and use repo state
4
- - load SKILL.md, repo root, relevant memory, then .rdapq/state if present
4
+ - load SKILL.md, repo root, memory index, compact if over cap, then at most 12 hits, then .rdapq/state if present
5
5
  - load the current playbook only; observe before acting
6
6
  - update facts, assumptions, evidence, risks, decisions
7
7
  - milestone: verify, review, score, gate, decide, persist
8
8
  - invalid plan -> PLAN; worthwhile fix -> iterate
9
9
  - gates pass and diminishing -> audit, then COMPLETE
10
10
  - else emit the accurate non-complete terminal state
11
- - promote only durable lessons
11
+ - promote only durable lessons that pass write_forbid and caps
12
12
  precedence: [user_intent, direct_evidence, repo_state, project_memory, global_memory, external_for_this_version, inference]
13
13
  replan_if_changes: [scope, architecture, dependencies, sequencing, risk, verification, success_criteria]
14
- context: targeted reads; do not replay chat or load the whole skill tree
14
+ context: targeted reads; do not replay chat or load the whole skill tree; never bulk-read memory/
@@ -8,5 +8,5 @@ gates:
8
8
  regression: [existing_tests_pass, no_known_material_regression]
9
9
  security: [no_new_material_issue, no_secrets_stored, destructive_safeguards, risk_proportional_checks]
10
10
  repository: [diff_reviewed, no_unintended_files, no_conflicts, state_understood, unrelated_work_kept]
11
- memory: [no_secrets, promotion_test, stale_handled, state_not_promoted_as_global]
11
+ memory: [no_secrets, promotion_test, stale_handled, state_not_promoted_as_global, under_cap, index_current]
12
12
  quality: target_met_or_diminishing_returns_and_other_gates_pass
@@ -2,10 +2,44 @@ scopes:
2
2
  global: "$RDAPQ_HOME/memory/{engineering-preferences,tooling,lessons,patterns,constraints}.md"
3
3
  project: "$RDAPQ_HOME/projects/<id>/{project,architecture,lessons,decisions}.md"
4
4
  task: .rdapq/state
5
+ index: "$RDAPQ_HOME/memory/index.md"
6
+ load: index_then_hits
5
7
  promote_if_all: [durable, reusable, material, safe, grounded]
6
8
  record: {id: M-<id>, scope: "global|project:<id>", status: [ACTIVE, STALE, SUPERSEDED, INVALID], class: [USER_SPECIFIED, OBSERVED, VERIFIED_EXTERNAL, INFERRED], confidence: "0-10", verified: YYYY-MM-DD, supersedes: "id|none", superseded_by: "id|none", fact: str, evidence: str}
9
+ index_row: {id: M-<id>, kind: str, scope: "global|project:<id>", status: str, class: str, one_line: str}
7
10
  secrets: never values; source plus identifier only
8
11
  on_conflict: trust direct evidence; mark STALE, SUPERSEDED, or INVALID; link ids; do not silent-delete
9
- load: relevant project, then relevant global
10
- memory_cmd: relevant entries, status, conflicts; never print secrets
11
- resume: home, project memory, repo state, last phase, inspect drift, continue at first unverified step
12
+ load_order: relevant index rows, then matching full records, project before global
13
+ memory_cmd: relevant ACTIVE entries, status, conflicts; never print secrets; never dump the store
14
+ resume: home, index, compact if over cap, load hits, repo state, last phase, inspect drift, continue at first unverified step
15
+ caps:
16
+ load_full_records: 12
17
+ load_index_rows: 80
18
+ fact_chars: 240
19
+ evidence_chars: 160
20
+ file_bytes: 24576
21
+ global_active: 80
22
+ project_active: 40
23
+ state_evidence_records: 80
24
+ state_iteration_rounds: 20
25
+ state_file_bytes: 49152
26
+ refuse:
27
+ - bulk_read of memory/ or projects/
28
+ - diagrams (.mmd)
29
+ - manifest.json
30
+ - playbooks other than current phase
31
+ - gzip, base64, or one-line tarball encodings
32
+ write_forbid:
33
+ - secret values
34
+ - command output, diffs, logs, chat
35
+ - INFERRED when verification was possible
36
+ - duplicate of an ACTIVE one_line
37
+ - fact longer than fact_chars
38
+ - evidence longer than evidence_chars
39
+ - promoting .rdapq/state into global memory
40
+ on_cap:
41
+ stop_append: true
42
+ compact: [STALE, SUPERSEDED, INVALID]
43
+ overflow: archive to memory/archive/YYYY-MM.md
44
+ say: "MEMORY_CAP — compacted, not loaded"
45
+ over_cap_without_safe_compact: stop promoting; emit MEMORY_CAP; do not keep appending
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env sh
2
2
  # Install the skill tree into $RDAPQ_HOME. Stage first, swap only after SKILL.md
3
3
  # is present, so a failed copy cannot delete a working install.
4
- # Prefer the repo installer (./install.sh or npx --yes github:coldcanuk/rdapq) when you have the full checkout.
4
+ # Prefer the repo installer (./install.sh or npx rdap-q) when you have the full checkout.
5
5
  set -eu
6
6
 
7
7
  SOURCE_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdap-q",
3
- "version": "1.2.1",
3
+ "version": "1.2.5",
4
4
  "protocol_name": "RDAP-Q Agent Engineering Protocol",
5
5
  "entrypoint": "SKILL.md",
6
6
  "invocation": "/rdapq",
@@ -1,4 +1,7 @@
1
1
  role: durable memory
2
2
  path: $RDAPQ_HOME/memory
3
+ index: $RDAPQ_HOME/memory/index.md
3
4
  schema: core/memory.md
5
+ load: index_then_hits
4
6
  promote_if: [durable, reusable, material, safe, grounded]
7
+ caps: SKILL.md memory_caps
@@ -0,0 +1,3 @@
1
+ schema: core/memory.md
2
+ load: index_then_hits
3
+ records: []
@@ -1,7 +1,10 @@
1
1
  phase: BOOTSTRAP
2
2
  do:
3
3
  - resolve home from SKILL.md; if unwritable, record that and use repo state only
4
- - read task-relevant project memory, then global memory; do not bulk-load
4
+ - read memory/index.md; do not bulk-load memory/ or projects/
5
+ - if any memory or state file exceeds SKILL.md memory_caps, compact first: archive overflow, mark STALE/SUPERSEDED out of the load set, rewrite the index
6
+ - if compact would require guessing, emit MEMORY_CAP, stop promoting, continue with repo state only
7
+ - load at most 12 matching full records (project before global, ACTIVE only)
5
8
  - inspect root, status, branch, remotes, worktrees, languages, manifests, lockfiles, test, CI
6
9
  - do not assume main, a remote, or a package manager
7
10
  - create .rdapq/state files on first write; do not preload every template
@@ -14,4 +17,4 @@ inspect:
14
17
  git_mutation: playbooks/07-git-worktree.md # worktree, commit, push, or audit cleanup only
15
18
  out: [scope, assumptions, evidence, risks, iteration-log]
16
19
  next: DISCOVERY
17
- forbid: [imagined_repo, destroying_unrelated_work]
20
+ forbid: [imagined_repo, destroying_unrelated_work, bulk_memory, diagrams, gzip_memory]
@@ -1,7 +1,8 @@
1
1
  phase: AUDIT
2
2
  stance: disprove completion
3
- ask: [misread_requirement, unexercised_path, untested_failure, inferred_claim, stale_memory, false_dependency, regression, malformed_input, dependency_down, observable_errors, secrets, races, unintended_interface_change, extra_dependency, debug_or_unused, docs_match, diff_matches_scope]
4
- memory: [candidates, promotion_test, write_approved_only, invalidate_stale, no_secrets]
3
+ ask: [misread_requirement, unexercised_path, untested_failure, inferred_claim, stale_memory, false_dependency, regression, malformed_input, dependency_down, observable_errors, secrets, races, unintended_interface_change, extra_dependency, debug_or_unused, docs_match, diff_matches_scope, memory_over_cap, index_stale]
4
+ memory: [candidates, promotion_test, write_approved_only, invalidate_stale, no_secrets, under_cap, index_current]
5
5
  report: [quality, confidence, coverage, gates, defects, unknowns, history, best_remaining, aqc]
6
6
  complete_only_if: all_applicable_gates_pass
7
+ fail_memory_gate_if: [secrets_stored, over_cap_uncompacted, index_missing_when_records_exist, bulk_memory_loaded, state_promoted_as_global]
7
8
  say: "Vibe Code Build complete."
@@ -2,3 +2,5 @@ role: task state, not durable memory
2
2
  path: .rdapq/state
3
3
  create: on first write
4
4
  secrets: never
5
+ caps: {evidence_records: 80, iteration_rounds: 20, file_bytes: 49152}
6
+ store: ids and outcomes, not log bodies