@ccoalm/ccl-skills 0.16.0 → 0.18.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.
Files changed (43) hide show
  1. package/dist/assets/marketplace/plugins/ccl-skills/agent-context/session-start.md +8 -7
  2. package/dist/assets/marketplace/plugins/ccl-skills/hooks/hooks.json +22 -0
  3. package/dist/assets/marketplace/plugins/ccl-skills/hooks/remind-review-covers-head.sh +128 -0
  4. package/dist/assets/marketplace/plugins/ccl-skills/hooks/remind-untracked-background.sh +53 -0
  5. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_remind_review_covers_head.sh +104 -0
  6. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_remind_untracked_background.sh +75 -0
  7. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/ccl-skills.ts +8 -0
  8. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/SKILL.md +6 -4
  9. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/development-completion.md +13 -1
  10. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/staged-review-contract.md +78 -126
  11. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/wording-only-review.md +136 -0
  12. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/review_gate.py +521 -32
  13. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_client_compat.py +25 -2
  14. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_client_order.sh +30 -15
  15. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_gate.sh +439 -19
  16. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_update_review_plan_intent.sh +14 -7
  17. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/SKILL.md +1 -1
  18. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/SKILL.md +1 -1
  19. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/SKILL.md +6 -6
  20. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/attention-budget-ratchet.md +1 -0
  21. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/dual-track-review-gate.md +48 -119
  22. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-quickstart.md +9 -9
  23. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/firing-point-placement.md +22 -0
  24. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-register.md +18 -0
  25. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/validation-and-landing.md +2 -2
  26. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check_review_evidence_present.py +122 -0
  27. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/contract-anchors.tsv +4 -1
  28. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/extraction_review_gate.sh +37 -8
  29. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/register-firing-path-resolution.rb +102 -20
  30. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_ai_coding_implementation_gates.sh +16 -27
  31. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_regressions.sh +3 -5
  32. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_review_evidence_present.sh +81 -0
  33. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_extraction_review_gate.sh +137 -279
  34. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_register_firing_path_resolution.sh +41 -1
  35. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_register_firing_path_wiring.sh +49 -3
  36. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/SKILL.md +3 -2
  37. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/closeout-reread.md +40 -0
  38. package/dist/assets/release.json +72 -52
  39. package/package.json +1 -1
  40. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/review_ledger_binding.py +0 -1242
  41. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_review_ledger_binding.sh +0 -978
  42. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_extraction_review_state.sh +0 -1477
  43. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/validate_extraction_review_state.py +0 -1183
@@ -736,7 +736,8 @@ DUAL_TRACK_REF="$REPO_ROOT/skills/skill-extraction-workflow/references/dual-trac
736
736
  LEDGER_REF="$REPO_ROOT/skills/skill-extraction-workflow/references/source-register.md"
737
737
  WALK_REF="$REPO_ROOT/skills/testing-strategy/references/run-killing-mutation-walk.md"
738
738
  DT_SELF_AUDIT_SECTION='### The self-adversary enumeration — method detail (relocated from `SKILL.md`)'
739
- DT_AUTHORITY_SECTION='### Findings, autonomous budget, and human authority'
739
+ DT_AUTHORITY_SECTION='### Findings and dispositions'
740
+ DT_LANE_SECTION='### The extraction review lane: one review, one challenge'
740
741
  TS_CORE_RULES_SECTION='## Core Rules'
741
742
  WALK_PROBE_SECTION='## Encoded Probe For Destructive Artifacts'
742
743
  LEDGER_RULE_PARAGRAPH='Round-consolidation rule (append-once)'
@@ -749,8 +750,8 @@ assert_in_section "$DUAL_TRACK_REF" "$DT_SELF_AUDIT_SECTION" '**Re-owe after fix
749
750
  "process controls (re-owe rule anchored in the self-audit section)"
750
751
  assert_in_section "$DUAL_TRACK_REF" "$DT_AUTHORITY_SECTION" 'A convergence or closure declaration must be written falsifiably.' \
751
752
  "process controls (falsifiable closure declaration anchored in the authority section)"
