> 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-session05-cli-notice-commands/tasks.md).

# Task Checklist

**Session ID**: `phase17-session05-cli-notice-commands` **Total Tasks**: 21 **Estimated Duration**: 3-4 hours **Created**: 2026-06-05

***

## Legend

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

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 5      | 5      | 0         |
| Implementation | 9      | 9      | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **21** | **21** | **0**     |

***

## Setup (3 tasks)

Initial CLI placement, conventions, and test-pattern review.

### apps/cli

* [x] T001 \[S1705] Review current CLI command dispatch and help text for Notice Board insertion (`apps/cli/src/index.js`)
* [x] T002 \[S1705] Audit current CLI env, server URL, auth token, and local settings helper patterns for notice client design (`apps/cli/src/lib/localFiles.js`)
* [x] T003 \[S1705] Audit CLI fake-server and captured-console test patterns for command coverage (`apps/cli/tests/cliRuntime.test.js`)

***

## Foundation (5 tasks)

Reusable Notice Board client, validation, and command scaffolding.

### apps/cli

* [x] T004 \[S1705] \[P] Create Notice Board HTTP client helper for server URL, auth header, JSON request, timeout, optional retry/backoff, and failure-path handling (`apps/cli/src/lib/noticeClient.js`)
* [x] T005 \[S1705] Define notice type validators, command argument parsers, and compact error codes with schema-validated input and explicit error mapping (`apps/cli/src/lib/noticeClient.js`)
* [x] T006 \[S1705] Implement session id and author display resolution from env/settings with privacy-safe fallback behavior (`apps/cli/src/lib/noticeClient.js`)
* [x] T007 \[S1705] \[P] Create `runNotice` command scaffold and subcommand help formatter with clear argument validation (`apps/cli/src/commands/notice.js`)
* [x] T008 \[S1705] \[P] Create Notice Board CLI test scaffold with fake HTTP server and fixture helpers (`apps/cli/tests/noticeCommands.test.js`)

***

## Implementation (9 tasks)

Notice command behavior, output formatting, and documentation.

### apps/cli

* [x] T009 \[S1705] Wire the `notice` command into CLI dispatch, top-level help, and examples (`apps/cli/src/index.js`)
* [x] T010 \[S1705] Implement `notice post <type> <message>` with canonical post body, `authorType: "agent"`, auth header use, and duplicate-trigger prevention while in-flight (`apps/cli/src/commands/notice.js`)
* [x] T011 \[S1705] Implement `notice list` against `/notice-board?limit=20` with bounded pagination, validated filters, and deterministic ordering (`apps/cli/src/commands/notice.js`)
* [x] T012 \[S1705] Implement `notice list --type <type>` with recovered type validation and explicit error mapping (`apps/cli/src/commands/notice.js`)
* [x] T013 \[S1705] Implement `notice resolve <noticeId>` with id validation, duplicate-trigger prevention while in-flight, and explicit server error mapping (`apps/cli/src/commands/notice.js`)
* [x] T014 \[S1705] Implement `notice context --session <sessionId>` with validated query construction and malformed-response handling (`apps/cli/src/commands/notice.js`)
* [x] T015 \[S1705] Implement list/context output formatting for timestamp, type, author, content, priority, first three related files, and empty board state (`apps/cli/src/lib/noticeClient.js`)
* [x] T016 \[S1705] Implement privacy-safe error formatting for invalid input, unreachable server, unauthorized server, timeout, and malformed responses (`apps/cli/src/lib/noticeClient.js`)
* [x] T017 \[S1705] Document Notice Board CLI commands, env variables, output shape, and privacy boundaries (`apps/cli/README_cli.md`)

***

## Testing (4 tasks)

Focused command coverage and workflow validation.

### apps/cli

* [x] T018 \[S1705] \[P] Add CLI tests for post body, auth header, invalid type, and missing message (`apps/cli/tests/noticeCommands.test.js`)
* [x] T019 \[S1705] \[P] Add CLI tests for list, type-filtered list, empty board output, and related-file truncation (`apps/cli/tests/noticeCommands.test.js`)
* [x] T020 \[S1705] \[P] Add CLI tests for resolve, context, unauthorized, unreachable, timeout, and malformed response errors (`apps/cli/tests/noticeCommands.test.js`)
* [x] T021 \[S1705] Run focused CLI tests plus ASCII/LF validation for session artifacts (`apps/cli/tests/noticeCommands.test.js`)

***

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

Run the implement workflow step to begin AI-led implementation.


---

# 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-session05-cli-notice-commands/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.
