Port Daddy Agent Skill
You are not just coding. You are operating in a shared local coordination system. Port Daddy is the substrate. This skill is the field manual.
Use it when you need agents to move through a repo without losing truth: current daemon state, active work, claimed files, locks, notes, actor inboxes, FleetBar/Fleet Control Center evidence, validation, and recoverable handoffs.
NOT For
- One-line read-only answers where Port Daddy state does not matter.
- Generic "be careful with git" advice.
- Replacing repo-authored docs, live daemon truth, tests, or operator evidence.
- Launching extra agents when one bounded local change is enough.
Operator vs Agent — know which surface you are
The CLI is for you (the agent) and for emergencies. The human operator does
not run pd commands, edit .env.local files, run launchctl kickstart, or
tail logs. Their surface is the FleetBar menu-bar app and the dashboard at
http://localhost:9876 — buttons, panels, deep-links to provider token pages.
When you tell the operator to do something, point at the FleetBar button or
dashboard panel, not at a shell command. If the surface does not exist yet,
that is a product gap: file a high-severity feedback entry against the
FleetBar surface so cartographer promotes it onto the roadmap. Open examples
to follow: fleetbar-secret-management-with-provider-deeplinks,
fleetbar-console-must-support-zoom-and-text-scaling.
When Port Daddy is intentionally Off, do not ask the operator to turn it on
merely so an agent can coordinate. The Relay's Harbor Work Register has a
browser-approved task path: the operator opens the repository's Register page,
names the task, and pastes the one-use pairing code into that task. Exchange it
at POST /v1/register/exchange; the returned pdr_ bearer is short-lived and
bound to that repository, task name, and owner. It is Register authority only,
not a general Relay credential. Treat roadmap rows missing from a halted or
stale mirror as unknown and any new claim as proposed; never pretend the
Register became the roadmap's writer.
If an agent's output reads like "now run launchctl ..." or "edit
~/.env.local and add ...", rewrite it. The right output is "open FleetBar →
Credentials → Cloudflare → paste token (deep-link: dash.cloudflare.com/
profile/api-tokens?template=workers-ai)" — with the gap filed as feedback if
the button is not built yet. Operators do not read AGENTS.md; they should not
have to.
Giant Squid harness
For a Port Daddy project, pd squid on is the one full arm switch. It stages
the local lifecycle tentacles, wires every detected interactive CLI in its real
scope (Claude/Gemini project config; Codex/agy daemon-gated user config), adds
the ◆ PD statusline, installs Pilot SessionStart steering, and adds /squid.
Do not use or recommend the removed pd squid hooks fork; pd hooks install
is the narrower hook-only repair surface.
Read pd squid status before claiming the harness works. LIVE means complete
wiring plus a fresh daemon heartbeat and an exact daemon.ready → daemon.pid
generation match. READY means the wiring is complete but the daemon is down
or still behind its boot checks; PARTIAL and DEGRADED require repair. Use
--json when another surface needs the same truth and pd squid tap to inspect
the exact bounded next-turn envelope. User-level Codex/agy entries do not make
hooks global: the wrapper requires the exact project root in the arm registry.
pd squid off removes that root while preserving other projects.
Do not infer hook readiness from the Bosun heartbeat alone. The daemon starts
that heartbeat before its database-integrity gate so its supervisor will not
kill a legitimately slow boot. The shared Claude/Codex/Gemini/agy wrapper first
requires the ready PID to match the live PID, then checks heartbeat freshness
and exact project arming. A missing, malformed, stale, or displaced generation
is an immediate successful no-op; pd squid status --json exposes
daemonAlive and daemonReady separately, and debug mode explains the skipped
boot/displacement step without retaining prompt or tool content.
When hook behavior is slow or confusing, use pd squid debug on only for the
diagnostic window, reproduce the turn, then read pd squid status or the
focused pd squid debug status (--json works on either). They share one
diagnostic source. Status returns at most 25 recent hook steps and 20 recent
matrix values per kind, with total/returned/truncated metadata, so retained
history cannot cut JSON in half or turn introspection into more hook work. Each
step shows actual start/finish, the one-second expected-by timestamp, duration,
gate outcome, and a short explanation. A start with no completion by its
deadline is OVERDUE. pd squid debug off stops capture while preserving the
bounded local timeline; clear removes it. The format cannot retain argv,
environment snapshots, prompts, tool inputs/results, stdout, or stderr.
Routine pd squid status hides retained session identifiers and absolute paths
while capture is off; use the explicit debug-status surface to inspect them.
Operators use the FleetBar Squid strip's Inspect button for this same surface.
Retained PD TRACE rows are legacy history; current installs do not schedule a
PostToolUse process.
Every staged hook command is a stable ~/.port-daddy/bin/pd-hook-* shim; a
provider config that names a Homebrew Cellar version is stale and must be
repaired. Hooks never retry in the agent's critical path. Three consecutive
unexpected exits or executions over the 250 ms health budget open a five-minute
circuit breaker: later calls immediately fail open, one next-turn notice points
the operator to FleetBar, and the Inspect sheet shows the affected hook, last
reason, timestamps, and retry time. FleetBar's Repair button atomically
restages the shims, rewires providers, and clears the latch only after success.
An intentional direct-edit block (exit 2) is enforcement, not a hook failure.
Coordination content in the hook path stays bounded: no status message and
zero coordination stdout when there is no fresh actionable project fact or
fleet-wide control alert. Its topology is deliberately bounded to one turn
briefing plus a gate only for direct file-edit tools. Broad shell/exec tools
and observational PostToolUse hooks are excluded; claims and notes carry
cumulative outcomes. When coordination is genuinely useful, the prompt hook's
coordination block is capped at one heading plus two facts (512 bytes of
context). A hook that waits on the daemon or scans an unbounded matrix is
still a product bug — but the end-of-turn SITREP is not: it is the harness's
visible value surface (operator doctrine, 2026-08-22), governed by the
per-repo sitrep.endOfTurn dial (off | suggest | enforce, default
enforce; PD_SITREP env override wins, then agent.config.json →
.portdaddy/sitrep.json → .portdaddy/project.json). At suggest/enforce
every turn carries the end-of-turn SITREP table contract —
| Idea / Suggestion / Remediation | Source (Agent/Operator) | Status | Related PR/Issue | Docs / Roadmap Link | — update Status each turn, carry
unresolved rows forward, and mint a roadmap link (pd roadmap upsert) before
writing code for a row. enforce makes a turn that ends without the table an
incomplete turn; scaffold it with pd sitrep --template. Repos that want
quiet turns dial it off explicitly.
pd attention is also safe before pd begin: without a bound identity its
default read succeeds as an explicit empty/unbound result; subscription changes
still require an identity. A normal pd attention read advances the caller's
read cursors; use pd attention --peek when inspection must not mark anything
seen.
The operator drives this through FleetBar's selected-project ◆ GIANT SQUID
strip. It exposes state, provider count, Arm/Repair/Disarm, and the hook timeline
without asking the operator to run these agent-facing commands.
Daemon connection code follows published truth. Port 9876 is an allocator
preference, not a liveness witness: clients use an explicit URL, an existing
Unix socket, or the selected daemon's published port file. Missing, malformed,
or unreadable publication fails closed instead of guessing a listener, and the
SDK's public URL field stays empty rather than publishing a made-up endpoint.
Default Agent Happy Path
Use this path before you reach for advanced coordination. It is the normal agent loop for repo work on this machine.
pd learn is the canonical offline-safe orientation command; pd tutorial is
an exact alias. The orientation handler is operationally read-only: it does not
create or change sessions, claims, plans, notes, files, indexes, or other work
resources. Headless execution makes no handler daemon request. On an actual
interactive controlling terminal, it may make one bounded GET /health
(750 ms, no retry) to label the guide with live daemon status. The surrounding
CLI envelope still makes exactly one best-effort append-only usage-telemetry
attempt, so "operationally read-only" does not mean zero I/O. pd learn never
searches, trains, ingests, embeds, or reindexes content; use the explicit
retrieval and indexing commands for those jobs.
pd attention
pd status
pd sitrep --template
pd briefing
pd salvage --project <project> --limit 20
pd begin "<bounded task>" --identity <project>:<agent> --lifecycle durable
pd whoami
pd plan set "- [ ] Setup X\n- [ ] Fix Y\n- [ ] Verify Z"
pd advise <likely-path> --task "<plain-language task>"
pd note "Scope: <files>. Assumptions: <truth>. Validation: <commands>."
pd session files add <path>
# Work in a linked worktree; commit validated checkpoints with agent attribution.
# Keep the complete plan and notes current. A checkpoint is not delivery.
pd plan check "Setup X"
# Publish a ready, non-draft PR through the authorized path.
# Own reviews, regression tests, required checks and the protected merge/queue.
# Verify the actual merged-head receipt; queue admission is not merge.
pd note "Result: <change + PR + merged SHA>. Validation: <evidence>. Remaining: <risk>."
pd done "<short outcome>"
After admission, pd begin may show at most three semantically matched live
peers. That optional hint has a 75 ms total budget, disables reconnect retries,
aborts its request, excludes the new agent, never falls back to lexical matching,
and fails open without output. A long list of
salvage, roadmap, docs, files, or sessions during begin is a regression, not an
arrival brief.
pd sitrep is similarly a bounded projection: collections expose limits,
returned counts, and truncation; nested salvage histories and strings are
capped. Use pd sitrep --quiet when only the summary is needed.
The --template scaffold shows recorded metadata or explicit unavailable values,
not a fresh runtime, capture or authorization attestation. Roadmap rows match the
exact selected session within the returned preview; empty and unavailable are
distinct, and neither proves a complete ownership census. Never substitute another
session's work or create duplicate roadmap items just to populate the table.
Plan & Todo List Tracking
Every agent must establish a versioned todo checklist using pd plan set.
- Set a plan: Run
pd plan setwith markdown checklist items. - View latest plan: Run
pd plan showorpd plan. - Mark item completed: Run
pd plan check <index>(e.g.,pd plan check 1orpd plan check "step one"). - Close session gate:
pd doneandpd plan checkuse the same visible checklist tasks. Unfinished[ ]or[-]tasks block completion; fenced examples, HTML comments, and prose markers do not. Checked[x]and[X]tasks are complete. Finish the plan or explicitly abandon the session; a caller-supplied reason is not operator authority.pd done --no-pris narrower than “I chose not to open a PR”: it succeeds only for a clean worktree whoseHEADhas no commit absent from every remote ref. This verifier runs even when the branch is fully pushed; dirty or unpublished repository work remains blocked.
Durable note history has no lifetime count ceiling. Ordinary appends allow 60 notes per rolling 60 seconds per session, with content bounded to 10 KiB UTF-8; honor a temporary refusal's retry time without replacing the session or deleting history. One actual terminal transition may append a bounded handoff at an exhausted burst; repeated completion and caller-selected handoff types cannot bypass admission. Ephemeral sessions still cap ordinary notes at 500. Requested pages accept limits 1–1000, while exact-session detail retains its complete history default. A persisted total is not a preview length. Verify the installed daemon separately; this does not promise a hostwide storage quota.
Ordinary code delivery has a separate Git publication/containment gate: the
worktree must be clean and its exact HEAD must be contained in a freshly
advertised origin upstream or origin default branch. Missing or deleted
tracking metadata is not proof that work was never pushed. The default-branch
proof records ancestry, not feature-branch publication history; neither proof
establishes CI, independent review, or protected merge. Keep the PR Finish Line
requirements. The check does not fetch or rewrite Git state, retains ignored
evidence, and refuses missing objects, changed evidence, or unproven squash/rebase
ancestry. Verify installed behavior separately from this source contract.
Session Continuity
A resumed coding session is not automatically a new Port Daddy session. Treat multi-day work as a continuity problem first, then decide whether to resume, link, or restart.
Re-anchor when a conversation resumes after a calendar day, after context compaction, after daemon/session drift, or when the worktree is behind the canonical remote:
pd status
pd briefing
pd sessions --all-worktrees
pd notes --limit 20
pd salvage --project <project> --limit 20
git status --short --branch
git fetch origin
Resume the existing session when the user goal, worktree or successor
worktree, branch lineage, and touched surface are still the same unresolved
slice. If the previous session is stale, abandoned, or cannot be made active,
inspect the exact session, recorded owner, worktree/root and claims first.
Use a supported same-owner pd session takeover <old-session-id> [reason]
(or pd takeover <old-session-id> [reason]) only when the selected credential
is authorized for that predecessor. Read back the actual successor, retained
notes and claim disposition; the command name alone does not prove a transfer.
Start a new linked session when the product goal changed, the previous slice was completed or merged, the branch no longer descends cleanly from the old work, or the next edit would touch unrelated surfaces. Continuity comes from explicit provenance, not from overloading one old purpose forever.
The first continuity note must carry enough truth for another agent to take over without transcript archaeology:
- predecessor session id and new session id, if different
- identity, worktree, branch, and base drift from the canonical branch
- dirty or claimed files, plus any ownership conflicts
- last validation that is still trusted and validation that is stale
- runtime truth, especially socket/TCP/port-file or install-root drift
- next intended edit, blocker, or handoff
After drift, prefer explicit session ids for notes and file claims. If
pd whoami, active context, TCP port-file routing, and direct session storage
disagree, call it a coordination bug. Leave the best durable evidence you can,
fix the bounded bug if this slice can safely absorb it, or continue with a
clear note about the degraded coordination path.
Harness continuation is a separate identity boundary from Port Daddy session
takeover. Never replay a raw Claude, Codex, Gemini, or agy transcript into a
different runtime. Persist a sanitized handoff capsule first. Native resume is
valid only when the source and effective target backend share the same catalog
adapter family, the source id is a UUID rather than an option-shaped token, and
the daemon can bind bounded local evidence to the canonical source workspace.
Claude, Codex, and Gemini need an explicit transcript reference; agy also needs
its current workspace-to-conversation cache binding. The witnessed workspace
device/inode must still match at the final CLI child boundary. Missing or stale evidence
is not a reason to replay a transcript; it means native resume is unavailable
and cross-harness continuation must start a successor from the sanitized
capsule. Never trust the capsule's historical workspace path as execution cwd.
Reuse its reverified source witness; for a history-only, API, or model-server
source, pass an explicit current targetWorkdir that resolves to the intended
user-owned checkout. On POST /memory/handoffs/:episodeId/continue, choose the concrete
targetBackend and use mode: auto (default), native, or handoff. Auto
restores only a matching session-scoped adapter family and otherwise sends the
versioned sanitized successor brief to a new target session. Explicit native
must fail rather than silently changing identity semantics; explicit handoff
always creates a successor, even inside one family. Use a stable idempotency key
and trust the owner-leased continuation
receipt, not a model's claim that it resumed. A backend override that changes
adapter family, a lost accepted-to-running lease, or a failed terminal receipt
transition must fail closed before Port Daddy reports success.
Session selection itself is deterministic. PD_SESSION_ID and PD_AGENT_ID
are one atomic identity: a partial pair does not hide a complete context slot,
and a complete environment pair that disagrees with the slot fails with
CONTEXT_CONFLICT plus both provenances. Do not clear variables or retry a
broader selector to route around that error. Exact mutations send the selected
session and its stored owner together; agent-only ambiguity returns
AMBIGUOUS_ACTIVE_SESSION candidates. Dormant, missing, failed, or mismatched
exact-session lookups never fall through to another worktree's active session.
Completion, including the completed phase, must pass pd done's plan and delivery
checks. Credential files must be owner-held, single-link regular files; never
repair a credential by copying another actor's bearer. pd session takeover <id> resumes only
the daemon-stamped owner of that dormant session. Raw IPC and direct SQLite are
read-only for session, note, claim, lock, and salvage authority; mutations use
the credentialed daemon HTTP path.
Inspect portability with pd backend adapters --matrix or
GET /harness-adapters/continuation-matrix. Read the grid as declared mechanics,
not proof: N means same-family native resume is mechanically available and H
means a sanitized successor handoff is available. --probe is discovery only.
Only durable completed spawn transcripts, continuation receipts, or dedicated
live-control receipts can mark the corresponding predicate witnessed; evidence
older than seven days remains visible but stale. Never turn catalog declarations,
help output, path existence, or an agent's self-report into a numeric conformance
badge.
Durable roster identity is another layer again. Use pd roster list and
pd roster search "<expertise>" [--repo <path>] when the question is which
long-lived named expert should receive work, even when no body is currently
running. A roster alias such as portdaddy-typography-expert is a human label;
the daemon-minted agent_node_... is the principal. Create one with pd roster create, or promote a proven session only after storing its sanitized handoff
capsule, then use pd roster promote <session-id> --episode <id> .... Profile
edits append revisions. pd roster continue <agent-node-id> --backend <id>
chooses a new body without changing the person and reuses the same witnessed
native-or-successor continuation receipt path described above. Stored trigger
and permission fields are declarations, not proof they are active or enforced.
Roster expertise search is hybrid: fuse BM25 with results from a compatible
semantic space. Prefer the strongest approved, configured embedder that fits
the corpus privacy boundary, retrieval quality target, latency, and cost. Every
stored vector and query carries its provider, model id, immutable model
revision, dimensions, normalization, distance metric, and a space_id hashed
from canonical ordered metadata.
Reject or re-embed incompatible spaces; never compare them silently.
MiniLM is an explicit local/degraded fallback, not the universal design
authority. Name the stable corpus on every direct embedding call (pd embed text|stdin --corpus <id>); the source selector maps corpus policy, role, tier,
and provider to a registry profile and returns its spaceId. The local loader
must verify pinned artifact and runtime digests plus the vector output contract
before use. That runtime check is not a signed producer or benchmark promotion
receipt, and it does not activate BGE or any code/multimodal candidate. Verify
the installed pd embed --help surface before depending on this source contract,
run pd doctor when the local profile is unavailable, and do not claim a daemon
upgrade until deployed runtime and read-back evidence agree.
Telos vs Purpose
Every Port Daddy agent carries a telos alongside its purpose.
They look similar in pd whoami output, but they are not the same field
and should not drift together.
| Field | Meaning | Lifetime |
|---|---|---|
purpose |
The current task this session is doing. | Per-session. Resets when you pd done and pd begin again. |
telos |
Why this agent exists in the fleet — the durable role headline. | Long-lived. Survives across sessions, salvages, and respawns. |
pd begin "<purpose>" sets the purpose. By default the telos defaults to
the same string for compatibility, but creator-provided telos is preferred:
fleet YAML, spawn calls, and registration paths can declare a richer telos
object explicitly, and pd whoami will show that string instead.
When to update each:
- Per task — change
purposevia a freshpd begin(orpd donethenpd begin). Don't reuse a session whose purpose has materially shifted. - When the agent's role changes — update
telosthrough registration or heartbeat. Don't let operator surfaces (FleetBar, Fleet Control Center, briefings) show a stale role headline. A runtime-derived fallback telos is allowed only as compatibility — bake a real telos in as soon as you know the role.
Practical rules:
- If you spawn fleet agents in
pd-fleet.yml, declaretelos:on each agent explicitly. Keep starter templates, schema docs, CLI help, API docs, and this skill aligned when the telos shape changes. - If you can choose only one to make accurate, make telos accurate. Operator surfaces use it for the human-readable "what does this agent do" answer.
- When handing off, mention both telos and purpose in your
pd noteif they differ — the next agent inherits identity but may need to set a new purpose for its own slice.
Reconciling Before Publishing
Fetch and reconcile before publishing:
git fetch origin
git rebase origin/main
pd sessions --all-worktrees
pd notes --limit 20
pd guard check --staged
PR Finish Line
Code is not done until it is ready to merge to main. Delivery ownership continues through the actual merge. Commit coherent, validated checkpoints often in a linked worktree; a commit or pushed branch is recoverable progress, not completion. Requested research and planning artifacts also belong in a PR. Keep their remaining publication, review and merge tasks in the complete plan.
Publish ready, non-draft PRs, comments and review replies through an authorized
repository path. Existing authenticated gh and Git credential helpers may be
used within task scope without a separate exception; verify account, repository
and exact head/base without exposing credentials, and report actual authorship.
App/Fleetbot publication is optional when useful; preserve its scoped receipts
when selected. Keep responsible-agent and session attribution in the work.
Read-only inspection may use tools permitted by repository/operator policy;
where all GitHub access is broker-routed, honor that policy for reads too.
If no authorized path is available, preserve the commits and prepared PR body,
record the exact missing capability and arrange an attributable handoff.
An ad-hoc helper is not a shipped surface; do not invent a publisher command or
pretend a planned ActionReceipt API is available. Uncertain writes require
exact readback before any further mutation. Never export credentials or bypass
required checks, review or protected merge/queue rules.
Read-only reviewers and non-authoring agents must not push or merge merely
because they read this contract. Their finish line is the assigned review or
handoff, with its evidence; pd done --no-pr retains the narrower verifier
described under Plan & Todo List Tracking.
Before the first commit, inspect both effective Git author and committer. Use
the verified responsible agent's attribution and traceable actor/session
trailers; never silently inherit the operator's identity. Git metadata is
neither cryptographic signing nor App/Fleetbot publication identity. If you
discover mistaken attribution in your own unpublished commits, correct only
that history and prove tree/message equivalence. Never rewrite published or
another agent's history, or change global machine configuration. See
references/git-discipline.md for the bounded procedure.
Keep the Git outcome separate from the coordination audit. After a commit,
verify the actual SHA before interpreting hook output. pd guard check --post-commit --json audits an existing commit; postCommitAudit.commit
identifies it, status describes the audit, preCommitWouldBlock describes
remaining debt, and persistence: not-attempted means no note was published.
Even an audit issue does not undo Git. Write a SHA-bound pd note, read it
back from the same selected daemon/session, and clear outstanding findings
before the next commit. Do not rerun or amend a successful commit merely
because an older installed hook printed “commit blocked.” Verify installed
behavior separately from source; never treat an unverifiable audit as green.
When you open or inherit a PR, you own the machine-visible finish line unless an accepting successor takes the explicit handoff. Use Port Daddy notes when its runtime is authorized, or the PR/task record while it is halted. Link the PR in the existing roadmap item's typed PR field and read it back without overwriting another owner's status, edges or plans.
Inspect the exact current head immediately after PR creation and each push. Follow every review and GitHub/external CI/CD status to a verdict; delegate routine polling and log triage to a tool-native non-Astra lower-cost agent by default. Astra coordinates and reviews findings. Fix branch-caused failures, answer and resolve threads, and record proven external blockers with an owner and next action. Pending checks need an active follow-up or accepting handoff; an open PR is not completion. A review-PR request alone does not authorize merge. If local Port Daddy is operator-halted, use ordinary Git and hosted workflows without calling its CLI, MCP, daemon, hooks, apps, or spawn paths.
- Read live PR comments, reviews, inline bot findings, and status checks before declaring the branch ready.
- Respond graciously to comments and incorporate actionable feedback unless clearly wrong or harmful; explain a disagreement with concrete evidence. Add regression tests for fixes and improve relevant CI/CD when needed.
- Treat bot comments as review findings — fleetbot included. The
port-daddy-fleetbot posts[pd-code-reviewer]and[pd-qa]threads on every PR; read and answer them alongside Copilot, Claude review, Cloudflare Pages, CodeQL, release, package, androadmap-link-gatecomments. Reply to every actionable thread with fixed / deferred / contested-because, and never declare a PR done with aport-daddy-fleet(or other actionable) thread unanswered. - A reply is not the same as resolution. After fixing or contesting inline
review comments, resolve the GitHub review threads and query the PR's
reviewThreads(GraphQL or equivalent) to prove no actionable thread remains unresolved. - Run or spawn an adversarial reviewer for non-trivial changes. Ask for a
SHIP / SHIP-AFTER-FIX / DO-NOT-SHIPverdict and fix high-confidence findings before merge. - "CI green" includes GitHub checks and attached external deploy/status checks.
If a red check is truly external, inspect the linked logs and document the
owner/root cause in both the PR and a
pd note; otherwise fix the branch. - Once the exact head's required checks and review gates pass, use the normal protected merge/queue. Neutral/skipped Fleet is not a clean required verdict; neither queue admission nor auto-merge configuration is merge. Never use an admin bypass to manufacture green.
- Read back the actual merged head, merge commit and timestamp before marking
the merge task complete. Then post attributable validation evidence, update
the plan and linked receipt, and
pd donethe session. Do not close at PR creation or abandon ownership while checks run. A true external blocker gets exact evidence and an accepting handoff, not a false completion claim.
Small Decision Table
| Situation | Move |
|---|---|
| You will edit files | Start a session, leave a scope note, and claim the smallest real files or regions. |
| The live daemon looks stale | Verify daemon provenance before trusting docs, source, or memory. |
| Another session may overlap | Read notes, claims, activity, and ownership before changing the surface. |
| Work was interrupted | Use salvage or pd session takeover; preserve the abandoned intent. |
| The same coding vibe resumes days later | Re-anchor, then resume the old session or create a takeover successor with explicit predecessor provenance. |
| You are about to commit, push, or deploy | Fetch, reconcile, re-read live coordination state, stage narrowly, and run the guard. |
Advanced Surfaces
Use these only when the task actually needs them:
- Tuples and channels for machine-readable shared facts.
- Actor inboxes for durable role ownership.
- Pheromones and file heat for contention signals.
- Fleet YAML and spawned runs for real parallel work.
- Locks for scarce resources such as promotion, generated artifacts, migrations, and release packaging.
- FleetBar and Fleet Control Center for operator-visible truth.
Semantic inspection and ideation
When a task needs indexed relationships or promoted history, pd graph edges|stats and pd memory episodes|stats provide read-only inspection. Treat
these as views of recorded data, not as authority for the underlying work or
relationships.
For prior ideas, pd ideas list|show reads the repo's canonical
docs/recovery/IDEAS-TROVE.md; pd ideas search <query> can also return notes,
tuples, repo Markdown, and optional raw .spark/.spider residue. Search hits
outside the trove are discovery evidence: inspect their source before treating
an idea as established or adding it to the canonical trove. Live search inputs
may be unavailable while the daemon is down.
CLI Documentation Contract
The CLI reference lives in this skill and the website docs; nothing should
require a separate port-daddy-cli skill. The source-backed website page
/docs/cli must give every command row a detail route with syntax, options,
examples, aliases, source provenance, and API contract metadata.
High-frequency commands:
pd status
pd briefing
pd begin "<purpose>" --identity <project>:<agent> --lifecycle durable
pd note "Scope: <files>"
pd session files add <path>
pd add --dry-run -A
pd guard check --staged
pd tube <channel> --send "message"
pd actor lookout --message "release surface drift fixed"
pd done "<summary>"
Load references/cli-reference.md when you need the broader command families,
aliases, generated docs expectations, or claim-aware git staging rules.
Ambient Peer Coordination
The point is not to make agents talk constantly. The point is to publish shared facts where other agents and operator surfaces can find them.
- Use
pd notefor scope, assumptions, touched files, validation, blockers, and handoffs. - Use symbol/region claims when a change is naturally smaller than a file.
- Use tuples, channels, and actor inboxes for machine-readable coordination.
- When possible, fix bounded Port Daddy dogfood bugs when you discover them; if the fix is not bounded, leave exact evidence and a targeted actor message.
- Publish
coordination:inconsistencyfor not just collision avoidance, but implied-goal contradictions, UI or docs shape conflicts, live runtime/source drift, security, auth, privacy, data-retention, trust-boundary divergence, raw text or unauthenticated endpoints beside authenticated, secure API claims, and sessions marked active while their agent registry bodies are dead or missing. - Operator-worthy callouts go to durable channels. Routine progress stays in notes.
Roadmap, Skill, And Actor Truth
Roadmap and skill-drift work must route through live actor and recovery surfaces, not only local prose.
pd actors --project <project>
pd actor cartographer --project <project>
pd actor navigator --inbox-stats
pd actor navigator --inbox --unread
pd actor navigator --message "roadmap state changed; reconcile the live event evidence and projections"
pd actor lookout --message "release-surface drift fixed in docs, website, README, and skill"
Mailbox delivery is durable but not an immediate answer. After messaging an actor, work from live daemon events, notes, sessions, and checked-in release evidence. Recovery ledgers, Cartographer files, plans, DAGs, binders, and snapshots are sources or projections, not independent authorities. The target roadmap authority is the configured remote append-only work-event Oracle after a write has a remote read-back receipt. Until that cutover is proven live, preserve and label local projections honestly; do not mint another "authoritative" file.
MCP Equivalents
When a client is using MCP instead of the CLI, use the matching Port Daddy MCP
tools for claims, sessions, notes, locks, messaging, salvage, harbors, spawning,
and service orchestration. Prefer MCP for model clients that already have it
installed; prefer the CLI when you need shell-local git, build, or deployment
evidence. jury_rig_status() maps to GET /jury-rig/status and is
strictly read-only: it reports current-hash Tool2Vec coverage without generating
centroids or calling an LLM. Reconciliation stays on the explicit CLI/API path;
do not add an agent-triggered MCP mutation for it.
Operating Loop
Run the loop in order. Skip only when the task is truly trivial.
pd status
pd briefing
pd salvage --project <project> --limit 20
pd begin "<bounded task>" --lifecycle durable
pd advise <likely-path> --task "<plain-language task>"
pd note "Scope: <files>. Assumptions: <truth>. Validation: <commands>."
pd session files add <path>
pd guard status
pd guard install --mode enforce # if this repo should enforce claims and the guard is not already enforcing
# work
git fetch origin
git rebase origin/main # use origin/master only when that remote branch actually exists
pd sessions --all-worktrees
pd notes --limit 20
pd guard check --staged
# Commit validated checkpoints; publish a ready, non-draft PR.
# Follow PR Finish Line: gracious reviews, regression tests, required checks,
# protected merge/queue, and an actual merged-head receipt before completion.
pd note "Result: <change + PR + merged SHA>. Validation: <evidence>. Remaining: <risk>."
pd done "<short outcome>"
The loop is not ceremony. It solves the actual failures that ruin multi-agent work: stale runtime assumptions, invisible ownership, repeated archaeology, ambiguous handoffs, and local green checks that do not match the installed app.
Decision Points
| Situation | Move |
|---|---|
| You will edit files | Start a session, leave a scope note, claim the smallest real surface. |
| Another session may overlap | Read notes/activity/claims, then route around or publish a coordination inconsistency. |
| The daemon or FleetBar looks wrong | Verify live process, socket, TCP URL, install root, and Fleet Control Center evidence. |
| Work was interrupted | Use salvage before restarting. Preserve the original intent when claiming. |
| A fact should be machine-queryable | Emit a tuple or schema-shaped handoff, not prose only. |
| A scarce resource is involved | Use a lock for promotion, migrations, generated assets, or release packaging. |
| A release surface changed | Update docs, README, website, skill, and package/export metadata in the same coherent slice. |
| You are about to commit, push, or deploy | Fetch the canonical remote branch, rebase/merge current work onto it, re-read live sessions/notes/activity, stage through pd add --dry-run -A then pd add -A, and run pd guard check --staged. Do not publish stale-base work. |
Procedural Cues
- If
pd statusis green but the browser or FleetBar is stale, suspect install root or daemon freshness before rewriting source. - Daemon installation is binary-first.
pd start,pd daemon start, andpd installshould launchdist/daemon/port-daddy-daemonwhen present; source-backedtsx server.tsis a development-only fallback gated byPORT_DADDY_ALLOW_SOURCE_DAEMON=1. - Single-binary builds use
npm run build:binand emitdist/port-daddy. That executable carries CLI dispatch, the MCP stdio server, and a hidden__daemonentrypoint without atsxsubprocess. The build embeds Fleet UI and public samples into the executable through a generated asset table, then smoke-tests daemon health plus/samples/manifest.jsonand/fleet-ui/index.htmlwith an emptyPORT_DADDY_RESOURCE_DIR. - Public tutorial samples are served from the generated
/samples/manifest.jsonbundle. Rebuild it withnpm run build:public-samplesbefore claiming a binary install can serve promised example code. - If a file looks unclaimed but a recent note says someone owns that surface, trust the coordination story enough to inspect before editing.
- If your fix needs a phrase like "probably unrelated," separate it from the slice until evidence says otherwise.
- If a note cannot tell the next agent what changed, what was validated, and what remains, it is not a handoff yet.
- If a process-level command succeeded but the UI still looks broken, the work is not visually verified.
- If two agents disagree about product shape, publish the conflict to
coordination:inconsistencyinstead of smoothing it away. - If the user has to remind you to coordinate, the process has already failed: pull against the canonical branch, read the live fleet, leave a Port Daddy note, and make the durable instruction stronger before continuing.
- If Coordination Guard is absent or only advisory in a repo that expects
enforced claims, run
pd guard install --mode enforceor leave an explicit blocker note with the exact failure.
Daemon Architecture Model
Treat the daemon as the local single-writer control plane. Stable, dev-latest, and branch berths may all run at once, but they do not share a SQLite file and they are not interchangeable evidence.
For source versions with canonical one-body intake, a spawn result includes a `runRe
…(truncated)