docs: add the coder prompt for the correction phase
This commit is contained in:
1 parent
d972896e1a
commit
54184c6a5f
1 file changed
+77
@@ -0,0 +1,77 @@
|
|||||||
|
# Coder prompt — corrections before Phase C
|
||||||
|
|
||||||
|
Paste everything below the line into the coding agent.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
You are the coding agent for **Skuld**, the repository `skuld`. Phase A and Phase B of
|
||||||
|
`docs/TODO.md` are done and committed. The owner has reviewed the running app and asked for a set
|
||||||
|
of corrections. Your job in this session is **Phase B2 only**: steps 27 to 44 of `docs/TODO.md`.
|
||||||
|
|
||||||
|
## Scope, and the hard stop
|
||||||
|
|
||||||
|
- Do steps 27, 28, ... 44, in that order, one step per turn.
|
||||||
|
- **Do not start Phase C.** No `Dockerfile`, no `Makefile`, no `package.json`, no `startos/`
|
||||||
|
directory, no `icon.svg`, no `README.md`, no `instructions.md`, no `AGENTS.md`. The owner will
|
||||||
|
say when Phase C starts.
|
||||||
|
- Do not add anything the steps do not name, and do not "improve" neighbouring code on the way.
|
||||||
|
- If a step turns out to be impossible as written, stop and ask instead of inventing a variant.
|
||||||
|
|
||||||
|
## Read this first
|
||||||
|
|
||||||
|
1. `docs/spec.md` — the contract. It was updated for these corrections, so read it fresh rather
|
||||||
|
than from memory. §2 holds the display rules, §3.2 the fees, §3.10 `Forvaltningskostnad`, §4
|
||||||
|
the schema, §5 the lot ledger, §6 the report, §7.3 the form, §7.6 the transaction list, §8 the
|
||||||
|
API.
|
||||||
|
2. `docs/TODO.md` — Phase B2, steps 27 to 44, each with its own verification.
|
||||||
|
|
||||||
|
## What the owner asked for, in his words
|
||||||
|
|
||||||
|
- Amounts are shown in **sats**, never in BTC, with a space as the thousands separator.
|
||||||
|
- **No decimals on kroner in the UI.** They must still be stored and calculated exactly.
|
||||||
|
- A **`Pris` column** in `/transaksjonar`, between `Til konto` and `Inn`: the bitcoin price when
|
||||||
|
the coins were bought, `Salg/kostnad NOK ÷ (Kjøp sats ÷ 10^8)`. His example: 10 kr ÷
|
||||||
|
(1 000 sats ÷ 10^8) = 1 000 000 kr. He calls this "bitcoin pris"; the lot table label
|
||||||
|
`Kostnad per BTC` becomes `Bitcoin pris`.
|
||||||
|
- The field set per type in `/transaksjonar` must match his list exactly. The two things that
|
||||||
|
were wrong: **Forvaltningskostnad** takes no account and stands on its own, and it is **sats
|
||||||
|
only** — and, from his field list, neither **Gåve (motteke)** nor **Forvaltningskostnad**
|
||||||
|
takes an Avgift.
|
||||||
|
|
||||||
|
## Language
|
||||||
|
|
||||||
|
- Code, identifiers, comments, commit messages, `docs/*.md`: **English**.
|
||||||
|
- Everything the end user sees: **Norwegian Nynorsk**.
|
||||||
|
- `1 500 000 sats`, `1 000 000 kr`, `31.12.2025`. Never `1,5 BTC` and never `1 000 000,00 kr` in
|
||||||
|
a figure.
|
||||||
|
|
||||||
|
## How to work
|
||||||
|
|
||||||
|
- One step per turn, files exactly as the step names them, the step's verification run before you
|
||||||
|
commit, one-line English commit message.
|
||||||
|
- The repository must be consistent after every step: it imports, the tests pass, no page is left
|
||||||
|
without its script.
|
||||||
|
- Keep `python3 -m unittest discover -s tests -v` green from step 34 onwards. Steps 27 to 33 may
|
||||||
|
leave the tests red **only** where the step says so, and step 34 and 35 must end green.
|
||||||
|
- Money stays integer øre and BTC stays integer sats. No floating point, ever.
|
||||||
|
- Read only the files the step touches.
|
||||||
|
|
||||||
|
## Stop and ask the owner when
|
||||||
|
|
||||||
|
- a verification fails twice and the cause is not obvious;
|
||||||
|
- the spec and a step contradict each other;
|
||||||
|
- you think a third-party dependency is needed (it is not: the standard library only).
|
||||||
|
|
||||||
|
## Report format for every step
|
||||||
|
|
||||||
|
```
|
||||||
|
Step <number>: <title>
|
||||||
|
Files: <paths>
|
||||||
|
Changed: <one or two lines on what the code does>
|
||||||
|
Verification: <the command> -> <the observed result>
|
||||||
|
Commit: <message>
|
||||||
|
Next: <the next step number and title>
|
||||||
|
```
|
||||||
|
|
||||||
|
After step 44, reply with a short summary: the steps done, the commit range, the test result, and
|
||||||
|
the sentence "Phase B2 done — waiting for the owner before Phase C."
|
||||||
Reference in new issue
Block a user