rdap-q 1.2.1

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 (178) hide show
  1. package/.agents/plugins/rdap-q/plugin.json +11 -0
  2. package/.agents/skills/rdap-q/README.md +171 -0
  3. package/.agents/skills/rdap-q/SKILL.md +55 -0
  4. package/.agents/skills/rdap-q/core/capabilities.md +9 -0
  5. package/.agents/skills/rdap-q/core/controller.md +14 -0
  6. package/.agents/skills/rdap-q/core/exit-logic.md +9 -0
  7. package/.agents/skills/rdap-q/core/gates.md +12 -0
  8. package/.agents/skills/rdap-q/core/memory.md +11 -0
  9. package/.agents/skills/rdap-q/core/scoring.md +7 -0
  10. package/.agents/skills/rdap-q/diagrams/rdapq-command-flow.mmd +9 -0
  11. package/.agents/skills/rdap-q/diagrams/rdapq-control-loop.mmd +31 -0
  12. package/.agents/skills/rdap-q/diagrams/rdapq-evidence-flow.mmd +31 -0
  13. package/.agents/skills/rdap-q/diagrams/rdapq-memory-model.mmd +26 -0
  14. package/.agents/skills/rdap-q/diagrams/rdapq-score-decision.mmd +24 -0
  15. package/.agents/skills/rdap-q/diagrams/rdapq-selective-loading.mmd +40 -0
  16. package/.agents/skills/rdap-q/install/install-unix.sh +48 -0
  17. package/.agents/skills/rdap-q/install/install-windows.ps1 +65 -0
  18. package/.agents/skills/rdap-q/manifest.json +87 -0
  19. package/.agents/skills/rdap-q/memory/README.md +4 -0
  20. package/.agents/skills/rdap-q/memory/constraints.md +3 -0
  21. package/.agents/skills/rdap-q/memory/engineering-preferences.md +3 -0
  22. package/.agents/skills/rdap-q/memory/lessons.md +3 -0
  23. package/.agents/skills/rdap-q/memory/patterns.md +3 -0
  24. package/.agents/skills/rdap-q/memory/tooling.md +3 -0
  25. package/.agents/skills/rdap-q/playbooks/00-bootstrap.md +17 -0
  26. package/.agents/skills/rdap-q/playbooks/01-discovery.md +9 -0
  27. package/.agents/skills/rdap-q/playbooks/02-planning.md +6 -0
  28. package/.agents/skills/rdap-q/playbooks/03-architecture.md +6 -0
  29. package/.agents/skills/rdap-q/playbooks/04-implementation.md +8 -0
  30. package/.agents/skills/rdap-q/playbooks/05-verification.md +6 -0
  31. package/.agents/skills/rdap-q/playbooks/06-final-audit.md +7 -0
  32. package/.agents/skills/rdap-q/playbooks/07-git-worktree.md +13 -0
  33. package/.agents/skills/rdap-q/projects/architecture.md +3 -0
  34. package/.agents/skills/rdap-q/projects/decisions.md +3 -0
  35. package/.agents/skills/rdap-q/projects/lessons.md +3 -0
  36. package/.agents/skills/rdap-q/projects/project.md +3 -0
  37. package/.agents/skills/rdap-q/state/README.md +4 -0
  38. package/.agents/skills/rdap-q/state/assumptions.md +3 -0
  39. package/.agents/skills/rdap-q/state/decisions.md +2 -0
  40. package/.agents/skills/rdap-q/state/evidence.md +3 -0
  41. package/.agents/skills/rdap-q/state/iteration-log.md +1 -0
  42. package/.agents/skills/rdap-q/state/plan.md +4 -0
  43. package/.agents/skills/rdap-q/state/research.md +13 -0
  44. package/.agents/skills/rdap-q/state/risks.md +2 -0
  45. package/.agents/skills/rdap-q/state/scope.md +9 -0
  46. package/.agents/skills/rdap-q/state/scorecard.md +15 -0
  47. package/.agents/skills/rdap-q/templates/final-report.md +31 -0
  48. package/.agents/skills/rdap-q/templates/milestone.md +8 -0
  49. package/.agents/skills/rdap-q/templates/task.md +12 -0
  50. package/.claude/commands/rdapq.md +8 -0
  51. package/.claude-plugin/marketplace.json +40 -0
  52. package/.claude-plugin/plugin-index.json +16 -0
  53. package/.claude-plugin/plugin.json +25 -0
  54. package/.clinerules +8 -0
  55. package/.codex/skill.json +9 -0
  56. package/.github/copilot-instructions.md +8 -0
  57. package/.github/workflows/ci.yml +25 -0
  58. package/.github/workflows/release.yml +34 -0
  59. package/.goosehints +8 -0
  60. package/.grok/rules.md +8 -0
  61. package/.grok/skill.json +9 -0
  62. package/.grok-plugin/marketplace.json +40 -0
  63. package/.grok-plugin/plugin-index.json +16 -0
  64. package/AGENTS.md +8 -0
  65. package/CLAUDE.md +8 -0
  66. package/GEMINI.md +8 -0
  67. package/LICENSE +674 -0
  68. package/README.md +657 -0
  69. package/agentskills.json +20 -0
  70. package/bin/rdapq.js +14 -0
  71. package/install.ps1 +65 -0
  72. package/install.sh +41 -0
  73. package/lib/installer.js +479 -0
  74. package/manifest.json +87 -0
  75. package/marketplace.json +112 -0
  76. package/package.json +102 -0
  77. package/plugin.json +12 -0
  78. package/plugins/rdap-q/plugin.json +21 -0
  79. package/plugins/rdap-q/skills/rdap-q/README.md +171 -0
  80. package/plugins/rdap-q/skills/rdap-q/SKILL.md +55 -0
  81. package/plugins/rdap-q/skills/rdap-q/core/capabilities.md +9 -0
  82. package/plugins/rdap-q/skills/rdap-q/core/controller.md +14 -0
  83. package/plugins/rdap-q/skills/rdap-q/core/exit-logic.md +9 -0
  84. package/plugins/rdap-q/skills/rdap-q/core/gates.md +12 -0
  85. package/plugins/rdap-q/skills/rdap-q/core/memory.md +11 -0
  86. package/plugins/rdap-q/skills/rdap-q/core/scoring.md +7 -0
  87. package/plugins/rdap-q/skills/rdap-q/diagrams/rdapq-command-flow.mmd +9 -0
  88. package/plugins/rdap-q/skills/rdap-q/diagrams/rdapq-control-loop.mmd +31 -0
  89. package/plugins/rdap-q/skills/rdap-q/diagrams/rdapq-evidence-flow.mmd +31 -0
  90. package/plugins/rdap-q/skills/rdap-q/diagrams/rdapq-memory-model.mmd +26 -0
  91. package/plugins/rdap-q/skills/rdap-q/diagrams/rdapq-score-decision.mmd +24 -0
  92. package/plugins/rdap-q/skills/rdap-q/diagrams/rdapq-selective-loading.mmd +40 -0
  93. package/plugins/rdap-q/skills/rdap-q/install/install-unix.sh +48 -0
  94. package/plugins/rdap-q/skills/rdap-q/install/install-windows.ps1 +65 -0
  95. package/plugins/rdap-q/skills/rdap-q/manifest.json +87 -0
  96. package/plugins/rdap-q/skills/rdap-q/memory/README.md +4 -0
  97. package/plugins/rdap-q/skills/rdap-q/memory/constraints.md +3 -0
  98. package/plugins/rdap-q/skills/rdap-q/memory/engineering-preferences.md +3 -0
  99. package/plugins/rdap-q/skills/rdap-q/memory/lessons.md +3 -0
  100. package/plugins/rdap-q/skills/rdap-q/memory/patterns.md +3 -0
  101. package/plugins/rdap-q/skills/rdap-q/memory/tooling.md +3 -0
  102. package/plugins/rdap-q/skills/rdap-q/playbooks/00-bootstrap.md +17 -0
  103. package/plugins/rdap-q/skills/rdap-q/playbooks/01-discovery.md +9 -0
  104. package/plugins/rdap-q/skills/rdap-q/playbooks/02-planning.md +6 -0
  105. package/plugins/rdap-q/skills/rdap-q/playbooks/03-architecture.md +6 -0
  106. package/plugins/rdap-q/skills/rdap-q/playbooks/04-implementation.md +8 -0
  107. package/plugins/rdap-q/skills/rdap-q/playbooks/05-verification.md +6 -0
  108. package/plugins/rdap-q/skills/rdap-q/playbooks/06-final-audit.md +7 -0
  109. package/plugins/rdap-q/skills/rdap-q/playbooks/07-git-worktree.md +13 -0
  110. package/plugins/rdap-q/skills/rdap-q/projects/architecture.md +3 -0
  111. package/plugins/rdap-q/skills/rdap-q/projects/decisions.md +3 -0
  112. package/plugins/rdap-q/skills/rdap-q/projects/lessons.md +3 -0
  113. package/plugins/rdap-q/skills/rdap-q/projects/project.md +3 -0
  114. package/plugins/rdap-q/skills/rdap-q/state/README.md +4 -0
  115. package/plugins/rdap-q/skills/rdap-q/state/assumptions.md +3 -0
  116. package/plugins/rdap-q/skills/rdap-q/state/decisions.md +2 -0
  117. package/plugins/rdap-q/skills/rdap-q/state/evidence.md +3 -0
  118. package/plugins/rdap-q/skills/rdap-q/state/iteration-log.md +1 -0
  119. package/plugins/rdap-q/skills/rdap-q/state/plan.md +4 -0
  120. package/plugins/rdap-q/skills/rdap-q/state/research.md +13 -0
  121. package/plugins/rdap-q/skills/rdap-q/state/risks.md +2 -0
  122. package/plugins/rdap-q/skills/rdap-q/state/scope.md +9 -0
  123. package/plugins/rdap-q/skills/rdap-q/state/scorecard.md +15 -0
  124. package/plugins/rdap-q/skills/rdap-q/templates/final-report.md +31 -0
  125. package/plugins/rdap-q/skills/rdap-q/templates/milestone.md +8 -0
  126. package/plugins/rdap-q/skills/rdap-q/templates/task.md +12 -0
  127. package/rdap-q-skill/README.md +171 -0
  128. package/rdap-q-skill/SKILL.md +55 -0
  129. package/rdap-q-skill/core/capabilities.md +9 -0
  130. package/rdap-q-skill/core/controller.md +14 -0
  131. package/rdap-q-skill/core/exit-logic.md +9 -0
  132. package/rdap-q-skill/core/gates.md +12 -0
  133. package/rdap-q-skill/core/memory.md +11 -0
  134. package/rdap-q-skill/core/scoring.md +7 -0
  135. package/rdap-q-skill/diagrams/rdapq-command-flow.mmd +9 -0
  136. package/rdap-q-skill/diagrams/rdapq-control-loop.mmd +31 -0
  137. package/rdap-q-skill/diagrams/rdapq-evidence-flow.mmd +31 -0
  138. package/rdap-q-skill/diagrams/rdapq-memory-model.mmd +26 -0
  139. package/rdap-q-skill/diagrams/rdapq-score-decision.mmd +24 -0
  140. package/rdap-q-skill/diagrams/rdapq-selective-loading.mmd +40 -0
  141. package/rdap-q-skill/install/install-unix.sh +48 -0
  142. package/rdap-q-skill/install/install-windows.ps1 +65 -0
  143. package/rdap-q-skill/manifest.json +87 -0
  144. package/rdap-q-skill/memory/README.md +4 -0
  145. package/rdap-q-skill/memory/constraints.md +3 -0
  146. package/rdap-q-skill/memory/engineering-preferences.md +3 -0
  147. package/rdap-q-skill/memory/lessons.md +3 -0
  148. package/rdap-q-skill/memory/patterns.md +3 -0
  149. package/rdap-q-skill/memory/tooling.md +3 -0
  150. package/rdap-q-skill/playbooks/00-bootstrap.md +17 -0
  151. package/rdap-q-skill/playbooks/01-discovery.md +9 -0
  152. package/rdap-q-skill/playbooks/02-planning.md +6 -0
  153. package/rdap-q-skill/playbooks/03-architecture.md +6 -0
  154. package/rdap-q-skill/playbooks/04-implementation.md +8 -0
  155. package/rdap-q-skill/playbooks/05-verification.md +6 -0
  156. package/rdap-q-skill/playbooks/06-final-audit.md +7 -0
  157. package/rdap-q-skill/playbooks/07-git-worktree.md +13 -0
  158. package/rdap-q-skill/projects/architecture.md +3 -0
  159. package/rdap-q-skill/projects/decisions.md +3 -0
  160. package/rdap-q-skill/projects/lessons.md +3 -0
  161. package/rdap-q-skill/projects/project.md +3 -0
  162. package/rdap-q-skill/state/README.md +4 -0
  163. package/rdap-q-skill/state/assumptions.md +3 -0
  164. package/rdap-q-skill/state/decisions.md +2 -0
  165. package/rdap-q-skill/state/evidence.md +3 -0
  166. package/rdap-q-skill/state/iteration-log.md +1 -0
  167. package/rdap-q-skill/state/plan.md +4 -0
  168. package/rdap-q-skill/state/research.md +13 -0
  169. package/rdap-q-skill/state/risks.md +2 -0
  170. package/rdap-q-skill/state/scope.md +9 -0
  171. package/rdap-q-skill/state/scorecard.md +15 -0
  172. package/rdap-q-skill/templates/final-report.md +31 -0
  173. package/rdap-q-skill/templates/milestone.md +8 -0
  174. package/rdap-q-skill/templates/task.md +12 -0
  175. package/scripts/check-static.js +86 -0
  176. package/scripts/check-versions.js +86 -0
  177. package/scripts/materialize-skill-links.js +83 -0
  178. package/skills.json +15 -0
