

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# Agent Instructions — agents-md-sync23Instructions for AI coding agents working on this repository. For what the tool itself does, see `README.md`.45## Project67Node/TypeScript CLI that composes an `AGENTS.md` from markdown fragments held in a central Bitbucket template repo, commits and pushes the result to a tool-owned branch on each target Bitbucket Data Center repo, and — when `--pr` is passed — opens or updates a pull request for that branch. Greenfield — currently only README and this file exist.89## Stack1011- **Language:** TypeScript, Node 20+12- **Runner:** `tsx` for dev, `tsc` for build13- **CLI:** `commander`14- **Validation:** `zod`15- **HTTP:** `undici` (or built-in `fetch`)16- **Tests:** `vitest`1718## Coding1920- TypeScript strict mode. No `any` without a written reason.21- Prefer small, pure functions. Keep I/O (Bitbucket API, fs) at the edges; keep composition logic pure so it can be unit-tested without network.22- No comments that restate the code. Only comment non-obvious *why*.23- Use Node's built-in `fetch` unless a specific `undici` feature is needed.24- Do NOT introduce a heavy templating engine. Include markers are `<!-- include: NAME.md -->` and are resolved by simple string replacement.25- Fragment resolution is profile-aware: `profiles/<profile>/NAME.md` wins over `common/NAME.md`. Keep `compose.ts` pure and test both paths.26- The default `AGENTS.md.tmpl` skeleton lives as a `DEFAULT_SKELETON` constant in `src/templateLoader.ts`. A profile can opt into a bespoke skeleton by dropping `AGENTS.md.tmpl` into its directory; absent that file, the default is used.27- v1 allows exactly ONE profile per target. Multi-profile (polyglot) support is out of scope. Do not add it without a design discussion.2829## Testing3031- Unit tests go in `tests/` and mirror `src/` layout.32- `src/compose.ts` MUST be covered by unit tests — it is the only pure-logic module and the heart of the tool.33- Network-touching code (`src/bitbucket.ts`, `src/sync.ts`) is tested via mocked `fetch` or integration tests against a sandbox repo, never against real production Bitbucket repos.34- Run tests with `npm test` (vitest). Every PR must pass tests locally before opening.35- **Sample outputs are golden fixtures.** `examples/sample-output-<profile>.md` is re-rendered on every build and test run by composing each profile in `examples/template-repo/profiles/` against `examples/template-repo/common/`. `npm run build` and `npm test` both invoke the render step. If a profile fragment changes, the sample file must be updated in the same commit. CI fails if committed samples drift from what `compose.ts` produces.3637## Review & Git3839- No direct pushes to `master`/`main`. Always work on a feature branch and open a PR.40- This repo is NOT a fork. Standard PR targeting applies — but if that ever changes, confirm the PR target with the user before running `gh pr create`.41- Commits: short imperative subject line, body optional. No Conventional Commits requirement yet.4243## Build & Run4445```bash46npm install47npm run build # tsc to dist/48npx tsx src/index.ts --config examples/targets.json --dry-run49```5051## Bitbucket API notes5253- Target is **Bitbucket Data Center** (self-hosted). API base: `/rest/api/1.0/`. Do NOT use Bitbucket Cloud endpoints (`/2.0/`).54- Auth: `Authorization: Bearer $BITBUCKET_TOKEN`.55- File write is `PUT /projects/{key}/repos/{slug}/browse/{path}` with multipart form fields `content`, `message`, `branch`, `sourceCommitId`.56- When the PR branch already exists, update it — do not create a second branch.5758## Do not5960- Do not push directly to `master`/`main`.61- Do not commit secrets, tokens, or `targets.json` files that contain real Bitbucket URLs/credentials. Add a `.env` and `examples/targets.json` with dummy values only.62- Do not touch any file in a target repo's `.agents/` directory. That directory is 100% repo-owned — the tool reads `.agents/<NAME>.md` files as per-section addenda when composing `AGENTS.md`, but only writes `AGENTS.md` itself.63- Do not skip pre-commit hooks (`--no-verify`) or Git signing without explicit user approval.64- Do not add support for Bitbucket Cloud or GitHub in v1 — it's out of scope.65
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/trick77-agents-md-sync-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.