Skip to content

Commit 71bb07a

Browse files
committed
docs: update AI status and todo for F-6/F-7 completion
Mark Sprint F-6 (Armory/Inventory) and F-7 (Shop Enhancement) as complete in todo.md. Add session 43 summary to status.md covering all sub-sprints (A-2, B-1 through B-3, C-1, C-2). https://claude.ai/code/session_01WJEjfBqjZaGatHiXXXDupo
1 parent 597dbb4 commit 71bb07a

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

.ai/status.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
88
<!-- ====================================================================== -->
99

1010
## Last Updated
11-
2026-03-17 -- **Sprint: U-1 role dashboards, W-1 command palette, T-3 worldbuilding prompts.**
11+
2026-03-17 -- **Sprint: F-6 Armory/Inventory, F-7 Shop Enhancement, Sync Dashboard, Foundry Config.**
12+
13+
43. **Sprint: F-6 + F-7 (Armory, Inventory, Transactions, Shop Enhancement).**
14+
- **A-2: Chronicle Sync Dashboard Expansion (COMPLETE)** — Owner API Keys page expansion with sync status overview, mappings table, error display. Admin API Monitor expansion with per-campaign sync stats.
15+
- **B-1: System-Dependent Item Presets (COMPLETE)**`preset_category` column on `entity_types` (migration 000009). `RelationPresetDef` on SystemManifest. Item entity presets for dnd5e (gem), pf2e (equipment), drawsteel (kits). `ItemPreset()` + `ItemFieldsForAPI()` helpers. Item fields API endpoint.
16+
- **B-2: Armory Page + Sidebar (COMPLETE)**`internal/plugins/armory/` plugin: gallery page, handler, service, repo. HTMX search/filter/sort/pagination. Sidebar link gated on "armory" addon. `armory_preview` dashboard block. Adapter pattern for cross-plugin deps.
17+
- **B-3: Inventory Block + Foundry Item Sync (COMPLETE)**`blockInventory` templ mount point. `inventory.js` Chronicle widget with quantity/equipped/attuned controls. `item-sync.mjs` Foundry module: bidirectional "Has Item" relation ↔ Actor item sync. Hooks: createItem/deleteItem/updateItem. WS events: relation.created/deleted/metadata_updated.
18+
- **C-1: Transaction Table + Service + Currency Fields (COMPLETE)** — Migration 000010: `shop_transactions` table. Transaction model/repo/service/handler. Purchase flow with stock validation. Currency fields on all character presets (dnd5e: cp/sp/ep/gp/pp, pf2e: cp/sp/gp/pp, drawsteel: wealth). REST endpoints: POST purchase, POST/GET transactions.
19+
- **C-2: Shop Management UI + Foundry Purchase Flow (COMPLETE)** — Transaction history in `shop_inventory.js` widget. `transaction_log.js` standalone widget + `transaction_log` block type. Foundry `shop-widget.mjs` enhanced with `_executePurchase()` method, buy buttons, stock/buyer validation.
1220

1321
42. **Sprint: U-1 + W-1 (partial) + T-3.**
1422
- **U-1: Role-Aware Dashboard Editor (COMPLETE)** — Role selector in dashboard editor. `RoleDashboardLayouts` struct with backward-compatible JSON format: detects legacy bare `{"rows":[...]}` vs role-keyed `{"default":...,"player":...,"scribe":...}`. Alpine.js toggle (Default/Player/Scribe) in customize.templ. `dashboard_editor.js` appends `?role=` param, listens for `role-change` events. Handler merges role layouts via `SetRoleDashboardJSON`/`RemoveRoleDashboardJSON`. `ParseRoleDashboardLayout(role)` with fallback chain. `UpdateDashboardLayoutRaw` service method. 9 unit tests in `model_test.go`.

.ai/todo.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ _WASM-sandboxed backend logic via Extism/wazero. See ADR-021._
279279
- [x] **Sprint R-3: Write Host Functions** — 6 write host functions (update_entity_fields, create_event, set_entity_tags, get_entity_tags, create_relation, send_message). 5 new capabilities. 4 write adapters. Plugin-to-plugin async messaging. 10 new tests (48 total).
280280
- [x] **Sprint R-4: Plugin SDK & Developer Tools** — Example WASM plugins (Rust auto-tagger, Go session-logger). Go SDK with MockHost test harness (9 tests). Plugin development guide. 7 new manifest tests. **Phase R complete.**
281281

