agentleFS
neal-kyleneal-kyle/cosmion/CLAUDE.md

cosmion

CLAUDE.md2 starsChanged 30 days agoMITView on GitHub

Cosmion is a CLI (cosmion) for generating images with any model on OpenRouter, bring-your-own-key, for developers and their agents. All thirteen commands of v0.1 are built (specs/001-cli/tasks.md; unticked boxes there are the maintainer's manual release checks). Code lives in src/ (core/ logic, cli/ commands and I/O), tests in tests/. SKILL.md (shipped to agents) and README.md are user docs: update them, and the tests/skill-md.test.ts they must pass, whenever a command, option or exit code changes. The rules live in .specify/memory/constitution.md: how…

The file

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

2 rules. About 0 are common, 2 are distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Update CLAUDE.md as part of the work, without being asked, whenever something changes how a future session should work here, in the same …

    line 67
  2. Distinctive:

    Keep it short: replace or remove outdated lines rather than appending, and don't duplicate the constitution, the docs above or the code.

    line 73

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project state

Cosmion is a CLI (cosmion) for generating images with any model on OpenRouter, bring-your-own-key, for developers and their agents. All thirteen commands of v0.1 are built (specs/001-cli/tasks.md; unticked boxes there are the maintainer's manual release checks). Code lives in src/ (core/ logic, cli/ commands and I/O), tests in tests/. SKILL.md (shipped to agents) and README.md are user docs: update them, and the tests/skill-md.test.ts they must pass, whenever a command, option or exit code changes.

The rules live in .specify/memory/constitution.md: how code is written, testing, the agent interface, the feature workflow and git. Read it before any work; this file doesn't repeat it.

Where things are:

  • specs/: records of how each feature was built, not kept up to date after merging. specs/001-cli covers the whole CLI (v0.1).
  • docs/openrouter-api.md: the OpenRouter endpoints, fields and pricing rules Cosmion uses, including what was checked against the live API. Check it before speccing anything that talks to OpenRouter.
  • DESIGN.md: how the CLI looks on a terminal. A command's terminal output goes in its pretty function; its text is for pipes and agents and doesn't change with the look.

Commands

CommandDoes
npm run buildtsc → dist/ (tsconfig.build.json, src/ only)
npm testBuilds first (pretest), then Vitest, all tests. tests/concurrency.test.ts runs dist/, so a bare npx vitest needs a fresh build
npm run lintBiome check, then tsc --noEmit over source and tests (tsconfig.json)
npm run formatBiome formats the code
npm run pack-checkPacks and installs the package in a temp folder, then runs it against the fake (scripts/pack-check.mjs; needs network for the install)
node dist/cli/main.js …Run the built CLI (or npm link once, then cosmion …)

Each change ends with lint, test and build passing. Releasing: bump version in package.json and add its entry to CHANGELOG.md (what a user would notice), merge to main, push a tag v<version>; CI stages it on npm once every system passes, and the maintainer approves it on npmjs.com (Staged Packages tab, with 2FA) to make it live. npm refuses it unless repository.url in package.json matches the GitHub repo and the repo is public.

COSMION_TEST_OPENROUTER_URL=<url> points the built CLI at a fake OpenRouter (FR-058); serveFakeOpenRouter() in tests/helpers/fake-openrouter.ts serves one. It's test-only: keep it out of the README and SKILL.md.

New capabilities go through Spec Kit (lean preset):

CommandUse for
/speckit-specifyStart a feature: creates a numbered branch and specs/<NNN-name>/spec.md
/speckit-clarifyResolve ambiguities in the spec before planning
/speckit-planplan.md: how it's built
/speckit-taskstasks.md: phased task checklist
/speckit-analyzeCheck spec, plan and tasks agree before implementing
/speckit-implementBuild, one phase at a time
/speckit-convergeCompare what was built with the spec and add remaining work
/speckit-checklistOptional: quality checklist for a spec

Spec Kit's git extension has auto-commit turned off.

Keeping this file current

Update CLAUDE.md as part of the work, without being asked, whenever something changes how a future session should work here, in the same commit as the change that caused it: commands added or changed, a convention established, a non-obvious gotcha discovered, or a lasting instruction from the maintainer. Rules belong in the constitution (with the maintainer's approval), not here.

Keep it short: replace or remove outdated lines rather than appending, and don't duplicate the constitution, the docs above or the code. Mention the update to the maintainer when it happens.

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.