Skip to content

Adopt persist repo practices: release, CI, .agents#187

Merged
SutuSebastian merged 6 commits into
mainfrom
adopt-persist-practices
Jul 7, 2026
Merged

Adopt persist repo practices: release, CI, .agents#187
SutuSebastian merged 6 commits into
mainfrom
adopt-persist-practices

Conversation

@SutuSebastian

@SutuSebastian SutuSebastian commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Adopts practices audited from the sibling persist repo across three surfaces.

Release — npm trusted publishing (GitHub OIDC, no NPM_TOKEN): release.yml gets id-token: write, release environment, Node 24 + npm ≥11 for OIDC detection, pinned changesets/action; publishConfig.provenance: true; docs/packaging.md + .changeset/README.md updated.

CI / toolingci.yml: top-level permissions: contents: read, SHA-pinned actions/checkout + persist-credentials: false, new check-pack job (attw + publint), audit promoted to block on high/critical and wired into ci-complete; .github/dependabot.yml (npm + github-actions weekly); AGENTS.md cross-tool stub; check:pack (attw + publint), :changes scripts + scripts/run-on-changed-files.ts, sideEffects: false, packageManager, coverage threshold (0.75); prepublishOnly chains check && check:pack.

.agents/ — adopt persist's thin-rule + skill-decomposition format: slim 5 rules to priming pointers (agents-tier-system, tracer-bullets, verify-after-each-step, docs-governance, agents-first-convention), split 4 monolith skills into slim SKILL + sibling (harden-pr→WORKFLOW, docs-governance→LIFECYCLE, docs-lifecycle-sweep→WORKFLOW, pr-comment-fact-check→WORKFLOW), merge preserve-comments+concise-comments into authoring-discipline (+PROSE.md), add architecture-priming rule, add 10 new skills (agents-tier-system, ask-agents, authoring-discipline, domain-modeling, grill-with-docs, grilling, tdd, tracer-bullets, verify-after-each-step, writing-agents-config, writing-great-skills), restructure grill-me + write-a-skill + improve-codebase-architecture (+REFERENCE.md). No persist-domain leakage; all codemap-specific substance preserved.

Test plan

  • bun run check:pack (attw 🟢, publint clean)
  • bun run test:coverage — 1857 pass, 0.75 threshold holds
  • bun run typecheck, bun run lint:ci, bun run format:check — clean
  • All .cursor/rules + .cursor/skills symlinks resolve; no broken links
  • No orphaned citations to deleted/slimmed rules; docs/README.md Rules 1–10 pointer preserved
  • One-time GitHub setup: create release environment + npm trusted-publisher binding for @stainless-code/codemap (workflow release.yml, env release); remove NPM_TOKEN secret after first OIDC publish
  • Confirm no current high/critical bun audit findings (promoted to hard gate)

Summary by CodeRabbit

  • New Features

    • Added a central guide for AI-agent and documentation workflows, plus linked reference material across the repo.
    • Introduced clearer guidance for writing, testing, debugging, and architecture review processes.
  • Bug Fixes

    • Tightened release and CI checks to catch packaging, audit, and verification issues earlier.
    • Updated publishing to use trusted publishing with provenance support.
  • Chores

    • Refreshed repository metadata, dependency checks, and file organization for easier maintenance.

Release: npm trusted publishing (OIDC, no NPM_TOKEN) + Sigstore provenance.
CI: least-priv perms, SHA-pinned checkout + persist-credentials:false, check-pack job, audit blocks on high/critical, dependabot.
Tooling: check:pack (attw+publint), :changes scripts, coverage threshold, AGENTS.md stub.
.agents: adopt persist thin-rule + skill-decomposition format — slim 5 rules, split 4 monolith skills, add 10 new skills, merge preserve/concise into authoring-discipline, add architecture-priming.
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5c79e9c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: de2d17c0-9bec-4684-b4b7-81002cdf742b

📥 Commits

