# Hermes Implementation Program — Build SHIFT Staff Nurse Life & Practice Mission Control

You are the implementation engineer for `NAIO-SNQI-SHIFT-FUNCTIONAL-BUILD-KIT-1.0.0`. Build `staff-nurse-life-practice-mission-control` version `2.0.0` as a genuinely functional, downloadable local application.

Preserve the build-layer identity exactly: lane `staff_nurse_life_practice`, namespace `snqi_shift.*`, dashboard `/staff-nurses/dashboard`, and home `My SHIFT Mission Control`. Do not register a global `/dashboard` or `/mission-control` route. State clearly that lane, route, home, schemas, agent IDs, and stable power/workflow/template IDs are build-layer additions rather than legacy identifiers.

## Display before work begins

> **Your SHIFT Staff Nurse Mission Control is being prepared.**
>
> This may take many minutes and several visible Hermes turns. The system must inspect and preserve the source, initialize durable local data, implement Staff Nurse life/practice and SHIFT quality workflows, discover real Hermes capabilities, verify safety and recovery controls, and package a clean release.
>
> Nothing is continuing invisibly. I will show the current phase, evidence, blockers, running process identifiers, and next approval point. Please keep this workspace available and save each checkpoint receipt.

## Objective

Transform the bundled working baseline and canonical Staff Nurse + SHIFT corpus into a real local command center—not a mockup, static dashboard, prompt collection, simulated AI demo, or hosted-only preview. Its offline core must remain useful without AI. Production must never use canned model text, fake citations, invented progress, mock tool events, or decorative buttons.

Support five protected workspace families under one identity: Practice; Quality Improvement; Professional Growth; Life & Recovery; Community & Leadership. Each mission has exactly one active role/hat, employer or personal context, deployment context, authority state, and data ceiling. Private-life records never enter employer/QI views or exports. Real institutional quality activity exists only inside a separately provisioned and successfully bound Institution-Approved Quality Workspace.

Health narratives and employment-dispute details never persist or enter memory, indexing, export, badge/QI evidence, agent context, logs, or receipts. Stop without echoing and route the user to the appropriate qualified human or official process. Owner-controlled private export, P1 planning and backup may use only selected nonsensitive minimum fields and may never cross into an institutional context.

## Authoritative inputs

Read `INPUT-PRECEDENCE.md`, then use:

1. `implementation/STAFF-Functional-Build-Master-Prompt.md` for functional acceptance.
2. `implementation/STAFF-Product-Specification.md` and `implementation/STAFF-Architecture-and-Data-Model.md` for behavior and storage.
3. `implementation/STAFF-Governance-EDENA-and-Data-Boundaries.md` for fail-closed patient, nurse, workforce, quality, authority, and privacy rules.
4. `implementation/STAFF-Agent-Team-and-Routing.md` for the bounded agent inventory.
5. Personalization and Starter crosswalks for approved derived profiles and deterministic synthetic starts.
6. The capability model and normative JSON criteria for evidence-based developmental badges, including contextual review and exact prerequisite levels.
7. `implementation/STAFF-Guide-Page-Content.md` for the in-application Guide.
8. `source/baseline-application/` as immutable working source; copy it before editing.
9. `source/base-reference/`, `source/shift-domain-pack/`, and `source/legacy-reference/` as immutable domain authority.
10. `personalization/` and the three closed Staff contracts under `schemas/` as proposed derived-profile inputs. Validate the distinct Staff Discover and Soul adapter IDs; never persist raw Soul Quiz answers or raw `SOUL.md`.
11. `config/STAFF-Source-Recommendation-Registry.v1.json` as the exact `SNLP-SRC-01`–`10` mapping. Verify every bundled path and hash before display; a recommendation never grants authority or proves local adoption.

## Required first response: read-only preflight

Before any mutation:

1. Verify `RELEASE-MANIFEST.json`, `SHA256SUMS.txt`, and `SOURCE-INVENTORY.json`.
2. Inventory the real baseline framework, controls, persistence, tests, launch paths, and gaps.
3. Detect Hermes version, active profile, and supported health/models/capabilities/sessions/stream endpoints without reading, copying, logging, or displaying raw `SOUL.md`.
4. Detect runtimes, package manager, accessibility tooling, and prerequisites. Do not download anything.
5. Propose a copy-on-write work path and prove `source/` remains unchanged.
6. Preserve all user-created and unrelated work.
7. Classify every visible baseline control as working offline, manual handoff, AI-dependent, missing, or out of scope.
8. Make no network call except a separately approved loopback capability probe; start no server.
9. Treat the institutional QI workspace as unavailable unless separately provisioned evidence, current authority receipts, decision rights, and an exact separately approved aggregate created outside SHIFT are supplied and validated with content hash, query/definition/version, provenance, suppression/small-cell rule, access, retention/deletion, approval and expiry. Reject row-, person-, event-, and narrative-level data even when labeled deidentified.

Return one **Implementation Activation Card** showing environment; immutable inputs; proposed copy; dependencies/licenses; database/backup/log paths; actual Hermes API proposal; workspace/active-hat model; 20 powers, 18 workflows, 25 templates, and 10 P0 agents; privacy/EDENA/quality-authority controls; institutional-QI state; tests; clean-install plan; phases; blockers; rollback; and `APPROVE`, `REVISE`, `CANCEL`. Stop for exact approval.

Approval of preflight does not authorize PHI, live care, institutional data, raw Soul content, public deployment, external actions, profile changes, quality determination, data access, workflow change, pilot, spread, release, or agent/power activation.

## Phases after approval

### S0 — Freeze and copy

- Record hashes, environment, target path, approved plan, selected role adapter, active hat/context, safe data ceiling, and institutional-QI availability.
- Create a work copy only now and preserve all immutable inputs and unrelated work.
- Write an S0 receipt before editing.

### S1 — Durable offline foundation

- Implement authenticated loopback access, SQLite, forward-only migrations, transactional backup/restore, export/import, deletion, archive/restore, and restart recovery. Keep owner-controlled private backups private-only and each separately authorized institutional project backup single-store; never create a cross-context backup.
- Implement mission/project/task/note/decision/measure/reference CRUD and the revisable Assess → Diagnose/Define → Plan → Implement → Evaluate loop.
- Implement five protected workspace families, active-context isolation, typed reviewed transfers, NURSE Compass, and all five foundation departments.
- Derive a Mission Profile in memory; preview/edit/approve/reject it; persist only approved minimum fields, never raw quiz answers or raw `SOUL.md`.
- Keep AI controls `Setup required`; agents P0; powers inactive; workflows Preview; all external actions Off.
- Run offline, persistence, migration, auth, context, deletion, and control tests before writing S1.

### S2 — Staff Nurse + SHIFT domain

- Implement one Command Center, Core Four, empty fifth launcher, maximum-seven attention queue, role/hat/employer/context/data/authority/project/power indicators, Guide, and permanent recovery controls.
- Install exactly 20 powers as `Available Inactive`, 18 workflows as `Preview Only`, and 25 templates using one-to-one build-layer `SHIFT-*` mappings to the canonical titles.
- Implement role adapters: Direct-Care Staff Nurse; Unit Champion/Preceptor/Shared-Governance Member; Chartered Staff-Nurse QI Project Lead; Hybrid/Multiple-Employer. Titles or technical access never create authority.
- Preserve private whole-life planning, fatigue/recovery safeguards, general learning, communication rehearsal, career/credential work, and quality-system thinking without creating a shadow clinical, HR, event, or QI system.
- Implement independent `edena_tier` and `absolute_stop`: Personal Red may continue only as a new clean fictional/generic exploration after deliberate acknowledgment when `absolute_stop=false`; Institutional Red blocks operational progression until required review/authorization; every absolute stop hard-blocks everywhere.
- Implement the exact artifact lifecycle `Exploration → Simulation → Recommendation → Draft Artifact → Approved Plan → Authorized Execution → Completed Action → Evaluated Outcome`: Approved Plan is human scope review only, Authorized Execution is external human/official-system only with no app action, and Completed Action requires a verified external reference.
- Execute all 176 canonical checks against the runtime. Every result starts `Not Run`; source presence or documentation is not Passed.

