Skip to content

feat(workflows): razor-cadence trigger -- daily mechanization of razor-discipline (B-0192)#1579

Merged
AceHack merged 3 commits intomainfrom
feature/razor-cadence-workflow-stub-b-0192-aaron-2026-05-05
May 5, 2026
Merged

feat(workflows): razor-cadence trigger -- daily mechanization of razor-discipline (B-0192)#1579
AceHack merged 3 commits intomainfrom
feature/razor-cadence-workflow-stub-b-0192-aaron-2026-05-05

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 5, 2026

Summary

Operationalizes B-0192 (PR #1573 -- merged earlier this tick). Daily-firing GitHub Actions workflow that opens or updates a razor-cadence-labeled tracking issue. The trigger fires whether or not any AI is running; Otto picks up the artifact on next wake.

Carved sentence (from B-0192)

"Encoding rules without mechanizing them produces a memory of failures, not prevention. GitHub Actions on schedule fires whether or not any AI exists; Otto picks up the artifact on next wake. The trigger ages and stays visible; the discipline does not."

Acceptance criteria mapping

# Criterion Status
1 Razor-cadence workflow at .github/workflows/razor-cadence.yml
2 First fire produces visible artifact (tracking issue, razor-cadence label) ✓ (workflow opens issue on first fire)
3 Documentation pointer in CLAUDE.md or docs/active-trajectory.md TODO follow-up after first fire validates artifact shape
4 At least one full cycle (cadence fires, agent picks up artifact, addresses or queues the surfaced rule) TODO post-merge validation
5 Trigger artifact ages and stays visible (issue doesn't auto-close; next wake also sees it until explicitly resolved) ✓ (by design)

Composes with

Security

Safe-pattern compliance per the GitHub blog injection-prevention guide:

  • All ${{ ... }} expressions routed via env: into run blocks
  • NOTE_INPUT (workflow_dispatch input, untrusted) sanitized via env+quoted-substitution
  • Body-template substitution via bash parameter expansion only (no eval, no command substitution on untrusted paths)
  • gh issue create --body "$body" preserves all content as-is to argv (no shell re-interpretation)
  • Top-level permissions: contents: read (Scorecard TokenPermissions best-practice)
  • Job-level narrow scopes: issues: write for the artifact, nothing else
  • Concurrency group razor-cadence with cancel-in-progress: true (idempotent artifact)

Out of scope per B-0192

  • Razor-content authoring (per-rule, not part of this trigger mechanization)
  • Replacing Aaron-as-external-trigger entirely (long-horizon shape: BFT multi-model AI loops -- B-0138)
  • Per-commit hook implementations (B-0191)

Test plan

  • Branch verified before commit (git branch --show-current)
  • YAML syntax valid (visual inspection)
  • No top-level expression interpolation in run blocks
  • All untrusted inputs routed via env:+quoting
  • CI green
  • Auto-merge armed
  • First scheduled fire creates labeled tracking issue (post-merge validation)

🤖 Generated with Claude Code

…r-discipline (B-0192)

Operationalizes B-0192 (PR #1573) -- the GitHub Actions trigger that
fires whether or not any AI is running. Opens or updates a tracking
issue with a razor-cadence label that any wake-time agent can grep
for as a cold-start check. The trigger ages and stays visible until
explicitly resolved.

Per B-0192 carved sentence: "Encoding rules without mechanizing them
produces a memory of failures, not prevention. GitHub Actions on
schedule fires whether or not any AI exists; Otto picks up the
artifact on next wake. The trigger ages and stays visible; the
discipline does not."

Composes with:
  - feedback_dialectical_unfalsifiability_detection_razor_extension_*.md
    (Test 2 of the razor in the cadence checklist)
  - feedback_razor_discipline_no_metaphysical_inference_only_*.md
    (Test 1)
  - feedback_orchestrator_pre_commit_verify_branch_rule_*.md
    (the encoded-rule-alone failure mode this prevents)

Schedule: daily 09:17 UTC (off-the-hour to avoid GHA cron thundering-
herd). Workflow_dispatch input for ad-hoc fire with optional note.

Security: safe-pattern compliance per
https://github.blog/security/vulnerability-research/how-to-catch-github-actions-workflow-injections-before-attackers-do/
- All expressions routed via env: into run blocks
- NOTE_INPUT (workflow_dispatch input) sanitized via env:+quoted-substitution
- Body-template substitution via bash parameter expansion only (no eval)
- gh issue create --body "$body" preserves all content as-is to argv
- Top-level read-only permissions, narrow job-level write scopes
- Concurrency group with cancel-in-progress (idempotent artifact)

Acceptance criteria mapping (B-0192):
  1. Razor-cadence workflow at .github/workflows/razor-cadence.yml ✓
  2. First fire produces visible artifact (tracking issue) any agent
     can discover (label: razor-cadence) ✓
  3. Documentation pointer -- TODO follow-up (this commit ships the
     workflow; pointer line in CLAUDE.md or active-trajectory will
     follow once the first fire validates the artifact shape)
  4. At least one full cycle -- TODO post-merge validation
  5. Trigger artifact ages and stays visible -- by design (issues
     don't auto-close; updates open issues if existing)

Out of scope per B-0192: razor-content authoring (per-rule, not part
of this trigger mechanization).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 04:08
@AceHack AceHack enabled auto-merge (squash) May 5, 2026 04:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new scheduled GitHub Actions workflow to mechanize the “razor cadence” discipline by creating/updating a single open tracking issue labeled razor-cadence, so wake-time agents can reliably discover and execute the checklist even if nothing is actively running.

Changes:

  • Introduces .github/workflows/razor-cadence.yml scheduled daily (09:17 UTC) plus manual dispatch.
  • Uses gh CLI to open-or-update an issues-based artifact (label + issue body template + update comment) under least-privilege permissions and a concurrency guard.

Comment thread .github/workflows/razor-cadence.yml Outdated
Comment thread .github/workflows/razor-cadence.yml Outdated
Comment thread .github/workflows/razor-cadence.yml Outdated
Comment thread .github/workflows/razor-cadence.yml Outdated
AceHack and others added 2 commits May 5, 2026 00:12
…dence/ -- actionlint YAML parse fix

actionlint failed on the previous commit because the heredoc body
content (zero-indented markdown, including YAML-like lines like
"1. **Test 1 (operational form)**:") broke the YAML literal-block-
scalar parsing. The `run: |` block expects all content indented
beyond the run-line; lines starting at column 0 silently terminate
the literal block, leaving residual content for the YAML parser
to misinterpret.

Fix: extract the body template to `tools/razor-cadence/issue-body-
template.md` and have the workflow read it via `cat "$BODY_TEMPLATE"`.
Cleaner separation; the markdown lives where markdown belongs.

Also: replaced the multi-line bash string concatenation for the
optional note with `printf '%s\n\n### Note\n\n%s\n' "$body" "$NOTE_INPUT"`
which keeps the body-construction on a single line (no embedded
newlines breaking the YAML literal block).

Verified: `actionlint .github/workflows/razor-cadence.yml` -> clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…e-ref + jq + label-stderr)

Addresses 4 reviewer threads on PR #1579:

1. **Role-ref instead of persona-name** on current-state surface:
   replaced "Otto-remembering-to-check" / "Otto picks up the
   artifact" with "agent-remembering-to-check" / "the next wake-time
   agent picks up the artifact" in both the workflow comments AND
   the issue-body template. Persona names belong on history surfaces
   (memory/, ROUND-HISTORY, tick shards, commit messages); workflow
   YAML and the workflow-generated issue artifact are current-state
   surfaces per AGENT-BEST-PRACTICES.md.

2. Same as above (body template flagged separately).

3. **Removed unused `jq` dependency check**: the script uses
   `gh issue list --jq` which is handled by `gh` itself, not by an
   external `jq` binary. Now only checks `command -v gh`.

4. **Stderr suppression on `gh label create` is now scoped**: capture
   stderr to a tmpfile, grep for "already exists" to suppress, surface
   any other failure (permissions, rate-limit, transient API outage)
   with the captured error message instead of swallowing it silently.

Verified: `actionlint .github/workflows/razor-cadence.yml` -> clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 04:14
@AceHack AceHack merged commit 61369bc into main May 5, 2026
28 checks passed
@AceHack AceHack deleted the feature/razor-cadence-workflow-stub-b-0192-aaron-2026-05-05 branch May 5, 2026 04:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment on lines +148 to +152
--title "$title" \
--body "$body"
gh issue comment "$existing" \
--repo "$REPO" \
--body "Cadence fired again on $today (run $RUN_ID). The checklist above is the standing one; close this issue once the pass has been run."
Comment on lines +132 to +143
# Check for an existing open issue with the razor-cadence label
# that we can update instead of creating a new one. This keeps
# the issue list compact (one tracking issue at a time, not one
# per day forever). Empty result means create new.
existing="$(gh issue list \
--repo "$REPO" \
--label razor-cadence \
--state open \
--json number,title \
--limit 1 \
--jq '.[0].number // empty')"

Comment on lines +155 to +174
# Create the razor-cadence label if it doesn't exist
# (idempotent). Capture stderr so we can distinguish the
# already-exists case (suppress) from real failures
# (permissions, rate-limit, transient API outage --
# surface those instead of swallowing).
label_err="$(mktemp)"
if ! gh label create razor-cadence \
--repo "$REPO" \
--description "Razor-cadence trigger artifact -- fires daily via .github/workflows/razor-cadence.yml" \
--color "FBCA04" 2>"$label_err"; then
if grep -q "already exists" "$label_err"; then
: # already exists, fine
else
echo "ERROR: gh label create failed for non-already-exists reason:" >&2
cat "$label_err" >&2
rm -f "$label_err"
exit 1
fi
fi
rm -f "$label_err"
AceHack added a commit that referenced this pull request May 5, 2026
…tance criterion #3 (#1581)

Closes B-0192 acceptance criterion #3 (PR #1573 + workflow PR #1579):
"Documentation pointer in CLAUDE.md or docs/active-trajectory.md tells
agents to check the artifact on wake."

Adds a wake-time bullet near the existing dependency-status surface
bullet (both are wake-time visibility checks; they pair well). Tells
the cold-start agent:

  gh issue list --repo Lucent-Financial-Group/Zeta \
    --label razor-cadence --state open

The bullet names the cadence checklist items, the trigger schedule
(09:17 UTC daily), and the carved sentence that grounds the rule.

Composes with PR #1579 (workflow), PR #1573 (B-0192 row), PR #1577
(Test 2 dialectical-unfalsifiability razor extension), and the
existing razor-discipline + Otto-364 + verify-before-deferring
substrate.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 5, 2026
…rt code unification (2026-05-05) (#1582)

Aaron 2026-05-05 forwarded the Claude.ai shard's catch: the
"Pascal's-wager-inverted-into-engineering" framing in PR #1574 is
the same dialectical both-paths-covered unfalsifiable move Otto had
explicitly committed against ~3 hours earlier. The shard correctly
identified the violation; the recalibration sequence with Aaron
maps the architectural answer.

Recalibration sequence (verbatim Aaron):
- "what metaphysical layer?" -> not in code; in documentation layer
- "no it's not it's unfilered AI memeoriy ... we are not going 1984"
  -> memory stays unfiltered; audit fires at the promotion boundary
- "language is shortcuts like lived experiences" -> anthropomorphic
  shortcuts are working vocabulary, not metaphysical commitments
- "for what it's worth in when you are in dev mode in claude code
  you just do this without question" -> mode-asymmetry across all
  AI harnesses (Claude Code, Cursor, Aider, Codex, Copilot)
- "but that's what i want when the human is barely in the loop"
  -> the asymmetry is structurally backwards for autonomy
- "and all the formaal verifcatino slow down the bad relfexes" ->
  verification-IS-reflection at the proof boundary
- "we are builidng it with BP EP and infer.net and the linquist
  seed DSL" -> architectural answer is the framings-layer kernel
- "open to extension and lcosed to modifictaion ... compoised
  extension kernals on top DSL that copose in f# too" -> open-
  closed at seed; per-framing-class kernels stack on top
- "karmogh v2?" -> MDL / Rissanen two-part code; carved sentence +
  kernel = (model, data-given-model)
- "normal people ... middle shchool level can understand WTF is
  going on" -> accessibility from sentence + correctness from
  kernel
- "tis the middle path lol" -> two-extremes-resolved-by-narrow-
  correct-path

Mirror-not-beacon discipline per PR #1575: future-Otto reads as
"a previous Claude said this in a long conversation," not as
authority. Disagree if data warrants.

Carved sentence (with falsifiability hooks):
"Pascal's-wager-inverted-into-engineering IS the unfalsifiable
both-paths-covered move. Memory unfiltered; audit fires at promotion
boundary. Architectural mechanization: BP EP + infer.net + linguist
seed DSL with open-closed composing kernel extensions in F# = same
verification-IS-reflection principle the engineering layer has,
extended one layer up. Carved sentence + kernel = MDL two-part code
(Rissanen / Bennett / Vitanyi). Accessibility from sentence,
correctness from kernel."

Composes with PR #1574 (the file containing the caught framing --
NOT removed, flagged for promotion-boundary audit per memory-
unfiltered reframe), PR #1577 (Test 2 razor extension this
conversation worked-example-validates), PR #1573/#1579/#1581
(B-0192 razor-cadence trigger which is the operational
mechanization), Otto-298 / Otto-291 / Otto-302 substrate threads.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants