adopt

adopt is a command for coding agents from poindexter12/waypoint. It costs 11 tokens per session (5,098 once invoked), scanned A, original, MIT.

A command that adds project metadata files to an existing Git worktree, which is a checked-out copy of a repository.

In plain words
What is it for?
Creating `.ai-context.json` and `README.working-tree.md`, with an optional project mode and description.
Why use it?
It gives an existing worktree standard context files when they are missing.

Command

Part of the workflows plugin — 4 skills, 5 commands, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/poindexter12/waypoint/adopt
Clone the repo
git clone --depth 1 https://github.com/poindexter12/waypoint

Or install workflows, the plugin that ships this one along with the rest of its 4 skills, 5 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adopt

README.md
[![agentmods](https://agentmods.dev/badge/commands/poindexter12/waypoint/adopt.svg)](https://agentmods.dev/commands/poindexter12/waypoint/adopt)
Your own site
<a href="https://agentmods.dev/commands/poindexter12/waypoint/adopt"><img src="https://agentmods.dev/badge/commands/poindexter12/waypoint/adopt.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,098 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.05098
Opus 5 $0.00005 $0.02549
Sonnet 5 $0.00002 $0.01020
Haiku 4.5 $0.00001 $0.00510

Measured 5d ago against content hash 14682ba72d17, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

adopt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

workflows/commands/adopt.md · 786 lines

How it starts

The opening of the file, as written. The whole thing — 786 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/adopt:working-tree

Generate .ai-context.json and README.working-tree.md for existing worktree lacking metadata.

ARGUMENT SPECIFICATION

SYNTAX: /adopt:working-tree [--mode <mode>] [--description "<text>"]

OPTIONAL:
  --mode <mode>
    Type: enum[main, feature, bugfix, experiment, review]
    Default: inferred from branch-name (see MODE_INFERENCE_ALGORITHM)
    Validation: must match exactly one of the enum values

  --description "<text>"
    Type: string (quoted if contains spaces)
    Default: "" (empty string)
    Validation: any string, no restrictions

MODE_INFERENCE_ALGORITHM

APPLY rules sequentially, first match wins:

def infer_mode(branch_name: str) -> str:
    if branch_name.startswith("feature/"):
        return "feature"
    elif branch_name.startswith(("bugfix/", "fix/")):
        return "bugfix"
    elif branch_name.startswith(("exp/", "experiment/")):
        return "experiment"
    elif branch_name.startswith("review/"):
        return "review"
    elif branch_name.startswith("i18n/"):
        return "feature"  # i18n work is feature-type work
    elif branch_name in ("main", "master"):
        return "main"
    else:
        return "feature"  # DEFAULT

DETERMINISTIC: Given same branch_name, always produces same mode.

EXECUTION PROTOCOL

Execute steps sequentially. Each step must complete successfully before proceeding.

STEP 1: DETECT REPOSITORY INFO

EXECUTE:

REPO_ROOT=$(git rev-parse --show-toplevel 2>&1)
EXIT_CODE_ROOT=$?
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>&1)
EXIT_CODE_BRANCH=$?

VALIDATION:

  • IF EXIT_CODE_ROOT != 0 → ERROR PATTERN "not-in-git-repo"
  • IF EXIT_CODE_BRANCH != 0 → ERROR PATTERN "git-command-failed"
  • REPO_ROOT must be absolute path starting with /

DATA EXTRACTION:

WORKTREE_NAME=$(basename "$REPO_ROOT")

NEXT:

  • On success → STEP 2
  • On failure → ABORT

STEP 2: CHECK EXISTING METADATA

EXECUTE:

METADATA_PATH="$REPO_ROOT/.ai-context.json"
test -f "$METADATA_PATH"
EXISTS=$?

Read the full file on GitHub · 786 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 786 lines · 0 tokens per session scan A 14682ba72d17

Subscribe to this mod's changes

adopt is a command published in the GitHub repository poindexter12/waypoint (7 stars, last pushed 7mo ago), licensed MIT. It adds 11 tokens to every session and 5,098 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.