> 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/phases/phase_17/session_09_automatic_mission_lifecycle_posts.md).

# Session 09: Automatic Mission Lifecycle Posts

**Session ID**: `phase17-session09-automatic-mission-lifecycle-posts` **Package**: apps/server **Status**: Not Started **Estimated Tasks**: \~14-22 **Estimated Duration**: 2-4 hours

***

## Objective

Restore recovered automatic Notice Board posts for mission start and mission completion without turning raw hook events into a noisy event log.

***

## Scope

### In Scope (MVP)

* Find current mission name generation and mission summary generation paths.
* On mission name generation, call `autoPost("status", "Started: <name>", ...)` with expiration around 30 minutes.
* On mission summary generation, call `autoPost("completion", "Done: <summary>", ...)` with expiration around one hour.
* Use active room id, author session id, author name, machine id, avatar, and related files when available.
* Preserve recovered dedupe for same room, author session, and type inside the 30 second window.
* Broadcast generated notices locally as `notice_board_message`.
* Relay generated notices through War Room when connected.
* Keep generated notice content concise and coordination-only.
* Ensure normal raw hook events remain separate telemetry and do not become automatic Notice Board messages.
* Ensure generated notices do not include raw prompts, transcripts, terminal output, secrets, absolute paths, raw commands, or file contents.
* Add tests proving mission name generation creates deduped `status` notices.
* Add tests proving mission summary generation creates deduped `completion` notices.
* Add tests proving real sessions populate the board without static demo or mock mode.

### Out of Scope

* Manual CLI posts.
* Hook context lookup.
* Web UI rendering.
* Worker relay implementation.

***

## Prerequisites

* [ ] Session 02 manager `autoPost` behavior completed.
* [ ] Session 03 broadcaster and route behavior completed.
* [ ] Session 08 War Room bridge behavior completed for relay forwarding.
* [ ] Current mission name and summary generation paths reviewed.

***

## Deliverables

1. Mission-start `status` auto-post behavior.
2. Mission-summary `completion` auto-post behavior.
3. Local broadcast and optional relay forwarding for automatic posts.
4. Tests for dedupe, expiration, privacy, and real-mode population.

***

## Task Expansion Guidance

When expanded with `plansession`, keep the checklist to 14-22 tasks covering:

* Mission name path audit.
* Mission summary path audit.
* Active room helper use.
* Author metadata mapping.
* Related-file mapping.
* Status auto-post wiring.
* Completion auto-post wiring.
* Expiration values.
* Dedupe assertion.
* Local broadcast assertion.
* Relay forwarding assertion.
* Privacy assertion.
* No raw-event-log assertion.
* Mission name tests.
* Mission summary tests.
* Real-mode no-mock test.

***

## Success Criteria

* [ ] Mission name generation creates a deduped `status` notice.
* [ ] Mission summary generation creates a deduped `completion` notice.
* [ ] Automatic posts expire on the recovered schedule.
* [ ] Automatic posts broadcast and relay like manual posts.
* [ ] Raw hook events do not become Notice Board spam.


---

# 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/phases/phase_17/session_09_automatic_mission_lifecycle_posts.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.
