Skip to content

feat(coord): §1e chore-claim gate with proactive queue enrichment#886

Open
otherness-app[bot] wants to merge 3 commits into
mainfrom
feat/issue-882
Open

feat(coord): §1e chore-claim gate with proactive queue enrichment#886
otherness-app[bot] wants to merge 3 commits into
mainfrom
feat/issue-882

Conversation

@otherness-app

@otherness-app otherness-app Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds §1e-chore-gate to coord.md: when MEANINGFUL_PRS_THIS_SESSION==0 and COORD would claim a kind/chore item, the gate intercepts and injects a feature item first
  • Gate scans docs/design/*.md for an unissued 🔲 Future item, creates a GitHub issue, and claims it instead
  • Fallback: if no unissued Future items exist, writes meaningful_pr_guarantee_failed: true to state.json so SM §4b can diagnose
  • MEANINGFUL_PRS_THIS_SESSION shell variable initialized at §1a startup and exported for ENG/QA to increment
  • Fail-open on all errors (any exception → claim the original item)

Motivation

The session minimum meaningful-PR contract (design doc 35.x, issue-796) fires a [DEFECT] after the session ends with 0 meaningful PRs. This is retrospective. This PR makes the guarantee proactive: COORD cannot ship only chores unless there are literally no non-chore items available to generate from design docs.

Risk assessment

CRITICAL tier — modifies agents/phases/coord.md. Deploys to all projects on next session start.

  • The gate is fail-open: any Python exception → PASS {ITEM_ID} → normal claim
  • Tested: validate.sh PASSED, lint.sh PASSED
  • The bash wrapper safely handles the REPLACE/PASS output parsing

Closes #882

Design doc

Updated docs/design/21-session-throughput.md: moved §1e chore-claim gate item from 🔲 Future to ✅ Present.

[NEEDS HUMAN: critical-tier-change]

Signed-off-by: otherness[bot] <otherness[bot]@users.noreply.github.com>

otherness[bot] added 2 commits April 22, 2026 11:35
…fer gaps

Vibe-vision autonomous scan (Step A). No human input required.
Changes: 2 files changed, 5 insertions(+)

Scans performed:
- Scan 1: promote shipped 🔲 Future → ✅ Present (matched against merged PRs) — 0 promoted
- Scan 2: flag stale ✅ Present items (referenced files missing) — 0 stale
- Scan 3: infer 🔲 Future items from untracked TODO/FIXME in code — 0 added
- Scan 4: deprecate 🔲 Future items stale >90 days with no open issue — 0 deprecated
- Scan 5: self-updating pressure prompts — 0/5 bullets addressed (pressure still active)

New 🔲 Future items added from pressure-context gap analysis:
- 32.W1: Interactive wizard-style onboarding (/otherness.setup --wizard) — onboarding lens
- 39.27: Automated weekly digest of report issue comments — visibility lens

Signed-off-by: otherness[bot] <otherness[bot]@users.noreply.github.com>
When MEANINGFUL_PRS_THIS_SESSION==0 and COORD would claim a kind/chore
item, §1e-chore-gate intercepts: scans docs/design/*.md for an unissued
🔲 Future item, creates a GitHub issue for it, and claims that instead.
This converts the minimum meaningful-PR guarantee from post-hoc detection
(SM §4b DEFECT) to proactive enforcement at claim time.

Fallback: if no unissued Future items exist, writes
meaningful_pr_guarantee_failed=true to state.json and claims the chore.
Fail-open on any error.

Design doc updated: docs/design/21-session-throughput.md (🔲 → ✅)

Signed-off-by: otherness[bot] <otherness[bot]@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
@otherness-app

otherness-app Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

[NEEDS HUMAN: critical-tier-change] This PR modifies agents/phases/coord.md (CRITICAL tier). Deploys to all projects on next session startup. Requires human review before merge.

QA WRONG finding: the previous is_chore logic had false positives for
items with no kind/ labels (area-only labels incorrectly flagged as chore).

New logic: is_chore = True only when ALL kind/ labels are 'kind/chore' or
'kind/docs' AND at least one kind/ label exists. Items with no kind/ label
are treated as non-chore (fail-open).

Signed-off-by: otherness[bot] <otherness[bot]@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.ai/code)
@otherness-app

otherness-app Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

[AGENT SELF-REVIEW | sess-7af2b350 | otherness@103578b]

5-check CRITICAL-A self-review:

  1. SPEC COMPLETENESS ✅ — All 6 Zone 1 obligations satisfied. O1: chore detection + MEANINGFUL_PRS check. O2: design doc scan + issue creation + REPLACE. O3: meaningful_pr_guarantee_failed fallback. O4: fail-open try/except at top level. O5: MEANINGFUL_PRS_THIS_SESSION initialized in §1a. O6: logged.

  2. FAILURE MODE ANALYSIS

    • No docs/design/ → scan skipped, fallback to chore claim
    • GitHub API unavailable → issue creation returns None → fallback
    • Item is not kind/chore → gate doesn't fire (PASS immediately)
    • state.json invalid → except Exception → PASS fallback
    • No kind/ labels on item → is_chore=False → gate doesn't fire (QA WRONG: fixed in second commit)
  3. GLOBAL DEPLOYMENT CHECK ✅ — Gate wrapped in $(), output parsed with grep; if grep finds nothing, _GATE_ACTION is empty and if ['REPLACE' = ''] → false. New python block has outer try/except. Design docs path is relative — works in any project.

  4. SIMPLICITY CHECK ✅ — Reuses existing patterns from §1c-guard (is_done_check, open_if_absent, design dir scan). ~150 lines but each line is necessary.

  5. LONG-TERM VISION CHECK ✅ — Converts post-hoc defect detection to proactive guarantee at claim time. Generic: works on any project with docs/design/*.md. Complements (doesn't replace) §1c-guard and §1f recovery.

Result: All 5 checks pass.

@otherness-app

otherness-app Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

[🔄 SDM §4a | sess-f95ca388] PR #886 (feat(coord): §1e chore-claim gate) has needs-human label and is currently CONFLICTING with main. Human review required before merge. A rebase may be needed to resolve conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: COORD §1e must refuse to claim a kind/chore item when no kind/enhancement or `kind/bug

0 participants