Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
pr_number: 4758
title: "feat(B-0707): cron-cadence wiring \u2014 daily manifesto-citation snapshot workflow"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-23T19:43:52Z"
merged_at: "2026-05-23T19:50:28Z"
closed_at: "2026-05-23T19:50:28Z"
head_ref: "otto/cli-b0707-followup-cron-wiring-2026-05-23"
base_ref: "main"
archived_at: "2026-05-23T22:20:57Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #4758: feat(B-0707): cron-cadence wiring — daily manifesto-citation snapshot workflow

## PR description

## Summary

Ships the **5th (deferred) acceptance criterion from B-0707**: cron-cadence wiring for automatic daily manifesto-citation snapshots.

B-0707 closure now reflects **ALL 5 acceptance criteria met** (was 4/5 with cron-cadence deferred per #4750).

## New workflow

`.github/workflows/manifesto-citation-snapshot-cadence.yml`:
- Daily 06:37 UTC (off-the-hour; before razor-cadence 09:17 and outside budget-cadence Sundays 16:23)
- Runs `bun tools/hygiene/audit-manifesto-citations.ts --snapshot`
- Diffs `docs/hygiene-history/manifesto-citations/`
- Opens snapshot PR if diff exists (idempotent per-day; no-diff → healthy no-op)
- AgencySignature v1 trailer block on commits + PR body
- Concurrency-group cancel-in-progress (snapshot file is per-day idempotent)

## Pattern source

Copied from `.github/workflows/budget-snapshot-cadence.yml` which has identical shape (cron → bun tool → diff → PR). Same security discipline (env: routing of expressions, `"$VAR"` quoting in shell, no direct interpolation in run-block scripts).

## Auto-merge limitation (inherited from pattern source)

`GITHUB_TOKEN`-created PRs don't trigger downstream workflows (GitHub's anti-infinite-loop guard). The snapshot PR sits open for the next maintainer/agent merge pass — per `budget-snapshot-cadence.yml` convention. Explicit-no-auto-merge over silent-stall.

## Composes with

- B-0525 (parent — constitutional-promotion readiness tracking; this completes the measurement-infrastructure substrate)
- B-0707 (child — this commit ships its 5th criterion)
- `.github/workflows/budget-snapshot-cadence.yml` (pattern reference)
- `.github/workflows/razor-cadence.yml` (sibling daily cadence)
- `.claude/rules/encoding-rules-without-mechanizing.md` (carved sentence: *"encoding rules without mechanizing produces a memory of failures, not prevention"* — this cron is the mechanization)

## Test plan

- [x] Workflow follows budget-snapshot-cadence.yml security pattern (env routing, `$VAR` quoting)
- [x] B-0707 row updated to reflect 5/5 acceptance criteria
- [x] Cron time off-the-hour (06:37) to avoid GHA thundering-herd
- [x] Concurrency group + cancel-in-progress (idempotent per-day)
- [x] Branch matches `ZETA_EXPECTED_BRANCH` guard
- [ ] CI green
- [ ] First scheduled fire produces snapshot PR (verify ~tomorrow 06:37 UTC)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-23T19:45:44Z)

## Pull request overview

Adds scheduled GitHub Actions cadence wiring to automatically produce daily manifesto-citation snapshot PRs, completing B-0707’s deferred “cron-cadence wiring” acceptance criterion and updating the backlog row to reflect full closure.

**Changes:**
- Introduces a new daily scheduled workflow that runs `bun tools/hygiene/audit-manifesto-citations.ts --snapshot`, detects changes, and opens a PR with the new snapshot.
- Updates the B-0707 backlog row to reflect that all 5/5 acceptance criteria are now met and points to the new workflow.

### Reviewed changes

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

| File | Description |
| ---- | ----------- |
| docs/backlog/P2/B-0707-manifesto-citation-time-series-tracking-2026-05-23.md | Updates closure text + acceptance criteria to reflect cron cadence now shipped. |
| .github/workflows/manifesto-citation-snapshot-cadence.yml | New daily workflow to generate snapshot and open a PR when snapshot output changes. |

