gleam-change
Implement or review a change to the controller with the sans-IO boundary, confined FFI, supervision, tests and documentation the invariants require.
- License 许可
- Apache-2.0
- 所属仓库
- BiscuitBin/knarr
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- gleam-change
- description
- Implement or review a change to the controller with the sans-IO boundary, confined FFI, supervision, tests and documentation the invariants require.
03 SKILL.md 正文
Change the controller
- Read
AGENTS.mdanddocs/decisions/0002-sans-io-boundaries.md. Identify which module undersrc/the change lands in and whether it changes what the controller writes to the cluster; an annotation, a label or a patch shape is part of the worker contract and so part of the change. - Find the clause. Every behaviour has an owning module under
docs/specs/; read the rule, its guards and its outcomes before writing code. If no clause says what you need, this is aspec-changefirst, not a judgement call in code. - Put every effect behind the sans-IO boundary. Decision logic takes observations, a clock value and configuration as plain values and returns the decision; HTTP polls, Kubernetes reads and patches, timers and scheduling live in adapters that call pure builders and decoders and send through an injected function. A change that wants to read the clock, the network or the environment inside the decision logic has found a design problem, not a missing import.
- Keep Erlang calls in a named
*_ffi.erlmodule beside the Gleam module that owns them, and nothing else may@external. Every process starts under a supervisor; a bare spawned process is a finding. - Derive the test from the clause before implementing, and confirm it fails first. A test under
test/drives the decision logic with values and asserts the decision; an adapter test proves the HTTP or Kubernetes behaviour against a fake or the local cluster tier the test-tier decision assigns. A test already green proves nothing about the new behaviour. - The controller writes only the annotations it owns on live Pod objects. It never changes replica counts, never touches a Deployment's pod template, and stops patching a pod once
deletionTimestampis set. A change that would do any of these is a specification question, not a code change. - Run
just format-check,just buildandjust test, thenjust checkbefore handing back. Warnings are errors inbuildand in the gate alike, andbuildandtestrefuse a driftedmanifest.toml;gleam deps downloadand a reviewed diff fix that, never a hand edit. - Report by
file:line: what changed, which clause it implements, and which test proves it.
04 同仓库更多 Skills
witness
Independently witness that an Allium loop's convergence claim is true and was reached honestly. Use when the user wants to verify a loop's self-report, confirm tests really pass and no generated test was weakened, produce a convergence certificate or witness record, gate CI on a trustworthy signal, or check that an autonomous run did not cheat its way to green.
weed
Weed the Allium garden. Find where Allium specifications and implementation code have diverged, and help resolve the divergences. Use when the user wants to check spec-code alignment, compare specs against implementation, audit for spec drift or violations, sync specs with code or code with specs, or verify whether the implementation matches what the spec says.
tend
Tend the Allium garden. Use when the user wants to write, edit, update, add to, improve, clarify, refine, restructure, fix or migrate Allium specs. Covers adding entities, rules, triggers, surfaces and contracts, fixing syntax or validation errors, renaming or refactoring within specs, migrating specs to a new language version, and translating requirements into well-formed specifications. Pushes back on vague requirements.
spec-change
Change an Allium specification and carry the change through the tests and the implementation.
review-docs
Add or revise a handbook page so it satisfies the documentation contract and stays reachable.
review-change
Review a change in this repository against its invariants, specifications, tests, and documentation contract.