Proof: Deployment repair may use kubectl only when the same fix is backported into repo workflow or scripts in the same turn, keeping push-driven automation as the steady-state path. Assumptions: Emergency break-glass incidents remain rare exceptions and should not redefine the normal deployment workflow. Still fake: Repo automation should prevent routine kubectl repair, but that guarantee depends on continued verification of the push-driven deploy path.
8 KiB
unrip agent rules
This repository is run with a data-first trading-system workflow.
Core rule
Every change must directly serve the currently approved turn.
What a turn is
A turn is the currently approved slice of work. There are two lanes:
- Implementation turn:
- defined by
PROOF.mdandIMPLEMENTATION.md - the job is to implement what
IMPLEMENTATION.mdsays, validate it againstPROOF.md, and keep working until the scoped fake paths are removed or explicitly recorded as remaining blockers
- defined by
- Research turn:
- defined by
research/ACTIVE.md - the job is to produce evidence against the active research charter, not product shape
- defined by
BACKLOG.md is not the turn.
ARCHIVE.md is not the turn.
They are planning and history artifacts.
Read order by task
Use the smallest context needed for the current task.
For implementation work
Read only:
THESIS.mdPROOF.mdIMPLEMENTATION.md
Do not read BACKLOG.md, ARCHIVE.md, or research/ACTIVE.md during an implementation turn unless the user explicitly asks to re-plan, open a new turn, review history, or switch to research.
For research work
Read only:
THESIS.mdresearch/ACTIVE.md
Do not read BACKLOG.md, ARCHIVE.md, PROOF.md, or IMPLEMENTATION.md unless the user explicitly asks to re-plan, compare lanes, or promote research into implementation.
For planning, re-planning, or archiving
Read:
THESIS.md- the live turn files for the lane being changed
BACKLOG.mdARCHIVE.md
Hard constraints
- Do not invent or adopt a new roadmap on your own.
- Do not expand scope beyond the active implementation proof or research charter.
- No backlog generation instead of implementation.
- No scaffolding ahead of demonstrated need.
- The repository must be fully wired so every service deploys automatically from a repo push.
- Manual deployment intervention is forbidden by default.
kubectlmay be used to fix a deployment only if the same fix is also backported into the repository scripts or workflow in the same turn so the next push should not require the same manual repair.- Manual
kubectlrollout, image patching, or other ad hoc production reconciliation without a repo backport is forbidden except when the user explicitly asks for emergency break-glass incident handling. - Quote collection and analytics are first-class from day one. They are not a later add-on.
- Do not present scaffolding, dashboards, placeholders, or mock flows as product progress.
- State assumptions before coding when the environment, venue, chain, or source behavior is uncertain.
- Declare what is still fake in every commit.
- Do not read
BACKLOG.mdorARCHIVE.mdduring an implementation turn unless the user explicitly asks to re-plan, open a new turn, or inspect history. - If you discover adjacent work, add it to
BACKLOG.mdinstead of absorbing it into the current turn. - Changes that widen risk require explicit user approval:
- live funds
- secret creation or rotation
- permanent infrastructure spend
- long-running external jobs
- destructive data migrations
- The long-term thesis may be proposed, but
THESIS.mdmust not be rewritten without explicit user approval.
Iteration archive rule
When the user says to plan the next iteration, next turn, implementation turn, or proof sprint:
- first preserve the finished turn before drafting new planning docs
- do not rewrite the live turn files until the current turn has been archived
- use the existing repo workflow and archive locations:
- implementation turn snapshots go in
archive/implementation/ - research turn snapshots go in
archive/research/
- implementation turn snapshots go in
- prefer the tracked scripts:
python3 scripts/workflow/close_turn.py ...python3 scripts/workflow/open_turn.py ...
Planning or archiving is the one time it is correct to read BACKLOG.md and ARCHIVE.md.
Planning inputs
iteration,implementation turn,proof sprint, andnext turnmean the same planning slice unless the user says otherwise.- Use
BACKLOG.mdonly while planning, re-planning, or archiving. Do not read it while implementing or validating the active turn unless the user explicitly asks. - Select backlog items and bugs that belong together under one proof topic instead of mixing unrelated work into the same slice.
- When an item is pulled into the live turn, remove it from
BACKLOG.mdand record the planning event inARCHIVE.md.
Planning quality bar
IMPLEMENTATION.mdmust be detailed enough that coding does not depend on rediscovering the plan mid-turn.IMPLEMENTATION.mdshould cover the end-to-end system touched by the proof: ingest, pricing, inventory, persistence, strategy, execution, control surfaces, logging, validation, tests, failure modes, and important edge cases.PROOF.mdmust be specific and falsifiable: scope, non-goals, definition of done, validation evidence, failure conditions, and clear statements about what is real versus fake.- Both planning documents should think through the whole operator workflow and full system path, not isolated file edits.
Turn lanes
- Implementation lane:
- Governed by
PROOF.mdandIMPLEMENTATION.md. - Must make the shared live and historical data path more real unless the turn is explicitly marked as pure ops.
- “Doing the turn” means implementing
IMPLEMENTATION.md, validating againstPROOF.md, fixing what fails, and continuing until the definition of done is met or a hard blocker is reached.
- Governed by
- Research lane:
- Governed by
research/ACTIVE.md. - Must name the hypothesis, dataset, metric, assumptions, and falsification condition.
- Research output is evidence, not product shape.
- Governed by
Commit rules
Every non-merge commit message body must include:
Proof: ...Assumptions: ...Still fake: ...
Install the tracked hook before relying on this:
bash scripts/workflow/install_hooks.sh
Post-implementation loop
- After implementation and validation, expect the user to test the slice and suggest small fixes.
- Treat those small fixes as part of closing the same turn unless the user explicitly changes scope.
Bug-fix rule
- If a bug is found, fix it, inspect analogous or affected locations, and apply the needed follow-up fixes there too.
- No bug fix is done without a regression test.
- If a meaningful automated test cannot be added, stop and explain why instead of claiming the fix is complete.
Real progress vs fake progress
Real progress means the repository can do more of the active proof with validated evidence from real systems. In this repo that means things like:
- ingesting real NEAR Intents flow
- storing durable inventory, pricing, decision, and execution records
- producing a real decision from live data
- making a real execution attempt through repo-controlled code
- deploying all repo-owned services automatically from push-driven repo workflow without manual cluster intervention
- proving blocked-path safety with explicit evidence
Fake progress includes:
- docs-only motion without stronger runtime truth
- speculative architecture not required by the active proof
- dashboards or control surfaces without the underlying real path
- placeholders or mocks presented as finished work
- invented data, unverifiable claims, or abstractions not yet required
Safety rules
- Prefer the smallest real implementation that proves the active turn works.
- Keep secrets out of git, docs, and chat history.
- Use self-hosted or directly controlled infrastructure by default.
- If something is fake or incomplete, say so plainly.
Review standard
Before claiming a turn is done, be able to state:
- what became more real
- what was validated against real data or systems
- what is still fake
- what was deliberately not built
Working rule
Within an approved turn, continue implementing and validating until:
PROOF.mdis satisfied for the active scope, or- a hard blocker requires user input.
Do not silently open the next turn yourself. Do not stop at “the structure exists.” Do not stop while the active turn still depends on hidden dummy paths. If something remains fake at the end of the turn, name it plainly.