agentleFS
pjlangleypjlangley/ff/.claude/skills/build/SKILL.md

build

Skill4 starsChanged 53 days agoUnlicenseView on GitHub

Authoritative commands and conventions for building and QA-ing code in this repo (Node.js, Python, Rust/Anchor, Terraform, Bruno). Use for ANY code change — editing, building, upgrading, linting, testing, formatting — including one-off and ad-hoc work that is not part of a spec feature. This is the general reference and the default; it is not tied to the spec-driven workflow.

  • Reads credentials

156 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use backprop, finances and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • JuliusBrusseeSkill

    backprop

    Bug → spec protocol. When a bug is found or a test fails, trace the cause, decide whether a new §V invariant would catch recurrence, append to §B. This is the one non-obvious thing SDD does that plan-then-execute doesn't. Triggers on test failure, bug report, post-mortem, or explicit user ask.

    Also in 4 projects that use this

  • GerardoRdz96Skill

    finances

    Use when Gera talks about his money — logging an expense ("I spent X on Y"), checking where he stands this pay-period, closing a period, planning debt payoff, onboarding his financial picture, or asking for budgeting/finance opinions. Servy's financial brain. Triggers — "I spent", "log this expense", "where am I this period", "close the period", "how's my budget", "debt plan", "should I pay off", "finances onboard", "/finances".

    Also in 3 projects that use this

  • cpiprintSkill

    favicon

    Generate favicons from a source image

    Also in 3 projects that use this

  • madeehahassanSkill

    Go-Live

    Pre-launch checklist. Use before making any app public, sharing a link externally, or announcing a product launch. Adapts to Claude Code, claude.ai, and Cowork.

    Also in 3 projects that use this

  • JuliusBrusseeSkill

    deepen

    Optional design-improvement pass for when you have spare usage to drain. Finds the shallowest modules in the code the spec touches, researches a deeper design, and proposes refactors that shrink interfaces and hide decisions — behavior held constant, tests green before and after. Proposes §I/§V/§T edits, never silent rewrites. Triggers when the user says "deepen this", "improve the design", "this module feels shallow", "pull complexity down", "use spare budget on the codebase", or invokes /ck:deepen. Leans on the codebase-design skill's deep-module vocabulary when present.

    Also in 3 projects that use this

  • synaptiaiSkill

    gate

    Create a BDSK review_gate artifact. Defines a checkpoint that controls whether generated output may proceed toward acceptance. Use when defining quality, security, or scope gates for execution plans.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 143 edited versions we read keep these.

  • 2

    Distinctive

    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:

    Prefer snake case for file and directory names.

    line 68
  2. Distinctive:

    What to expose vs not: If it is reusable beyond the feature that introduced it — expose it.

    line 82

“Common” is measured: kept by at least 6 in 10 of the 143 edited versions of this file we could read. “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
SKILL.md

build

The single source of truth for how to build and verify code in this repo. Consult it before and while changing any code. It is used directly for everyday work (e.g. "fix this lint error", "upgrade Node to v24") and is composed by the spec-build skill during spec-driven, per-task delivery.

When to use

The default for any code change anywhere in the repo — editing, building, upgrading, linting, testing, formatting — including one-off and ad-hoc work. This is the skill to reach for unless you are explicitly working through a planned spec feature's task list (in which case use spec-build, which composes this skill).

Common commands

  • docker compose --profile blockchain up - runs the local infrastructure (this is normally up and running).
  • docker compose --profile blockchain --profile api up - runs the local infrastructure including the APIs.
  • fnm used for local Node.js, and version is specified in .node-version.
  • node --run test - runs the Node.js unit tests.
  • uv used for local Python; config in ./pyproject.toml.
  • uv run python -m unittest -v runs the Python unit tests.
  • node --run api to run the local Node.js API.
  • node --run api:bru:fastify to run the Bruno integration tests against the running Fastify API.
  • uv run python -m fragments.api to run the local Python API.
  • node --run api:bru:fastapi to run the Bruno integration tests against the running FastAPI API.
  • solana and anchor CLI commands are available locally.
  • Further anchor CLI commands available once you change directory into ./fragments/blockchain/solana/, e.g.:
    • anchor test (or cargo test -p program-tests) runs the Rust unit tests.
    • anchor build to build all programs.
  • terraform login - one-time, authenticates against HCP Terraform.
  • TF_CLOUD_ORGANIZATION must be set in the environment for any terraform command that contacts HCP (init, plan, apply, etc.) — the cloud {} block in code omits organization so it can be supplied here.
  • Further terraform CLI commands available once you change directory into a workspace root, e.g. ./fragments/terraform/ff_dev/:
  • terraform fmt -check -recursive ./fragments/terraform - format check for all terraform code.

