> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/prd/phase_25/prd_phase_25.md).

# PRD Phase 25: Verbs And Ceremony

**Status**: Not Started **Sessions**: 8 (initial estimate) **Estimated Duration**: 4-6 days

**Progress**: 0/8 sessions (0%)

***

## Overview

Phase 25 maps the game-design Phase 4 implementation plan, Verbs And Ceremony, onto the active spec-system sequence after completed Phase 24. The phase makes existing user verbs in `apps/web` feel deliberate, legible, and physical without changing their semantics. It adds presentation, reduced-motion static twins, bounded accessibility copy, and optional audio routing around real local actions such as summoning heroes, sending work, answering gates, approving plans, accepting and assigning quests, receiving notices, joining War Rooms, dispatching scans, converting inbound channel commands, and collecting tomes.

The phase is presentation-first and honesty-bound: it must not add protocol events, server routes, persistent browser storage keys, rewards, XP, loot, class advantage, remote execution claims, hosted identity claims, or fake work progress.

Folded source: the standalone Phase 4 Verbs And Ceremony implementation plan was incorporated into this phase record on 2026-07-08; this PRD and its session stubs are now the canonical Phase 25 planning source.

***

## Progress Tracker

| Session | Name                                                | Status      | Est. Tasks | Validated |
| ------- | --------------------------------------------------- | ----------- | ---------- | --------- |
| 01      | Ceremony Registry And Test Harness                  | Not Started | \~12-25    | -         |
| 02      | Town Crier Toasts                                   | Not Started | \~12-25    | -         |
| 03      | Counsel Flares, Plan Seals, And Permission Gates    | Not Started | \~12-25    | -         |
| 04      | Quest Contracts, Muster Flags, Banish, And Scouts   | Not Started | \~12-25    | -         |
| 05      | Hero Roster, Summon, Discharge, And Tomes           | Not Started | \~12-25    | -         |
| 06      | Emissary, Notices, Decrees, And Banners Unite       | Not Started | \~12-25    | -         |
| 07      | Audio Routing, Media Decisions, And Fatigue Control | Not Started | \~12-25    | -         |
| 08      | Integration, Reduced Motion, And Dogfood Closeout   | Not Started | \~12-25    | -         |

***

## Completed Sessions

None yet.

***

## Upcoming Sessions

* Session 01: Ceremony Registry And Test Harness
* Session 02: Town Crier Toasts
* Session 03: Counsel Flares, Plan Seals, And Permission Gates
* Session 04: Quest Contracts, Muster Flags, Banish, And Scouts
* Session 05: Hero Roster, Summon, Discharge, And Tomes
* Session 06: Emissary, Notices, Decrees, And Banners Unite
* Session 07: Audio Routing, Media Decisions, And Fatigue Control
* Session 08: Integration, Reduced Motion, And Dogfood Closeout

***

## Objectives

1. Add a pure, testable ceremony registry for all 13 Phase 4 verb IDs.
2. Apply distinct visual, static reduced-motion, accessible, and optional audio treatments to existing user actions without changing action semantics.
3. Preserve local-first privacy, no-overclaim boundaries, replay/mock honesty, and single projection authority while improving cockpit legibility.

***

## Prerequisites

* Phase 24 completed.
* Phase 24 projection, live-tier, combat playback, scrying, alert-focus, world cue, and generated-asset reference posture remains in place.

***

## Planning Assumptions And Resolutions

### Working Assumptions

* Game-design Phase 4 maps to spec-system Phase 25: The folded plan is dated 2026-07-08, states that it starts after the projection, scanner camp, live enemy, combat playback, scrying, alert focus, world cue, and generated asset handoff work has shipped, and Phase 24 is complete in PRD/state tracking. The active spec-system sequence therefore continues with Phase 25.
* Primary implementation package is `apps/web`: The folded plan explicitly names `apps/web` as the primary package and all sessions are centered on web presentation, selectors, tests, CSS, audio routing, and browser verification. Cross-package changes are not planned unless later session planning finds a direct test or catalog dependency.
* Audio is enhancement only: The folded plan allows missing audio assets to remain visible, documented decisions. Session 07 can proceed without treating absent audio files as blockers because visual and screen-reader equivalents are required for every cue.

### Conflict Resolutions