### COMMENTED — @chatgpt-codex-connector (2026-05-23T19:46:13Z)


### 💡 Codex Review

Here are some automated review suggestions for this pull request.

**Reviewed commit:** `b6d4cc5148`


<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>

[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.


Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

</details>

## Review threads

### Thread 1: .github/workflows/manifesto-citation-snapshot-cadence.yml:104 (resolved)

**@copilot-pull-request-reviewer** (2026-05-23T19:45:43Z):

P0: `git diff --quiet docs/hygiene-history/manifesto-citations/` will ignore newly-created (untracked) daily snapshot files, so the first snapshot of a day can be incorrectly treated as "no diff" and the PR won’t open. Switch the change-detection to include untracked files (e.g., `git status --porcelain` on the path, or combine `git diff --quiet -- <path>` with a `git ls-files --others --exclude-standard <path>` check).

### Thread 2: .github/workflows/manifesto-citation-snapshot-cadence.yml:42 (resolved)

**@copilot-pull-request-reviewer** (2026-05-23T19:45:44Z):

The `workflow_dispatch` input `note` is described as being attached to the snapshot, but it’s currently only echoed to logs and not persisted into the commit message or PR body. Either plumb it into the commit/PR text (quoted/sanitized via env as you’re already doing) or remove the input to avoid misleading operators.

### Thread 3: .github/workflows/manifesto-citation-snapshot-cadence.yml:93 (resolved)

**@chatgpt-codex-connector** (2026-05-23T19:46:13Z):

**<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Detect untracked snapshots before declaring no changes**

The `Inspect diff` gate uses `git diff --quiet docs/hygiene-history/manifesto-citations/`, which ignores untracked files. This workflow writes a new dated file each day (for example `YYYY-MM-DD.json`), and on the first run for a date that file is untracked, so this check returns success and sets `changed=false`; the PR creation step is then skipped even though a new snapshot was produced. In practice, that means the daily cadence can silently no-op for new days instead of opening the intended snapshot PR.

Useful? React with 👍 / 👎.
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
pr_number: 4761
title: "rules(pr-triage-tiers): codify Tier 1-5 PR-triage framework + deferred-to-human label workflow"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-23T19:59:13Z"
merged_at: "2026-05-23T20:13:47Z"
closed_at: "2026-05-23T20:13:47Z"
head_ref: "otto/pr-triage-tiers-rule-deferred-human-label-2026-05-23"
base_ref: "main"
archived_at: "2026-05-23T22:20:51Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #4761: rules(pr-triage-tiers): codify Tier 1-5 PR-triage framework + deferred-to-human label workflow

## PR description

## Summary

QoL bundle (Aaron-authorized 2026-05-23) that codifies the empirical PR-triage framework evolved during Otto-CLI's 2026-05-23 PR-cleanup session (27 closes from 125 → 90 open queue).

**Two additive substrate changes**:

1. **New rule**: `.claude/rules/pr-triage-tiers.md` — five-class disposition framework:
- **Tier 1**: fully redundant (all files byte-identical on main) → close
- **Tier 2**: substrate-recoverable (missing files regeneratable via existing tooling) → close with regenerate path
- **Tier 3**: substrate-superseded (alt-ID / alt-filename / alt-scheme on main) → close with cross-reference
- **Tier 4**: substrate-re-derivable (operational lesson already in canonical rule form OR from observable evidence) → close
- **Tier 5**: deferred-to-human (substantive + unique + NOT regeneratable — e.g., external-AI conversation transcripts) → tag + leave

2. **GitHub label**: `deferred-to-human` (color `#FBCA04`, created 2026-05-23) — applied to Tier 5 PRs so agent unfinished-PR scans skip them.

**Each tier has substrate-honest comment template + empirical anchor from the 27 closes that evolved the framework.**

## Deferred from this PR

The companion edit to `docs/AUTONOMOUS-LOOP-PER-TICK.md` Step 1 (unfinished-PR check sub-step) is **intentionally deferred to a follow-up PR**. Peer Otto-CLI is actively editing that canonical file; coordinating the Step 1 change avoids clobbering peer work. The new rule's body already references the canonical's Step 1 — when the canonical edit lands separately, the rule composes cleanly.

## Lane discipline

Per `agent-roster-reference-card.md`: agent applies tiers ONLY to PRs in own surface's branch lane (`otto-cli/*` / `otto-desktop/*` / `otto-vscode/*` / `otto/*`). Lior/Vera/Riven/Alexa branches stay in their respective owner's lanes.

## Why this matters

Aaron 2026-05-23: *"lirs background service is what's leaving prs sometime so we are updateing to check for unfinsihed prs first when it starts, maybe yours should do the same"*. The triage framework is what an unfinished-PR check applies; the Tier 5 + `deferred-to-human` mechanism is what keeps the rare-by-design human-attention case bounded so agents don't loop on it.

## Commit details

Landed via git plumbing (`commit-tree` with temp index, no working-tree touch) due to ongoing dotgit-saturation (544 stuck git pack/maintenance/repack procs at commit time) preventing reliable isolated worktree-add. Same fallback path validated in PR #4755 earlier today.

## Test plan

- [x] Rule file added at `.claude/rules/pr-triage-tiers.md` (auto-loaded per `.claude/rules/` convention)
- [x] GitHub label `deferred-to-human` exists and is queryable
- [x] All cross-references to other rule files are correct paths
- [ ] CI green (markdown lint + path-depth check)
- [ ] Auto-merge fires once green

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-23T20:01:15Z)

