> 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/specs/phase24-session06-world-cues-and-bark-reuse/tasks.md).

# Task Checklist

**Session ID**: `phase24-session06-world-cues-and-bark-reuse` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-07-08

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Setup (2 tasks)

* [x] T001 \[S2406] Verify Session 04/05 prerequisites, package scripts, and no-new-asset boundary (`.spec_system/specs/phase24-session05-scrying-and-alert-focus/IMPLEMENTATION_SUMMARY.md`)
* [x] T002 \[S2406] Create world-cue source and test scaffolds (`apps/web/src/lib/worldCues.ts`)

***

## Foundation (5 tasks)

* [x] T003 \[S2406] Extend the SFX manifest with typed `WorldCueKind`, `SFX_FILES.world`, and world URL lookup while preserving faction bark lookups (`apps/web/src/lib/sfxAssets.ts`)
* [x] T004 \[S2406] Add synth world cue recipes and playback support for the six Phase 24 cue kinds (`apps/web/src/lib/voiceSynth.ts`)
* [x] T005 \[S2406] Extend the file-backed synth adapter with world cue file-first routing and synth fallback (`apps/web/src/lib/fileVoiceSynth.ts`)
* [x] T006 \[S2406] Add world cue request validation, playback mapping, muted/playback-denied/failed status handling, and redacted failure details (`apps/web/src/lib/audioRuntime.ts`)
* [x] T007 \[S2406] Expose world cue playback and cleanup through the existing runtime store cue guard (`apps/web/src/store/useAudioRuntimeStore.ts`)

***

## Implementation (7 tasks)

* [x] T008 \[S2406] Implement pure cue candidate derivation for camp-hit, camp-collapse, ram-crash, ram-break-triumph, skirmisher red-slash, and flare attention with schema-validated input and explicit error mapping (`apps/web/src/lib/worldCues.ts`)
* [x] T009 \[S2406] Apply `shouldPlayCue` per-category histories so repeated audio is silenced while visual presentation continues (`apps/web/src/lib/worldCues.ts`)
* [x] T010 \[S2406] Reuse existing hero-bark request semantics for wraith spawn, verified camp kill, and linked mission completion actor moments (`apps/web/src/store/useVoiceBarks.ts`)
* [x] T011 \[S2406] Implement `useWorldCues` with seen-key refs, category histories, duplicate-trigger prevention while in-flight, and cleanup on scope exit for all acquired resources (`apps/web/src/store/useWorldCues.ts`)
* [x] T012 \[S2406] Wire `useWorldCues` into Battlefield with combat playback, live enemy, alert focus, event log, hero, mission, projection, and settings inputs (`apps/web/src/components/battlefield/Battlefield.tsx`)
* [x] T013 \[S2406] Preserve no-autoplay behavior for disabled audio, zero volume, unsupported browsers, replayed inputs, and unlinked events (`apps/web/src/store/useWorldCues.ts`)
* [x] T014 \[S2406] Confirm the cue hook adds no user-facing diagnostic surface and no projection, storage, protocol, or server write path (`apps/web/src/components/battlefield/Battlefield.tsx`)

***

## Testing (6 tasks)

* [x] T015 \[S2406] \[P] Write pure tests for all six world cues, category budgets, no replay, no unlinked combat cues, and safe labels (`apps/web/tests/worldCues.test.ts`)
* [x] T016 \[S2406] \[P] Write hook tests for runtime calls, disabled audio, duplicate prevention, cleanup, and hero bark reuse (`apps/web/tests/useWorldCues.test.tsx`)
* [x] T017 \[S2406] \[P] Extend audio runtime tests for world cue schema, muted, unsupported, playing, duplicate, and redacted failure paths (`apps/web/tests/audioRuntime.test.ts`)
* [x] T018 \[S2406] \[P] Extend file synth tests for world cue manifest lookup, file-first routing, synth fallback, and unchanged bark behavior (`apps/web/tests/fileVoiceSynth.test.ts`)
* [x] T019 \[S2406] Add Battlefield integration coverage for real event-to-cue routing without debug UI (`apps/web/tests/Battlefield.test.tsx`)
* [x] T020 \[S2406] Run focused tests, web typecheck, ASCII, and LF checks (`npm --workspace apps/web run typecheck`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` (next step in the implement -> creview -> validate sequence)

***

## Next Steps

Run the `implement` workflow step.


---

# 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/specs/phase24-session06-world-cues-and-bark-reuse/tasks.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.