752
- assert_in_section "$DUAL_TRACK_REF" "$DT_AUTHORITY_SECTION" '`continuation_authorization`' \
753
- "process controls (continuation authorization anchored in the authority section)"
753
+ assert_in_section "$DUAL_TRACK_REF" "$DT_LANE_SECTION" '**Task authority.**' \
754
+ "process controls (task authority anchored in the extraction review lane)"
754
755
  # Remediation re-owes the pre-cover axes; third same-class round escalates to one full-matrix self-enumeration.
755
756
  assert_same_line "$DUAL_TRACK_REF" 'remediation text written mid-round re-owes the draft-time axes BEFORE the candidate goes back to the reviewer' \
756
757
  '**Re-owe after fixes.**' \
@@ -768,7 +769,7 @@ assert_same_line "$DUAL_TRACK_REF" 'states × failure points × orderings × res
768
769
  '**Re-owe after fixes.**' \
769
770
  "process controls (full-matrix axes named)"
770
771
  # Convergence/closure declarations are falsifiable: named candidate/evidence/axes/open items, scoped adjectives.
771
- assert_same_line "$DUAL_TRACK_REF" 'Name the exact candidate identity it covers' \
772
+ assert_same_line "$DUAL_TRACK_REF" 'Name the commit it covers' \
772
773
  'must be written falsifiably' \
773
774
  "process controls (declaration names the candidate identity)"
774
775
  assert_same_line "$DUAL_TRACK_REF" "each lane's terminal evidence, the axes/dimensions the closing self-audit actually crossed, and every standing open item by name" \
@@ -780,29 +781,17 @@ assert_same_line "$DUAL_TRACK_REF" 'cannot be checked false and is inconclusive'
780
781
  assert_same_line "$DUAL_TRACK_REF" 'any "full X" adjective is scoped to the named axes, never wider' \
781
782
  'must be written falsifiably' \
782
783
  "process controls (full-adjective scoped to named axes)"
783
- # Default continuation retains original authority and accumulated evidence.
784
- assert_same_line "$DUAL_TRACK_REF" 'necessary in-scope fixes, tests and review are already authorized by default' \
785
- '`continuation_authorization`' "process controls (necessary review inherits task authority)"
786
- assert_same_line "$DUAL_TRACK_REF" 'continuation_basis=existing-task-scope' \
787
- '`continuation_authorization`' "process controls (inherited continuation has an explicit basis)"
788
- assert_same_line "$DUAL_TRACK_REF" 'the original authorization reference and scope' \
789
- '`continuation_authorization`' "process controls (original authority remains traceable)"
790
- assert_same_line "$DUAL_TRACK_REF" 'changed method or added evidence, cumulative rounds' \
791
- '`continuation_authorization`' "process controls (checkpoint requires method and spending evidence)"
792
- assert_same_line "$DUAL_TRACK_REF" "links between the old sequence's terminal evidence and the new sequence" \
793
- '`continuation_authorization`' "process controls (successive sequences retain their links)"
794
- assert_same_line "$DUAL_TRACK_REF" 'fresh current-candidate bindings and preserves every prior receipt, focus, finding and disposition' \
795
- '`continuation_authorization`' "process controls (fresh binding does not discard history)"
796
- assert_same_line "$DUAL_TRACK_REF" 'The existing per-sequence format, timeout and validation bounds remain unchanged' \
797
- '`continuation_authorization`' "process controls (bounded invocation format remains enforced)"
798
- assert_same_line "$DUAL_TRACK_REF" 'never relabel these calls as newly human-requested or erase earlier spending' \
799
- '`continuation_authorization`' "process controls (no fabricated human request or count reset)"
800
- assert_same_line "$DUAL_TRACK_REF" 'Ask only for scope or authority the original task lacks, an explicit user limit' \
801
- '`continuation_authorization`' "process controls (real missing authority and user limits remain blocking)"
802
- assert_same_line "$DUAL_TRACK_REF" 'Continuation waives no review, test or evidence obligation and grants no merge, publication or risk-acceptance authority' \
803
- '`continuation_authorization`' "process controls (continuation is not a waiver or landing authority)"
804
- assert_same_line "$DUAL_TRACK_REF" 'Never infer a lane waiver from silence or from authorization to continue' \
805
- '`continuation_authorization`' "process controls (no inferred lane waiver)"
784
+ # Task authority: necessary passes are inherited, never relabelled, never a waiver or merge grant.
785
+ assert_same_line "$DUAL_TRACK_REF" 'necessary in-scope fixes, tests and review passes by default' \
786
+ '**Task authority.**' "process controls (necessary review inherits task authority)"
787
+ assert_same_line "$DUAL_TRACK_REF" 'never relabels an Agent-run pass as newly human-requested' \
788
+ '**Task authority.**' "process controls (no fabricated human request)"
789
+ assert_same_line "$DUAL_TRACK_REF" 'never infers a lane waiver from silence or from authorization to continue' \
790
+ '**Task authority.**' "process controls (no inferred lane waiver)"
791
+ assert_same_line "$DUAL_TRACK_REF" 'Ask only for scope or authority the original task lacks, or when an explicit user limit' \
792
+ '**Task authority.**' "process controls (real missing authority and user limits remain blocking)"
793
+ assert_same_line "$DUAL_TRACK_REF" 'waives no review, test or evidence obligation and grants no merge, publication or risk-acceptance authority' \
794
+ '**Task authority.**' "process controls (passes are not a waiver or landing authority)"
806
795
  assert_contains "$PRODUCT_SKILL" 'Necessary fixes, tests and review inherit task authorization' \
