> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_25/session_05_full_prompt_drawer_copy_briefings.md).

# Session 05: Full Prompt Drawer Copy Briefings

**Session ID**: `phase25-session05-full-prompt-drawer-copy-briefings` **Status**: Completed **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Make every mini-goal actionable by surfacing `full_prompt`, adding copy actions, and rendering human briefings with structured sections.

***

## Scope

### In Scope (MVP)

* Add a no-layout-shift drawer or modal for mini-goal detail.
* Render `full_prompt` with strong wrapping and bounded height.
* Add "Copy /goal prompt" behavior for agent goals with `/goal` prefix safety.
* Add "Copy briefing" behavior for human goals.
* Share one copy-text builder between card and drawer actions.
* Add the v2.3 guard line that tells the executing agent not to self-tick Mission Control.
* Implement structured human briefing formatting with prose fallback.

### Out of Scope

* One-goal rail navigation and gradient progress.
* Changing mission write contracts.
* New agent types beyond the existing `hermes` and `human` actor set.

***

## Prerequisites

* [x] Session 02 completed.
* [x] Session 04 active mission card/editor state available.

***

## Deliverables

1. Mini-goal detail drawer or modal.
2. Shared copy-text and human-brief formatting helpers.
3. Tests for drawer state, copy output, prefix safety, and briefing fallback.

***

## Success Criteria

* [x] Every mini-goal exposes its `full_prompt`.
* [x] Agent cards copy a valid `/goal` -prefixed prompt.
* [x] Human cards copy a readable briefing.
* [x] Long prompt and briefing text wraps without horizontal overflow.

***

## Folded Comparison Detail

This section preserves the shared Phase 25 reference context and the complete S25-05 session detail from the folded Phase 25 comparison record. This stub is self-contained so the old ongoing-project document can be deleted without losing source anchors, implementation scope, build steps, or exit criteria.

### Source Project Reference Links

#### AI OS

* [Hermes route](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/routes/agents.hermes.tsx)
* [Hermes page shell](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/components/hermes/hermes-read-only-page.tsx)
* [Mission Control UI](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/components/hermes/hermes-mission-control.tsx)
* [Claude Code mission page](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/components/hermes/claude-code-mission-page.tsx)
* [Hermes read hook](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/hooks/use-hermes.ts)
* [Hermes admin hook](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/hooks/use-hermes-admin.ts)
* [Hermes read contracts](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/lib/hermes-types.ts)
* [Hermes admin contracts](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/lib/hermes-admin-types.ts)
* [Hermes read bridge](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/scripts/lib/hermes-dev-bridge.ts)
* [Hermes admin bridge](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/scripts/lib/hermes-admin-bridge.ts)
* [Hermes demo fixtures](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/lib/hermes-demo-data.ts)

#### Claude OS v2.3 Reference

* [Reference Hermes route](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/src/routes/agents.hermes.tsx)
* [Reference Mission Control component](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/src/components/hermes-mission-control.tsx)
* [Reference Vite middleware/endpoints](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/vite.config.ts)
* [Reference Documents Gallery](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/src/components/hermes-documents-gallery.tsx)
* [Reference Mnemosyne component](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/src/components/hermes-mnemosyne.tsx)
* [Reference README](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/README.md)
* [Reference CHANGELOG](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/CHANGELOG.md)

### Reference Source Map

Every session below carries a **Reference (v2.3)** line pointing at the exact reference code to mirror. Citations are relative to the reference root `v2.3/` = `/home/aiwithapex/projects/claudeos/claude-os-v2.3/`. Line numbers are the 2026-06-08 inspection snapshot - treat them as anchors and re-confirm before editing. The two reference files that matter for this plan:

* `v2.3/src/components/hermes-mission-control.tsx` - the entire Mission Control UI, planning prompt, per-card copy, briefing renderer, and goal rail. Key anchors: `Actor`/`Status`/`MiniGoal`/`Mission` types (265-286); endpoint contract comments (243-249); `LONG_PROMPT_BODY` (313-509); `buildLongPrompt` (511-523); `MissionControlAgent` (532); `refetch` GET (547-555); exact-decimal progress geometry (561-569); tick/clear fetches (610, 633); `EmptyPanel` + `copy()` + Copy-prompt button (783-944); `MissionBody` (945-1034); `estimateToPips` (1035-1073); `buildCopyText` incl. `/goal` safety net (1074-1128); `formatHumanBrief` + `HUMAN_BRIEF_LABELS` (1130-1196); `BriefingDrawer` (1209-1577); `MissionGoalRail` incl. progress bar + milestone ticks (1583-1987).
* `v2.3/vite.config.ts` - the local mission endpoints: GET `/__hermes_missions` (778-799), `optimize` (799-943), `create` (944-1050), `tick` (1051-1099), `clear` (1100-1124); `MISSIONS_FILE` (751).

