Skip to content

feat: you-md export renders your profile as AGENTS.md for 20+ coding agents - #23

Closed
brainsparker wants to merge 1 commit into
mainfrom
feature/2026-08-11-agents-md-export
Closed

feat: you-md export renders your profile as AGENTS.md for 20+ coding agents#23
brainsparker wants to merge 1 commit into
mainfrom
feature/2026-08-11-agents-md-export

Conversation

@brainsparker

Copy link
Copy Markdown
Owner

What this does

Adds a new CLI command, you-md export, that renders your you.md profile into the context files that non-MCP coding agents actually read:

  • you-md export (or you-md export agents): AGENTS.md content, printed to stdout or written with -o
  • you-md export claude: CLAUDE.md variant, with a tip about the @AGENTS.md import to prevent drift
  • you-md export gemini: GEMINI.md variant
  • you-md export copilot: .github/copilot-instructions.md (parent directories created automatically)
  • you-md export list: shows all targets

Behavior details: generated files carry a header marking them as generated from you.md with the regeneration command, existing files are never overwritten without --force, and exporting a profile marked privacy_level: private to a file prints a reminder that these files usually get committed to repos. Section order and subsections from the profile are preserved.

Why now (market rationale)

you.md promises "every AI tool you use now knows exactly who you are," but the skill only installs into 4 MCP-capable tools (Claude Code, Claude Desktop, Cursor, Windsurf). Meanwhile AGENTS.md has become the industry convergence point for agent context:

The repo can already import AGENTS.md (you-md convert), but could not produce one. This closes the loop and extends you.md reach from 4 tools to the whole AGENTS.md ecosystem with zero new dependencies.

Runner-up candidates considered today: a promptfoo-style CI quality-gate mode for PromptLens (solid but me-too), and migrating MCP-Profiles to the stateless 2026-07-28 MCP spec (right direction, too large for one PR).

Implementation notes

  • src/cli/commands/export.ts: new command following the check.ts pattern (dependency-injected runExport core, thin CLI wrapper), reusing the existing parser discovery chain
  • src/cli/args.ts and src/cli/index.ts: command wiring plus help text
  • test/cli/export.test.ts: 14 vitest cases covering all targets, ordering, overwrite refusal, --force, nested directory creation, privacy warning, and error paths
  • README: new "Export to AGENTS.md" section and CLI reference entry
  • No new dependencies

Test status

npm registry access is blocked in the build sandbox, so vitest could not run there. The new module was verified by bundling with esbuild (syntax and import resolution for export.ts, cli/index.ts, and the parser chain) and running a behavioral harness mirroring the vitest assertions: 26/26 checks pass, plus an end-to-end CLI smoke test of stdout, write, overwrite refusal, list, and unknown-target paths. Please run npm test in CI to confirm on the committed test file.

🤖 Generated with Claude Code

Generates AGENTS.md, CLAUDE.md, GEMINI.md, and .github/copilot-instructions.md from the you.md profile so AGENTS.md-native coding agents (Codex, Cursor, Copilot, Gemini CLI, Windsurf, Aider, Zed, and more) pick up the user context without MCP.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copy link
Copy Markdown
Owner Author

Superseded by #24, which implements the same you-md export command with managed-block merging, idempotent re-exports, backups, and a shared formatter so MCP output and exported files stay identical. Both PRs create src/cli/commands/export.ts and test/cli/export.test.ts, so only one could land.

Worth carrying forward from this PR as a follow-up: the copilot target (.github/copilot-instructions.md) and stdout printing, which #24 does not cover. Closing.

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