flisk
AGENTS.md49 starsChanged 36 days agoMITView on GitHub
Contributor and AI coding agent guidelines for Flisk. Flisk runs a local development inner loop for microservices and multi-agent systems. Services that declare a command run as local processes with no Docker; container stacks run on Docker and Tilt. It discovers services from manifests, generates necessary local configurations (Vite, TSConfig, Compose), and orchestrates live-reloading environments. It is designed for fast local development; it does not emit Kubernetes manifests by default and does not replace production cluster orchestrators like Helm, Kustomize,…
- Reads credentials
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 35,040 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 repository21 other files it gives its agents.
- cli/AGENTS.mdAGENTS.md
- flisk-agent-opsSkill
- flisk-bug-hunterSkill
- flisk-buildSkill
- flisk-convertSkill
- flisk-doctorSkill
- flisk-e2e-authorSkill
- flisk-recipe-ai-agentSkill
- flisk-recipe-blogSkill
- flisk-recipe-saasSkill
- flisk-recipe-shopSkill
- flisk-recipe-startersSkill
- flisk-releaseSkill
- flisk-resourceSkill
- flisk-scan-convertSkill
- flisk-startup-perfSkill
- flisk-statusSkill
- flisk-tool-addSkill
- flisk-troubleshootSkill
- flisk-upSkill
- layer-autoresearchSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 4 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 20
Before modifying specific subsystems, read their dedicated guidance files:
- Very specific: line 22
Read cli/AGENTS.md before changing cli/ for coding standards, naming conventions, export patterns, and FliskError usage.
- Very specific: line 23
Read runtime/engine/AGENTS.md before changing runtime/engine/ for topology architecture, manifest-driven generation, golden image layering, …
- Very specific: line 24
Read runtime/discovery/AGENTS.md before changing runtime/discovery/ for scan roots, manifest validation rules, and caching behavior.
- Distinctive: line 29
Run checks from the repository root:
- Very specific: line 35
Test CLI: npm --prefix cli test (coverage: npm --prefix cli run test:coverage)
- Very specific: line 37
Verify dist sync: npm --prefix cli run check:dist
- Very specific: line 42
Run make help to inspect all available targets:
- Distinctive: line 53
Keep PRs focused: Address one specific issue or change per pull request.
- Distinctive: line 54
Add tests for behavior changes: Every new feature, bug fix, or CLI behavior change must include automated tests in the same PR.
- Very specific: line 55
Do not hand-edit generated files: Never edit .flisk/, .flisk-out/, release-dist-*, /*.autogenerated.*, or product_autogenerated_*.
- Very specific: line 56
Do not hand-write container manifests: Use the Flisk CLI to manage services:
- Very specific: line 57
Create services: flisk resource <name> --type agent|backend|worker|mcp or call the resource_create MCP tool
- Very specific: line 58
Start the stack: flisk up [stack] or call the up MCP tool
- Very specific: line 62
Check diagnostics: flisk doctor --json.
- Very specific: line 71
Never commit secrets or .env: Keep credentials, API keys, and environment overrides out of version control.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
Contributor and AI coding agent guidelines for Flisk.
Flisk runs a local development inner loop for microservices and multi-agent systems. Services that declare a command run as local processes with no Docker; container stacks run on Docker and Tilt. It discovers services from manifests, generates necessary local configurations (Vite, TSConfig, Compose), and orchestrates live-reloading environments. It is designed for fast local development; it does not emit Kubernetes manifests by default and does not replace production cluster orchestrators like Helm, Kustomize, Flux, or Argo.
Repository Map
cli/: TypeScript CLI implementation (flisk), Ink-based terminal UI, command handlers, and precompiled bundle (dist/).runtime/engine/: Tilt and Starlark topologies, generators, and infrastructure orchestration modules (runtime/engine/topologies/).runtime/discovery/: Starlark-based service discovery, multi-root manifest scanning, and registry generation.runtime/ext/: Tilt extensions, UI enhancements, and IDE components.runtime/platform/: Shared platform service definitions and topology templates (runtime/platform/services/).docs/: Architecture guides, tutorials, contributor documentation, and agent contracts (docs/agents/).scripts/: Shell, Node.js, and Python maintenance, verification, benchmark, and release scripts.tests/: End-to-end (e2e) tests, tilt-engine pytest suites, and test fixtures.
Package-Level Guidelines
Before modifying specific subsystems, read their dedicated guidance files:
- Read
cli/AGENTS.mdbefore changingcli/for coding standards, naming conventions, export patterns, andFliskErrorusage. - Read
runtime/engine/AGENTS.mdbefore changingruntime/engine/for topology architecture, manifest-driven generation, golden image layering, and Tilt conventions. - Read
runtime/discovery/AGENTS.mdbefore changingruntime/discovery/for scan roots, manifest validation rules, and caching behavior. - Subsystem directories under
runtime/engine/topologies/platform/(such asdocker/,net/,security/, andstate/) contain additional targetedAGENTS.mdfiles.
Common Commands
Run checks from the repository root:
CLI Verification
- Typecheck CLI:
npm --prefix cli run typecheck(orcd cli && npm run typecheck) - Lint CLI:
npm --prefix cli run lint(autofix:npm --prefix cli run lint:fix) - Test CLI:
npm --prefix cli test(coverage:npm --prefix cli run test:coverage) - Build CLI:
npm --prefix cli run build - Verify dist sync:
npm --prefix cli run check:dist - Quick one-liner (with Bun):
bun run typecheck && bun run lint && bun run test
Make Targets
Run make help to inspect all available targets:
make test: Run TypeScript, Python, and shell checks.make test-ts: Run TypeScript CLI test suite.make test-python: Run Python test suite with pytest.make test-shell: Run Bash syntax checks on scripts and e2e suite definitions.make test-e2e GROUP=<group> SUITE=<suite>: Run a live-stack e2e test suite (requires Docker, Tilt, and built flisk).make scores: Print the deterministic scoreboard (scripts/scores/README.md).make test-shellfails when a gate or ratchet on it drops.
Ground Rules
- Keep PRs focused: Address one specific issue or change per pull request. Avoid bundled refactors or unrelated formatting changes.
- Add tests for behavior changes: Every new feature, bug fix, or CLI behavior change must include automated tests in the same PR.
- Do not hand-edit generated files: Never edit
.flisk/,.flisk-out/,release-dist-*,**/*.autogenerated.*, orproduct_autogenerated_*. Modify the source files (service.json,package.json, or templates) instead. - Do not hand-write container manifests: Use the Flisk CLI to manage services:
- Create services:
flisk resource <name> --type agent|backend|worker|mcpor call theresource_createMCP tool - Start the stack:
flisk up [stack]or call theupMCP tool - Inspect status:
flisk status --jsonor call thestatusMCP tool - Inspect agent sessions:
flisk agent sessions <resource>lists them (add--watchto refresh);--session-id <id>reads one checkpoint. The MCP toolagent_sessionstakes an optionalsessionIdthe same way - Restart services:
flisk restart <resource>or callresource_restart - Check diagnostics:
flisk doctor --json; check generated files withflisk config verify --jsonor theconfig_verifyMCP tool
- Create services:
- Agent resource contracts: The
agentresource type manages its own process contract (/healthfor liveness,/readyfor checkpoint store reachable,GET /sessionslists stored sessions, session routing viax-session-id, checkpoints survive restarts). - MCP integration: Use
flisk mcpover stdio ({ "command": "flisk", "args": ["mcp"] }) for full MCP stack integration. - Starter templates: Use
flisk project agent-stack(MCP:project_initwithtemplate: "agent-stack") to scaffold a complete multi-agent system with tools, database, and messaging. - Local-only by default: Do not add Deployment or cluster manifest generators without an agreed export scope. Keep cluster deployment policy with the user's Kubernetes workflow. The one agreed export scope:
flisk export render,flisk export wranglerandflisk export compose(opt-in) may generaterender.yaml,wrangler.tomland a standalonedocker-compose.yml(bring-your-own resources, runs without Flisk) fromservice.json. They write files only: they never deploy, never create DNS records, never call a cloud API, and write environment variable names, never values. Kubernetes manifests stay out of scope. - Preserve diagnostics boundaries: Maintain the distinction between
flisk doctorenvironment/service checks andflisk config verifygenerated-project consistency checks. - Database migrations: New services, examples, and fixtures must run database migrations in an explicit
migratorresource (appType: migrator), not from an API start script or entrypoint. - Agent contracts location: Agent-facing contracts (
llms.txt,llms-full.txt, and the AI agents guide) live indocs/agents/; keep them there, not in the repo root. - The one-command demo is P1:
npx @flisk-sh/flisk demois the first thing a new user runs, so a regression in it outranks every other task. Its CI suite istests/e2e/journeys/demo(check "🎬 Demo command, run twice"). It runs the demo twice, because the second run meets the first run's Docker volumes, and runs it with Docker not running (cases N1-N3), where the demo must fall back to the two-service app as local processes (cli/src/utils/native-demo.ts,cli/templates/demo-native/). Native Windows runs that fallback too (tests/e2e/platforms/windowsW5). Keep it passing, and extend it when the demo's behaviour changes. - Never commit secrets or
.env: Keep credentials, API keys, and environment overrides out of version control. - Sign off commits: All commits must be signed off (
git commit -s) to comply with the Developer Certificate of Origin (DCO).
Verification Gotchas and Traps
- Stale
cli/dist/: The CLI is committed as compiled output incli/dist/. When modifyingcli/src/, always runnpm --prefix cli run build(ornpm --prefix cli run check:dist). Newly emitted files incli/dist/are gitignored by default; force-stage them withgit add -f cli/dist. - Biome execution: Run Biome through
npm --prefix cli run lintorcd cli && ./node_modules/.bin/biome check .. Do not run barenpx biomeat the repository root, which executes an obsolete package that exits 0 without checking. - Clean test artifacts before linting: Running tests with coverage creates cli/test-results/ and cli/coverage/, which cause Biome checks to fail. Remove these directories before running
biome check .. - Repository memory: Check
.claude/memory/MEMORY.mdbefore opening a PR for an up-to-date list of verification and CI traps observed across previous runs. Add a line when a task uncovers a new trap.
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.