@@ -0,0 +1,3 @@
1
+ scope: global
2
+ kind: lessons
3
+ records: []
@@ -0,0 +1,3 @@
1
+ scope: global
2
+ kind: patterns
3
+ records: []
@@ -0,0 +1,3 @@
1
+ scope: global
2
+ kind: tooling
3
+ records: []
@@ -0,0 +1,17 @@
1
+ phase: BOOTSTRAP
2
+ do:
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
5
+ - inspect root, status, branch, remotes, worktrees, languages, manifests, lockfiles, test, CI
6
+ - do not assume main, a remote, or a package manager
7
+ - create .rdapq/state files on first write; do not preload every template
8
+ inspect:
9
+ - git status --short
10
+ - git branch --show-current
11
+ - git remote -v
12
+ - git branch -a
13
+ - git worktree list
14
+ git_mutation: playbooks/07-git-worktree.md # worktree, commit, push, or audit cleanup only
15
+ out: [scope, assumptions, evidence, risks, iteration-log]
16
+ next: DISCOVERY
17
+ forbid: [imagined_repo, destroying_unrelated_work]
@@ -0,0 +1,9 @@
1
+ phase: DISCOVERY
2
+ sources: [local_source, project_config, upstream_docs, upstream_source, experiment, secondary]
3
+ per_assumption: [record, materiality, needed_evidence, investigate, status]
4
+ block_exit:
5
+ critical_unknown: true
6
+ high_unresolved_if: [architecture, interfaces, security, persistence, compatibility, destructive]
7
+ memory: may suggest questions; never replaces evidence; candidates stay unpromoted
8
+ out: [questions, repo, architecture, external, experiments, resolved, unresolved, implications, evidence_ids]
9
+ next: PLAN
@@ -0,0 +1,6 @@
1
+ phase: PLAN
2
+ shape: [phases, milestones, tasks]
3
+ task: [id, milestone, objective, files_if_known, evidence, action, commands_or_TBD-EVIDENCE, verification, observable, dependencies]
4
+ plan_weights: {coverage: 15, grounding: 15, architecture: 15, completeness: 10, order: 10, verification: 15, risk: 10, repro: 5, git_safety: 5}
5
+ block_execute_if: [ambiguous_success, critical_assumption_open, imagined_paths, task_without_verification, destructive_without_safeguard, bad_order]
6
+ out: .rdapq/state/plan.md
@@ -0,0 +1,6 @@
1
+ phase: ARCHITECTURE
2
+ when: [interfaces, boundaries, persistence, security, concurrency, integration]
3
+ record: [components, responsibilities, interfaces, data_flow, persistence, compatibility, failures, security, runtime, rejected]
4
+ decision: [decision, evidence, alternatives, why, risks, verification]
5
+ rules: [fit_current_system, no_unrelated_refactor, promote_only_if_durable_and_verified]
6
+ out: decisions.md
@@ -0,0 +1,8 @@
1
+ phase: IMPLEMENT
2
+ loop: [observe, implement, verify, review]
3
+ observe: [affected_code, interfaces, versions, nearby_tests, memory_if_it_affects_the_edit]
4
+ implement: [smallest_change, no_driveby_refactor, preserve_behavior_unless_intended, no_secrets, no_speculative_abstraction]
5
+ verify: planned checks only; an unrun test is not a pass
6
+ review: [status, diff, whitespace, generated, debug, secrets, unrelated, todos]
7
+ close_when: [tasks_done, definition_of_done, verification, diff_reviewed, state_updated, gates]
8
+ vcs: commit only a coherent milestone
@@ -0,0 +1,6 @@
1
+ phase: VERIFY
2
+ use_real_stack_only: [unit, integration, e2e, build, lint, format, types, static_analysis, security, race, migration, perf, manual]
3
+ on_fail: [record, severity, cause, return_to_IMPLEMENT, rerun]
4
+ if_cannot_run: "NOT VERIFIED — ENVIRONMENTAL CONSTRAINT"
5
+ forbid: [invented_commands, averaging_a_failure_into_the_score]
6
+ each_result: evidence_id
@@ -0,0 +1,7 @@
1
+ phase: AUDIT
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]
5
+ report: [quality, confidence, coverage, gates, defects, unknowns, history, best_remaining, aqc]
6
+ complete_only_if: all_applicable_gates_pass
7
+ say: "Vibe Code Build complete."
@@ -0,0 +1,13 @@
1
+ phase: GIT
2
+ when: [worktree_requested, commit_requested, push_requested, audit_cleanup]
3
+ inspect_already_in: playbooks/00-bootstrap.md
4
+ never_without_explicit_authorization: ["git reset --hard", "git clean -fd", "git push --force"]
5
+ forbid: destroying_unrelated_work
6
+ worktree_when_requested:
7
+ - use the inspected default branch and remote; do not assume main
8
+ - "git checkout <default> && git pull --ff-only <remote> <default>"
9
+ - "git worktree add -b gb/<slug> ../gb-<slug>-wt"
10
+ commit_when_milestone: ["git diff --check", "git add -A", "git diff --cached", "git commit -m 'Milestone X.Y: <summary>'"]
11
+ empty_commits: false
12
+ push: "git push -u <remote> <branch>"
13
+ cleanup_after_merge: ["git worktree remove <path>", "git branch -d <branch>"]
@@ -0,0 +1,3 @@
1
+ scope: project
2
+ kind: architecture
3
+ records: []
@@ -0,0 +1,3 @@
1
+ scope: project
2
+ kind: decisions
3
+ records: []
@@ -0,0 +1,3 @@
1
+ scope: project
2
+ kind: lessons
3
+ records: []
@@ -0,0 +1,3 @@
1
+ scope: project
2
+ kind: project
3
+ records: []
@@ -0,0 +1,4 @@
1
+ role: task state, not durable memory
2
+ path: .rdapq/state
3
+ create: on first write
4
+ secrets: never
@@ -0,0 +1,3 @@
1
+ # classes: SKILL.md facts plus RESOLVED
2
+ records: [] # id, statement, status, materiality, evidence_ids, next
3
+ block: critical UNKNOWN before implementation; unresolved HIGH on architecture, interfaces, security, persistence, compatibility, or destructive work
@@ -0,0 +1,2 @@
1
+ # fields: playbooks/03-architecture.md decision
2
+ records: []
@@ -0,0 +1,3 @@
1
+ records: [] # id, type, claim, source, outcome
2
+ types: [OBSERVED, USER_SPECIFIED, VERIFIED_EXTERNAL, INFERRED, UNKNOWN, TEST, BUILD, STATIC_ANALYSIS, RUNTIME, VCS, CONSTRAINT]
3
+ forbid: [unrun_command_as_pass, secrets]
@@ -0,0 +1 @@
1
+ rounds: [] # from, to, reason, gates, unknowns, evidence, memory, quality, confidence, coverage, defects, dQ, effort, decision
@@ -0,0 +1,4 @@
1
+ # task shape: playbooks/02-planning.md
2
+ milestones: [] # id, phase, tasks
3
+ plan_score:
4
+ plan_gates:
@@ -0,0 +1,13 @@
1
+ questions: []
2
+ repo: []
3
+ architecture: []
4
+ external: []
5
+ experiments: []
6
+ resolved: []
7
+ unresolved: []
8
+ implications: []
9
+ memory_candidates: []
10
+ evidence_ids: []
11
+ readiness:
12
+ score:
13
+ gates:
@@ -0,0 +1,2 @@
1
+ records: [] # id, risk, probability, impact, evidence_ids, mitigation, status
2
+ forbid: invented_risks_to_fill_a_quota
@@ -0,0 +1,9 @@
1
+ goal:
2
+ non_goals: []
3
+ success: []
4
+ constraints: []
5
+ env: []
6
+ risk: "LOW|MODERATE|HIGH|CRITICAL"
7
+ target:
8
+ confidence:
9
+ coverage:
@@ -0,0 +1,15 @@
1
+ # weights and anchors: SKILL.md. gate names: core/gates.md
2
+ risk:
3
+ target:
4
+ quality:
5
+ confidence:
6
+ coverage:
7
+ gates:
8
+ critical:
9
+ high:
10
+ unknowns:
11
+ previous:
12
+ delta:
13
+ aqc:
14
+ rows: [] # dimension, score, evidence_ids, gap
15
+ improvements: [] # severity, dQ, risk, effort, confidence, decision
@@ -0,0 +1,31 @@
1
+ # fields already defined in SKILL.md and core/exit-logic.md
2
+ result:
3
+ risk:
4
+ target:
5
+ quality:
6
+ confidence:
7
+ coverage:
8
+ gates:
9
+ critical:
10
+ high:
11
+ unknowns:
12
+ aqc:
13
+ history: []
14
+ exit:
15
+ verification: []
16
+ memory:
17
+ loaded: []
18
+ added: []
19
+ superseded: []
20
+ invalidated: []
21
+ secrets: NO
22
+ residual: []
23
+ git:
24
+ branch:
25
+ commits:
26
+ pr:
27
+ default:
28
+ worktree:
29
+ status:
30
+ terminal: "COMPLETE|BLOCKED|STALLED|CONSTRAINT_LIMITED|FAILED_VERIFICATION"
31
+ say_if_complete: "Vibe Code Build complete."
@@ -0,0 +1,8 @@
1
+ id:
2
+ goal:
3
+ done: []
4
+ tasks: []
5
+ verification: []
6
+ state: [assumptions, evidence, risks, scorecard, iteration-log]
7
+ memory: [candidates_only, no_transient, no_secrets, revalidate_conflicts]
8
+ close: [tasks_done, definition_of_done, verification, diff_reviewed, gates, commit_if_coherent]
@@ -0,0 +1,12 @@
1
+ # shape: playbooks/02-planning.md task
2
+ id:
3
+ milestone:
4
+ objective:
5
+ files:
6
+ evidence: []
7
+ memory: []
8
+ action:
9
+ commands:
10
+ verification:
11
+ observable:
12
+ dependencies:
@@ -0,0 +1,86 @@
1
+ 'use strict';
2
+
3
+ const { spawnSync } = require('child_process');
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+
7
+ const ROOT = path.resolve(__dirname, '..');
8
+ const failures = [];
9
+
10
+ function read(rel) {
11
+ return fs.readFileSync(path.join(ROOT, rel), 'utf8');
12
+ }
13
+
14
+ function ban(rel, pattern, why) {
15
+ if (pattern.test(read(rel))) failures.push(`${rel}: ${why}`);
16
+ }
17
+
18
+ function need(rel, pattern, why) {
19
+ if (!pattern.test(read(rel))) failures.push(`${rel}: ${why}`);
20
+ }
21
+
22
+ ban('install.sh', /\brm\b/, 'wrapper must not delete user files');
23
+ ban('install.sh', /\|\|\s*true/, 'wrapper must not hide copy failures');
24
+ need('install.sh', /refusing a piped install/, 'wrapper must refuse curl | bash');
25
+ need('install.ps1', /refusing a piped install/, 'wrapper must refuse irm | iex');
26
+ ban('install.ps1', /Remove-Item/, 'wrapper must not delete user files');
27
+ ban('rdap-q-skill/install/install-unix.sh', /rm -rf "\$TARGET\/skills\/rdap-q"/, 'must not delete the live skill before the copy succeeds');
28
+ ban('rdap-q-skill/install/install-unix.sh', /\|\|\s*true/, 'must not hide copy failures');
29
+ need('rdap-q-skill/install/install-unix.sh', /SKILL\.md/, 'must verify the staged skill before swapping');
30
+ need('.gitignore', /^\.code-dr\/$/m, 'diagnostic artifacts must be ignored');
31
+
32
+ const pkg = JSON.parse(read('package.json'));
33
+ const bin = pkg.bin || {};
34
+ if (bin['rdapq-install'] && String(bin['rdapq-install']).includes('install.sh')) {
35
+ failures.push('package.json bin.rdapq-install must not point at the shell script');
36
+ }
37
+ if (bin.rdapq !== './bin/rdapq.js' || bin['rdap-q'] !== './bin/rdapq.js') {
38
+ failures.push('package.json bin entries must point at bin/rdapq.js');
39
+ }
40
+
41
+ for (const rel of ['bin/rdapq.js', 'lib/installer.js', 'scripts/check-versions.js', 'scripts/check-static.js', 'scripts/materialize-skill-links.js']) {
42
+ const checked = spawnSync(process.execPath, ['--check', path.join(ROOT, rel)], { encoding: 'utf8' });
43
+ if (checked.status !== 0) {
44
+ failures.push(`${rel}: node --check failed\n${checked.stderr}`);
45
+ }
46
+ }
47
+
48
+ const pluginPath = path.join(ROOT, '.agents/plugins/rdap-q/plugin.json');
49
+ const plugin = JSON.parse(fs.readFileSync(pluginPath, 'utf8'));
50
+ const base = path.dirname(pluginPath);
51
+ for (const rel of [...(plugin.rules || []), ...(plugin.skills || [])]) {
52
+ const resolved = path.resolve(base, rel);
53
+ if (!fs.existsSync(resolved)) {
54
+ failures.push(`.agents plugin path does not exist: ${rel} -> ${resolved}`);
55
+ }
56
+ }
57
+
58
+ need('rdap-q-skill/README.md', /SKILL\.md` is the instruction source/, 'README must point at SKILL.md and not act as a second protocol');
59
+
60
+ for (const rel of ['manifest.json', 'rdap-q-skill/manifest.json']) {
61
+ const manifest = JSON.parse(read(rel));
62
+ const bootstrap = (manifest.phase_load && manifest.phase_load.BOOTSTRAP) || [];
63
+ if (bootstrap.some((item) => String(item).includes('07-git-worktree'))) {
64
+ failures.push(`${rel}: BOOTSTRAP must not load the git mutation playbook`);
65
+ }
66
+ const events = manifest.event_load || {};
67
+ const listed = Object.values(events).flat().join('\n');
68
+ if (listed.includes('constitution.md')) {
69
+ failures.push(`${rel}: constitution.md must not be an event load`);
70
+ }
71
+ if (!Object.prototype.hasOwnProperty.call(events, 'git_mutation')) {
72
+ failures.push(`${rel}: git_mutation event must point at the worktree playbook`);
73
+ }
74
+ }
75
+ need('rdap-q-skill/SKILL.md', /BOOTSTRAP: \[playbooks\/00-bootstrap\.md\]/, 'SKILL bootstrap must load inspection only');
76
+ ban('rdap-q-skill/SKILL.md', /methodology_conflict/, 'SKILL must not load the constitution stub');
77
+ if (fs.existsSync(path.join(ROOT, 'rdap-q-skill/core/constitution.md'))) {
78
+ failures.push('rdap-q-skill/core/constitution.md must stay deleted');
79
+ }
80
+
81
+ if (failures.length) {
82
+ process.stderr.write(`${failures.join('\n')}\n`);
83
+ process.exit(1);
84
+ }
85
+
86
+ process.stdout.write('static checks ok\n');
@@ -0,0 +1,86 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * package.json is the only version source. Every manifest and the prose
5
+ * version stamps must match it. Banner text is rendered from package.json
6
+ * at runtime and must not hardcode a version.
7
+ */
8
+
9
+ const fs = require('fs');
10
+ const path = require('path');
11
+
12
+ const ROOT = path.resolve(__dirname, '..');
13
+ const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8'));
14
+ const version = pkg.version;
15
+ const semver = /(?<![\d.])\d+\.\d+\.\d+(?![\d.])/g;
16
+ const failures = [];
17
+
18
+ function read(rel) {
19
+ return fs.readFileSync(path.join(ROOT, rel), 'utf8');
20
+ }
21
+
22
+ function checkJson(rel, pick) {
23
+ const data = JSON.parse(read(rel));
24
+ const found = pick(data);
25
+ if (found !== version) {
26
+ failures.push(`${rel}: expected ${version}, found ${found}`);
27
+ }
28
+ }
29
+
30
+ function checkProse(rel) {
31
+ const text = read(rel);
32
+ const found = text.match(semver) || [];
33
+ if (!found.includes(version)) {
34
+ failures.push(`${rel}: does not mention ${version}`);
35
+ }
36
+ for (const hit of found) {
37
+ if (hit !== version) failures.push(`${rel}: stray version ${hit}`);
38
+ }
39
+ }
40
+
41
+ checkJson('agentskills.json', (j) => j.version);
42
+ checkJson('marketplace.json', (j) => j.version);
43
+ checkJson('manifest.json', (j) => j.version);
44
+ checkJson('rdap-q-skill/manifest.json', (j) => j.version);
45
+ checkJson('plugin.json', (j) => j.version);
46
+ checkJson('plugins/rdap-q/plugin.json', (j) => j.version);
47
+ checkJson('.agents/plugins/rdap-q/plugin.json', (j) => j.version);
48
+ checkJson('skills.json', (j) => j.skills[0].version);
49
+ checkJson('.grok/skill.json', (j) => j.version);
50
+ checkJson('.codex/skill.json', (j) => j.version);
51
+ checkJson('.claude-plugin/plugin.json', (j) => j.version);
52
+ checkJson('.claude-plugin/marketplace.json', (j) => j.plugins[0].version);
53
+ checkJson('.grok-plugin/marketplace.json', (j) => j.plugins[0].version);
54
+ checkJson('.claude-plugin/plugin-index.json', (j) => j.plugins['rdap-q'].version);
55
+ checkJson('.grok-plugin/plugin-index.json', (j) => j.plugins['rdap-q'].version);
56
+
57
+ for (const rel of [
58
+ 'README.md',
59
+ 'AGENTS.md',
60
+ 'CLAUDE.md',
61
+ 'GEMINI.md',
62
+ '.github/copilot-instructions.md',
63
+ 'rdap-q-skill/SKILL.md',
64
+ 'rdap-q-skill/README.md',
65
+ ]) {
66
+ checkProse(rel);
67
+ }
68
+
69
+ for (const rel of ['bin/rdapq.js', 'lib/installer.js', 'install.sh', 'install.ps1']) {
70
+ const text = read(rel);
71
+ const found = text.match(semver) || [];
72
+ for (const hit of found) {
73
+ failures.push(`${rel}: hardcoded version ${hit} (read package.json instead)`);
74
+ }
75
+ }
76
+
77
+ if (!String(pkg.engines && pkg.engines.node || '').includes('>=18')) {
78
+ failures.push('package.json engines.node must require >=18');
79
+ }
80
+
81
+ if (failures.length) {
82
+ process.stderr.write(`${failures.join('\n')}\n`);
83
+ process.exit(1);
84
+ }
85
+
86
+ process.stdout.write(`versions ok (${version})\n`);
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * npm does not pack symlink directories. Replace the marketplace skill
5
+ * mounts with real trees before `npm pack` / `npm publish`, then restore
6
+ * the symlinks afterwards. Re-entrant: a second materialize is a no-op
7
+ * while the state file exists (prepack can run twice).
8
+ */
9
+
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+ const { copyTreeSafe } = require('../lib/installer');
13
+
14
+ const ROOT = path.resolve(__dirname, '..');
15
+ const STATE = path.join(ROOT, '.rdapq-pack-state.json');
16
+ const LINKS = [
17
+ '.agents/skills/rdap-q',
18
+ 'plugins/rdap-q/skills/rdap-q',
19
+ ];
20
+
21
+ function assertInsideRepo(resolved) {
22
+ const rel = path.relative(ROOT, resolved);
23
+ if (rel.startsWith('..') || path.isAbsolute(rel)) {
24
+ throw new Error(`refusing to materialize a link outside the repo: ${resolved}`);
25
+ }
26
+ }
27
+
28
+ function materialize() {
29
+ if (fs.existsSync(STATE)) return;
30
+ const state = [];
31
+ fs.writeFileSync(STATE, '[]\n');
32
+ try {
33
+ for (const rel of LINKS) {
34
+ const abs = path.join(ROOT, rel);
35
+ const st = fs.lstatSync(abs);
36
+ if (!st.isSymbolicLink()) {
37
+ throw new Error(`${rel} is not a symlink; refusing to pack an unexpected tree`);
38
+ }
39
+ const target = fs.readlinkSync(abs);
40
+ const resolved = path.resolve(path.dirname(abs), target);
41
+ assertInsideRepo(resolved);
42
+ if (!fs.existsSync(path.join(resolved, 'SKILL.md'))) {
43
+ throw new Error(`symlink ${rel} does not point at a skill tree`);
44
+ }
45
+ fs.unlinkSync(abs);
46
+ copyTreeSafe(resolved, abs, resolved);
47
+ state.push({ rel, target });
48
+ fs.writeFileSync(STATE, `${JSON.stringify(state, null, 2)}\n`);
49
+ }
50
+ } catch (err) {
51
+ restore();
52
+ throw err;
53
+ }
54
+ }
55
+
56
+ function restore() {
57
+ if (!fs.existsSync(STATE)) return;
58
+ const state = JSON.parse(fs.readFileSync(STATE, 'utf8'));
59
+ for (const entry of state) {
60
+ const abs = path.join(ROOT, entry.rel);
61
+ fs.rmSync(abs, { recursive: true, force: true });
62
+ fs.mkdirSync(path.dirname(abs), { recursive: true });
63
+ fs.symlinkSync(entry.target, abs);
64
+ }
65
+ fs.unlinkSync(STATE);
66
+ }
67
+
68
+ if (require.main === module) {
69
+ const cmd = process.argv[2];
70
+ try {
71
+ if (cmd === 'materialize') materialize();
72
+ else if (cmd === 'restore') restore();
73
+ else {
74
+ process.stderr.write('usage: node scripts/materialize-skill-links.js materialize|restore\n');
75
+ process.exit(1);
76
+ }
77
+ } catch (err) {
78
+ process.stderr.write(`error: ${err.message}\n`);
79
+ process.exit(1);
80
+ }
81
+ }
82
+
83
+ module.exports = { LINKS, STATE, materialize, restore };
package/skills.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/agent-skills/spec/main/skills.schema.json",
3
+ "skills": [
4
+ {
5
+ "name": "rdap-q",
6
+ "version": "1.2.1",
7
+ "title": "RDAP-Q: Research-Driven Adaptive Planning with Quality Gates",
8
+ "description": "Vendor-neutral engineering protocol for evidence-first software development, persistent state, calibrated 0-10 scoring, and diminishing-return exit gates.",
9
+ "entrypoint": "rdap-q-skill/SKILL.md",
10
+ "invocation": "/rdapq",
11
+ "repository": "https://github.com/coldcanuk/rdapq",
12
+ "license": "GPL-3.0-or-later"
13
+ }
14
+ ]
15
+ }