* Active PRD/state stopped at completed Phase 24 while the supplied plan defines a new phase: The best-supported interpretation is that the supplied dated plan is a source-backed update for the next phase, not a completed or archived phase. This run creates Phase 25, advances state tracking, and updates the master PRD so PRD and state align before plansession.

***

## Technical Considerations

### Architecture

Phase 25 must compose existing `apps/web` contracts. The new `verbCeremony.ts` registry is pure TypeScript with no DOM, audio playback, React imports, Zustand store imports, timers, or browser-state reads. React components consume the registry for data attributes, classes, accessible copy, and bounded labels. Audio, if added, routes through existing settings, `useAudioRuntimeStore`, hero bark helpers, and world-cue paths.

The single `alertFocus` pulse authority and the single `localStorage["factionos-game-v1"]` projection authority remain unchanged.

### Technologies

* `apps/web` TypeScript and React components
* Pure TypeScript helpers in `apps/web/src/lib/`
* Zustand-backed existing stores
* Existing audio runtime and world cue routing
* Existing Vitest and Testing Library test suites
* CSS component layer in `apps/web/src/index.css`

### Risks

* Ceremony could imply false progress or rewards: Mitigate with no-reward data attributes, tests, copy, and no new protocol/server/storage authority.
* Visual chrome could hide safety details: Mitigate by preserving existing permission, plan, channel, War Room, Notice Board, and Quest Board detail rendering.
* Repeated audio or motion could become noisy: Mitigate with rate limiting, reduced fanfare for repeated flares, existing audio guards, and reduced-motion static twins.
* Generated art could be runtime-loaded prematurely: Mitigate by keeping source sheets blocked until app catalog, rights, fallback, accessibility, and tests are recorded.
* Privacy-sensitive text could leak through ceremony copy: Mitigate with pure text-safety helpers and tests covering prompts, commands, file contents, diffs, terminal output, provider payloads, tokens, secrets, and broad paths.

### Phase Rules

* Real work only: ceremony wraps existing actions or events and never creates resource income, XP, loot, enemy kills, map progress, task execution, hosted persistence, or collaboration guarantees.
* One-second legibility: a user should know which command happened and whether it needs attention without reading a log.
* Work urgency equals game urgency: `awaiting_input`, permission gates, guarded actions, plan approvals, quest assignment, and inbound commands are high ceremony; decorative and admin controls stay quiet.
* No rewarded waste: do not score tool volume, mission count, token spend, retries, busywork, or decorative clicks.
* Motion and audio are optional: every animated or audible treatment needs a static visible equivalent and screen-reader equivalent.
* Runtime UI remains inspectable: bounded ceremony copy must not expose raw prompts, transcripts, terminal output, provider payloads, broad local paths, secrets, tokens, headers, cookies, signatures, diffs, or file contents.

### Non-Goals

* No new server route, protocol event, persistent browser storage key, or persisted `GameProjection` field.
* No XP, loot, title, banner, relic, class advantage, scoring, season, progression grant, Battle Report, territory map, War Tide, War Council, Dawn Report, saga, boss, dynamic music stem, or War Games implementation.
* No trusted-erasure, hosted-persistence, hosted-identity, remote-execution, or production-hosted claim.
* No runtime dependency on unpublished planning material.
* No audio-only signal and no new map-level "send prompt" command.
* No conversion of low-level diagnostics, export, erasure, provider health, reset, validator cap, or redaction plumbing into game ceremony or rewards.
* Allowed state is component-local and transient only, such as a short sealing or pulse timer; it must not be persisted or change domain outcomes.

### Inherited Baseline