Conventions

  • Node.js code is formatted and linted with Deno; config in ./deno.json.
  • Node.js code is written in TypeScript and uses tsc to build (see ./tsconfig.json) the core fragments.
  • Node.js API is locally run with tsx and uses ./tsconfig.api.json.
  • Local Solana validator settings in ./solana-cli.local.yml (you do not have permission to read the referenced ./solana.id.json key file though).
  • Python code is type-checked with mypy; config in ./pyproject.toml.
  • Python code is linted with pylint; config in ./pyproject.toml.
  • Python code is formatted with ruff; config in ./pyproject.toml.
  • Solana program Rust code is linted with clippy and formatted with cargo fmt.
  • Solana program tests can be run with cargo test -p program-tests (uses LiteSVM).
  • Terraform code is formatted with terraform fmt and validated with terraform validate.
  • Terraform state is stored remotely in HCP Terraform; each workspace root directory binds to one HCP workspace via the cloud block in main.tf.
  • ff_dev uses local execution; ff_prod uses remote execution (configured in the HCP workspace UI, not in code).
  • Terraform AWS provider uses a default_tags block so every taggable resource automatically gets Project / Environment / ManagedBy tags. Don't duplicate these tags at the resource level.
  • Resource names should be derived from local.name_prefix ("${var.project}_${var.environment}") declared in each root module's locals.tf.
  • .terraform.lock.hcl files are committed; .terraform/, *.tfstate*, and *.tfvars are ignored.
  • Core fragments have access to environment variables that specify the locally running Solana program IDs - see ./solana_program_keys/solana_program_keys.env.
  • Production-grade code with a pragmatic understanding that this is for educational purposes. For example, I made a trade-off by using ephemeral in-memory keypairs in the API interfaces that operate on the Solana programs, i.e. in ./fragments/apis/fastify/blockchain/solana_username.ts. Potentially come back to this if I end up with a CD workflow in AWS (e.g. use a secrets manager in the cloud instead)
  • Prefer snake case for file and directory names.

API surface

  • Every capability a fragment exposes is surfaced on both APIs. The rule is about the capability, not where it lives: whenever a fragment gains something a caller could reasonably want to do — a read, a write, a query, an action against whatever the fragment integrates with — it gets a route on Fastify (./fragments/apis/fastify/, registered in app.ts) and on FastAPI (./fragments/apis/fastapi/, app.py), with the same path, status codes and JSON shape — bigints stringified, malformed input answered 400 by both rather than one framework's native 422 (see the comment on get_registration_by_index_route in ./fragments/apis/fastapi/blockchain/solana_register.py). Each new route gets cases in the co-located route test file (e.g. solana_register.test.ts / test_solana_register.py) and a Bruno request under ./fragments/apis/bruno/ that runs against both environments (environments/fastify.bru, environments/fastapi.bru). Today that covers the solana_*_interface fragments and the datastore modules; a new kind of fragment is covered by the same rule.
  • What to expose vs not. If it is reusable beyond the feature that introduced it — expose it. Feature-specific orchestration and runtime wiring — a Lambda handler, a consumer loop, readConfig / createAwsClients in ./fragments/solana_register_sync/poller.ts — is a deployment surface, not a capability; don't expose it. When a capability first appears inside orchestration code (as the by-index read did in the poller), promote it into the fragment it belongs to, mirror it in the other language, and expose it: GET /solana/register/index/:index (getRegistrationAccountByIndex / get_registration_account_by_index) is the exemplar.

Testing conventions

Decided in ADR 013; the short version:

  • The chain is real. Blockchain fragment tests (*.test.ts, test_*.py) are integration tests against the local validator — assume it is running (docker compose --profile blockchain up). Never mock initRpcClient / init_rpc_client, the @solana/kit or solana-py RPC clients, or the solana_*_interface fragments. A module that integrates with the chain is tested through the chain, against accounts the deployed program actually wrote.
  • AWS is mocked, at the SDK client boundary. Inject the clients (see PollerClients in ./fragments/solana_register_sync/poller.ts) and double them with aws-sdk-client-mock (Node.js) or the boto3 equivalent (Python), so tests assert the commands, condition expressions and envelopes the module actually sends. Do not mock one level higher (a wrapper or interface) — that hides exactly the parts worth asserting.
  • Be frugal with the shared validator. The runner executes files in parallel against one validator with slowed slots (--ticks-per-slot 256). Confine chain writes to before / setUpClass and keep them few; when bootstrapping a singleton PDA tolerate an already in use error; use a generous confirmation window whose result is asserted, not ignored. ./fragments/solana_register_sync/poller.test.ts is the exemplar.
  • In the agent sandbox the validator is unreachable (loopback listen() denied, Docker socket blocked). Run typecheck / lint / format yourself, then hand node --run test / uv run python -m unittest -v to the user and say so explicitly in the handback. Never report those tests as passing, and never work around it by mocking the chain.

See also

  • spec-build — drives spec-driven, per-task delivery and composes this skill for the commands and conventions above.
  • spec-tasks — plans the API surface above into each task at task-split time, so routes are not retrofitted later.
  • The spec-driven workflow: spec-ideate → spec-tasks → spec-build.

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.