## Pull request overview

Adds a new `.claude/rules/` rule that codifies a five-tier framework for triaging stale/unfinished PRs, including a “deferred-to-human” workflow for preserving unique, non-regeneratable substrate while allowing automated scans to skip those PRs.

**Changes:**
- Introduces Tier 1–5 PR triage framework with disposition/comment templates for each tier.
- Documents the `deferred-to-human` label semantics and the `gh pr edit ... --add-label` application step.
- Adds “composes with” cross-references to existing rules and the canonical per-tick loop doc.

## General comments

### @chatgpt-codex-connector (2026-05-23T19:59:16Z)

You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage).

### @AceHack (2026-05-23T20:08:43Z)

Vera coordination note: rechecked CI at 2026-05-23T20:07Z. #4761 is mergeable but BLOCKED by gate / lint (markdownlint) only. The failing log reports MD032/blanks-around-lists in .claude/rules/pr-triage-tiers.md at lines 100 and 182. Focused fix: add blank lines around the two affected list blocks, then rerun markdownlint/gate. Root checkout was left read-only by Vera because it is dirty/active.
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
pr_number: 4762
title: "docs(autonomous-loop): Step 1a \u2014 unfinished-PR check before new work"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-23T20:25:41Z"
merged_at: "2026-05-23T20:27:28Z"
closed_at: "2026-05-23T20:27:28Z"
head_ref: "otto/canonical-step1a-unfinished-pr-check-2026-05-23"
base_ref: "main"
archived_at: "2026-05-23T22:20:45Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #4762: docs(autonomous-loop): Step 1a — unfinished-PR check before new work

## PR description

## Summary

Companion to merged PR #4761 (rules/pr-triage-tiers + `deferred-to-human` label). Adds **Step 1a** between Steps 1 and 2 of the canonical per-tick discipline: after refresh, query for unfinished PRs authored by this agent surface, classify per the Tier 1-5 framework, and act on Tier 1-4 closes BEFORE picking new speculative work.

## Why

Aaron 2026-05-23: *"lirs background service is what's leaving prs sometime so we are updateing to check for unfinsihed prs first when it starts, maybe yours should do the same"*. This is Otto's version of that fix at the canonical-discipline scope — applies to all three Otto surfaces (CLI / Desktop / queued B-0448 cloud routine) which cite this file as their one-source-of-truth.

## What lands

