@1c2c/agent-templates
v0.1.0
Published
Canonical agent templates (CLAUDE.md, AGENTS.md, Cursor rules, ACP manifest schema) for OneClickToControl LLC repos.
Maintainers
Readme
@1c2c/agent-templates
Canonical agent templates (CLAUDE.md, AGENTS.md, Cursor rules) and the ACP manifest schema for OneClickToControl LLC repos.
This package mirrors the SSOT in octc-platform under templates/agents/ and schemas/. Repos consume it to scaffold and keep their agent templates drift-free against the platform baseline.
Install
pnpm add -D @1c2c/agent-templatesOr invoke the CLI directly without installing:
npx @1c2c/agent-templates initWhat's inside
| File | Purpose |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| templates/CLAUDE.md | Normative base for Claude-family agents. Contains <!-- octc:base ... --> markers. |
| templates/AGENTS.md | Neutral equivalent for Cursor / OpenAI / other coding agents. |
| templates/cursor/00-octc-base.mdc | Cursor rule with the always-applied platform baseline. |
| templates/cursor/01-octc-tooling.mdc | Cursor rule that codifies the platform tooling (TS, ESLint, pnpm, Conventional Commits). |
| schemas/octc-agent-provider.manifest.v1.json | JSON Schema (draft 2020-12) for the ACP manifest validated by verify.yml. |
CLI
The package exposes a binary octc-agents.
# scaffold the canonical files in the current repo
npx @1c2c/agent-templates init
# scaffold into a specific dir, overwriting any existing copy
npx @1c2c/agent-templates init --target ./my-repo --force
# report drift versus the canonical version (exits 1 on drift)
npx @1c2c/agent-templates verify
# update drifted files; markdown files keep your <!-- octc:user --> blocks
npx @1c2c/agent-templates syncinit writes:
<target>/CLAUDE.md
<target>/AGENTS.md
<target>/.cursor/rules/00-octc-base.mdc
<target>/.cursor/rules/01-octc-tooling.mdc
<target>/.octc/agents/manifest.schema.jsonsync rewrites only the <!-- octc:base ... --> block of CLAUDE.md and AGENTS.md, preserving any local edits inside <!-- octc:user --> ... <!-- octc:end-user -->.
Programmatic API
import { templates, schemas, VERSION } from "@1c2c/agent-templates";
const claudeMd = templates.claude();
const agentsMd = templates.agents();
const cursorBase = templates.cursorBase();
const cursorTooling = templates.cursorTooling();
const acpSchema = schemas.acpManifestV1();
console.log("agent-templates version:", VERSION);You can also resolve raw file paths via package exports:
import { paths } from "@1c2c/agent-templates/templates";
console.log(paths.claude); // absolute path to CLAUDE.md inside the packageOr import the JSON schema directly:
import schema from "@1c2c/agent-templates/schema" with { type: "json" };Provenance
Published with npm provenance via GitHub Actions OIDC (Trusted Publishers). Verify in your CI:
pnpm dlx audit-signatures || npm audit signaturesThe release run for each version is linked from the corresponding GitHub Release and the npm package page.
See docs/packages/POLICY.md for the full supply-chain policy.
Bootstrap (first manual publish)
If the package does not exist on npm yet, maintainers may need one manual publish before GitHub OIDC / Trusted Publishers can take over.
Git — Track
main:git checkout main && git pull. Ifgit pullcomplains about a missing remote branch, rungit branch --unset-upstreamthengit branch -u origin/main(your local branch was probably tied to a deleted feature branch).Install — Run
pnpm installonly from the monorepo root (octc-platform/). Do not paste inline comments (# …) into the shell as part of the command; pnpm may treat#as a dependency spec and fail withERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER.Build & publish path — From
packages/agent-templates/:pnpm run build, thennpm publish --access public. Do not runnpm publishfrom the repository root; that targets the privateoctc-platformworkspace package.Provenance —
publishConfig.provenanceexpects CI (GitHub Actions). On a laptop you will getEUSAGE/provider: nullunless you disable it for that one run:npm publish --access public --no-provenance(or
NPM_CONFIG_PROVENANCE=false npm publish --access public, depending on your npm version.)Auth — Set a non-empty token (
export NPM_TOKEN=npm_...) beforenpm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}", or usenpm login.
After the package exists, add a Trusted Publisher for @1c2c/agent-templates in npm (same org/repo as your other @1c2c/* packages) and prefer releases from CI only.
Drift policy
The single source of truth for these files lives in octc-platform:
templates/agents/CLAUDE.mdtemplates/agents/AGENTS.mdtemplates/agents/cursor/*.mdcschemas/octc-agent-provider.manifest.v1.json
This package mirrors them at build time via scripts/sync-from-ssot.mjs (run by prepack). The agent-templates-drift job in verify.yml blocks any PR where the package copy and the SSOT diverge.
Versioning
Strict SemVer, Changesets-driven. See docs/packages/POLICY.md#versionado-de-1c2cagent-templates-caso-especial:
- Major — breaking structural change, removed sections, or anything that breaks tooling that parses the files.
- Minor — new sections, additional non-breaking rules, support for new runtimes.
- Patch — wording fixes, examples, typos.