* `apps/web/src/lib/gameProjection.ts` remains the browser-local derived game-state authority; `useGameStore.ts` folds events and exposes `selectGameProjection`, `selectGameAlertFocus`, and `selectGameLegion`.
* `GameProjection` already owns `attention.flares`, `attention.gates`, `alertFocus`, and `flareCeremony`; the alert priority ladder remains flare, gate, siege, ram, skirmisher, then new camp.
* `flareCeremony` may reduce repeated fanfare, but priority and answerability remain unchanged.
* Projection persistence stays limited to `localStorage["factionos-game-v1"]`; prompt-bearing transient ceremony state must not persist.
* Replay, reconnect, and mock guards already prevent progress farming; Phase 25 motion and audio must respect those guards.
* Quest Board scanner snapshots already reconcile into aggregate Null Legion camps through `suggestion_update`; camp inspection and dry Banish already use real Quest Board issue paths and grant no reward.
* Codebase, analysis, and project scan triggers already exist; Phase 25 may present them as Dispatch Scouts but must not add a scan engine.
* Linked Quest Board accept/assign actions already record projection-owned pending links, and `mission_start` binds `campLinks`.
* Existing linked missions already render strike, counterattack, combo, stage, display HP, and verified burn-down presentation.
* `worldCues.ts` and `useWorldCues.ts` already route typed world cues through the opt-in audio runtime and synthetic fallback; Phase 25 must not add storage keys, server routes, reward paths, or diagnostic UI for cues.
* Generated sheets remain implementation references and media catalog records until explicitly promoted through app-owned runtime paths and tests. DOM/CSS remains the default runtime treatment.

### Existing Inputs And Owners

| Input                 | Owner                                                      | Phase 25 use                                                                       |
| --------------------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Projection attention  | `gameProjection.ts`, `useGameStore.ts`                     | Read flares, gates, `alertFocus`, and `flareCeremony`.                             |
| Toast list            | `useGameStore.ts`                                          | Town Crier priority framing.                                                       |
| Audio runtime         | `audioRuntime.ts`, `useAudioRuntimeStore.ts`               | Mute, volume, unlock, fallback, duplicate guard, and status behavior.              |
| Hero barks            | `useVoiceBarks.ts`, `useFactionVoiceLine.ts`               | Hero-centered cue reuse.                                                           |
| World cues            | `worldCues.ts`, `useWorldCues.ts`                          | Existing rate-limited cue routing.                                                 |
| Settings              | `useSettingsStore.ts`                                      | Honor audio, volume, severity filters, reduce motion, and mock no-persist posture. |
| Quest Board           | `questBoard*.ts`, `useGameStore.ts`                        | Decorate accept, assign, dismiss, Banish, and scan actions.                        |
| Battlefield attention | `ScryingAndAlertFocusLayer.tsx`, `scryingAndAlertFocus.ts` | Counsel and flare fanfare without changing alert authority.                        |
| Plan decisions        | `PlanWorkpad.tsx`                                          | Approve/reject ceremony with duplicate guards.                                     |
| Permission decisions  | `PermissionModal.tsx`                                      | Gate ceremony with expiry and duplicate guards.                                    |
| Channel commands      | `ChannelCommandPanel.tsx`, command-center state            | Receive the Emissary without changing intake, replay, validation, or conversion.   |
| Notices               | `NoticeBoard.tsx`, notice store paths                      | Tavern contracts and Warchief decrees with bounded detail displays.                |
| War Room              | `useWarRoomStore.ts`, `WarRoomPanel.tsx`                   | Join, approval, notices, and Banners Unite presentation.                           |
| Scrolls               | `packages/protocol/src/scrolls.ts`, `ScrollShelf.tsx`      | `collect_scroll` and `scroll_collected` polish.                                    |
| Achievements          | `AchievementsGallery.tsx`, `achievementCelebration.ts`     | Preserve existing achievements; do not confuse them with tome ceremony.            |

### Verb Inventory

Every verb requires distinct visual treatment, static reduced-motion treatment, bounded accessible copy, and optional audio through the existing runtime.

