cli-continues
AGENTS.md1.6k starsChanged 8 months agoMITView on GitHub
Agent 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. All five steps are required. Missing any one is a bug. See CLAUDE.md for detailed implementation guidance.
Trending
Quiet since June.thin dataabout the whole repository
Who's talking about yigitkonur/cli-continues
- A Hacker News story“Show HN:`npx continues` – resume same session Claude, Gemini, Codex when limited”Hacker News · Feb 19, 2026 · 15 points
- @camilleroux.com“Un CLI pour transférer une session de coding IA d'un outil à l'autre : passez de Claude à Copilot ou Gemini …”Bluesky · Feb 26, 2026 · 5 likes
- hodanov/my-pde“[scan:scripts] ai-bridge にリクエスト履歴の永続化と `replay` サブコマンドを追加する”GitHub · Jun 28, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 2 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Before any commit: run pnpm run check (pnpm lint && pnpm build).
- Very specific: line 8
After changing a parser or fixture: run pnpm test and confirm all tests pass.
- Very specific: line 9
After adding a new tool: run pnpm run link to test the global continues / cont binary locally.
- Very specific: line 14
ESM-only: all local imports must end in .js, even for .ts source files (e.g., import { foo } from './foo.js').
- Very specific: line 17
Logging: use logger from src/logger.ts for all diagnostic output.
- Very specific: line 19
Tool activity: use SummaryCollector from src/utils/tool-summarizer.ts in every parser.
- Very specific: line 20
JSONL: use the shared streaming helpers in src/utils/jsonl.ts, never fs.readFileSync + split('\n').
- Distinctive: line 26
All five steps are required.
- Very specific: line 28
Add tool name to TOOL_NAMES in src/types/tool-names.ts
- Very specific: line 29
Create src/parsers/<tool>.ts exporting parse<Tool>Sessions() and extract<Tool>Context()
- Very specific: line 31
Add create<Tool>Fixture() in src/__tests__/fixtures/index.ts
- Very specific: line 32
Add conversion test cases in src/__tests__/unit-conversions.test.ts
- Distinctive: line 42
Do not add new runtime dependencies without strong justification.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Agent 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.
Workflow
- Before any commit: run
pnpm run check(pnpm lint && pnpm build). Fix all Biome errors; warnings are advisory. - After changing a parser or fixture: run
pnpm testand confirm all tests pass. Do not commit with failing tests. - After adding a new tool: run
pnpm run linkto test the globalcontinues/contbinary locally. - Never run
pnpm run test:watch,e2e-conversions.test.ts,real-e2e-full.ts, orstress-test.tsin CI — these require live session files on the developer's machine.
Coding Standards
- ESM-only: all local imports must end in
.js, even for.tssource files (e.g.,import { foo } from './foo.js'). - No
any: Biome reportsnoExplicitAnyas a warning. Avoid it; document the reason if unavoidable. - Exit codes: set
process.exitCode = Nrather than callingprocess.exit(N). - Logging: use
loggerfromsrc/logger.tsfor all diagnostic output. Never use bareconsole.log/console.warn/console.errorin library code. TUI display goes through@clack/promptsorchalkvia the display layer. - Error types: throw typed errors from
src/errors.tson user-facing paths, not barenew Error(). - Tool activity: use
SummaryCollectorfromsrc/utils/tool-summarizer.tsin every parser. Do not buildToolUsageSummary[]arrays manually. - JSONL: use the shared streaming helpers in
src/utils/jsonl.ts, neverfs.readFileSync+split('\n'). - SQLite (OpenCode, Crush parsers): use built-in
node:sqlite— do not add third-party SQLite dependencies. - Biome rules in force:
noEmptyBlockStatements(error),noUnusedImports(error),useConst(error). Emptycatch {}blocks fail the linter; usecatch (err) { logger.debug(...) }instead.
Adding a New Tool — Checklist
All five steps are required. Missing any one is a bug. See CLAUDE.md for detailed implementation guidance.
- Add tool name to
TOOL_NAMESinsrc/types/tool-names.ts - Create
src/parsers/<tool>.tsexportingparse<Tool>Sessions()andextract<Tool>Context() - Register in
src/parsers/registry.ts(the completeness assertion throws at module load if missing) - Add
create<Tool>Fixture()insrc/__tests__/fixtures/index.ts - Add conversion test cases in
src/__tests__/unit-conversions.test.ts
Dependencies
@clack/prompts— all interactive TUI prompts and spinners. Do not usereadlineorinquirer.chalk— terminal color. Chalk v4 is installed (CommonJS compat import); do not upgrade to v5+ (ESM-only).commander— CLI argument parsing.ora— non-interactive spinners.yaml— YAML parsing for Copilot sessions.zod— runtime schema validation. Usez.safeParse()where failures are recoverable.- Do not add new runtime dependencies without strong justification. The install footprint is intentionally small.
Anti-Patterns to Avoid
- Writing to tool storage directories — the tool is read-only. Any write to
~/.claude/,~/.codex/, etc. is a severe bug. exec()with string interpolation — always usespawn()with an argument array inresume.ts. Session IDs and paths can contain shell metacharacters.fs.readFileSync/fs.writeFileSyncin parsers — these block the event loop. Use async fs APIs or shared streaming helpers.- Duplicating parser-helpers —
cleanSummary,extractRepoFromCwd,homeDirlive insrc/utils/parser-helpers.ts. Import them; do not reimplement. - Hardcoding tool names — derive from
TOOL_NAMESorSessionSource. Never writeif (tool === 'claude' || tool === 'codex' || ...). - Importing
node:sqliteoutside OpenCode/Crush parsers — SQLite is only needed for those two tools. Do not spread this dependency. - Embedding secrets in handoff markdown —
.continues-handoff.mdis written to project directories and may be committed or read by other AI tools.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

