36 Commits

Author SHA1 Message Date
fb61fb85ed refactor transcript 2026-06-14 13:36:47 +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
0540e5ff5b feat(eslint): add no-primitive-value-properties rule to enforce value objects
Add custom ESLint rule that warns when class properties or constructor
parameters use primitive types (number, string, boolean) where a value
object exists in src/value-objects/.

The rule auto-discovers value objects from the directory and maps
property names (e.g. 'health' → 'Health') to suggest the correct type.

Found 4 warnings on the codebase:
- MagicalObject.ts: #health: number property
- MagicalObject.ts: health: number constructor param
- MagicalWeapon.ts: health: number constructor param
- HealingObject.ts: health: number constructor param
2026-06-14 12:39:54 +01:00
dea77d463f create extension and skill to run yaks 2026-06-14 12:23:52 +01:00
23edbc6e36 docs: update README with attribution, workflow, and project overview 2026-06-14 12:08:49 +01:00
b628cc639f horizontal refactoring transcript 2026-06-14 12:02:35 +01:00
fe984a1c86 phase 3: verify all spec import paths (already correct) 2026-06-14 12:01:14 +01:00
bc64293ba4 phase 2: move Character, HealingObject, MagicalObject, MagicalWeapon into directories 2026-06-14 11:44:42 +01:00
fc260dc97c phase 1: refactor directory structure (value-objects, factions, characters) 2026-06-14 11:36:37 +01:00
3965aaf33b create yaks 2026-06-14 11:22:44 +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
0c09b08009 gitignore .yaks directory 2026-06-14 10:24:54 +01:00
350e8073e9 story 3 was not completely done 2026-06-14 09:54:07 +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
39983a30c9 forgot to mention the story 2026-06-13 15:57:23 +01:00
4cdb048dfc refactor(story2): immutable dealDamage, reference guard, negative damage validation, spec precision
- dealDamage returns new Character instead of mutating in-place
- SelfDamageForbidden uses reference equality (this === target)
- Negative damage throws at the boundary
- Removed duplicate Health.maxHealthForLevel (Level.ts is source of truth)
- Allium spec uses max(0, ...) for health floor precision
- New property: NegativeDamageForbidden (11 total properties)
2026-06-13 15:44:46 +01:00
a9c20a5f1b add yagni n agents 2026-06-13 15:36:43 +01:00
75305b3ddd specific instructions for what not to add in each iteration 2026-06-13 15:36:08 +01:00
461bc7f776 feat: clear-export extension — tool info and global pkg handling 2026-06-13 15:34:48 +01:00
fc2cf73b34 feat: story 2 — Characters can Deal Damage to Characters
- Allium spec: damage-and-health.allium
- 5 fast-check properties: damage reduces health, health non-negative,
  death at zero, self-damage forbidden, dead cannot take damage
- Character.createWithHealth factory for testing with arbitrary health
- Character.dealDamage(target, damage) method
2026-06-13 15:28:34 +01:00
75c7c63dda add transcript files 2026-06-12 22:55:33 +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
5a5e06f471 docs(AGENTS): tighten YAGNI discipline, resolve value-object contradiction
- Clarify 'value objects over primitives' is reactive, not anticipatory
- Mark the Step 3 example as aspirational domain shape, not per-story template
- Add 'What to skip per story' trap table with concrete boundaries
- Add litmus test: 'point to a failing property or don't write it'
2026-06-12 22:23:42 +01:00
e05572bcec skills I believed were committed 2026-06-12 22:08:36 +01:00
8450f90e89 update agent skill with YAGNI 2026-06-12 22:08:10 +01:00
e267c35e55 refactor(story1): clean story boundaries, introduce CharacterState record type, tighten ESLint
- Introduce CharacterState value object to group character properties
  → Character constructor reduced from 5 to 1 parameter
- Introduce Faction value type (previously bare string)
- Remove cross-story methods: isAllyOf, isAlive, isDead, add, isMax, next, diff
- Remove misleading level parameter from Health.create
- Remove trivial invariant tests (dead-code paths on fresh characters)
- Move cross-cutting invariants out of character-creation.allium
- ESLint: forbid unused params (remove argsIgnorePattern), max-params=5
- null parameters enforced by TypeScript strictNullChecks (tsconfig)
2026-06-12 20:32:44 +01:00
d3cc48c0f7 feat: Character Creation user story — ADTs, properties, and Allium spec
- Level value object (1..10, level-capped health)
- Health value object (non-negative, pure sub/add)
- Status discriminated union (alive | dead)
- Character entity with private constructor and static factory
- 9 fast-check properties covering creation invariants
- Allium spec with entities, rules, and invariants
2026-06-12 20:23:48 +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
7c108b628b docs: add user story observations and implementation order 2026-06-12 19:44:59 +01:00
4b37fd6bb4 chore: clean up whitespace in docs, add mise.toml for Node version management 2026-06-12 19:41:22 +01:00
Emily Bache
22c16c8146 initial import 2026-06-03 08:41:06 +00:00