Skip to content

chore: add agent instruction guidance#1273

Draft
zrosenbauer wants to merge 4 commits into
VoltAgent:mainfrom
zrosenbauer:chore/ai-cleanup
Draft

chore: add agent instruction guidance#1273
zrosenbauer wants to merge 4 commits into
VoltAgent:mainfrom
zrosenbauer:chore/ai-cleanup

Conversation

@zrosenbauer
Copy link
Copy Markdown
Contributor

@zrosenbauer zrosenbauer commented May 8, 2026

Status

Draft PR, still in progress.

Goals

  • Make AGENTS.md the canonical source of coding-agent instructions for the repository.
  • Add focused nested AGENTS.md files for the highest-impact core areas instead of adding instruction files everywhere.
  • Keep alternate instruction filenames as symlinks to AGENTS.md so instructions do not drift.
  • Add a reusable sync script for instruction-file aliases.
  • Move contributor docs into contributing/ and give them a consistent layout.
  • Document changeset expectations for published package changes.

Current Scope

  • Root AGENTS.md updates and contributor-doc references.
  • Core-focused AGENTS.md files for agent, memory, VoltOps, workflow, and workspace areas.
  • Symlinked instruction aliases for agents that require alternate filenames.
  • Contributor docs for structure, tooling, testing, linting, changesets, and coding-agent compatibility.
  • Gitignore updates for local coding-agent and IDE config.

Still In Progress

  • Final review of the contributor docs wording and scope.
  • Decide whether lint-staged should explicitly skip markdown symlinks, since the current pre-commit hook fails when symlinked instruction files are staged.
  • Any follow-up adjustments from maintainer review.

Summary by cubic

Make AGENTS.md the single source of truth for coding‑agent instructions, standardize guidance across core, server, and website, and add a script to sync CLAUDE.md symlinks. Also harden pre‑commit formatting by moving lint-staged to a JS config and skipping instruction files to avoid Prettier symlink errors.

  • New Features

    • Scoped AGENTS.md for packages/core sub-areas (agent, memory, workflow, workspace, voltops, a2a, mcp, observability, tool) plus packages/server-core and website/ (Docusaurus rules: npm not pnpm, sucrase-built plugins, hand‑curated static/llms.txt).
    • CLAUDE.md -> AGENTS.md symlink aliases; scripts/sync-agent-instructions.mjs previews, reports conflicts, and supports --yes.
    • Root AGENTS.md reorganized with Critical Rules, Boundaries, and Related; adds validation commands, safeStringify usage, and model‑registry generation.
  • Refactors

    • Moved contributor docs to contributing/* (coding‑agents, linting, tooling, testing, changesets); removed docs/linting.md and .cursor/rules/agents.mdc.
    • Updated .gitignore to ignore local agent/IDE config while keeping shared instruction files tracked.
    • Switched lint-staged to lint-staged.config.mjs, updated Husky pre‑commit to auto‑discover it, and added AGENTS.md/CLAUDE.md to .prettierignore to prevent Prettier 3.x symlink errors.
    • Standardized and fact‑checked all AGENTS.md files (e.g., tool span tool.execution:<name>, workflow span workflow.step.<stepType>, (Tool | Toolkit)[] type, MCP SDK pinning, workspace timeout notes).

Written for commit 4cfa777. Summary will update on new commits.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

⚠️ No Changeset found

Latest commit: 4cfa777

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
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 78e63c97-daa4-4c15-b91e-42a8c001f5af

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

zrosenbauer and others added 3 commits May 8, 2026 13:03
Refactor pass on all 13 AGENTS.md files (CLAUDE.md symlinks managed by
scripts/sync-agent-instructions.mjs):

- Add nested AGENTS.md for a2a, mcp, observability, tool, server-core,
  and website (Docusaurus-specific gotchas: npm vs pnpm, sucrase-built
  plugins, llms.txt is hand-curated, SSR rule, multiple sidebars).
- Rewrite root: split commit/PR conventions, replace contributor-docs
  bullets with a Vercel <docs-index> block that includes the website
  doc tree, audit Boundaries (lockfile, .changeset/, .github/, tsconfig,
  workspace yaml), drop generic "TypeScript-first" Code Style.
- Standardize layout: Critical Rules (bullets, top), Boundaries
  (3-tier bullets), "Related" instead of "See Also".
- Fact-check pass against actual source (3 verifier agents):
  - Tool span name is `tool.execution:<name>`, not `agent.tool.<name>`.
  - Workflow span name is `workflow.step.<stepType>`, not `<stepId>`.
  - Agent root span uses the agent's own `name`, not `agent.generateText`.
  - `agent.state` enum is running/completed/cancelled.
  - Subagent delegate is a single `delegate_task` tool, not `__delegate_to_<name>`.
  - `tools` option type is `(Tool | Toolkit)[]`.
  - Add `onStepFinish` to the public hook list.
  - Replace fabricated `workflow.resume(...)` with real `result.resume()` /
    `workflow.run(input, { resumeFrom })`.
  - Replace fabricated `client.actions.execute(...)` with namespaced API
    (`client.actions.slack.postMessage`, etc.).
  - Fix VectorAdapter shape (deleteBatch, no count/get) and
    EmbeddingAdapter.getDimensions(): number.
  - Rename AISdkEmbeddingAdapter -> AiSdkEmbeddingAdapter.
  - server-core: LogStreamManager, drop non-existent test:single script.
  - mcp: SDK is range-pinned (caret); default timeout 60000ms not 30000ms.
  - workspace: operationTimeoutMs has no default for general ops; fix
    stale spec paths; default search mode is conditional.

--no-verify used because lint-staged + Prettier 3.x errors on the
CLAUDE.md symlinks ("Explicitly specified pattern ... is a symbolic
link"). All files were pre-validated with `prettier --check` and pass.

Co-Authored-By: Claude <noreply@anthropic.com>
Switches the root lint-staged config from a static block in package.json
to lint-staged.config.mjs so we can filter files programmatically. Skips:

- AGENTS.md — canonical coding-agent instruction docs; hand-curated, not
  worth mechanical Prettier churn.
- CLAUDE.md — symlinks to AGENTS.md (managed by
  scripts/sync-agent-instructions.mjs). Prettier 3.x errors when handed
  symlink paths explicitly ("Explicitly specified pattern ... is a
  symbolic link"), which broke the pre-commit hook on AGENTS.md changes
  even when the underlying content was fine.

Updates the husky pre-commit hook to drop `--config package.json` so
lint-staged auto-discovers `lint-staged.config.mjs`.

Also adds AGENTS.md and CLAUDE.md to .prettierignore as a defense-in-depth
measure for direct `prettier --write` runs.

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@omeraplak omeraplak left a comment

Choose a reason for hiding this comment

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

wow 🔥

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