| Verb ID               | Trigger and surfaces                                                                                                           | Outcome and guardrail                                                                                                       |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| `summon_banner_raise` | `internal_hero_spawn`, new roster entry, spawning state; `HeroRoster`, `HeroCard`, battlefield token                           | New hero gets banner-rise frame and faction identity; no new spawn path or achievement grant.                               |
| `rally_horn`          | `mission_start`, Quest accept, existing work intake; `QuestBoard`, `HeroRoster`, battlefield token, existing command summaries | Work begins with compact rally pulse and short cue; no new map-level send-prompt action.                                    |
| `counsel_flare_douse` | `awaiting_input` flare and `input_received` clear; attention layer, roster, toasts, notices                                    | Flares ask for counsel and douse when answered; repeated fanfare reduces only ceremony.                                     |
| `wax_seal_plan`       | `plan_approval` approve/reject and response status; `PlanWorkpad`, toasts, existing attention rows                             | Decisions feel signed or refused while preserving duplicate-submit guards; no hosted orchestration or auto-execution claim. |
| `portcullis_gate`     | `permission_response`, `guarded_action_decision`, gate open/clear; `PermissionModal`, attention layer, command rows            | Permission requests read as gates and decisions open/close them; expiry and duplicate guards stay authoritative.            |
| `muster_flag`         | Quest assignment to idle hero or accept with selected hero; `QuestBoard`, `HeroRoster`, camp focus banner                      | Assignment plants a flag on the hero/source card; class advantage is reserved only.                                         |
| `tavern_contract`     | Quest accept/assign/dismiss, Notice post/resolve; `QuestBoard`, `NoticeBoard`, toasts                                          | Cards look like contracts; dismiss/resolve semantics stay unchanged.                                                        |
| `honorable_discharge` | `hero_dismissed`, dismissed context, dry camp Banish, dismissed issue; roster, card, Quest Board                               | Removal reads as formal dismissal; no Hall of Banners, title, XP, loot, or victory language.                                |
| `banners_unite`       | War Room join, approval, connected state, existing War Room achievement; panel, toasts, achievements, mounted remote overlay   | Shared-banner flourish; no remote execution, hosted identity, or stronger redaction guarantee.                              |
| `warchiefs_decree`    | `hero_state_override`, high-priority notice, critical local decision, existing review action                                   | Senior priority framing; no new override control or safety-copy bypass.                                                     |
| `receive_emissary`    | `command_center_channel_command_update`, local approval/conversion of stored channel command                                   | Inbound commands arrive as sealed messages; no raw payload exposure or implicit provider trust.                             |
| `dispatch_scouts`     | Codebase, analysis, or project scan trigger; scanning/done states; Quest Board, scanner layer, battlefield                     | Scans read as scout dispatch with static state; scan errors/resets remain utility/admin.                                    |
| `collect_scroll`      | `collect_scroll`, `scroll_collected`; `ScrollShelf`, toasts, achievements                                                      | Tomes get arcs, rarity beams, shelf fill, and static rarity twin; preserve idempotency and Lobster unlock logic.            |

### Adjacent Rows Kept Out

* Tool-use essence and strike vocabulary stay in combat playback or later progression/economy work.
* Mission completion victory banners, XP, titles, loot rolls, and Battle Report presentation are later progression/report work.
* File conflict shields, file intent pennants, inspector seals, trophy pins, supply warnings, low supply horns, and patrol routes stay out unless only categorized for Town Crier copy.
* War Tide, War Council objectives, Dawn Report, First Ten Minutes onboarding, seasons, saga, bosses, named nemeses, dynamic music stems, and War Games are not implemented here.
* Low-level admin controls stay quiet: export, local erasure, readiness probes, provider health, reset actions, validation caps, terminal diagnostics, channel replay plumbing, and raw redaction safeguards.

### Implementation Contract

`apps/web/src/lib/verbCeremony.ts` must export `Phase4VerbId`, `VerbCeremonyTone`, `VerbCeremonySpec`, `VERB_CEREMONY_SPECS`, selector helpers, and safety helpers. `VerbCeremonySpec` fields are `id`, `label`, `shortLabel`, `tone`, `surface`, `audio`, `motionClass`, `staticClass`, `ariaLabel`, `srSummary`, `dataAttributes`, `privacyLevel`, and `assetRefs`. Tone values are `command`, `attention`, `success`, `warning`, `danger`, `collaboration`, `mystic`, and `neutral`.

Selector helpers: `ceremonyForToast`, `ceremonyForQuestAction`, `ceremonyForPlanDecision`, `ceremonyForPermissionDecision`, `ceremonyForAttentionFocus`, `ceremonyForNotice`, `ceremonyForScroll`, `ceremonyForWarRoomState`, `ceremonyForChannelCommand`, `ceremonyForHeroState`, and `ceremonyForScanState`.

Safety helpers: `safeCeremonyText`, `safeCeremonyTitle`, `ceremonyDataAttributes`, `isPhase4VerbId`, and `isCeremonyAudioCueSupported`.

Required data attributes on ceremony surfaces:

