> 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/archive/sessions/phase22-session04-camp-link-boundaries/tasks.md).

# Task Checklist

**Session ID**: `phase22-session04-camp-link-boundaries` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-07-05

***

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

***

## Setup (3 tasks)

* [x] T001 \[S2204] Verify Session 03 validation evidence and Session 04 dependency scope (`.spec_system/specs/phase22-session03-legion-enemy-reducer/validation.md`)
* [x] T002 \[S2204] Inspect the current projection reducer and camp-link fields before editing (`apps/web/src/lib/gameProjection.ts`)
* [x] T003 \[S2204] Inspect mission and suggestion event contracts used by the reducer (`packages/protocol/src/events.ts`)

***

## Foundation (5 tasks)

* [x] T004 \[S2204] Add bounded pending-link input validation, equality, sorting, and expiry helpers (`apps/web/src/lib/gameProjection.ts`)
* [x] T005 \[S2204] Export `recordProjectionPendingLink` for real future camp callers with duplicate-trigger prevention while preserving unchanged references (`apps/web/src/lib/gameProjection.ts`)
* [x] T006 \[S2204] Add deterministic `mission_start` pending-link resolution helpers for exact prompt match and same-hero fallback (`apps/web/src/lib/gameProjection.ts`)
* [x] T007 \[S2204] Add deterministic camp-link clearing helpers for mission terminal events without deleting unrelated links (`apps/web/src/lib/gameProjection.ts`)
* [x] T008 \[S2204] Add typed Vitest builders for mission start, mission complete, mission update, and suggestion snapshot events (`apps/web/tests/gameProjection.test.ts`)

***

## Implementation (7 tasks)

* [x] T009 \[S2204] Wire `mission_start` exact `heroId + prompt` binding with pending-link consumption (`apps/web/src/lib/gameProjection.ts`)
* [x] T010 \[S2204] Wire `mission_start` same-hero fallback binding inside the expiry window (`apps/web/src/lib/gameProjection.ts`)
* [x] T011 \[S2204] Wire `mission_complete` camp-link clearing without XP, banners, kills, essence, or War Tide mutation (`apps/web/src/lib/gameProjection.ts`)
* [x] T012 \[S2204] Wire failed and cancelled `mission_update` camp-link clearing without progress-like mutation (`apps/web/src/lib/gameProjection.ts`)
* [x] T013 \[S2204] Add an explicit `suggestion_update` no-progress reducer case with code comments scoped to deferred camp coalescing (`apps/web/src/lib/gameProjection.ts`)
* [x] T014 \[S2204] Preserve replay and snapshot anti-farming behavior for camp-link reducer paths with schema-validated input and explicit no-ops (`apps/web/src/lib/gameProjection.ts`)
* [x] T015 \[S2204] Ensure new helpers preserve serializable aggregate shape and do not add UI, protocol, server, audio, or persistence authority (`apps/web/src/lib/gameProjection.ts`)

***

## Testing (5 tasks)

* [x] T016 \[S2204] \[P] Test `recordProjectionPendingLink` valid, invalid, duplicate, expired, sorted, and serialization behavior (`apps/web/tests/gameProjection.test.ts`)
* [x] T017 \[S2204] \[P] Test exact prompt binding, same-hero fallback binding, wrong-hero rejection, and expired-link rejection (`apps/web/tests/gameProjection.test.ts`)
* [x] T018 \[S2204] \[P] Test mission complete and terminal update clearing while unrelated pending links and camp links remain intact (`apps/web/tests/gameProjection.test.ts`)
* [x] T019 \[S2204] \[P] Test `suggestion_update` idle and codebase snapshots as no-progress no-ops for links, camps, XP, banners, essence, and War Tide (`apps/web/tests/gameProjection.test.ts`)
* [x] T020 \[S2204] Run focused tests, web typecheck, Biome, and ASCII/LF validation (`apps/web/tests/gameProjection.test.ts`)

***

## 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/archive/sessions/phase22-session04-camp-link-boundaries/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.
