AGENTS.md
AGENTS.mdAGENTS.mdroot
Quality
87/100
Scores the file, not the repository.Length
575 words
6 headings · 0 code blocksRepository
1.4k
— · pushed 89 days agoLast changed
3 days ago
First indexed 3 days ago.1# AGENTS.md23Agent behavior instructions for `continues` — the cross-tool AI session handoff CLI. Read `CLAUDE.md` for architecture, types, and the step-by-step guide for adding a new parser. This file covers workflow, coding standards, and anti-patterns.45## Workflow67- **Before any commit**: run `pnpm run check` (`pnpm lint && pnpm build`). Fix all Biome errors; warnings are advisory.8- **After changing a parser or fixture**: run `pnpm test` and confirm all tests pass. Do not commit with failing tests.9- **After adding a new tool**: run `pnpm run link` to test the global `continues` / `cont` binary locally.10- **Never run** `pnpm run test:watch`, `e2e-conversions.test.ts`, `real-e2e-full.ts`, or `stress-test.ts` in CI — these require live session files on the developer's machine.1112## Coding Standards1314- **ESM-only**: all local imports must end in `.js`, even for `.ts` source files (e.g., `import { foo } from './foo.js'`).15- **No `any`**: Biome reports `noExplicitAny` as a warning. Avoid it; document the reason if unavoidable.16- **Exit codes**: set `process.exitCode = N` rather than calling `process.exit(N)`.17- **Logging**: use `logger` from `src/logger.ts` for all diagnostic output. Never use bare `console.log`/`console.warn`/`console.error` in library code. TUI display goes through `@clack/prompts` or `chalk` via the display layer.18- **Error types**: throw typed errors from `src/errors.ts` on user-facing paths, not bare `new Error()`.19- **Tool activity**: use `SummaryCollector` from `src/utils/tool-summarizer.ts` in every parser. Do not build `ToolUsageSummary[]` arrays manually.20- **JSONL**: use the shared streaming helpers in `src/utils/jsonl.ts`, never `fs.readFileSync` + `split('\n')`.21- **SQLite** (OpenCode, Crush parsers): use built-in `node:sqlite` — do not add third-party SQLite dependencies.22- **Biome rules in force**: `noEmptyBlockStatements` (error), `noUnusedImports` (error), `useConst` (error). Empty `catch {}` blocks fail the linter; use `catch (err) { logger.debug(...) }` instead.2324## Adding a New Tool — Checklist2526All five steps are required. Missing any one is a bug. See `CLAUDE.md` for detailed implementation guidance.27281. Add tool name to `TOOL_NAMES` in `src/types/tool-names.ts`292. Create `src/parsers/<tool>.ts` exporting `parse<Tool>Sessions()` and `extract<Tool>Context()`303. Register in `src/parsers/registry.ts` (the completeness assertion throws at module load if missing)314. Add `create<Tool>Fixture()` in `src/__tests__/fixtures/index.ts`325. Add conversion test cases in `src/__tests__/unit-conversions.test.ts`3334## Dependencies3536- **`@clack/prompts`** — all interactive TUI prompts and spinners. Do not use `readline` or `inquirer`.37- **`chalk`** — terminal color. Chalk v4 is installed (CommonJS compat import); do not upgrade to v5+ (ESM-only).38- **`commander`** — CLI argument parsing.39- **`ora`** — non-interactive spinners.40- **`yaml`** — YAML parsing for Copilot sessions.41- **`zod`** — runtime schema validation. Use `z.safeParse()` where failures are recoverable.42- Do not add new runtime dependencies without strong justification. The install footprint is intentionally small.4344## Anti-Patterns to Avoid4546- **Writing to tool storage directories** — the tool is read-only. Any write to `~/.claude/`, `~/.codex/`, etc. is a severe bug.47- **`exec()` with string interpolation** — always use `spawn()` with an argument array in `resume.ts`. Session IDs and paths can contain shell metacharacters.48- **`fs.readFileSync`/`fs.writeFileSync` in parsers** — these block the event loop. Use async fs APIs or shared streaming helpers.49- **Duplicating parser-helpers** — `cleanSummary`, `extractRepoFromCwd`, `homeDir` live in `src/utils/parser-helpers.ts`. Import them; do not reimplement.50- **Hardcoding tool names** — derive from `TOOL_NAMES` or `SessionSource`. Never write `if (tool === 'claude' || tool === 'codex' || ...)`.51- **Importing `node:sqlite` outside OpenCode/Crush parsers** — SQLite is only needed for those two tools. Do not spread this dependency.52- **Embedding secrets in handoff markdown** — `.continues-handoff.md` is written to project directories and may be committed or read by other AI tools.53
Also in yigitkonur/cli-continues
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| yigitkonur/cli-continues.github/copilot-instructions.md · 1.4k | Copilot instructions | lint-formatstylegitperformance+1 | 59/100 | 3 days ago | |
| yigitkonur/cli-continues.github/instructions/ci.instructions.md · 1.4k | Copilot instructions | setupbuildteststyle+4 | 82/100 | 3 days ago | |
| yigitkonur/cli-continues.github/instructions/parsers.instructions.md · 1.4k | Copilot instructions | testing-strategygitdo-not | 57/100 | 3 days ago | |
| yigitkonur/cli-continues.github/instructions/security.instructions.md · 1.4k | Copilot instructions | stylegitsecurity | 54/100 | 3 days ago | |
| yigitkonur/cli-continues.github/instructions/testing.instructions.md · 1.4k | Copilot instructions | testtesting-strategygitperformance | 56/100 | 3 days ago | |
| yigitkonur/cli-continues.github/instructions/typescript.instructions.md · 1.4k | Copilot instructions | styletypesgitdo-not | 61/100 | 3 days ago | |
| yigitkonur/cli-continuesCLAUDE.md · 1.4k | CLAUDE.md | setupbuildteststyle+4 | 94/100 | 3 days ago |
Diff against .github/copilot-instructions.md Diff against .github/instructions/ci.instructions.md Diff against .github/instructions/parsers.instructions.md Diff against .github/instructions/security.instructions.md Diff against .github/instructions/testing.instructions.md Diff against .github/instructions/typescript.instructions.md Diff against CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 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 | 3 days ago |