807
796
  "process controls (implementation entry reaches inherited authority)"
808
797
  assert_contains "$PRE_FINAL_REF" 'continuation_basis=existing-task-scope' \
@@ -18,7 +18,7 @@
18
18
  # - test_generic_r0_leak_scan.sh
19
19
  # - test_shared_git_surface_gate.sh
20
20
  # - test_extraction_review_gate.sh
21
- # - test_validate_extraction_review_state.sh
21
+ # - test_check_review_evidence_present.sh
22
22
  # - test_check_ccl_route_drift.sh
23
23
  # - test_check_sync_pointers.sh
24
24
  # - test_check_ccl_register_pending_exclusion.sh
@@ -122,10 +122,8 @@ fast_tests=(
122
122
  test_generic_r0_leak_scan.sh
123
123
  test_shared_git_surface_gate.sh
124
124
  test_extraction_review_gate.sh
125
- test_validate_extraction_review_state.sh
126
- # Merge-side binding between the landing candidate and the review evidence that
127
- # inspected it: own throwaway git repo, no clone, seconds.
128
- test_review_ledger_binding.sh
125
+ # Review-evidence presence gate: own throwaway git repo, seconds.
126
+ test_check_review_evidence_present.sh
129
127
  # Candidate-SHA-bound gate receipts (mint/verify): own throwaway git repo,
130
128
  # no clone, seconds — belongs in the lane every run exercises.
131
129
  test_gate_receipt.sh
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env bash
2
+ # Regression for check_review_evidence_present.py: a pull request that changes
3
+ # skills/ or hooks/ must carry at least one conclusive review result; everything
4
+ # else passes untouched. Own throwaway git repo.
5
+ set -euo pipefail
6
+
7
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
8
+ GATE="$SCRIPT_DIR/check_review_evidence_present.py"
9
+ TMP="$(mktemp -d "${TMPDIR:-/tmp}/review-evidence.XXXXXX")"
10
+ trap 'rm -rf "$TMP"' EXIT
11
+
12
+ pass=0
13
+ fail() { echo "FAIL: $*" >&2; exit 1; }
14
+ ok() { pass=$((pass + 1)); echo "ok - $1"; }
15
+
16
+ REPO="$TMP/repo"
17
+ git init -q "$REPO"
18
+ git -C "$REPO" config user.email test@example.invalid
19
+ git -C "$REPO" config user.name "Test User"
20
+ mkdir -p "$REPO/skills/demo" "$REPO/docs"
21
+ printf -- '---\nname: demo\ndescription: demo skill\n---\n\n# demo\n\nKeep the rule, always.\n' > "$REPO/skills/demo/SKILL.md"
22
+ echo "# doc" > "$REPO/docs/a.md"
23
+ git -C "$REPO" add -A && git -C "$REPO" commit -qm base
24
+ BASE="$(git -C "$REPO" rev-parse HEAD)"
25
+
26
+ result() { # result <path> <mode> <status>
27
+ mkdir -p "$(dirname "$REPO/$1")"
28
+ printf '{"schema_version":3,"mode":"%s","status":"%s","selected_client":"codex"}\n' \
29
+ "$2" "$3" > "$REPO/$1"
30
+ }
31
+
32
+ # case <label> <expected rc> <expected token> <setup...>: reset to base, apply setup, commit, run.
33
+ run_case() {
34
+ local label="$1" want_rc="$2" want="$3"; shift 3
35
+ git -C "$REPO" checkout -q --detach "$BASE"
36
+ git -C "$REPO" clean -qfdx
37
+ "$@"
38
+ git -C "$REPO" add -A
39
+ git -C "$REPO" commit -qm case --allow-empty
40
+ set +e
41
+ out="$(python3 "$GATE" --repo-root "$REPO" --base "$BASE" 2>&1)"
42
+ rc=$?
43
+ set -e
44
+ [ "$rc" = "$want_rc" ] || fail "$label: expected rc=$want_rc got rc=$rc: $out"
45
+ case "$out" in *"$want"*) : ;; *) fail "$label: expected '$want': $out" ;; esac
46
+ ok "$label"
47
+ }
48
+
49
+ docs_only() { echo "more" >> "$REPO/docs/a.md"; }
50
+ skill_change() { echo "rule" >> "$REPO/skills/demo/SKILL.md"; }
51
+ hook_change() { mkdir -p "$REPO/hooks"; echo "#!/bin/sh" > "$REPO/hooks/h.sh"; }
52
+ both_passes() { result specs/r1/evidence/round1-review.json review findings; result specs/r1/evidence/round2-challenge.json challenge passed; }
53
+
54
+ run_case "no skills or hooks change needs nothing" 0 review_evidence_not_required docs_only
55
+ run_case "skill change with no evidence is refused" 1 "no conclusive review result" skill_change
56
+ run_case "hook change with no evidence is refused" 1 review_evidence_missing hook_change
57
+ run_case "review plus challenge passes" 0 "review_evidence_present_ok: 1 review, 1 challenge" \
58
+ bash -c "$(declare -f result skill_change both_passes); REPO='$REPO'; skill_change; both_passes"
59
+ run_case "a file replaced by a symlink still needs evidence" 1 review_evidence_missing \
60
+ bash -c "rm '$REPO/skills/demo/SKILL.md'; ln -s ../../docs/a.md '$REPO/skills/demo/SKILL.md'"
61
+ run_case "a review alone is enough for the gate" 0 "review_evidence_present_ok: 1 review, 0 challenge" \
62
+ bash -c "$(declare -f result skill_change); REPO='$REPO'; skill_change; result specs/r1/evidence/round1-review.json review passed"
63
+ run_case "a challenge alone does not satisfy the gate" 1 review_evidence_missing \
64
+ bash -c "$(declare -f result skill_change); REPO='$REPO'; skill_change; result specs/r1/evidence/round2-challenge.json challenge passed"
65
+ run_case "an inconclusive result does not count" 1 review_evidence_missing \
66
+ bash -c "$(declare -f result skill_change); REPO='$REPO'; skill_change; result specs/r1/evidence/round1-review.json review inconclusive"
67
+ run_case "a result outside an evidence directory does not count" 1 review_evidence_missing \
68
+ bash -c "$(declare -f result skill_change); REPO='$REPO'; skill_change; result specs/r1/round1-review.json review passed; result specs/r1/round2-challenge.json challenge passed"
69
+ run_case "malformed JSON does not count" 1 review_evidence_missing \
70
+ bash -c "mkdir -p '$REPO/specs/r1/evidence'; echo 'not json' > '$REPO/specs/r1/evidence/round1-review.json'; echo rule >> '$REPO/skills/demo/SKILL.md'"
71
+
72
+ set +e
73
+ out="$(python3 "$GATE" --repo-root "$REPO" --base does-not-exist 2>&1)"
74
+ rc=$?
75
+ set -e
76
+ [ "$rc" = 2 ] || fail "an unresolvable base must be unevaluated (rc=2), got rc=$rc"
77
+ case "$out" in *review_evidence_unevaluated*) : ;; *) fail "unresolvable base reason: $out" ;; esac
78
+ ok "an unresolvable base is unevaluated, never a pass"
79
+
80
+ [ "$pass" = 11 ] || fail "expected 11 assertions, saw $pass"
81
+ echo "test_check_review_evidence_present_ok ($pass assertions)"