282-
### Phase F: Foundry Sync Enhancements & Character Integration ← CURRENT (F-6 next)
282+
### Phase F: Foundry Sync Enhancements & Character Integration (F-1 through F-7 COMPLETE)
283283

284284
_Improve Foundry VTT sync fidelity. Add system-aware character sheet sync. Build toward inventory/NPC features._
285285

@@ -290,8 +290,13 @@ _Improve Foundry VTT sync fidelity. Add system-aware character sheet sync. Build
290290
- [x] **Sprint F-4.5: Generic System Adapter & Dynamic Matching** — Added `foundry_system_id` to manifest, `foundry_path`/`foundry_writable` to FieldDef. New `GET /systems/:id/character-fields` API. `_detectSystem()` now API-driven (matches by `foundry_system_id`). New `generic-adapter.mjs` auto-generates field mappings from API. dnd5e (15 fields), pf2e (15 fields, most read-only), drawsteel annotated. actor-sync.mjs falls back to generic adapter. 7 new tests.
291291
- [x] **Sprint F-QoL: Foundry Sync Diagnostics & Error Handling**`ValidationReport` type with `BuildValidationReport()` analyzing categories, fields, presets, Foundry compatibility, warnings. Templ component shows capability badges + warnings after upload. API client health metrics (success/error counts, uptime, reconnect attempts). Structured error log. Retry queue for failed writes (processes on reconnect, max 3 retries). Dashboard Status tab: diagnostics grid, error log, field mapping debug info. 3 new tests.
292292
- [x] **Sprint F-5: NPC Viewer / Hall (Plugin + Widget + Foundry Sync)** — Full NPC plugin at `internal/plugins/npcs/` with handler/service/repo/templates. Campaign route `/campaigns/:id/npcs` — gallery/grid of revealed NPCs (non-private character entities). Portrait, name, type label, tags. Search/sort/pagination. "Reveal" = Scribe toggles `is_private` via eye icon. `npc_gallery` layout block type for entity pages and dashboards. Foundry sync: NPC visibility changes sync bidirectionally — Chronicle `is_private` ↔ Foundry `prototypeToken.hidden`. REST API endpoint `POST /entities/:id/reveal`. 7 tests.
293-
- [ ] **Sprint F-6: Armory / Inventory System** — Items as entities with game-mechanic fields (weight, cost, rarity, damage, properties). Character "Inventory" tab/block via entity relations. Relation metadata: equipped, quantity, attunement. System-specific item templates (dnd5e ≠ pf2e). Foundry sync: Actor inventory ↔ Chronicle inventory relations. "Armory" campaign page showing all catalogued items.
294-
- [ ] **Sprint F-7: Shop / Marketplace Enhancement** — Transaction logging (who bought what, when). Currency tracking per character. Stock management (auto-deplete on purchase). Foundry: purchase from shop window → update character inventory on both sides.
293+
- [x] **Sprint F-6: Armory / Inventory System** — Items as entities with game-mechanic fields (weight, cost, rarity, damage, properties). Character "Inventory" tab/block via entity relations. Relation metadata: equipped, quantity, attunement. System-specific item templates (dnd5e ≠ pf2e). Foundry sync: Actor inventory ↔ Chronicle inventory relations. "Armory" campaign page showing all catalogued items. **Implemented across 5 sub-sprints:**
294+
- B-1: System-dependent item presets (`preset_category` column, `RelationPresetDef`, item fields API, manifest changes for dnd5e/pf2e/drawsteel).
295+
- B-2: Armory plugin (`internal/plugins/armory/`) — gallery page, sidebar link, dashboard block, addon gating.
296+
- B-3: Inventory block + Foundry item sync (`blockInventory`, `inventory.js` widget, `item-sync.mjs` Foundry module).
297+
- [x] **Sprint F-7: Shop / Marketplace Enhancement** — Transaction logging (who bought what, when). Currency tracking per character. Stock management (auto-deplete on purchase). Foundry: purchase from shop window → update character inventory on both sides. **Implemented across 2 sub-sprints:**
298+
- C-1: `shop_transactions` table, transaction service with stock validation, currency fields on character presets, REST endpoints.
299+
- C-2: Transaction history in `shop_inventory.js`, `transaction_log.js` widget + block, Foundry shop-widget purchase flow.
295300

296301
### Phase X: System Modularity & Owner Experience
297302

0 commit comments

Comments
 (0)