Skip to content

docs(agents): Add policy and playbook docs#912

Open
dcramer wants to merge 7 commits intomainfrom
codex/adopt-agent-policies
Open

docs(agents): Add policy and playbook docs#912
dcramer wants to merge 7 commits intomainfrom
codex/adopt-agent-policies

Conversation

@dcramer
Copy link
Copy Markdown
Member

@dcramer dcramer commented May 4, 2026

Move agent guidance out of the oversized AGENTS.md into repo-native policy, playbook, and spec docs. AGENTS.md now acts as a task index, while the new policy files carry durable defaults for comments, runtime APIs, command design, output, pagination, testing, and generated artifacts.

Local CLI Playbook

Add a local CLI testing playbook with dev, env-file, built-binary, output, and targeted-test commands for agent smoke checks.

Cursor Rule Migration

Remove .cursor/rules docs after preserving their repo-specific guidance in policies/runtime-and-deps.md and other focused policies.

Validated with bun run lint; it completed with an existing Biome warning about an unused suppression in src/lib/formatters/markdown.ts.

Move detailed agent guidance out of AGENTS.md into concise policy, playbook, and spec docs. Add a local CLI testing playbook and replace the old Cursor rule files with repo-native policies.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@dcramer dcramer marked this pull request as ready for review May 4, 2026 18:13
@dcramer
Copy link
Copy Markdown
Member Author

dcramer commented May 4, 2026

need to make changes here as it wiped a lot from AGENTS.md and im not sure it retained the things that we'd 100% want to keep, at minimum

dcramer and others added 4 commits May 4, 2026 14:07
Restore compact project context and high-risk operational guidance that was lost when the root agent instructions were thinned down. Keep the policy, playbook, spec, and file lookup indexes intact while avoiding the old long-form lore dump.

Co-Authored-By: OpenAI Codex <codex@openai.com>
Remove the duplicated policy and playbook index from the root agent instructions. Keep the read-first table focused on files agents should actually consult for each kind of change.

Co-Authored-By: OpenAI Codex <codex@openai.com>
Convert command, reference, location, and long-term concern sections away from tables. Group related guidance to keep the root instructions under the target length while preserving the major operational warnings.

Co-Authored-By: OpenAI Codex <codex@openai.com>
Keep AGENTS.md as a compact router and move edge-case notes into a task-scoped policy.

Add Grit rules for command wrapper invariants that previously lived only in agent guidance.

Co-Authored-By: OpenAI Codex <codex@openai.com>
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 495be6a. Configure here.

Comment thread biome.jsonc
"@stricli/core": {
"importNames": ["buildCommand", "buildRouteMap"],
"message": "Import buildCommand from '../lib/command.js' and buildRouteMap from '../lib/route-map.js' instead. The wrappers inject telemetry and standard subcommand aliases."
"message": "Command files must use the repo command wrappers from lib/command.js, lib/list-command.js, lib/mutate-command.js, and lib/route-map.js instead of importing @stricli/core directly."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Restricted imports rule now blocks all @stricli/core usage

Low Severity

The noRestrictedImports override for src/commands/**/*.ts removed the importNames: ["buildCommand", "buildRouteMap"] field. Without importNames, Biome blocks all imports from @stricli/core in command files, including any future legitimate type imports or other non-wrapper utilities. The global rule at the top of the file still keeps importNames scoped, so this override silently broadens the restriction beyond what the global rule enforces.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 495be6a. Configure here.

dcramer and others added 2 commits May 4, 2026 14:37
Keep AGENTS.md readable in raw markdown by using bullets for commands, references, and file paths.

Co-Authored-By: OpenAI Codex <codex@openai.com>
Make AGENTS.md section names match the referenced content and keep the smoke-test workflow under playbooks.

Co-Authored-By: OpenAI Codex <codex@openai.com>
Copy link
Copy Markdown
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

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

I want to merge this but I think it is losing a lot of fidelity and adding too much boilerplate for questionable wins.

I'm fine making the AGENTS.md file smaller by splitting into parts. It's just this particular PR doesn't cut it for me due to the reasons I mentioned above.

## Intent
Commands should follow `gh`-style ergonomics while preserving consistent telemetry, JSON output, and error handling.

## Command Wrappers
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems like this missed the crucial buildListCommand helper

# CLI Command Design

## Intent
Commands should follow `gh`-style ergonomics while preserving consistent telemetry, JSON output, and error handling.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should probably mention curl-style ergonomics too, especially for sentry api command

Comment thread AGENTS.md
AI commits MUST include:

```text
Co-Authored-By: OpenAI Codex <codex@openai.com>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is bullshit

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