Skip to content

docs(agents): principles-only os-dev definition — lessons distilled in place, no issue-ID citations - #7938

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-7903-os-dev-principles
Aug 12, 2026
Merged

docs(agents): principles-only os-dev definition — lessons distilled in place, no issue-ID citations#7938
os-zhuang merged 2 commits into
mainfrom
claude/issue-7903-os-dev-principles

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Fixes#7903

ADR-class by the recorded governance note (an agent definition governs every dev session's behavior): draft, human merge only — ⛔ no queue entry, no auto-merge. Independent of the #7885 PR (PR₁): branched off current origin/main, no file overlap, either merge order works (PR₁'s ID-lint carries a self-expiring exact-count waiver for this file).

What this is

.claude/agents/os-dev.md rewritten to the same writing standard as the pm-dispatch principles rewrite (maintainer rulings 2026-08-12: 「只需要说原则,不需要写细节」;「处理 issue 时犯的错应该总结成经验,保留 issue id没有意义」): 686 → 356 lines, zero issue-ID citations (81 removed; every lesson now self-contained — failure mode + discipline + boundary), maintainer rulings kept as date + verbatim quote.

The three-way sorting rule applied:

  1. Mechanized ⇒ one principle line: worktree guard, stash guard (kept with its alternatives since the reflex it blocks is the reverse-verification move), the os-regen merge four-step (now scripts/pm/os-regen-merge.sh), nul-byte gate (its header cited as the authority instead of re-arguing the harms).
  2. Deleted: incident storytelling, per-incident counts and timings, duplicated rationale; the model-pin comment compressed from 46 lines of narrative to the pin's floor-not-ceiling contract, the resolution order, and its two traps.
  3. Kept as data: the report-contract JSON, the toolchain-trap table, gate-family names, the resource-discipline constants (flock lock path, heap cap, worker caps), the attribution-footer forms.

Everything binding survived as a rule: the six ground rules, resource discipline (foreground pipeline, PID-only kills, unforced worktree removal), local verification scope, the standard clauses (build-first, prefix filter direction, reverse verification with its three directions, spec anchor / MERGE-state trap, rejection-envelope code+status, key-vs-value criterion, fixture triage's three dispositions + consumption-radius sweep), Definition of done (Fixes/Part-of rule, skip-changeset read-back, report-at-draft-PR-time with the platform-subscription override), terminating cleanly (report twice GitHub-first with marker read-back, monitors never outlive their subject, silence-is-not-success + the PM probe backstop), the three-axis escalation frame (frame-sync anchors verbatim), and byte/sanitizer discipline.

Deviation to review

356 lines vs the ~200–300 target. The remaining ~60 lines over target are load-bearing rules I judged non-droppable under the no-silent-semantic-loss red line (mostly the standard clauses and definition-of-done, which dispatch prompts deliberately do NOT repeat — this file is their only home). If you want it tighter, the candidates are named sections, not sentence trims — say which section may lose semantics.

Gate status (honest, at draft-PR time)

Local, all green: check:agent-model-declared (pin kept), check:skill-frame-sync (4 copies isomorphic; anchors preserved verbatim), check:nul-bytes, check:doc-authoring; zero #[0-9]{3,} matches (PR₁'s new lint goes fully strict on this file once both land). CI: in_progress at report time — the PM owns convergence.

No changeset: .claude/-only change (skip-changeset applied).


Generated by Claude Code

…n place, no issue-ID citations
The dev-agent definition is rewritten to the same standard as the pm-dispatch
principles rewrite (maintainer rulings 2026-08-12: 「只需要说原则,不需要写
细节」;「保留 issue id没有意义」): every incident-backed rule becomes a
self-contained lesson (failure mode + discipline + boundary), hook-enforced
details keep one principle line each, operational lookups (toolchain traps,
report contract, gate families) stay as data. 686 → 356 lines; zero issue-ID
citations (the pm-skill ID lint's legacy waiver for this file self-expires at
zero). The three-axis decision frame keeps its frame-sync anchors verbatim.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W3v2G9dvcfxkC4NsZ4JCE9
@vercel

vercelBot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectstackIgnoredIgnoredAug 12, 2026 6:42am

Request Review

@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation labels Aug 12, 2026
@os-zhuangos-zhuang added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 12, 2026 — with Claude
…the frame-sync fixture
The self-test's extraction-failure fixture removes the declaring sentence by
literal single-line match; the rewrap had split it across a line break. The
gate's own anchor matching is whitespace-tolerant — only the fixture needs the
head contiguous.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W3v2G9dvcfxkC4NsZ4JCE9
@os-zhuang

Copy link
Copy Markdown
ContributorAuthor

同意合并

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

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

os-dev agent definition: principles-only simplification, following the #7885 pattern (maintainer-approved follow-up)

2 participants

@os-zhuang@claude