{"_id":"@_mark_/agent-config","_rev":"2-1f8c3b1d4de3f5c9b690ca67cf8754f1","name":"@_mark_/agent-config","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@_mark_/agent-config","version":"0.0.1","keywords":["claude-code","agents","testing","scaffold","cli"],"license":"UNLICENSED","_id":"@_mark_/agent-config@0.0.1","maintainers":[{"name":"_mark_","email":"mark@markbrown.space"}],"bin":{"agent-config":"bin/agent-config.mjs"},"dist":{"shasum":"8de9c9db1439eaa9c57a83bc9ab8746103e1598b","tarball":"https://registry.npmjs.org/@_mark_/agent-config/-/agent-config-0.0.1.tgz","fileCount":26,"integrity":"sha512-Oz7bG5YZ4USWB8PRv2tIOGvnf5COFPP9eFAqFCJzAqS9hDR5ErqFl4u8ujCBnBe4xBhPYP92ScDPCO1pLoCARw==","signatures":[{"sig":"MEYCIQD0uZZA7Spl+AeIL/a4Ew5QL2P/G/YktQJPJ/4GLkJORwIhALH8lwdJ0UApy4FT9Ib2Do6lmnAdTPdHUxg/HtEV/DTt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":117314},"type":"module","engines":{"node":">=24"},"gitHead":"4ff7f770fa733a926e4f7482d28342a0abb05396","scripts":{"test:smoke":"node bin/agent-config.mjs list","agent-config":"node bin/agent-config.mjs"},"_npmUser":{"name":"_mark_","email":"mark@markbrown.space"},"_npmVersion":"11.13.0","description":"Install agent tool bundles into a repo. `agent-config add <bundle>` drops Claude Code agents, slash commands, hooks, docs, and scripts into a target repo. First bundle: test-quality.","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.30.3","_npmOperationalInternal":{"tmp":"tmp/agent-config_0.0.1_1780618481814_0.973770937131847","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@_mark_/agent-config","version":"0.0.2","license":"UNLICENSED","description":"Install agent tool bundles into a repo. `agent-config add <bundle>` drops Claude Code agents, slash commands, hooks, docs, and scripts into a target repo. First bundle: test-quality.","type":"module","bin":{"agent-config":"bin/agent-config.mjs"},"keywords":["claude-code","agents","testing","scaffold","cli"],"engines":{"node":">=24"},"packageManager":"pnpm@10.30.3","scripts":{"agent-config":"node bin/agent-config.mjs","test:smoke":"node bin/agent-config.mjs list"},"gitHead":"ed304b625666aedc9f6b9faf8bca73087fa571f9","_id":"@_mark_/agent-config@0.0.2","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-x7vwBF2JEstjZQhfhN6n0vynencyZ/mM9tZvTN91Y4/jNJ2MQlXLo42drzVk9FHGUJXgO7hSSF/X0fXA+E6UMA==","shasum":"a27a5f4d727480bcedb9b2e6038f60de1f2b81c3","tarball":"https://registry.npmjs.org/@_mark_/agent-config/-/agent-config-0.0.2.tgz","fileCount":30,"unpackedSize":142997,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID9NW2WYhu/f4xVdjrm2Af7aLT0l8CDxthRTxJc/AI2aAiBr+VtAz9oqtafsOZ7JwS63EfMv+D2EOUuWa1r42D0vHw=="}]},"_npmUser":{"name":"_mark_","email":"mark@markbrown.space"},"directories":{},"maintainers":[{"name":"_mark_","email":"mark@markbrown.space"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-config_0.0.2_1780767870274_0.5435278757134245"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-05T00:14:41.706Z","modified":"2026-06-06T17:44:30.502Z","0.0.1":"2026-06-05T00:14:41.968Z","0.0.2":"2026-06-06T17:44:30.415Z"},"license":"UNLICENSED","keywords":["claude-code","agents","testing","scaffold","cli"],"description":"Install agent tool bundles into a repo. `agent-config add <bundle>` drops Claude Code agents, slash commands, hooks, docs, and scripts into a target repo. First bundle: test-quality.","maintainers":[{"name":"_mark_","email":"mark@markbrown.space"}],"readme":"# agent-config\n\nInstall agent tool bundles into a repo. `agent-config` packages reusable Claude\nCode agents, slash commands, hooks, and the scripts they drive — and drops them\ninto any target repo with one command.\n\nThe first bundle, **`test-quality`**, is a testing toolbox: an audit script, a testing doctrine, four\nsubagents, and the `/test`, `/cover`, `/rewrite-test`, `/mutate`,\n`/audit-tests`, `/ship` commands. The doctrine is stack-agnostic — repo-specific\ndetails come from a per-repo profile.\n\n## Layout\n\n```\nagent-config/\n  bin/agent-config.mjs     the CLI entry\n  src/install.mjs          install logic (resolves bundles off disk)\n  bundles/\n    test-quality/          the testing bundle (assets + manifest + schema + profiles)\n  core/                    placeholder for a future multi-backend runtime (see note)\n```\n\nIt's a single package — no workspace, no inter-package dependency.\n\n## Quick start\n\n```bash\n# Install the test-quality bundle into another repo:\nnpx agent-config add test-quality /path/to/repo\n\n# Preview without writing anything:\nnpx agent-config add test-quality /path/to/repo --dry-run\n\n# Also drop an editable profile template:\nnpx agent-config add test-quality /path/to/repo --with-config\n\n# From a clone of this repo:\nnode bin/agent-config.mjs add test-quality /path/to/repo\n\n# See what's installed and whether anything has drifted:\nnpx agent-config status /path/to/repo\n```\n\n`add` copies the bundle's Claude config into `.claude/`, the doctrine into\n`docs/testing/`, and the audit script into `scripts/`, then merges the required\nhooks into `.claude/settings.json` (idempotent — re-running is a no-op).\n\n## Configuring for a repo\n\nEach consuming repo commits one **profile**, `agent.config.json`, describing how\nthe universal doctrine binds to its stack (the datastore module, the test\ncommands, the directory layout, the tenant key, the mutation tool, etc.). The\nprofile is validated by\n[`bundles/test-quality/schema/profile.schema.json`](bundles/test-quality/schema/profile.schema.json),\nand [`bundles/test-quality/profiles/trpc-prisma.json`](bundles/test-quality/profiles/trpc-prisma.json)\nis a ready-made preset.\n\n```json\n{\n  \"unitUnderTest\": { \"term\": \"handler\", \"sourceGlob\": \"src/server/**/*.ts\" },\n  \"dataLayer\": { \"dbModule\": \"@/db\" },\n  \"testRunner\": { \"name\": \"vitest\", \"projects\": [{ \"name\": \"server\", \"match\": \"__tests__/server/\", \"kind\": \"server\" }] }\n}\n```\n\nThe audit script (`scripts/audit-tests.mjs`) reads `agent.config.{mjs,json}`\nfrom the target repo root, falling back to a built-in default preset.\n\n## Versioning & drift\n\nEach bundle manifest carries a `version`. On every `add`/`sync`, the installer\nwrites a lockfile, **`.agent-config/lock.json`**, into the target repo recording\nthe bundle version and a content hash of every file it manages. Commit it — like\n`package-lock.json`, it's shared provenance for the team.\n\n`agent-config status` reads that lockfile and reports, per bundle:\n\n- whether the installed version is current (`update available: 1.0.0 → 1.1.0`),\n- which managed files were **modified** locally (would conflict on update),\n- which **generated** files (e.g. `STACK.md`) were hand-edited,\n- which tracked files are **missing**.\n\n`.claude/settings.json` is deep-merged rather than owned, so it is intentionally\nnot tracked for drift. Hashes are taken against the canonical bundle content, so\na pre-existing file that `add` skipped will correctly show as drifted. See\n[`docs/specs/01-versioning-lockfile.md`](docs/specs/01-versioning-lockfile.md)\nfor the full design.\n\n## CLAUDE.md variants & discovery\n\nCLAUDE.md is a first-class, versioned asset. The package ships a catalog of\nnamed **variants** under `variants/` (e.g. `node-service`, `minimal`), each a\nclean doctrine body that layers in per-repo bindings via `@import`.\n\n```bash\n# List catalog variants:\nnpx agent-config claude-md list\n\n# Install one (writes a provenance marker + lockfile entry):\nnpx agent-config claude-md add node-service /path/to/repo\nnpx agent-config claude-md add node-service /path/to/repo --at=packages/api/CLAUDE.md\n\n# Find & classify every CLAUDE.md in a repo:\nnpx agent-config discover /path/to/repo\n```\n\n`discover` walks the tree and reports, per file: **provenance** (`locked` ›\n`marked` › `foreign`), **state** (`clean`/`modified`, hashed against the\nlockfile or in-file marker), **currency** (`up to date`/`outdated (X → Y)`), and\nits `@import` references (resolved `→ ok`/`missing`). A foreign file is\nfingerprinted against the catalog, so a hand-copied CLAUDE.md is recognized as\n`matches node-service@1.0.0 (unmarked)`. Installed files carry an HTML-comment\nmarker Claude Code ignores; the lockfile is authoritative when present. See\n[`docs/specs/02-claude-md-variants-discover.md`](docs/specs/02-claude-md-variants-discover.md).\n\n### Updating\n\nThe catalog is authoritative — agent-config **owns** the managed CLAUDE.md, so\n`update` overwrites it with the current canonical version (or switches variant).\nReal customization belongs in the `@import`-ed files (`CLAUDE.local.md`, the\ngenerated `STACK.md`), which `update` never touches — so there's no merge to do.\n\n```bash\nnpx agent-config update /path/to/repo                       # all installs\nnpx agent-config update /path/to/repo --path=CLAUDE.md      # one file\nnpx agent-config update /path/to/repo --to=minimal          # switch variant\nnpx agent-config update /path/to/repo --force               # also reset local drift\n```\n\nAn outdated file is overwritten to canonical. A file you've hand-edited\n(\"drifted\") is left alone until you pass `--force` — and any overwrite of a\ndrifted file first saves the old contents to `<file>.bak`, so a hand-edit is\nnever lost without a copy. No git, no 3-way merge. Full design in\n[`docs/specs/03-update-merge.md`](docs/specs/03-update-merge.md).\n\nOutput across `status`/`discover`/`update` is colorized via Node's built-in\n`util.styleText` (no dependency), and falls back to plain text when piped or\nunder `NO_COLOR`.\n\n## Status / scope\n\nThis is a **config distributor**, deliberately. Almost everything a bundle does\nlives in Claude Code markdown; the portable code is the installer + the audit\nscript. See [`core/README.md`](core/README.md) for the multi-backend runtime\ndirection that's reserved but not built.\n","readmeFilename":"README.md"}