15 Commits

Author SHA1 Message Date
31984bbd9d Consolidate all .allium specs into specs/
- Move .pi/specs/ files into specs/ (healing, factions, merged magical-objects)
- Move src/*.allium files into specs/ (levels, changing-level)
- Delete .pi/specs/ directory
- Document specs/ convention in AGENTS.md
2026-06-15 08:16:12 +01:00
39839dc594 fix Allium specs syntax + implement Changing Level story
- Fix Allium spec syntax: type→value, enum for Status, remove implies chaining
- Fix factions.spec: add missing type declarations (Health, Level, Status)
- Fix magical-objects.spec: add type declarations, use .value for Health access,
  remove entity inheritance syntax, remove invalid invariants
- Implement Changing Level: add totalDamageTaken + factionsJoined to Character
- Add level-up logic in dealDamage() and joinFaction()
- Add Level.damageThresholdForLevel() static method
- Fix changing-level.spec.ts properties: handle target survival, compute
  expected level from threshold crossings
2026-06-15 07:55:39 +01:00
ba0903714c refactor: replace number health with Health value object in MagicalObject
- MagicalObject: internal #health and #maxHealth now Health type
- HealingObject: constructor, create, and heal use Health value object
- MagicalWeapon: constructor, create, and use use Health value object
- DamageDealer and Healer interfaces: health: number -> health: Health
- magical-objects.spec.ts: all assertions use .health.value
- Run npm run checks: 0 errors, 70 tests passing
2026-06-14 13:35:44 +01:00
dea77d463f create extension and skill to run yaks 2026-06-14 12:23:52 +01:00
0805623b68 refactor: break circular dependency with DamageDealer and Healer interfaces
- Create src/magical-objects/magical-object-types.ts with DamageDealer
  and Healer interfaces
- MagicalWeapon implements DamageDealer
- HealingObject implements Healer
- Character depends on interfaces instead of concrete classes
2026-06-14 10:49:53 +01:00
f29e3c456f add problem breakdown with yaks skill 2026-06-14 10:31:03 +01:00
f6605bbbfd feat: implement story 3 (Factions) with Allium spec and fast-check properties
- Add .pi/specs/story-3-factions.allium with formal spec for faction rules
- Add src/factions.spec.ts with 26 fast-check properties covering:
  - joinFaction / leaveFaction (add, remove, idempotent, dead no-op)
  - isAllyOf (shared factions, symmetry, self-not-ally)
  - dealDamage blocks ally damage
  - healAlly (allies only, capped, dead no-op)
- Implement Character methods: joinFaction, leaveFaction, isAllyOf, healAlly
- Modify dealDamage to check ally status before applying damage
2026-06-13 22:36:43 +01:00
11919c742a feat: Magical Objects story — weapons and healing items
- MagicalWeapon: fixed damage, owner-only, self-destructs at 0 HP
- HealingObject: heals characters up to both caps, self-destructs at 0 HP
- 18 fast-check properties covering rules and invariants
- Allium spec with entities, rules, and invariants
- Character.createWithHealthAndStatus factory method for status-aware creation
2026-06-13 22:13:06 +01:00
38ea78f91e feat(story2): level-based damage modifiers — diff method, 50% scaling for level gaps, transcripts 2026-06-13 16:08:50 +01:00
461bc7f776 feat: clear-export extension — tool info and global pkg handling 2026-06-13 15:34:48 +01:00
934551197c fix: use pi.getAllTools() instead of ctx.getAllTools()
getAllTools() is on the ExtensionAPI (pi), not on ExtensionContext (ctx).
2026-06-12 22:52:36 +01:00
9ca324342c feat: add /clear command — export session to transcripts/ and start new session
Registers a /clear slash command as a project-local extension.
Prompts for a transcript name (spaces → dashes), exports the full
session HTML (with in-memory state) to transcripts/<name>.html,
then starts a new session with parent tracking.
2026-06-12 22:51:08 +01:00
e05572bcec skills I believed were committed 2026-06-12 22:08:36 +01:00
9a2181318e feat: add user-story-conversation skill and fast-check integration
Add the user-story-conversation Pi skill following Ron Jeffries'
Card, Conversation, Confirmation mantra enhanced with Matt Wynne's
Example Mapping.

The skill guides users through six steps:
1. Card — user story
2. Conversation — Example Mapping (Rules, Examples, Questions, Answers)
3. Allium Spec — formal behavioural specification
4. fast-check Properties — executable verification
5. TypeScript ADTs — value objects and discriminated unions
6. Confirmation — verify all properties pass

Also update AGENTS.md with workflow guidance and add the new skill
to the Allium routing table. Add fast-check as a dependency.
2026-06-12 20:15:30 +01:00
6c57136e7f feat: add Allium pi.dev skills and upstream repository
Install Allium skills (allium, elicit, distill, propagate, tend, weed)
from the pi-allium-port, with corrected symlinks for upstream content.

Add juxt/allium as a git submodule for language reference materials.
Allium CLI v3.0.5 is already installed via Homebrew.
2026-06-12 19:55:43 +01:00