fix(ci): resolve 7 CI failures from cc6750c4

## doc-release-gate (link validation)
- tests/docs/validate-links.sh: fix canonical-path assignment bug where
  inline `|| fallback` never fires if the outer $() assignment itself
  does not fail. Rewrite as explicit if-else so mkdocs-generated paths
  (docs/skills/*.md, docs/cli/*.md) resolve correctly in CI environments
  where those directories don't exist on disk.

## skill-lint + skill-integrity + go-build (TestSkillContract_ReferencesLinkedInSKILLMD)
- Add strict-delegation-contract.md link to skills/shared/SKILL.md and
  skills-codex/shared/SKILL.md Reference Documents sections (heal.sh
  --strict requires every references/*.md to be linked in its SKILL.md).
- Extend tests/skills/lint-skills.sh regex to support ../shared/references/
  paths in addition to skills/<name>/references/ — matches heal.sh behavior.

## markdownlint
- Disable MD030 (list-marker-space) in .markdownlint.json. Material theme
  grid-cards syntax uses 3 spaces after `-` which is standard for multi-line
  items; markdownlint default of 1 space conflicts. 61 violations → 0.

## contract-compatibility-gate + smoke-test (next-work parity)
- .agents/rpi/next-work.jsonl: fix invalid enum values for the
  2026-04-19-rpi-dag-hardening entry. Type "enhancement" → "process-improvement",
  source values normalized to valid enum (council-finding, retro-learning,
  backlog-processing).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Boden Fuller
2026-04-19 11:01:52 -04:00
parent cc6750c4e8
commit 2385dbd4fb
6 changed files with 21 additions and 4 deletions
+1 -1
View File
@@ -54,4 +54,4 @@
{"source_epic":"na-22xi","timestamp":"2026-04-15T03:30:54Z","items":[{"id":"na-jox1","title":"Investigate Dream Council Claude timeout behavior","type":"bug","severity":"high","source":"council-finding","description":"Deep Dream validation still shows the local Claude council lane timing out after the current 90s runner cap. Investigate timeout policy, parallel council execution, or prompt/schema simplification so council can become a reliable default value add instead of an opt-in cost sink.","evidence":"Open bead na-jox1 plus the long-haul post-mortem found that recommended L3 council proof is still incomplete even though the rest of the long-haul path is working.","target_repo":"nami","morning_command":"ao rpi phased \"Investigate Dream Council Claude timeout behavior\"","consumed":true,"claim_status":"consumed","consumed_by":"0b03ce39","consumed_at":"2026-04-15T18:55:47Z"},{"id":"na-22xi.4","title":"Persist Dream long-haul discovery evidence for closure audits","type":"bug","severity":"medium","source":"council-finding","description":"Closure-integrity replay for epic na-22xi fails because closed children na-22xi.1 and na-22xi.2 cite missing `.agents/brainstorm/...` and `.agents/research/...` seed artifacts. Persist a durable discovery artifact or update closure policy so closed beads only cite proof surfaces that later audits can replay.","evidence":"`bash skills/post-mortem/scripts/closure-integrity-audit.sh --scope auto na-22xi` returned two timing_miss failures during the 2026-04-14 post-mortem.","target_repo":"nami","morning_command":"ao rpi phased \"Persist Dream long-haul discovery evidence for closure audits\"","consumed":true,"claim_status":"consumed","consumed_by":"3af1c409","consumed_at":"2026-04-15T18:55:47Z"}],"consumed":true,"claim_status":"consumed","consumed_by":"swarm-2026-04-15-crank","consumed_at":"2026-04-15T18:55:47Z"}
{"source_epic":"swarm-2026-04-15-8-issue","timestamp":"2026-04-15T14:05:00-04:00","items":[{"title":"Fix pre-existing codex runtime-section lint violations","type":"bug","severity":"high","source":"retro-learning","description":"skills-codex/compile/SKILL.md:35,37,40 and skills-codex/quickstart/SKILL.md:50 contain residual mixed-runtime markers (claude-cli, Claude Code auth, Anthropic HTTP API, `claude` binary) that the codex runtime-section lint rejects. Introduced by commit fa6f4048 (predates 2026-04-15 swarm). Rewrite using the substitution vocabulary in .agents/learnings/2026-04-15-codex-mirror-runtime-string-lint.md. Unblocks pre-push gate.","evidence":"scripts/pre-push-gate.sh --fast on HEAD=308c413d reports 4 violations + skill runtime formats FAIL (same root cause)","target_repo":"nami","proof_ref":{"kind":"gate_log","path":"/tmp/gate-run.log"},"consumed":true,"claim_status":"consumed","consumed_by":"swarm-2026-04-15-rpi-cycles","consumed_at":"2026-04-15T18:24:48Z"},{"title":"Add flag-collision preflight + codex-audit + sync-script runs to swarm worker prompt templates","type":"improvement","severity":"medium","source":"retro-learning","description":"Bake three checks into the swarm skill's worker-prompt template so they are enforced per-worker, not per-lead: (1) before adding a cobra flag, grep the target file and parent command for the proposed name; (2) after touching skills-codex/\u003cname\u003e/, run scripts/audit-codex-parity.sh --skill \u003cname\u003e; (3) when the manifest matches cli/cmd/ao/*.go (new flag) or skills-codex/, run the corresponding sync script (generate-cli-reference.sh or regen-codex-hashes.sh) and assert clean git diff. See .agents/learnings/2026-04-15-swarm-flag-collision-preflight.md and 2026-04-15-post-wave-sync-scripts-are-in-scope.md.","target_repo":"nami","consumed":true,"claim_status":"consumed","consumed_by":"swarm-2026-04-15-rpi-cycles","consumed_at":"2026-04-15T18:24:48Z"},{"title":"Add pre-wave gate snapshot helper to swarm lead protocol","type":"improvement","severity":"low","source":"retro-learning","description":"Swarm leads currently re-derive pre-existing vs swarm-introduced gate failures with ad-hoc git blame. Add a one-liner to the swarm skill's execution contract: capture FAIL set before wave spawn, diff after cleanup. See .agents/learnings/2026-04-15-pre-wave-gate-snapshot.md for proposed shell recipe.","target_repo":"nami","consumed":true,"claim_status":"consumed","consumed_by":"2c1d961b","consumed_at":"2026-04-15T18:31:45Z"}],"consumed":true,"claim_status":"consumed","consumed_by":"swarm-2026-04-15-rpi-cycles","consumed_at":"2026-04-15T18:31:45Z"}
{"source_epic":"dream-findings-router","timestamp":"2026-04-19T06:27:31Z","items":[{"id":"f-2026-04-14-001","title":"Production command refactors can miss the paired test diff expected by the command/test-pairing gate.","type":"tech-debt","severity":"medium","source":"council-finding","description":"Production command refactors can miss the paired test diff expected by the command/test-pairing gate.","target_repo":"20260419T062730Z-iter-1","source_path":".agents/findings/f-2026-04-14-001.md"},{"id":"f-2026-04-14-002","title":"Closed beads can cite ephemeral discovery seed paths that are absent from the repo, breaking closure-integrity replay and plan comparison.","type":"tech-debt","severity":"medium","source":"council-finding","description":"Closed beads can cite ephemeral discovery seed paths that are absent from the repo, breaking closure-integrity replay and plan comparison.","target_repo":"20260419T062730Z-iter-1","source_path":".agents/findings/f-2026-04-14-002.md"}],"consumed":false,"claim_status":"available","consumed_by":null,"consumed_at":null}
{"source_epic":"2026-04-19-rpi-dag-hardening","timestamp":"2026-04-19T10:45:00-04:00","items":[{"title":"Sweep skills-codex/ DAG bodies for Skill() to $skill notation","type":"tech-debt","severity":"low","source":"vibe finding 2026-04-19","description":"Codex DAG steps still use Claude Skill() notation in some orchestrators; codex-skill-api expects $skill.","target_repo":"agentops"},{"title":"Decompose skills/crank/SKILL.md to under 248-line limit","type":"tech-debt","severity":"medium","source":"skill-lint pre-existing violation","description":"Move step detail to references/ files.","target_repo":"agentops"},{"title":"Rename --fast-path to --quick-gates across /rpi","type":"task","severity":"low","source":"research-audit P2","description":"Name misleading; implies skip-phases but is actually fast-quality gates.","target_repo":"agentops"},{"title":"Plan template: default-include skills-codex mirrors","type":"enhancement","severity":"low","source":"post-mortem Learning 1","description":"When skills-codex/<name>/SKILL.md exists, plan template should default-include it in Files to Modify.","target_repo":"agentops"},{"title":"Runtime hook for RPI phase enforcement","type":"feature","severity":"low","source":"forged compression learning","description":"If learning+text don't prevent compression, add hooks/rpi-phase-enforcement.sh that inspects skill invocation trace.","target_repo":"agentops"}],"consumed":false,"claim_status":"available","claimed_by":null,"claimed_at":null,"consumed_by":null,"consumed_at":null}
{"source_epic":"2026-04-19-rpi-dag-hardening","timestamp":"2026-04-19T10:45:00-04:00","items":[{"title":"Sweep skills-codex/ DAG bodies for Skill() to $skill notation","type":"tech-debt","severity":"low","source":"council-finding","description":"Codex DAG steps still use Claude Skill() notation in some orchestrators; codex-skill-api expects $skill. Flagged by vibe judge 2026-04-19.","target_repo":"agentops"},{"title":"Decompose skills/crank/SKILL.md to under 248-line limit","type":"tech-debt","severity":"medium","source":"backlog-processing","description":"Pre-existing skill-lint violation touched during 2026-04-19 work; move step detail to references/ files.","target_repo":"agentops"},{"title":"Rename --fast-path to --quick-gates across /rpi","type":"improvement","severity":"low","source":"council-finding","description":"Research-audit P2 finding: name misleading; implies skip-phases but is actually fast-quality gates. Needs user confirmation before rename.","target_repo":"agentops"},{"title":"Plan template: default-include skills-codex mirrors","type":"process-improvement","severity":"low","source":"retro-learning","description":"When skills-codex/<name>/SKILL.md exists, plan template should default-include it in Files to Modify. Prevents parity drift.","target_repo":"agentops"},{"title":"Runtime hook for RPI phase enforcement","type":"feature","severity":"low","source":"retro-learning","description":"If the forged compression learning + loud skill text don't prevent compression, add hooks/rpi-phase-enforcement.sh that inspects skill invocation trace. Measure first.","target_repo":"agentops"}],"consumed":false,"claim_status":"available","claimed_by":null,"claimed_at":null,"consumed_by":null,"consumed_at":null}
+1
View File
@@ -12,6 +12,7 @@
"MD026": false,
"MD028": false,
"MD029": false,
"MD030": false,
"MD031": false,
"MD032": false,
"MD033": false,
+1
View File
@@ -137,6 +137,7 @@ Skills that chain to other skills (e.g., `$rpi` calls `$research`, `$vibe` calls
- [references/cli-command-failures-2026-02-26.md](references/cli-command-failures-2026-02-26.md)
- [references/ralph-loop-contract.md](references/ralph-loop-contract.md)
- [references/orchestration-as-prompt.md](references/orchestration-as-prompt.md)
- [references/strict-delegation-contract.md](references/strict-delegation-contract.md) — canonical contract loaded by $rpi, $discovery, $validation: strict sub-skill delegation is the default for top-level orchestrators.
## Local Resources
+1
View File
@@ -181,3 +181,4 @@ Skills that chain to other skills (e.g., `/rpi` calls `/research`, `/vibe` calls
- [references/ralph-loop-contract.md](references/ralph-loop-contract.md)
- [references/orchestration-as-prompt.md](references/orchestration-as-prompt.md)
- [references/stale-scope-validation.md](references/stale-scope-validation.md) — planning rule loaded by plan + pre-mortem: re-validate inherited scope against HEAD before acting on deferred beads or handoff docs.
- [references/strict-delegation-contract.md](references/strict-delegation-contract.md) — canonical contract loaded by /rpi, /discovery, /validation: strict sub-skill delegation is the default for top-level orchestrators.
+10 -1
View File
@@ -90,7 +90,16 @@ for file in "${md_files[@]}"; do
if [[ ! -e "$resolved" ]]; then
# Normalize the resolved path so generated-path lookups line up.
canonical="$(cd "$(dirname "$resolved")" 2>/dev/null && pwd)/$(basename "$resolved")" || canonical="$resolved"
# The mkdocs-generated paths have no on-disk parent dir in CI (docs/skills/
# and docs/cli/ exist only via gen-files plugin). Fall back to the raw
# resolved path when the parent dir does not exist — do NOT use inline
# short-circuit `|| canonical=...` because that never fires when the
# outer assignment itself does not fail.
if resolved_parent="$(cd "$(dirname "$resolved")" 2>/dev/null && pwd)"; then
canonical="$resolved_parent/$(basename "$resolved")"
else
canonical="$resolved"
fi
if [[ -n "${generated_paths[$canonical]+x}" ]]; then
generated=$((generated + 1))
continue
+7 -2
View File
@@ -161,14 +161,19 @@ for skill_dir in "$SKILLS_DIR"/*/; do
# --- (f) Referenced files must exist ---
# Match patterns like references/foo.md, references/bar-baz.md
# Also handles cross-skill references like skills/shared/references/foo.md
ref_paths=$(grep -oE '(skills/[a-z-]+/)?references/[A-Za-z0-9_.-]+(\.[a-z]+)?' "$skill_md" 2>/dev/null || true)
# Also handles cross-skill references:
# - skills/shared/references/foo.md (repo-absolute)
# - ../shared/references/foo.md (relative to skill dir)
ref_paths=$(grep -oE '(\.\./shared/|skills/[a-z-]+/)?references/[A-Za-z0-9_.-]+(\.[a-z]+)?' "$skill_md" 2>/dev/null || true)
if [ -n "$ref_paths" ]; then
while IFS= read -r ref; do
[ -z "$ref" ] && continue
if [[ "$ref" == skills/* ]]; then
# Cross-skill reference — resolve from repo root
check_path="$REPO_ROOT/$ref"
elif [[ "$ref" == ../shared/* ]]; then
# Relative shared reference — resolve via skill dir parent
check_path="$skill_dir/$ref"
else
# Local reference — resolve from skill directory
check_path="$skill_dir/$ref"