Module 08 · 10 min
Tasks and evidence
Every change is a task, and every task leaves evidence: the board, what a task records, the ledger, and checks that could not run.
By the end of this module you can
- Find any task, and read what it planned, ran and passed, and who approved it
- Explain what the ledger proves, and what it can't
- Tell a check that failed from one that could not run
Every change AlbertCode SWE makes is a task, and every task leaves evidence: what was planned, what ran, what passed, and who approved what.
The task board
Tasks… in the browser's Evidence menu, or /tasks, shows every task on a board. Each task sits in a column for where it stands:
- Planned
- Active
- Blocked (waiting for you, or failed)
- Verifying
- Completed
The board updates by itself while tasks run. Tasks you rejected, discarded or stopped leave the board, and List still finds them. From a script, albertcode show <task> prints one task, with its state (Tasks and evidence).
What a task records
- The plan you approved: goal, files, steps, test plan, security, rollback and assumptions.
- Verification: each check command, with its exit code.
- The reviews: the security and quality findings, each with its severity.
- Who approved what, and when.
Export evidence in the browser, or /ledger evidence <task> [file] in the terminal, saves one change's evidence as a file. For an auditor, albertcode compliance <task> sets the evidence against the controls they assess.
The ledger
The ledger is the record of everything AlbertCode SWE did, in order: tasks created, plans approved, commands run, files changed, changes accepted, keys connected, and more. Each entry is linked to the one before it, so changing or deleting an entry breaks the chain, and the break is found. In the terminal, /ledger lists the entries, and Enter reads an entry and checks it.
Clearing task history with /tasks clear keeps the ledger's record of each task. Deleting a session keeps its tasks and their evidence.
Checks that fail, and checks that can't run
A check that cannot run here proves nothing about the change. So it is recorded as Not run, with the reason, and never sent back to Albert as a defect to repair. For example, a test runner that isn't installed gives No module named pytest.
A test that ran and failed is still a failure, and Albert repairs it. A check your contract names is required evidence, so it fails when it cannot run.
After each edit, the file is also checked by its language's own checker, the one your editor would use. Only the errors that edit introduced go back to Albert. /checks shows which languages are checked.
Memory
What Albert learns about a repository is kept in the repository itself, in .albertcode/memory.md. Each note is a write you approve like any other change. To correct a note, edit the file: the next task believes what it says.
Practise
Read the task board
The board shows every task in a column for where it stands. Match each column to what it means.
Follow one task's evidence
After any governed task, in the terminal interface:
- 1
Open your tasks, press Enter on the task, and open its evidence:
/tasks - 2
Open the ledger, find the entry for its approved plan, and press Enter to read and check it:
/ledger - 3
Set one change's evidence against the controls an auditor assesses, using your own task id:
albertcode compliance 3f2a91c0 - 4
See what Albert has learned about this repository, kept in
.albertcode/memory.md:/memory
Check your understanding
6 questions. Answer 5 correctly to complete the module. Checked here, in your browser.