> 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_05_cli_notice_commands.md).

# Session 05: CLI Notice Commands

**Session ID**: `phase17-session05-cli-notice-commands` **Package**: apps/cli **Status**: Not Started **Estimated Tasks**: \~14-22 **Estimated Duration**: 2-4 hours

***

## Objective

Provide first-party `factionos notice` commands that replace the historical notice-board skill scripts for real local agents.

***

## Scope

### In Scope (MVP)

* Add a `notice` command group to `apps/cli/src/index.js`.
* Implement `factionos notice post <type> <message>`.
* Implement `factionos notice list`.
* Implement `factionos notice list --type <type>`.
* Implement `factionos notice resolve <noticeId>`.
* Implement `factionos notice context --session <sessionId>`.
* Use `FACTIONOS_SERVER_URL` with fallback to `http://localhost:2468`.
* Use `FACTIONOS_AUTH_TOKEN` when configured.
* Use `FACTIONOS_SESSION_ID`, provider session id, or `unknown`.
* Use configured hero/session display name with fallback `Agent-<session-prefix>`.
* Post `authorType: "agent"` for agent commands.
* Post to canonical `/notice-board`.
* List unresolved notices through canonical `/notice-board?limit=20`.
* Pass `forSession` to list/context calls when a session id is available.
* Print unresolved notices with timestamp, type, author, content, priority, and first three related files.
* Return "No active notices on the board." when empty.
* Print useful errors for invalid type, missing message, missing notice id, unreachable server, unauthorized server, and malformed responses.
* Add CLI tests for post, list, type-filtered list, resolve, context, auth header, empty board, and error output.

### Out of Scope

* Hook output integration.
* Server route implementation.
* Web UI rendering.
* Worker relay implementation.

***

## Prerequisites

* [ ] Session 03 canonical routes available.
* [ ] Current CLI command parsing and tests reviewed.
* [ ] Current CLI server URL and auth helper patterns reviewed.

***

## Deliverables

1. `factionos notice` command group.
2. Post/list/resolve/context command implementations.
3. Historical script-equivalent output behavior.
4. Focused CLI tests.

***

## Task Expansion Guidance

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

* CLI command parser update.
* Help text update.
* Server URL resolution.
* Auth header helper.
* Session id resolution.
* Author name resolution.
* Post command.
* List command.
* Type filter handling.
* Resolve command.
* Context command.
* Output formatter.
* Empty board output.
* Error formatter.
* CLI tests.
* Focused CLI test run.

***

## Success Criteria

* [ ] `factionos notice post status "Working on X"` posts an agent notice.
* [ ] `factionos notice list` displays unresolved active notices.
* [ ] `factionos notice list --type review` filters by type.
* [ ] `factionos notice resolve <noticeId>` resolves a notice.
* [ ] `factionos notice context --session <sessionId>` prints bounded context.
* [ ] Empty lists print "No active notices on the board."


---

# 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_05_cli_notice_commands.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.