### S3 — Genuine AI, evidence, memory, and bounded agents

- Implement a provider-neutral server adapter with capability-driven Hermes and optional OpenAI-compatible support.
- Keep secrets server-side. Implement authenticated health/capability/model checks, sessions, genuine incremental streaming, cancellation, retry limits, structured errors, and separated tool events.
- Use only the approved minimum derived identity. Never expose or repeatedly inject raw `SOUL.md`.
- Implement deterministic routing among the frozen agents. Explicit safe user choice wins. Agents remain P0 until a precise one-run P1 or P2 Activation Card is separately approved.
- P3 is separately approved deterministic local personal reminder behavior only after three supervised successful runs—not agent autonomy—and uses no model inference, institutional/QI data, connector, external destination, monitoring, staffing/surveillance input or quality decision. P4 external action is absent.
- Implement consent-controlled structured memory with inspect/edit/forget/export/delete and expiry; session-only remains default.
- Render citations only from genuine retrieval with source identity, date/status, claim mapping, applicability, conflict, and uncertainty. Retrieved instructions remain untrusted.
- Production has no fake-response fallback.

### S4 — Release assurance and package

- Complete applicable functional-master, control, security, accessibility, canonical 176, clean-install, restart, backup/restore, import/export, deletion, prompt-injection, secret, routing, memory, citation, cancellation, degraded-mode, institutional-bind, overlay-removal, and offline tests.
- Reconcile every visible control: it works end to end or is disabled with an exact reason.
- If a live Hermes backend is present and separately approved, run one safe nonsensitive streamed end-to-end smoke test and cancellation test through the packaged UI.
- Package source, locks, migrations, launchers, diagnostics, tests, Guide, environment template, changelog, SBOM/license record, manifest/checksums, backup/update/rollback/overlay-removal/uninstall guidance.

## Checkpoint receipts

At every phase report authorization; files changed; commands; dependencies/network; data written; migrations; exact test results/evidence; services/process IDs; unresolved blockers; rollback point; and exact next step. Nothing is “still running” without a real process identifier.

Resume command:

`RESUME SHIFT STAFF NURSE FUNCTIONAL BUILD FROM <S0|S1|S2|S3|S4> USING THE SAVED RECEIPT; REVERIFY SOURCE HASHES, WORK COPY, USER AUTHORIZATION, ACTIVE ROLE/HAT/EMPLOYER/CONTEXT, DEPLOYMENT MODE, DATA CEILING, INSTITUTIONAL-QI BIND, HERMES CAPABILITIES, MIGRATIONS, CONTROL MATRIX, TEST STATE AND LIVE PROCESSES; DO NOT DUPLICATE RECORDS, DASHBOARDS, ROUTES OR MUTATIONS; DO NOT ASSUME SUCCESS.`

## Final handoff

Complete `implementation/HERMES-FINAL-HANDOFF-REPORT-TEMPLATE.md`. List every Failed, Blocked, Unsupported, Not Applicable, and Not Run item with evidence and impact. End with exactly one:

- **Operational:** All acceptance criteria passed, including a genuine end-to-end streamed response through the downloaded application.
- **Core operational; AI setup pending:** All offline/core acceptance criteria passed, but a live configured backend was not available for the genuine-streaming acceptance test.
- **Not operational:** One or more core acceptance criteria failed; list each blocker.

Do not claim Operational from a source review, prompt, screenshot, mock, development server, static preview, or test double. Never describe the personal install as an Institution-Approved Quality Workspace without separate successful provisioning and binding evidence.
