---
quick_id: 260515-uf1
description: Make psyche-download consume drop files into psyche-context; deprecate /amend-signoff skill
gathered: 2026-05-15
status: Ready for planning
---

# Quick Task 260515-uf1: psyche-download consumes drop files - Context

<domain>
## Task Boundary

Replace the current non-destructive "Pending Commune/Signoff" output-append behavior of `psyche-download` with destructive consumption: read `.claude/{self_id}-{commune|signoff}.md` drop files, append their bodies into the on-disk `{psyche_dir}/{self_id}.md` context file under sectioned headers, delete the drop files, then output the updated psyche-context.

Deprecate `/spt:amend-signoff` skill — the new psyche-download consumption replaces the post-signoff amendment workflow. Users who need to update Psyche context post-signoff drop a `{id}-signoff.md` (or `-commune.md`) into `.claude/`; the next `psyche-download` call absorbs and clears it.

Also update `/spt:signoff` skill doc to add an offline path: if not live (no perch), agent still drops `{id}-signoff.md` so the next `psyche-download` absorbs it. Prevents the agent from flagging `/signoff` as inapplicable when no listener is running.

Out of scope:
- Removing the binary `amend-signoff` subcommand from `src/cli.rs` / `src/live/context.rs` (skill doc removal only).

</domain>

<decisions>
## Implementation Decisions

### Deprecation depth (/amend-signoff)
- **Delete `plugin/spt/skills/amend-signoff/` entirely.** Skill becomes unavailable as a slash command.
- Binary subcommand `$LIVE amend-signoff` and the `run_amend_signoff` / `amend_signoff_result` Rust functions are LEFT IN PLACE for backward compat (out of scope).

### psyche-download consumption scope
- **Both CLI and SessionStart-injection paths consume drop files.** Symmetric behavior; drop files always converge into psyche-context regardless of how psyche-download is invoked.
- Acknowledged risk: if SessionStart hook fires while a live listener is also polling, both paths race for the same drop file. The listener's `scan_drop_files` and the new psyche-download consumption both call `fs::read_to_string` + `fs::remove_file`; one of them will get `ErrorKind::NotFound` on the read, which already short-circuits as "file absent" in both code paths. No new locking needed.

### Append format on psyche-context.md
- Per-file header `## Pending Commune (written {mtime})` and `## Pending Signoff (written {mtime})`.
- `{mtime}` = drop file's modification time, formatted as `%Y-%m-%dT%H:%M:%S%:z` (same format used by existing amend-signoff timestamps). Use mtime, not wall clock, so the section header reflects when the user actually wrote the drop file (not when psyche-download happened to pick it up — could be hours later).
- Section ordering: commune first, then signoff (mirrors existing `append_pending_sections` order).
- One blank line between prior context body and the new header; one blank line between the two sections if both present.

### /signoff offline path
- Add to `plugin/spt/skills/signoff/SKILL.md`: when no perch is live for the agent (check via `$LIVE list-ready` or absence of `ready` file), the Write-tool drop of `.claude/{id}-signoff.md` is still the correct action. The file persists until the next `$LIVE psyche-download <id>` consumes it into psyche-context.
- Doc should not branch into two separate flows — single flow with a note: "If no live listener exists, the signoff file remains until `psyche-download` absorbs it. This replaces the deprecated `/amend-signoff` workflow."

### Commit semantics
- **Append → delete drop files. No git commit.**
- `.claude/` is typically gitignored; the drop files themselves aren't tracked.
- The psyche-context dir IS a git repo (managed by `git_commit_context`), but we intentionally skip committing here — next `context-save` or wrapper-driven Psyche run will commit naturally. Avoids inflating commit history with auto-consumption noise.
- Order: write updated context.md first, then delete drop files. If write fails, drop files remain for retry.

</decisions>

<specifics>
## Specific Ideas

- The existing `append_pending_sections` helper in `src/live/context.rs:304` (currently appends to OUTPUT buffer only) is the natural extraction point. Rework it to:
  1. Read drop file
  2. Append section to in-memory `out` buffer (existing behavior — preserved for stdout)
  3. Write updated context.md to disk (NEW)
  4. Delete drop file (NEW)
- Section headers change from `## Pending {Kind} (uncommitted)` → `## Pending {Kind} (written {mtime})`.
- Need to read drop file mtime via `std::fs::metadata(...).modified()` → `chrono::DateTime<Local>` → formatted.
- The existing tests in `src/live/context.rs` (around line 567+) and `tests/file_drop_integration.rs` will need updates: previously they asserted the drop file SURVIVED psyche-download; now they must assert it's DELETED and the context.md ON DISK contains the appended sections.
- Behavior when context.md does not yet exist but a drop file does: create the context.md from the drop file content under the appropriate header (`download_payload` currently returns `Some(...)` if any source file exists, so this path is reachable).

</specifics>

<canonical_refs>
## Canonical References

- `src/live/context.rs` — `download_payload`, `download_payload_for_injection`, `append_pending_sections` (lines ~219–330)
- `src/live/context.rs` — existing tests `download_payload_*` (lines ~567+)
- `tests/file_drop_integration.rs` — integration coverage referenced by `append_pending_sections` doc comment (Plan 04 Task 2 Test 5/6)
- `plugin/spt/skills/amend-signoff/SKILL.md` — to be deleted
- `plugin/spt/skills/psyche-download/SKILL.md` — to be updated with destructive-consumption documentation
- `CLAUDE.md` — Build/Deploy via `docs/DEPLOY.ps1`; `psyche.md` embedded via `include_str!` (no change here, but rebuild required for any binary change)

</canonical_refs>
