> 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/phase17-session09-automatic-mission-lifecycle-posts/tasks.md).

# Task Checklist

**Session ID**: `phase17-session09-automatic-mission-lifecycle-posts` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-06-05

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[S1709]` = Session reference (phase 17, session 09)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 5      | 5      | 0         |
| Implementation | 8      | 8      | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **20** | **20** | **0**     |

***

## Setup (3 tasks)

Current lifecycle, metadata, and relay inventory.

* [x] T001 \[S1709] Review real mission start, subagent start, mission completion, and subagent completion emit points for accepted lifecycle-only wiring (`apps/server/src/routes/event.ts`)
* [x] T002 \[S1709] Review Notice Board auto-post, expiration, dedupe, related-file normalization, and route broadcast behavior before reusing manager-owned writes (`apps/server/src/managers/noticeBoard.ts`)
* [x] T003 \[S1709] Review server bridge injection and test harness construction for active-room, broadcast, and optional relay dependencies (`apps/server/src/server.ts`)

***

## Foundation (5 tasks)

Lifecycle notice helper and route dependency scaffolding.

* [x] T004 \[S1709] \[P] Create lifecycle notice publisher scaffold with injected Notice Board, broadcaster, bridge, active-room resolver, clock, and project root (`apps/server/src/lib/missionLifecycleNotices.ts`)
* [x] T005 \[S1709] Implement mission label and completion summary normalization with bounded output and privacy filtering for prompts, commands, transcripts, patch bodies, secrets, and absolute paths (`apps/server/src/lib/missionLifecycleNotices.ts`)
* [x] T006 \[S1709] Implement safe author metadata mapping for session id, hero name, machine id, optional avatar, and agent author type with schema-validated input and explicit fallback behavior (`apps/server/src/lib/missionLifecycleNotices.ts`)
* [x] T007 \[S1709] Implement safe related-file extraction from mission tool uses with project-relative normalization, unsafe-entry omission, and deterministic ordering (`apps/server/src/lib/missionLifecycleNotices.ts`)
* [x] T008 \[S1709] Extend event router dependency types to accept optional lifecycle notice publisher without changing existing event response shape (`apps/server/src/routes/event.ts`)

***

## Implementation (8 tasks)

Mission start, completion, broadcast, relay, and server wiring.

* [x] T009 \[S1709] Implement `status` auto-post creation for accepted mission starts with 30 minute expiration and manager-owned duplicate-trigger prevention while in-flight (`apps/server/src/lib/missionLifecycleNotices.ts`)
* [x] T010 \[S1709] Implement `completion` auto-post creation for accepted mission summaries with one hour expiration and manager-owned duplicate-trigger prevention while in-flight (`apps/server/src/lib/missionLifecycleNotices.ts`)
* [x] T011 \[S1709] Emit local `notice_board_message` only for accepted automatic posts and skip duplicate or rejected helper results without creating raw event-log notices (`apps/server/src/lib/missionLifecycleNotices.ts`)
* [x] T012 \[S1709] Forward accepted automatic posts through the War Room notice bridge with timeout/failure-path handling and compact failure feedback (`apps/server/src/lib/missionLifecycleNotices.ts`)
* [x] T013 \[S1709] Wire accepted user mission start and reused active-mission start paths to lifecycle status posts without changing mission telemetry events (`apps/server/src/routes/event.ts`)
* [x] T014 \[S1709] Wire accepted hero idle mission completion paths to lifecycle completion posts without changing mission completion telemetry (`apps/server/src/routes/event.ts`)
* [x] T015 \[S1709] Wire accepted subagent mission start and completion paths to lifecycle posts only when they represent real mission lifecycle transitions (`apps/server/src/routes/event.ts`)
* [x] T016 \[S1709] Instantiate the lifecycle notice publisher in server construction with the shared active-room resolver and pass it to `/event` for root and `/api` route mounts (`apps/server/src/server.ts`)

***

## Testing (4 tasks)

Focused helper, route, and real-mode verification.

* [x] T017 \[S1709] \[P] Add lifecycle notice helper tests for status/completion content, expiration, dedupe, metadata, related files, privacy filtering, local broadcast, and bridge forwarding (`apps/server/tests/missionLifecycleNotices.test.ts`)
* [x] T018 \[S1709] \[P] Extend event ingest route tests for real hook lifecycle status and completion posts, duplicate suppression, no raw-event spam, and safe serialized payloads (`apps/server/tests/eventIngest.test.ts`)
* [x] T019 \[S1709] \[P] Add server route coverage proving `mock: false` POST `/event` populates GET `/notice-board` without static demo or mock generator behavior (`apps/server/tests/routes.test.ts`)
* [x] T020 \[S1709] Run focused server tests plus ASCII and LF validation for all Session 09 artifacts (`apps/server/tests/missionLifecycleNotices.test.ts`, `apps/server/tests/eventIngest.test.ts`, `apps/server/tests/routes.test.ts`, `.spec_system/specs/phase17-session09-automatic-mission-lifecycle-posts`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [x] All files ASCII-encoded
* [x] implementation-notes.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Session 09 is complete. The next workflow command is `plansession` for Session 10.


---

# 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/phase17-session09-automatic-mission-lifecycle-posts/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.