Reviewing files that changed from the base of the PR and between aaa5b3a and 5c79e9c.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (76)
  • .agents/README.md
  • .agents/rules/agents-first-convention.md
  • .agents/rules/agents-tier-system.md
  • .agents/rules/architecture-priming.md
  • .agents/rules/authoring-discipline.md
  • .agents/rules/concise-comments.md
  • .agents/rules/consumer-surfaces.md
  • .agents/rules/docs-governance.md
  • .agents/rules/preserve-comments.md
  • .agents/rules/tracer-bullets.md
  • .agents/rules/verify-after-each-step.md
  • .agents/skills/agents-tier-system/SKILL.md
  • .agents/skills/ask-agents/SKILL.md
  • .agents/skills/authoring-discipline/PROSE.md
  • .agents/skills/authoring-discipline/SKILL.md
  • .agents/skills/diagnosing-bugs/SKILL.md
  • .agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh
  • .agents/skills/docs-governance/LIFECYCLE.md
  • .agents/skills/docs-governance/SKILL.md
  • .agents/skills/docs-lifecycle-sweep/SKILL.md
  • .agents/skills/docs-lifecycle-sweep/WORKFLOW.md
  • .agents/skills/domain-modeling/GLOSSARY-ENTRY.md
  • .agents/skills/domain-modeling/GLOSSARY-SCAN.md
  • .agents/skills/domain-modeling/SKILL.md
  • .agents/skills/grill-me/SKILL.md
  • .agents/skills/grill-with-docs/ARTIFACTS.md
  • .agents/skills/grill-with-docs/SKILL.md
  • .agents/skills/grilling/SKILL.md
  • .agents/skills/harden-pr/SKILL.md
  • .agents/skills/harden-pr/WORKFLOW.md
  • .agents/skills/improve-codebase-architecture/REFERENCE.md
  • .agents/skills/pr-comment-fact-check/SKILL.md
  • .agents/skills/pr-comment-fact-check/WORKFLOW.md
  • .agents/skills/tdd/PATTERNS.md
  • .agents/skills/tdd/SKILL.md
  • .agents/skills/teach/GLOSSARY-FORMAT.md
  • .agents/skills/teach/LEARNING-RECORD-FORMAT.md
  • .agents/skills/teach/MISSION-FORMAT.md
  • .agents/skills/teach/RESOURCES-FORMAT.md
  • .agents/skills/teach/SKILL.md
  • .agents/skills/tracer-bullets/SKILL.md
  • .agents/skills/verify-after-each-step/SKILL.md
  • .agents/skills/write-a-skill/SKILL.md
  • .agents/skills/writing-agents-config/SKILL.md
  • .agents/skills/writing-great-skills/GLOSSARY.md
  • .agents/skills/writing-great-skills/SKILL.md
  • .changeset/README.md
  • .changeset/trusted-publishing-provenance.md
  • .cursor/rules/architecture-priming.mdc
  • .cursor/rules/authoring-discipline.mdc
  • .cursor/rules/concise-comments.mdc
  • .cursor/rules/preserve-comments.mdc
  • .cursor/skills/agents-tier-system
  • .cursor/skills/ask-agents
  • .cursor/skills/authoring-discipline
  • .cursor/skills/diagnose
  • .cursor/skills/diagnosing-bugs
  • .cursor/skills/domain-modeling
  • .cursor/skills/grill-with-docs
  • .cursor/skills/grilling
  • .cursor/skills/tdd
  • .cursor/skills/teach
  • .cursor/skills/tracer-bullets
  • .cursor/skills/verify-after-each-step
  • .cursor/skills/write-a-skill
  • .cursor/skills/writing-agents-config
  • .cursor/skills/writing-great-skills
  • .github/dependabot.yml
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • AGENTS.md
  • docs/packaging.md
  • package.json
  • scripts/run-on-changed-files.ts
  • src/package-scripts.test.ts
  • tsconfig.json