* `data-verb-ceremony-id`
* `data-ceremony-tone`
* `data-ceremony-surface`
* `data-reduced-motion-safe="true"`
* `data-ceremony-audio="optional"` or `data-ceremony-audio="none"`
* `data-ceremony-privacy="bounded"`

Required inert attributes where relevant:

* `data-ceremony-affinity-hook="reserved"` for `muster_flag`
* `data-ceremony-reward="none"` for Banish, dismissal, and dry discharge
* `data-ceremony-execution="local-existing-action"` for Command Center and Emissary controls

`apps/web/src/components/VerbCeremony.tsx` should provide `CeremonyFrame`, `CeremonyActionButton`, `CeremonyPulse`, `CeremonyGlyph`, `CeremonySrSummary`, and `CeremonyAudioStatus`. Components render presentation only and must not own business decisions.

`apps/web/src/store/useVerbCeremonyAudio.ts` should read existing settings, use `useAudioRuntimeStore`, use `buildHeroBarkRequest` for hero/faction context, use `playWorldCue` only for existing or app-owned SFX cue kinds, generate `phase4:verb:<verbId>:<sourceId>` cue IDs, rate-limit by verb/source, skip or downgrade replay cues unless already allowed, and return visible statuses for muted, blocked, unsupported, failed, unavailable, or rate-limited audio. Ceremony surfaces must not call raw `Audio`, `HTMLAudioElement`, or Web Audio APIs directly.

CSS in `apps/web/src/index.css` should add these component-layer classes: `.ceremony-frame`, `.ceremony-frame-command`, `.ceremony-frame-attention`, `.ceremony-frame-success`, `.ceremony-frame-warning`, `.ceremony-frame-danger`, `.ceremony-frame-collaboration`, `.ceremony-frame-mystic`, `.ceremony-frame-neutral`, `.ceremony-action`, `.ceremony-pulse`, `.ceremony-static`, `.ceremony-town-crier`, `.ceremony-scroll-rarity-common`, `.ceremony-scroll-rarity-uncommon`, `.ceremony-scroll-rarity-rare`, `.ceremony-scroll-rarity-epic`, `.ceremony-scroll-rarity-legendary`, `.ceremony-gate-open`, `.ceremony-gate-closed`, `.ceremony-scout-dispatch`, `.ceremony-banner-raise`, `.ceremony-wax-seal`, `.ceremony-contract`, `.ceremony-emissary`, and `.ceremony-banners-unite`.

CSS rules: honor `html[data-reduce-motion="true"]`, avoid viewport-width font scaling, keep labels contained, keep cards on existing radius scale, avoid decorative orbs and one-hue backgrounds, provide DOM/CSS static equivalents, and keep compact bottom-rail panels dimensionally stable.

### Visual Asset And Media Posture

Phase 25 is DOM/CSS-first. Generated assets below are approved source material only and are not runtime-ready until promoted through app-owned paths, catalog records, fallbacks, accessibility, provenance, and tests.

| Asset ID                                           | Source path                                                                                  | Dimensions    | Use                                                                                                            |
| -------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- |
| `war-effort.town-crier.toast-chrome-sheet.v1`      | `assets/generated/game-design/phase04/town-crier/town-crier-toast-chrome-sheet.png`          | 1672x941 PNG  | Toast chrome, ribbons, icons; DOM herald fallback required.                                                    |
| `war-effort.command-ceremony.props-sheet.v1`       | `assets/generated/game-design/phase04/command-ceremony/command-ceremony-props-sheet.png`     | 1536x1024 PNG | Plans, gates, contracts, emissaries, scouts, seals, flags, scrolls, route markers; DOM prop fallback required. |
| `war-effort.banners-regalia.sheet.v1`              | `assets/generated/game-design/phase05/banners-regalia/banners-regalia-sheet.png`             | 1536x1024 PNG | Banner-rise, Banners Unite, pennants, wax seals, flare mounts, dismissal frames.                               |
| `war-effort.class-icons.flares-sheet.v1`           | `assets/generated/game-design/phase05/class-icons/class-icons-and-flares-sheet.png`          | 1537x1023 PNG | Future class-affinity hook only; no Phase 25 class bonus.                                                      |
| `war-effort.loot.roll-visuals-sheet.v1`            | `assets/generated/game-design/phase08/loot/loot-roll-visuals-sheet.png`                      | 1672x941 PNG  | Tome arcs, rarity beams, shelf fill; static rarity fallback required.                                          |
| `war-effort.reduced-motion.static-badges-sheet.v1` | `assets/generated/game-design/phase03/reduced-motion/reduced-motion-static-badges-sheet.png` | 1672x941 PNG  | Static alert, rally, disabled, fallback, and loot vocabulary.                                                  |
| `war-effort.alliance-war.visuals-sheet.v1`         | `assets/generated/game-design/phase10/alliance-war/alliance-war-visuals-sheet.png`           | 1672x941 PNG  | Banners Unite, cooperative ribbons, rally beacons, shared-front markers.                                       |

