Skip to content

Working with AI agents ​

How the repository is set up for AI coding agents (Claude Code and GitHub Copilot), and the rules they follow. It is for contributors who use an agent on Mapo itself. To give an agent Mapo knowledge inside your app, see AI assistant (MCP) instead.

One source, thin entry points ​

Rules, procedures and facts live in one place each, and every tool-specific file only points to them:

FileRead byHolds
AGENTS.md (root)Copilot directly; Claude Code through CLAUDE.mdScope, hard stops, repository map, the working loop, the module manuals
<module>/AGENTS.mdClaude Code through the sibling CLAUDE.md; Copilot when nested files are enabledThe rules of one package or folder
CLAUDE.mdClaude CodeOnly @AGENTS.md, which imports the manual next to it
docs/contributing/EveryoneThe procedures: these pages

Module manuals exist where a folder has rules of its own: packages/@mapomodule/mcp, form, uikit, core, docs/ and apps/. The root AGENTS.md lists them, so an agent that does not load nested files still knows to read them.

For Copilot in VS Code, turn on nested manuals in your settings:

json
{
  "chat.useAgentsMdFile": true,
  "chat.useNestedAgentsMdFiles": true
}

Skills ​

Skills are procedures an agent loads when a task needs them. Both agents read them from .claude/skills/.

SkillSourceUse it for
headless-frontend-devThis repositoryThe working method: contract first, reuse, docs with the code, staged hand-over
nuxt-modulesonmax/nuxt-skillsWriting Nuxt modules: kit utilities, hooks, module tests
nuxt, vue, pinia, nuxt-i18n, nuxt-uionmax/nuxt-skillsThe framework APIs Mapo builds on
vitestonmax/nuxt-skillsWriting and debugging unit tests
vue-testing-best-practicesvuejs-ai/skillsTesting Vue components and composables
mcp-builderanthropics/skillsDesigning MCP tools for @mapomodule/mcp
vitepressantfu/skillsThe docs site

The third-party skills are pinned in skills-lock.json and managed with the skills CLI:

bash
npx skills experimental_install                # restore the pinned skills
npx skills update -p                           # update the project skills, then review the diff
npx skills add <owner/repo> --skill <name> --agent claude-code --copy -y   # add one

The AGENTS.md files win over any skill: a skill is general advice, the manual is this project's decision. Skills that only change your personal style belong in your home folder (npx skills add <owner/repo> -g), not in the repository.

Subagents ​

Subagents run a task in their own context and report back. They live in .claude/agents/, which both agents read.

SubagentWhat it does
mapo-verifierRuns the gates and, when asked, the live check in apps/example-e2e; returns a compact pass/fail report. It changes nothing.
mapo-docs-curatorBrings the docs, the sidebar and the MCP recipes in line with a code change, then rebuilds and tests the knowledge base.
mapo-reviewerReviews the staged diff against the manuals and these pages; reports findings, most severe first. It changes nothing.

MCP servers ​

ConfigClient
.mcp.jsonClaude Code
.vscode/mcp.jsonCopilot

Both declare the same two servers:

  • mapo: this repository's own MCP server, run from packages/@mapomodule/mcp/bin/mapo-mcp.mjs with apps/example-e2e as its project root and that app's api-schema.json as the backend schema. It needs a build first (pnpm build). The live tools answer while pnpm dev:example-e2e runs.
  • nuxt-ui: the Nuxt UI documentation server, for component APIs and examples.

Using the mapo server while working on Mapo is also its everyday test: if it gives an agent a wrong answer, fix the docs or the recipe that caused it.

Permissions ​

.claude/settings.json is shared: it allows the read-only commands and the gates, and denies what an agent must never do on its own (pushing, releasing, publishing, discarding work). Personal permissions go in .claude/settings.local.json, which git ignores.

The rules agents follow ​

The complete list is in the root AGENTS.md. In short:

  • Work ends staged with a hand-over report; a commit happens only when someone asks for it.
  • No push, pull request, release or publish without an explicit request at that moment.
  • Work in progress that the agent did not create (the working tree, the stash) is never discarded.
  • Every change runs the gates; UI and runtime changes are also checked live in apps/example-e2e, and the dev server is stopped afterwards.
  • Docs and MCP recipes change in the same step as the code.

Keeping this setup current ​

When a convention changes, update the root AGENTS.md or the module manual, the page here that explains it, and the subagent that applies it, in the same change. Keep the entry points thin: a rule written in two places drifts.

Released under the MIT License.