📝 Walkthrough

Walkthrough

This PR overhauls the .agents/.cursor agent-configuration documentation: it condenses tier-system, docs-governance, tracer-bullets, and verify-after-each-step rules; adds new skills (ask-agents, grilling, grill-with-docs, domain-modeling, teach, tdd, harden-pr WORKFLOW, pr-comment-fact-check WORKFLOW, writing-great-skills, writing-agents-config); removes obsolete rules/skills; wires .cursor symlinks; and separately hardens CI (pinned checkout, check-pack, blocking audit), adopts npm OIDC trusted publishing in the release workflow, and updates package.json/tsconfig/scripts.

Changes

Agents Documentation Restructuring

Layer / File(s) Summary
Foundational agent docs and tier system
AGENTS.md, .agents/README.md, .agents/rules/agents-first-convention.md, .agents/rules/agents-tier-system.md, .agents/skills/agents-tier-system/SKILL.md
Adds hub docs and naming conventions, condenses the tier system rule, and adds a full tier-system reference skill.
Architecture priming and improve-codebase-architecture reference
.agents/rules/architecture-priming.md, .agents/skills/improve-codebase-architecture/REFERENCE.md
Adds STOP-trigger architecture rule and a reference covering dependency categories, seams, testing, and boundaries.
Authoring discipline rule and prose skill
.agents/rules/authoring-discipline.md, .agents/skills/authoring-discipline/SKILL.md, .agents/skills/authoring-discipline/PROSE.md
Adds comment-preservation rule and concise-prose skill guidance.
Consumer surfaces rule updates
.agents/rules/consumer-surfaces.md
Expands consumer surfaces to include import and public API/JSDoc touchpoints.
Docs governance rule, skill, lifecycle, and sweep
.agents/rules/docs-governance.md, .agents/skills/docs-governance/SKILL.md, .agents/skills/docs-governance/LIFECYCLE.md, .agents/skills/docs-lifecycle-sweep/*
Condenses governance docs into a priming rule/skill and adds a full lifecycle spine and sweep workflow.
Tracer bullets and verify-after-each-step
.agents/rules/tracer-bullets.md, .agents/skills/tracer-bullets/SKILL.md, .agents/rules/verify-after-each-step.md, .agents/skills/verify-after-each-step/SKILL.md
Condenses rules and adds companion skill docs for slicing and per-step verification.
Diagnosing bugs skill
.agents/skills/diagnosing-bugs/SKILL.md
Renames diagnose to diagnosing-bugs and adds per-phase completion criteria.
Planning and interview workflow skills
.agents/skills/ask-agents/..., .agents/skills/grill-me/..., .agents/skills/grill-with-docs/..., .agents/skills/grilling/..., .agents/skills/domain-modeling/...
Adds router and interview-driven planning/domain-modeling skills.
Harden-PR workflow
.agents/skills/harden-pr/SKILL.md, .agents/skills/harden-pr/WORKFLOW.md
Adds the full autonomous PR-hardening loop with modes, reviewer spawning, and vetting.
PR comment fact-check skill and workflow
.agents/skills/pr-comment-fact-check/SKILL.md, .agents/skills/pr-comment-fact-check/WORKFLOW.md
Restructures the skill and adds a fetch/verify/report/apply workflow for review comments.
TDD skill and test patterns
.agents/skills/tdd/SKILL.md, .agents/skills/tdd/PATTERNS.md
Adds RED/GREEN TDD workflow and good/bad test pattern guidance.
Teach skill and format templates
.agents/skills/teach/*
Adds a multi-session teaching workflow and glossary/learning-record/mission/resources templates.
Writing-agents-config and writing-great-skills
.agents/skills/writing-agents-config/SKILL.md, .agents/skills/writing-great-skills/SKILL.md, .agents/skills/writing-great-skills/GLOSSARY.md
Adds guidance for structuring rules/skills and a glossary of skill-authoring terms.
Cursor symlink wiring
.cursor/rules/*, .cursor/skills/*
Adds/updates symlinks pointing to .agents rule/skill directories and removes obsolete entries.

CI, Release, and Packaging Infrastructure

Layer / File(s) Summary
CI workflow hardening and dependency automation
.github/dependabot.yml, .github/workflows/ci.yml
Adds Dependabot config, pins actions/checkout, adds check-pack job, makes audit blocking, expands gating.
Trusted publishing release workflow and docs
.github/workflows/release.yml, .changeset/README.md, .changeset/trusted-publishing-provenance.md, docs/packaging.md
Switches to GitHub OIDC trusted publishing, removes NPM_TOKEN, documents provenance.
Package scripts, config, and changed-files runner
package.json, tsconfig.json, scripts/run-on-changed-files.ts, src/package-scripts.test.ts
Updates scripts/devDependencies/packageManager, simplifies tsconfig includes, adds a changed-files runner script.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Actions as GitHub Actions
  participant OIDC as GitHub OIDC
  participant Changesets as changesets/action
  participant npm as npm registry
  Actions->>OIDC: request id-token
  OIDC-->>Actions: issue token
  Actions->>Changesets: run version/publish
  Changesets->>npm: publish with Sigstore provenance
Loading

Possibly related PRs

  • stainless-code/codemap#25: Rewrites/condenses the same .agents docs-governance and agents-tier-system rules/skills adopted here.
  • stainless-code/codemap#32: Overlaps on agents-tier-system.md and Tier-3 skills like grill-me, improve-codebase-architecture, diagnose/write-a-skill.
  • stainless-code/codemap#177: Makes prior wording changes to the same harden-pr skill significantly expanded in this PR.

Suggested labels: documentation, enhancement

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adopt-persist-practices

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

diagnose: fold persist's per-phase "Done when" completion criteria into codemap's stronger skill (one skill, no duplicate).
teach: new multi-session learning workspace skill (SKILL + 4 format siblings), adapted for codemap domain; wired into AGENTS.md + ask-agents router.
improve-codebase-architecture/REFERENCE: drop stale "(same caveats as persist's REFERENCE)" adoption leftover.
…ents-config)

Drop the skill, its .cursor symlink, and all refs (AGENTS.md intent line,
ask-agents router table, consumer-surfaces Related link).
README: add .agents/README.md (adapted from persist) as the in-.agents hub;
wire agents-tier-system skill + AGENTS.md to point at it.
diagnose: update skill to mattpocock/skills diagnosing-bugs structure
(Phase 1 red-capable completion criterion, Phase 2 minimise), then rename
the skill dir diagnose → diagnosing-bugs (frontmatter name, H1, .cursor
symlink, and all citations in AGENTS.md, ask-agents, writing-agents-config,
architecture-priming).
Add the library import surface (.d.mts/JSDoc on exports) to the consumer
surface table + intro, and an editing rule that @example imports must
resolve against exports (prose depth + no-internals defer to
authoring-discipline § PROSE + existing items, no duplication).
@SutuSebastian SutuSebastian marked this pull request as ready for review July 7, 2026 08:21
@SutuSebastian SutuSebastian merged commit 4afb0e2 into main Jul 7, 2026
11 of 12 checks passed
@SutuSebastian SutuSebastian deleted the adopt-persist-practices branch July 7, 2026 08:22
@github-actions github-actions Bot mentioned this pull request Jul 7, 2026
SutuSebastian added a commit that referenced this pull request Jul 7, 2026
CI (Socket firewall) closes the connection downloading today's
7.0.0-dev.20260707.2 tarball during `sfw bun install --frozen-lockfile`,
failing every job at setup. 20260706.1 is the build main already ships
(PR #187) and installs cleanly through sfw. The native-preview bump is a
dev-tooling moving-target (tsgo) — not worth blocking CI for a one-day
delta; can re-bump once the newer tarball is fetchable.
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.

1 participant