Promotion requirements for any visual asset:

* Add/update `apps/web/src/data/mediaCatalog.ts` or document the replacement catalog path in implementation notes.
* Record source, ownership, rights, attribution, credits, optimized dimensions, byte-size budget, and metadata cleanup.
* Serve from app runtime path; mirror to public demo only when demo parity is explicitly in scope.
* Add failed/blocked media fallback labels, reduced-motion twins, screen-reader copy, and focused catalog or consuming-surface tests.
* Confirm embedded media/captions contain no raw prompts, transcripts, terminal output, absolute paths, secrets, tokens, or unredacted local data.

Current audio baseline:

* Twelve full MP3 background tracks exist in `apps/web/public/music/`; no dynamic stems are in scope.
* Orc, Human, Elf, and Undead click voice lines exist in `apps/web/public/speech/`.
* Lobster has no app click voice-line entry in `FACTION_CLICK_VOICE_LINES`; public-demo `claw-*` clips require rights, catalog, parity, credits, and tests before promotion.
* Bark SFX exists for Orc, Undead, and Lobster under `apps/web/public/sfx/`; Human and Elf non-error bark SFX are absent.
* Human, Elf, Orc, and Undead error barks currently reuse speech-backed behavior; Lobster error is file-backed.
* World cues can use existing typed routing and synthetic fallback.
* File-backed world cues for camp hit, camp collapse, ram crash, ram-break triumph, skirmisher red slash, and flare attention are not yet recorded.

Session 07 must decide and record: Human bark SFX, Elf bark SFX, error-bark policy, Lobster click-line promotion/deferment, and whether any full verb cue pack files are approved. Candidate cue names include rally horn, summon/banner raise, flare douse, wax seal, plan scroll tear, portcullis raise/drop, target flag, class flare, contract stamp, tome pickup, salute/banner fold, decree gavel, scouts, report unfurl, missive unfurl, shield block, forge hit, lore glint, summon shimmer, low supply horn, trophy pin, scout report, flag flutter, and inspector seal. Only approved files or supported synth fallback may be wired.

### Verification And Dogfood

Targeted commands:

```bash
npm test -- apps/web/tests/verbCeremony.test.ts
npm test -- apps/web/tests/ToastTray.test.tsx apps/web/tests/PlanWorkpad.test.tsx apps/web/tests/PermissionModal.test.tsx
npm test -- apps/web/tests/scryingAndAlertFocus.test.ts apps/web/tests/ScryingAndAlertFocusLayer.test.tsx
npm test -- apps/web/tests/QuestBoard.test.tsx apps/web/tests/questBoardActions.test.ts apps/web/tests/questBoardStore.test.ts
npm test -- apps/web/tests/ScrollShelf.test.tsx apps/web/tests/HeroCard.test.tsx apps/web/tests/HeroRosterSort.test.tsx
npm test -- apps/web/tests/NoticeBoard.test.tsx apps/web/tests/ChannelCommandPanel.test.tsx apps/web/tests/WarRoomPanel.test.tsx
npm test -- apps/web/tests/audioRuntime.test.ts apps/web/tests/worldCues.test.ts apps/web/tests/useVerbCeremonyAudio.test.tsx
npm --workspace @factionos/web run typecheck
npm run format:check
npm run lint
```

Full regression command: `npm test`

Browser verification, when layout or CSS changed enough to justify it:

```bash
npm --workspace @factionos/web run dev
npm run test:e2e
```

Dogfood closeout should run normal mode, reduced motion, and audio disabled:

