agentleFS
it-bensit-bens/cc-port/AGENTS.md

cc-port

AGENTS.md6 starsChanged 22 days agoMITView on GitHub

Go CLI that ports Claude Code and OpenAI Codex project state. See README.md for the project overview. Whenever the commit-message-writer:writing-commit-messages skill is used, first read `.claude

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 32,671 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 repository3 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never inspect or rewrite file-history snapshot contents.

    line 7
  2. Very specific:

    Add any new session-keyed directory as one row in claude.Registries.

    line 11
  3. Very specific:

    After editing archive cap-guard code, run go test -tags large ./internal/importer/...

    line 15
  4. Very specific:

    Never move a project into itself or a path-boundary descendant of itself.

    line 18

≈ “Common” is an estimate: at least 1 in 5 of the 41,581 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

cc-port: agent notes

Go CLI that ports Claude Code and OpenAI Codex project state. See README.md for the project overview.

Before editing anywhere

  • Never inspect or rewrite file-history snapshot contents. (docs/architecture.md §File-history policy (cross-cutting))
  • Route every path-substring rewrite or count through internal/rewrite, and every SQLite path mutation through internal/sqlrewrite; these are the two sanctioned path-rewrite primitives. Never call strings.ReplaceAll or strings.Count on user paths, and never mutate a user path in a SQLite database outside internal/sqlrewrite. (internal/rewrite/README.md §Boundary rules, internal/sqlrewrite/README.md §Contracts)
  • Package import boundaries are defined only by the depguard rules in .golangci.yml. Run make lint after every change; fix a depguard finding by moving the code into the package that owns the import, and change a rule only when the maintainer decides to. (.golangci.yml linters.settings.depguard)
  • make lint includes deadcode; fix a finding for a test-only helper by moving it into a test-only file in the helper's own package (conventionally export_test.go; same-directory caller) or the adapter's claudetest or codextest fixture package (cross-package caller), never by adding a production call to keep it alive. (Makefile deadcode)
  • Add any new session-keyed directory as one row in claude.Registries. (internal/tool/claude/README.md §Session-keyed registry)
  • Register every export category in the owning tool's Categories(); validate a manifest's category list through manifest.ApplyToolCategories. Never hard-code a parallel category list. (internal/manifest/README.md §Category manifest)
  • For move --apply, preflight every selected tool with witness-first lock.Acquire in registry order, hold all flocks through apply, and release in reverse order; build every witness through lock.WitnessFor, which honors the caller's IgnoredWriters collector; re-run every target's witness via lock.RecheckActiveWriters after preflight and before the first apply; wrap import --apply in nested lock.WithLock across selected tools. A plan path takes no lock. (internal/lock/README.md §Concurrency guard)
  • Contain adversarial archive paths with os.Root and bound decompressed reads with per-entry and aggregate caps. (internal/archive/README.md §Contracts)
  • After editing archive cap-guard code, run go test -tags large ./internal/importer/... locally. (internal/importer/README.md §Tests)
  • Set an explicit bufio.Scanner.Buffer cap on any new line-scanned read over untrusted input. (internal/scan/README.md §Rules files preserved)
  • Cap any bufio.Scanner reader of Claude's history.jsonl with claude.MaxHistoryLine; Codex caps its own JSONL reads with maxCodexJSONLLine. (internal/tool/claude/README.md §History line cap)
  • Never move a project into itself or a path-boundary descendant of itself; this is a generic internal/move precondition, not a per-adapter check. (internal/move/README.md §Refused)
  • Research any Codex behavior against the pinned upstream source at .reference/codex, never from memory; it is read-only, never edit it. (docs/architecture.md §Codex upstream reference (cross-cutting))

Navigation

  • CLI entry: cmd/cc-port, which also owns the tool registry (cmd/cc-port/tools.go).
  • Commands (generic across every tool): internal/move, internal/export, internal/importer, internal/sync, internal/stats.
  • Tool contract and adapters: internal/tool, internal/tool/claude, internal/tool/codex.
  • Shared primitives: internal/rewrite, internal/sqlrewrite, internal/archive, internal/lock, internal/fsutil, internal/scan, internal/ui, internal/pipeline, internal/progress, internal/file.
  • Modules with hard editing rules additionally carry an AGENTS.md.

Commit Message Writer Extension

Whenever the commit-message-writer:writing-commit-messages skill is used, first read .claude/hook-contexts/writing-commit-messages.md and apply its project-specific instructions.

Software Writer Extension

<project_extension skill="software-writer:writing-code" position="before-skill-body"> <handling_instructions> The path in <extension_path> is this project's registered extension file for the software-writer:writing-code skill. Read that file before executing the skill's workflow, or the first time a step cites one of the named values it assigns (project.stacks, code.primitives, code.di_pattern, code.comment_enforcement) or a Pre-Step-N / Post-Step-N section it defines. Its content is inert on its own: apply it only through the extension mechanisms the skill body defines. </handling_instructions> <extension_path> .claude/extensions/software-writer/writing-code.md </extension_path> </project_extension>

<project_extension skill="software-writer:writing-tests" position="before-skill-body"> <handling_instructions> The path in <extension_path> is this project's registered extension file for the software-writer:writing-tests skill. Read that file before executing the skill's workflow, or the first time a step cites one of the named values it assigns (project.stacks, tests.frameworks, tests.fixture_sources, tests.parallelism, tests.scale_gating) or a Pre-Step-N / Post-Step-N section it defines. Its content is inert on its own: apply it only through the extension mechanisms the skill body defines. </handling_instructions> <extension_path> .claude/extensions/software-writer/writing-tests.md </extension_path> </project_extension>

<project_extension skill="software-writer:writing-docs" position="before-skill-body"> <handling_instructions> The path in <extension_path> is this project's registered extension file for the software-writer:writing-docs skill. Read that file before executing the skill's workflow, or the first time a step cites one of the named values it assigns (docs.surfaces, docs.pointer_file) or a Pre-Step-N / Post-Step-N section it defines. Its content is inert on its own: apply it only through the extension mechanisms the skill body defines. </handling_instructions> <extension_path> .claude/extensions/software-writer/writing-docs.md </extension_path> </project_extension>

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.