---
phase: 260522-4sq
plan: 01
subsystem: docs/skills
tags: [commune, signoff, docs, detection-rule, two-slice]
requires: []
provides:
  - "Future agents key in-project detection on the project=\"...\" attribute of the <current/> tag emitted by $LIVE psyche-download, not the conditional <project-context-resolved/> sentinel"
  - "First-time-in-project (agent, project) pairings now route correctly — project-bound work lands in <project-context> even when no prior project file exists yet"
affects:
  - plugin/spt/skills/commune/SKILL.md
  - plugin/spt/skills/commune/commune.md
  - plugin/spt/skills/signoff/SKILL.md
tech-stack:
  added: []
  patterns:
    - "Doc detection rule keys on always-emitted attribute (project= on <current/>) rather than conditional sentinel (<project-context-resolved/>) — sentinel demoted to secondary 'prior content' signal"
key-files:
  created:
    - .planning/quick/260522-4sq-update-and-clarify-commune-signoff-skill/260522-4sq-SUMMARY.md
  modified:
    - plugin/spt/skills/commune/SKILL.md
    - plugin/spt/skills/commune/commune.md
    - plugin/spt/skills/signoff/SKILL.md
decisions:
  - "Reframe positively per user direction — no 'Common Mistake' warning section; rewrite the existing detection-rule paragraph/bullet in place"
  - "Demote <project-context-resolved/> sentinel to a secondary 'project file already has prior content' signal — useful for spotting first-time-in-project pairings but explicitly NOT the routing rule"
  - "Use 'NO-CONTEXT exit / no payload at all' as the off-project signal (mirrors psyche-download runtime semantics) rather than 'marker absent'"
  - "Realign commune.md Example 3 narrative parenthetical to match new signal (NO-CONTEXT exit) so the worked example stays consistent with the rewritten detection rule"
metrics:
  duration: "8 min"
  completed: "2026-05-22"
---

# Phase 260522-4sq Plan 01: Update and Clarify Commune/Signoff Skill Detection Rule Summary

Rewrote the in-project detection rule across three skill docs (commune/SKILL.md, commune/commune.md, signoff/SKILL.md) so future agents key on the always-present `project="..."` attribute of the `<current ... />` tag emitted unconditionally by `$LIVE psyche-download` (per `src/live/context.rs` lines 393–398) instead of the conditional `<project-context-resolved/>` sentinel (only emitted when a prior project file exists on disk per lines 450–469).

## Why

Before this change, the docs taught agents to grep `psyche-download` output for the literal substring `<project-context-resolved` and route based on its presence. That sentinel is only emitted when ALL THREE guards pass:

1. `owlery::derive_current_repo_names().first()` resolves a project name.
2. `psyches/tracked/projects/<cwd_project>/<self_id>.md` exists on disk.
3. That file reads successfully.

The second guard means **first-time-in-project** for any `(agent, project)` pairing — where no prior project file has been written yet — emits NO sentinel. An agent following the old detection rule would interpret that as "outside any tracked project" and incorrectly route project-bound work into `<live-context>` only, leaving `<project-context>` un-emitted on the very first commune of every new project pairing.

The `<current/>` tag, by contrast, is emitted **unconditionally** whenever `download_payload` produces any output, with its `project="..."` attribute always populated (repo name inside a git repo; cwd-basename fallback outside per D-11). That makes it the reliable in-project routing signal.

## What Changed

### plugin/spt/skills/commune/SKILL.md

- Rewrote the `**In-project detection rule (D-25.1-04).**` paragraph (line 49) to:
  - Instruct Self to inspect the `<current ... />` tag at the top of `psyche-download` output (Step 1 of `## Flow` already present above).
  - State the rule: `project="..."` populated on `<current/>` → inside a tracked project (rule 1 or 2 applies); no payload at all (NO-CONTEXT exit) → outside any tracked project (rule 3 applies).
  - Add D-11 cwd-basename fallback nuance (still counts as project context for routing purposes).
  - Mention the `<project-context-resolved/>` sentinel as a SECONDARY signal indicating the project file already has prior content — useful for spotting first-time-in-project pairings but NOT the routing rule.