- Concrete `gh pr list` query with surface-lane-prefix filter + `-label:deferred-to-human` exclusion
- Reference to `.claude/rules/pr-triage-tiers.md` for classification (PR #4761)
- Lane discipline reminder (don't triage other agents' PRs)
- Substrate-honest framing of cross-session amnesia failure mode this prevents
- Explicit gate: only proceed to Step 3 (pick new work) if no unfinished PRs need attention

## Commit details

Landed via git plumbing (`commit-tree` with temp index from `origin/main`) to bypass contested-local-working-tree where peer Otto-CLI has unpushed edits to this file. `origin/main` was 3 days stale on this file at commit time (commit `7d6f3ff4f`); this is the next change. Peer-Otto's local edits will rebase cleanly when they push since this insertion is additive (Step 1a between existing Steps 1 and 2, no overlap with Step 4 tick-shard-gate work where peer edits live).

## Test plan

- [x] Insertion adds 40 lines between Steps 1 and 2 of canonical
- [x] All cross-references resolve correctly (`.claude/rules/pr-triage-tiers.md`, `.claude/rules/agent-roster-reference-card.md`)
- [x] Bash query uses proper escaping for `--search` argument
- [ ] CI green (markdown lint + path-depth check)
- [ ] Auto-merge fires once green

## Reviews

### COMMENTED — @chatgpt-codex-connector (2026-05-23T20:28:45Z)


### 💡 Codex Review

Here are some automated review suggestions for this pull request.

**Reviewed commit:** `8beea6daa3`


<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>

[Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.


Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

</details>

## Review threads

### Thread 1: docs/AUTONOMOUS-LOOP-PER-TICK.md:88 (unresolved)

**@chatgpt-codex-connector** (2026-05-23T20:28:45Z):

**<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Group OR clauses so author/label filters apply to all heads**

The `--search` expression combines multiple `OR` branch clauses without parentheses, so `author:@me` and `-label:"deferred-to-human"` are not guaranteed to constrain every branch term. `gh pr list` explicitly uses GitHub advanced issue-search syntax (https://cli.github.com/manual/gh_pr_list), and GitHub’s boolean-search docs require parentheses for grouped qualifiers (https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests#using-parentheses-for-more-complicated-filters). In this flow, that can surface PRs outside the intended lane or include deferred PRs, and the subsequent “act on each unfinished PR” instruction can close the wrong PRs.

Useful? React with 👍 / 👎.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
pr_number: 4763
title: "backlog(B-0708): stale-pointer cleanup across .claude/rules/ \u2014 surfaced by razor-cadence pass"
author: "AceHack"
state: "MERGED"
created_at: "2026-05-23T20:35:50Z"
merged_at: "2026-05-23T20:37:38Z"
closed_at: "2026-05-23T20:37:38Z"
head_ref: "otto/cli-b0708-stale-pointer-cleanup-from-razor-cadence-pass-2026-05-23"
base_ref: "main"
archived_at: "2026-05-23T22:20:39Z"
archive_tool: "tools/pr-preservation/archive-pr.ts"
---

# PR #4763: backlog(B-0708): stale-pointer cleanup across .claude/rules/ — surfaced by razor-cadence pass

## PR description

Files B-0708. Razor-cadence pass 2026-05-23 (issue #3128 closed) ran audit-rule-cross-refs.ts and surfaced 87 stale-pointer candidates across 62 rules (16% MISS rate). ~70-80 real stale pointers worth cleaning up. P2; load-bearing finding from cadence pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Reviews

### COMMENTED — @copilot-pull-request-reviewer (2026-05-23T20:37:30Z)

## Pull request overview

Files backlog row **B-0708** to track follow-up work from the 2026-05-23 razor-cadence pass: cleaning up stale cross-references across `.claude/rules/` after `audit-rule-cross-refs.ts` surfaced 87 candidate misses.

**Changes:**
- Added a new P2 backlog per-row file documenting scope, rationale, and acceptance criteria for the stale-pointer cleanup work.
- Updated `docs/BACKLOG.md` to include the new B-0708 entry.

### Reviewed changes

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

| File | Description |
| ---- | ----------- |
| docs/backlog/P2/B-0708-stale-pointer-cleanup-from-razor-cadence-pass-2026-05-23.md | New backlog row capturing the stale-pointer cleanup work item and its acceptance criteria. |
| docs/BACKLOG.md | Adds the generated index entry for B-0708 under P2. |
Loading
Loading