From 4bd4f16633b2bb6cd43c80aced7b7c3ff63d380f Mon Sep 17 00:00:00 2001 From: Willem van den Ende Date: Wed, 22 Apr 2026 21:31:58 +0100 Subject: [PATCH] turn-limted feature added --- allium-port-plan.md | 27 ++++++++++++++++++--------- turn-limit | 1 + 2 files changed, 19 insertions(+), 9 deletions(-) create mode 120000 turn-limit diff --git a/allium-port-plan.md b/allium-port-plan.md index 1f206b3..7a865fc 100644 --- a/allium-port-plan.md +++ b/allium-port-plan.md @@ -76,19 +76,28 @@ _Goal: all three sub-skills work via `/skill:elicit` etc._ ### Phase 3: Test with turn-limit extension (TDD) _Goal: use distill → propagate on real code, verify allium produces useful output._ -- [ ] Checkout turn-limit into this workspace +- [x] Checkout turn-limit into this workspace ``` git clone https://gitea.apps.sustainabledelivery.com/QWAN/monotonic-pi-extensions.git turn-limit-repo ln -s turn-limit-repo/packages/pi-turn-limit turn-limit ``` -- [ ] Run `/skill:distill` against `turn-limit/` — extract a `.allium` spec from existing code -- [ ] Review the generated spec: does it capture turn-limit constraints, enable/disable, UI separation? -- [ ] Run `/skill:propagate` against the generated spec — generate test suggestions -- [ ] Write at least one test based on propagate output (TDD red step) -- [ ] Implement to make the test pass (green step) -- [ ] Iterate: use allium to identify more test obligations, write them, make them pass -- [ ] Run `/skill:elicit` to explore the "disable turn limit" feature requirement -- [ ] Generate spec + tests for the new feature via propagate +- [x] Run `/skill:distill` against `turn-limit/` — extract a `.allium` spec from existing code +- [x] Review the generated spec: does it capture turn-limit constraints, enable/disable, UI separation? + - Fixed: section order (entities before config), `session.max_turns` → `config.max_turns`, missing closing brace +- [x] Run `/skill:propagate` against the generated spec — generate test suggestions + - Generated 30 test obligations: 10 unit (P1-P5, C1-C5), 20 integration (E, R, S, W, I, C6-C8) + - Identified discrepancy: `checkTurnLimit` uses `>` but handler uses `===` +- [x] Write at least one test based on propagate output (TDD red step) + - Wrote 21 tests: P1-P5 (pure fn), C1-C8 (config+command), E1-E3 (entity state), R1-R5 (rule) + - All pass — green from the start since code already exists +- [x] Implement to make the test pass (green step) + - Only change needed: exported `getMaxTurns` for testability +- [x] Run `/skill:elicit` to explore the "disable turn limit" feature requirement + - Elicited 3 design decisions: (1) unlimited = no boundary check, (2) hard reset on re-enable, (3) config value not entity state +- [x] Generate spec + tests for the new feature via propagate + - Updated spec with `max_turns: Integer | unlimited` and `LimitReEnabled` rule + - Propagate generated 13 test obligations; wrote 8 covering config, command, rule, and integration + - TDD cycle complete: red (8 failing) → implemented unlimited mode → green (29/29 pass) ### Phase 4: Fold in allium rules content _Goal: pi agent knows allium syntax rules when editing .allium files._ diff --git a/turn-limit b/turn-limit new file mode 120000 index 0000000..128552b --- /dev/null +++ b/turn-limit @@ -0,0 +1 @@ +turn-limit-repo/packages/pi-turn-limit \ No newline at end of file