Return of the Sharpee Builder
Restarted working on the project yesterday. The changes in Claude Code from September to now are significant and the work on rewriting the stdlib to use the phased execution (validate -> execute / block -> report). I've been testing Cloak of Darkness and it's nearly working. The darkness implementation has some inconsistencies and I'm working on those as I write this post.
One of the issues with using Claude is it can be very literal about what "fix" means. It will often hack at problems instead of explicitly looking at the underlying issues. The first attempts to repair Cloak's issues ended in dumb hacking solutions.
But let's see how Claude handles researching those base issues and resolving them....
After some debate, it looks like we're adding a Perception Service that runs after turn execution, but before the events get sent to the Text Service. This means all of our actions produce what they need to, but the Perception Service decides what is cleared by (current sight, hearing, smelling, feeling). So darkness is a perception based on light source, blindfold, or possibly magic. Our actions will determine most of this through behavior, but because we need an end of turn "LOOK", we have to manage that by perception. Otherwise we'd end up with every action managing perception and that would be very bad. Still working through ADR-069 - Perception-Based Event Filtering. This will be committed and viewable in the repository shortly. The author can replace the entire service or hook into stacked events to alter them. More on that later (and way too complicated for most authors). A useful trick would be an Actor that suddenly had God perception and the Perception Service could be emptied and no matter what, all senses are reported.
Those changes are complete and Cloak of Darkness now works for the winning and losing scenarios. We're at an inflection point where the core platform is at a usable level (lot's of edge cases will need to forge it into a true release). In the meantime, I'm having Claude do a full assessment, which looks like this...
● I'll conduct a comprehensive assessment of Sharpee. Let me set up the task
tracking and spawn parallel agents to explore different aspects.
● 4 Explore agents launched (ctrl+o to expand)
├─ Explore project structure · Running in background
│ ⎿ Launched
├─ Review architecture decisions · Running in background
│ ⎿ Launched
├─ Assess unit testing · Running in background
│ ⎿ Launched
└─ Analyze story creation · Running in background
⎿ Launched
● Four exploration agents are running in parallel. Let me wait for their results.
Task Output a8c5a28
Explore project structure
Waiting for task (esc to give additional instructions)
Task Output ae0eb86
Review architecture decisions
Waiting for task (esc to give additional instructions)
Task Output accce04
Assess unit testing
Waiting for task (esc to give additional instructions)
Task Output a698962
Analyze story creation
Waiting for task (esc to give additional instructions)
✢ Exploring project structure… (esc to interrupt · 3m 24s · ↓ 1.7k tokens · thought for 2s)
⎿ ☐ Explore project structure and package organization
☐ Review architecture decisions and patterns
☐ Assess unit testing approach and coverage
☐ Analyze story creation workflow
☐ Write comprehensive assessment documentThat's a wrap for now. Next post should be about client work to make all of this pretty. The 4gl Forge fluid layer will also be on the roadmap.
Sharpee's Cloak of Darkness with debug tracing on:
=== Cloak of Darkness ===
A Sharpee IF demonstration
Moving player a01 to foyer r01
Moving cloak i01 to player a01
Cloak location after move: a01
Player contents: velvet cloak
Engine started, running: true
> look
Foyer of the Opera House
You are standing in a spacious hall, splendidly decorated in red and gold, with
glittering chandeliers overhead. The entrance from the street is to the north,
and there are doorways south and west.
You can see velvet cloak here.
> south
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r03, bar.id: r03, toRoom: r03
[BAR HANDLER] isPlayer: true, isThisBar: true
[BAR HANDLER] actorSnapshot.contents: [
{
id: 'i01',
name: 'velvet cloak',
description: 'A handsome cloak of velvet trimmed with satin, and slightly
splattered with raindrops. Its blackness is so deep that it almost seems to
suck light from the room.',
shortDescription: undefined,
location: 'a01',
isWearable: true,
isWorn: false,
traits: {
attributes: [Object],
relationships: {},
traits: [Map],
on: undefined
}
}
]
[BAR HANDLER] hasCloak: true, isDark: true
[BAR HANDLER] disturbances before: 0
Blundering around in the dark isn't a good idea!
> look
It's pitch dark, and you can't see a thing.
> north
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r01, bar.id: r03, toRoom: r01
[BAR HANDLER] isPlayer: true, isThisBar: false
Foyer of the Opera House
You are standing in a spacious hall, splendidly decorated in red and gold, with
glittering chandeliers overhead. The entrance from the street is to the north,
and there are doorways south and west.
> south
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r03, bar.id: r03, toRoom: r03
[BAR HANDLER] isPlayer: true, isThisBar: true
[BAR HANDLER] actorSnapshot.contents: [
{
id: 'i01',
name: 'velvet cloak',
description: 'A handsome cloak of velvet trimmed with satin, and slightly
splattered with raindrops. Its blackness is so deep that it almost seems to
suck light from the room.',
shortDescription: undefined,
location: 'a01',
isWearable: true,
isWorn: false,
traits: {
attributes: [Object],
relationships: {},
traits: [Map],
on: undefined
}
}
]
[BAR HANDLER] hasCloak: true, isDark: true
[BAR HANDLER] disturbances before: 1
Blundering around in the dark isn't a good idea!
> north
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r01, bar.id: r03, toRoom: r01
[BAR HANDLER] isPlayer: true, isThisBar: false
Foyer of the Opera House
You are standing in a spacious hall, splendidly decorated in red and gold, with
glittering chandeliers overhead. The entrance from the street is to the north,
and there are doorways south and west.
> south
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r03, bar.id: r03, toRoom: r03
[BAR HANDLER] isPlayer: true, isThisBar: true
[BAR HANDLER] actorSnapshot.contents: [
{
id: 'i01',
name: 'velvet cloak',
description: 'A handsome cloak of velvet trimmed with satin, and slightly
splattered with raindrops. Its blackness is so deep that it almost seems to
suck light from the room.',
shortDescription: undefined,
location: 'a01',
isWearable: true,
isWorn: false,
traits: {
attributes: [Object],
relationships: {},
traits: [Map],
on: undefined
}
}
]
[BAR HANDLER] hasCloak: true, isDark: true
[BAR HANDLER] disturbances before: 2
Blundering around in the dark isn't a good idea!
> north
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r01, bar.id: r03, toRoom: r01
[BAR HANDLER] isPlayer: true, isThisBar: false
Foyer of the Opera House
You are standing in a spacious hall, splendidly decorated in red and gold, with
glittering chandeliers overhead. The entrance from the street is to the north,
and there are doorways south and west.
> west
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r02, bar.id: r03, toRoom: r02
[BAR HANDLER] isPlayer: true, isThisBar: false
Cloakroom
The walls of this small room were clearly once lined with hooks, though now only
one remains. The exit is a door to the east.
You can see brass hook here.
> hang cloak on hook
Cloak hung on hook - bar is now lit
You put velvet cloak on brass hook.
> east
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r01, bar.id: r03, toRoom: r01
[BAR HANDLER] isPlayer: true, isThisBar: false
Foyer of the Opera House
You are standing in a spacious hall, splendidly decorated in red and gold, with
glittering chandeliers overhead. The entrance from the street is to the north,
and there are doorways south and west.
> south
[BAR HANDLER] Event: if.event.actor_moved
[BAR HANDLER] actorSnapshot?.id: a01, worldPlayer?.id: a01
[BAR HANDLER] destinationSnapshot?.id: r03, bar.id: r03, toRoom: r03
[BAR HANDLER] isPlayer: true, isThisBar: true
[BAR HANDLER] actorSnapshot.contents: undefined
[BAR HANDLER] hasCloak: false, isDark: false
[BAR HANDLER] disturbances before: 3
Foyer Bar
The bar, much rougher than you'd have guessed after the opulence of the foyer to
the north, is completely empty. There seems to be some sort of message scrawled
in the sawdust on the floor.
You can see message in the sawdust here.
> debug:location
=== DEBUG ===
Player ID: a01
Location ID: r03
Location Name: Foyer Bar
Location Contents: [ 'message in the sawdust', 'player' ]
Player Inventory: []
Cloak Location: s01
=============
> look
Foyer Bar
The bar, much rougher than you'd have guessed after the opulence of the foyer to
the north, is completely empty. There seems to be some sort of message scrawled
in the sawdust on the floor.
You can see message in the sawdust here.
> examine message
The message has been completely obliterated.
> read message
The message has been trampled beyond recognition. You have lost!
=== Story Complete ===