1. Spawn/observe a new hero and confirm Summon.
2. Start work or accept a Quest Board card and confirm Rally.
3. Assign a Quest Board card to an idle hero and confirm Muster.
4. Trigger codebase, analysis, or project scan and confirm Dispatch Scouts.
5. Approve/reject a generated plan and confirm Wax-Seal Plan.
6. Approve/deny permission and confirm Portcullis Gate.
7. Trigger and answer awaiting input and confirm Counsel plus Douse.
8. Collect a tome and confirm Collect Tome differs from generic toast.
9. Join/approve War Room participant and confirm Banners Unite.
10. Receive inbound channel command and confirm Receive the Emissary without raw payload exposure.
11. Post/receive high-priority notice and confirm Warchief's Decree.
12. Dismiss hero or dry-Banish camp issues and confirm Honorable Discharge without reward language.
13. Confirm Town Crier toasts remain dismissible, filtered, and capped.
14. Repeat with reduced motion and verify each verb has a static twin.
15. Repeat with audio disabled and verify no meaning is lost.

Implementation order: registry, ToastTray, attention/decision surfaces, Quest Board/Banish/scouts, hero/tomes, notices/channel/War Room, optional audio, then dogfood/reduced-motion/privacy/regression closeout.

### Relevant Considerations

* \[P24-apps/web] **Generated Phase 3 assets are not runtime-ready**: Phase 25 may reference generated Phase 4/5/8/10 source sheets only after app-owned serving, slicing, optimization, metadata cleanup, accessibility, media gates, and catalog records.
* \[P24-apps/web] **Game projection stays aggregate-only**: Ceremony must not add new persisted projection fields or prompt-bearing durable state.
* \[P24-apps/web] **Live combat is projection-owned presentation**: Future battlefield, ceremony, report, audio, or reward work should read existing projection selectors instead of adding parallel state, protocol events, server routes, storage keys, or reward authority.
* \[P24-apps/web] **Pure models before UI/audio**: The verb registry should make labels, privacy, mappings, and rate-limit inputs testable before React and audio integration.
* \[P24-apps/web] **Do not duplicate urgency or audio paths**: Keep one projection-owned `alertFocus` pulse and route cues through existing opt-in audio guards, duplicate suppression, redacted failures, and cleanup.
* \[P24-apps/web] **Do not runtime-load generated source art**: Source assets remain references until promotion requirements are met.
* \[P24-apps/web] **Do not make combat playback a reward authority**: Ceremony can frame linked work and dry Banish moments but cannot grant XP, loot, banners, achievements, durable progress, or victory language.

***

## Success Criteria

Phase complete when:

* [ ] All 8 sessions completed
* [ ] All 13 verb IDs are represented in `VERB_CEREMONY_SPECS`
* [ ] Every verb has visual treatment, reduced-motion static treatment, and accessible copy
* [ ] Every animated or audible treatment has visible and screen-reader equivalents
* [ ] Town Crier toasts preserve severity filtering, dismissal, work-critical seniority, and max-visible cap
* [ ] Counsel flare presentation uses `alertFocus` and `flareCeremony` without creating a second pulse authority
* [ ] Plan approvals and permission decisions preserve duplicate-submission and expiry guards
* [ ] Quest Board accept, assign, dismiss, scan, and Banish actions preserve current state and network behavior
* [ ] War Room, Notice Board, and channel command ceremonies preserve current redaction, local-only, and no-overclaim boundaries
* [ ] `collect_scroll` and `scroll_collected` are visually distinct from generic achievement toasts
* [ ] Audio is optional, rate-limited, and visible-equivalent
* [ ] No ceremony introduces XP, loot, rewards, class advantage, progression, new protocol events, new server routes, or new storage keys
* [ ] Generated assets, if promoted, have app catalog records, fallbacks, source/rights records, accessibility labels, and tests
* [ ] Registry, key surfaces, audio routing, privacy safety, and reduced-motion static states have focused test coverage

***

## Dependencies

### Depends On

* Phase 24: Legion II - Live Tier And Combat Playback

### Enables

* Later progression, report, asset-promotion, War Tide, War Council, Dawn Report, season, saga, boss, dynamic music stem, and War Games phases once separately sourced and scoped.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://faction-os.gitbook.io/faction-os-docs/.spec_system/prd/phase_25/prd_phase_25.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