- D-25.1-01..03 three-rule list (lines 51–55) left intact.
- Nested envelopes paragraph (line 57) and Phase 23 EVENT envelope section left intact.

### plugin/spt/skills/commune/commune.md

- Rewrote the `**In-project detection rule (D-25.1-04).**` paragraph (line 21) to mirror the rewritten phrasing in `commune/SKILL.md` — same primary signal (`project="..."` on `<current/>`), same secondary mention of the sentinel as "prior content" indicator.
- Kept "deterministic check" framing (the attribute is also deterministic) — replaced "hard deterministic check" wording per plan instruction.
- D-25.1-01..03 routing rules (lines 15–19) left intact.
- Realigned Example 3 narrative (line 102) parenthetical to "NO-CONTEXT exit — no `<current/>` tag, no `project=\"...\"` attribute" so the example stays consistent with the rewritten detection rule. Example narrative (scratch script in `~/scratch`) preserved.

### plugin/spt/skills/signoff/SKILL.md

- Rewrote the `**In a tracked project**` bullet (line 59) to detect via the `project="..."` attribute on `<current ... />` tag in `$LIVE psyche-download` output.
- Updated the `**Outside any tracked project**` bullet (line 60) for internal consistency — "no payload at all from `psyche-download` — no `<current/>` tag, no `project=\"...\"` attribute" replaces the prior "no marker in psyche-download output" phrasing.
- `**Plain signoff**` bullet (line 61) and cross-reference to `/spt:commune` (line 63) left intact.
- Phase 23 EVENT envelope shape sections (lines 69–85) left intact.

## Deviations from Plan

None — plan executed exactly as written.

## Verification

**Automated checks (all passed):**

- `grep -l 'project="'` matched all three target files.
- `grep -l '<current'` matched all three target files.
- `grep -F 'hard deterministic check'` returned zero hits across all three files.
- `git diff --name-only -- src/` returned empty (src/ untouched).
- `git diff --name-only -- psyche.md` returned empty (psyche.md untouched).
- `git diff --stat HEAD~1 HEAD` lists exactly three files: the three skill docs.

**Manual read-through:**

1. Each rewritten paragraph reads as a positive reframing — no "do not" or "common mistake" framing.
2. Detection signal is consistently `<current ... project="..."/>` across all three docs.
3. The three D-25.1-01..03 routing rules in commune/SKILL.md (lines 51–55) and commune.md (lines 15–19) remain semantically intact.
4. Cross-reference from signoff/SKILL.md line 63 (`See /spt:commune → ## Two-slice body shape ...`) still resolves; `commune.md` → `psyche.md §<output_envelope>` resolves.

## Commits

- `aedfdea` — docs(260522-4sq-01): key in-project detection on <current/> project attr

## Deployment

Out of scope for this plan per CLAUDE.md. A subsequent `powershell -ExecutionPolicy Bypass -File docs/DEPLOY.ps1` (no `-Bump`, doc-only change) is required to sync the three updated skills into the marketplace cache and refresh installed plugins. The marketplace clone and `~/.claude/plugins/cache/cplugs/spt/` were intentionally untouched by this plan.

## Self-Check: PASSED

Files verified to exist:

- FOUND: plugin/spt/skills/commune/SKILL.md (rewritten paragraph in place)
- FOUND: plugin/spt/skills/commune/commune.md (rewritten paragraph + Example 3 realignment in place)
- FOUND: plugin/spt/skills/signoff/SKILL.md (rewritten bullets in place)
- FOUND: .planning/quick/260522-4sq-update-and-clarify-commune-signoff-skill/260522-4sq-SUMMARY.md (this file)

Commits verified to exist:

- FOUND: aedfdea (docs(260522-4sq-01): key in-project detection on <current/> project attr)