Where a session has no reference, the capability has no v2.3 equivalent and is marked **Reference (v2.3): none - AI OS-new**; the AI OS contracts/bridges named in that session are the substrate to build on.

### Phase Outcome (binary)

`/agents/hermes` (and the Claude Code mission route) fully restore the v2.3 Mission Control orchestration loop - planning prompt, discovery-driven decomposition, multi-goal authoring, optimized preview -> commit, per-goal `/goal` and human-briefing copy, and archive management - on top of the AI OS typed-contract, admin-gated, tested architecture, with documentation and end-to-end validation. YES/NO at the end of the last session.

### Cross-Cutting Guardrails (every session must hold these)

These are the AI OS strengths the plan must preserve while adding v2.3 affordances. No session may regress them:

1. Admin-gate is never weakened. All writes keep requiring loopback + valid per-run `X-Claude-OS-Token` + `HERMES_DASHBOARD_ADMIN=1` + non-demo + hook-mediated path.
2. Typed contracts stay authoritative. New fields/endpoints get read/admin parsers that reject malformed payloads; no ad hoc JSON.
3. State machine stays explicit. idle / loading / success / empty / error / offline / token-failure / demo / admin-disabled / admin-ready all keep rendering and stay tested.
4. Errors stay bounded and redacted through the existing display helpers.
5. Reads use query invalidation, not polling or fetch bypasses.
6. Demo/live parity holds; demo mode never triggers a real write.
7. Both agent presentations (`hermes`, `claude-code`) stay at parity at the contract layer; differences remain presentation copy only.
8. Every new affordance ships with unit/component coverage in the same session; responsive/e2e coverage lands by S25-08.

### S25-05 - Per-Goal `full_prompt` Drawer, Copy Actions & Briefing Rendering

**Resolves:** Finding #4, Priority 1.2, AI OS Product Regressions #1 and #5, UX Comparison (per-card copy, `buildCopyText`, `formatHumanBrief`).

**Reference (v2.3):** port directly from `v2.3/src/components/hermes-mission-control.tsx` - `buildCopyText` (1074-1128), including the `/goal` safety net that forces the prefix onto agent cards (1087-1106); `formatHumanBrief` + `HUMAN_BRIEF_LABELS` (1130-1196) for the 8-section human-briefing render with prose fallback; `BriefingDrawer` (1209-1577) for the no-layout-shift overlay, the `humanBlocks` split (1273), the "Copy /goal prompt" button (1532), and the long-prompt overflow/scroll handling (1276-1320); `estimateToPips` (1035-1073). The authored-content rules these mirror live in the prompt's `full_prompt` spec (431-456).

**Objective.** Make mini-goal cards actionable: surface `full_prompt`, render human briefings structurally, and provide per-card copy that bridges planning to execution.

**Scope (in).**

* Expandable detail drawer/modal on `GoalCard` showing `full_prompt` with strong wrapping and bounded height; the page underneath must not shift.
* Copy behavior: agent (`hermes`) goals -> "Copy /goal prompt" with `/goal` prefix validation (warn or correct if missing); human goals -> "Copy briefing".
* A `buildCopyText` equivalent shared by card button and drawer, including the guard line preventing self-ticking of the Mission Control card.
* A `formatHumanBrief` equivalent that renders the 8-section human briefing into labeled sections, falling back to prose when unstructured.

**Scope (out).** The one-goal rail and gradient bar (S25-06).

**Build steps.**

1. Add the drawer/modal + `full_prompt` rendering.
2. Implement copy text builders + prefix validation.
3. Implement structured briefing formatting with graceful fallback.

**Exit criteria.**

* Every mini-goal exposes its `full_prompt`; agent cards copy a valid `/goal` -prefixed prompt; human cards copy a readable briefing.
* Component tests cover drawer open/close, prefix validation/warning, copy output for both actors, and structured vs prose briefings.

***


---

# 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://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_25/session_05_full_prompt_drawer_copy_briefings.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.
