Skip to content

/to-task

Capture the current chat discussion into a task, no implementation plan

From plugin
78 skills8 agents
shell
$ npx -y skills add SpaiR/task-pipeline --skill to-task --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/to-task
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

Capture the current chat discussion into a task, no implementation plan

SKILL.md

to-task.SKILL.md
name: to-task
description: Capture the current chat discussion into a task, no implementation plan
disable-model-invocation: true
user-invocable: true

Distil the chat discussion so far (or a roadmap item) into `.task/task/<slug>.md` — `## Description` only, no `## Plan`. Lightest of the three capture skills (`to-task` / `to-plan` / `to-roadmap`): use it to record the "what and why" before implementing directly, or before `to-plan` later. The written file is the handle — no active-task pointer, no separate execution skill; a fresh session implements it by reading `## Execution`.

**Input:** `$ARGUMENTS` — optional. Recognized forms:

  • (empty) — draft from the chat discussion so far.
  • `<roadmap-slug>` or `<roadmap-slug>#<N>` — open from that roadmap item instead of the chat.
  • anything else — free-form context to fold into the draft alongside the chat discussion.

Step 0: Setup gate

Resolve the pipeline root, then check whether its `config/config.md` exists:

source "${CLAUDE_PLUGIN_ROOT}/skills/_lib/resolve-ws.sh"   # sourcing runs find_ai_dir → sets AI_DIR
[[ -f "$AI_DIR/config/config.md" ]] || echo "config.md not found"

The helper walks `task.root` git config → ancestor `config.md` → `dirname(git-common-dir)/.task` → `$CLAUDE_PROJECT_DIR/.task` when that path already holds a `config/config.md` → `./.task`. Use `${CLAUDE_PLUGIN_ROOT}` — a bare `skills/…` path resolves against the user's project cwd, where it does not exist.

**Once `config.md` exists, every artifact path in this skill is under that resolved `$AI_DIR`, never the cwd** — `.task/task/<slug>.md` below is shorthand for `$AI_DIR/task/<slug>.md`. A cwd-relative write from a subdirectory or a linked worktree would create a second `.task/` that `validate.sh` (which resolves `$AI_DIR` itself) never sees. The inline setup below is the one exception: it runs *before* a root exists, writes to `<ROOT>/.task`, and records `git config task.root "$ROOT"` — which is exactly what `$AI_DIR` resolves to on every later run.

  • **Absent → inline setup.** Run it inline, do not defer to another command:

1. Determine the pipeline root `ROOT` (main worktree root; `pwd` for a non-git dir; for a bare repo the default is a best-effort guess — surface it in the proposal below so the user can redirect it). 2. Analyze the project: read `CLAUDE.md` if present, detect language/stack, build/test commands, a project commit-format doc (check in order `CONTRIBUTING.md`, `docs/CONTRIBUTING.md`, `.github/CONTRIBUTING.md`), detected language policy (repo's dominant natural language from `git log -10 --oneline` + `CLAUDE.md`/`README.md` prose — default to "follow `task.md` Description" for English/mixed repos), and detected testing-policy mode (`always` if a TDD convention is documented, `on-demand` otherwise — never silently detect `never`). 3. Print the detected config as message text, then pose ONE `AskUserQuestion` confirmation in the same reply — the chips don't display it, so the call is gated on that line being printed above it. (This is the config-setup carve-out named in convention (b): it confirms *auto-detected* environment that was never discussed, so unlike a content capture it does ask before writing.):

     Detected — Language: <policy>; Testing policy: <mode>.

Bare repo: add a third clause, `.task location: <ROOT>/.task`, editable the same way. Chips **Accept** / **Edit** / **Decline**:

  • **Accept** → adopt as-is.
  • **Edit** → follow-up asks which field(s) to amend (language policy / testing-policy mode / bare-repo `.task` location), same option menus as the language/testing-policy questions below, then continue.
  • **Decline** → do not write anything; report "`config.md` not written — nothing was created. If the detected language or testing policy looked wrong, re-run and pick **Edit** to change them before the write. → Next: `/task:to-task`" and **stop**.

4. Write `.task/config/config.md` using the standard template — sections: Code Navigation, Code Editing, Library Documentation, Project Conventions, Build and Tests, Commit Format, Language, Testing Policy, Directories — Do Not Search. Reference mode (a short `**Source:** \`CLAUDE.md\` → \`## <Heading>\`` pointer, ≤3 summary lines) when `CLAUDE.md` already documents a section; full mode otherwise. Commit Format: reference mode with just `**Source:** <path>` when a commit-format doc was found; otherwise derive rules from `git log`, and when `git log` yields no usable convention fall back to `**Source:** ${CLAUDE_PLUGIN_ROOT}/skills/_lib/templates/conventional-commits.md`. 5. Record `git config --local task.root "$ROOT"` (repo-common; shared by every worktree). Skip with a warning if not a git repo — the ancestor-`config.md` walk resolves `.task/` without the anchor. 6. Exclude `.task` locally: `EXCLUDE=$(git rev-parse --git-path info/exclude); mkdir -p "$(dirname "$EXCLUDE")"; touch "$EXCLUDE"; grep -qxF '.task' "$EXCLUDE" || echo '.task' >> "$EXCLUDE"`. Skip with a warning if not a git repo. 7. Report what was written, then continue to Step 0's validate call below with the original `$ARGUMENTS` unchanged.

  • **Present → skip silently**, proceed to validate.

Then run `bash "${CLAUDE_PLUGIN_ROOT}/skills/validate/validate.sh" all` — an optional self-check, not a gate: report any WARN/ERROR lines, but only hard-stop when `.task/config/config.md` is genuinely absent (Step 0 just handled that). Never block on a pre-existing artifact failing validation.

Step 1: Entry

No pointer to resolve — the artifact path is the handle. Branch on `$ARGUMENTS`:

1. **Positional roadmap reference** (`<slug>` or `<slug>#<N>`, matching an existing `.task/roadmap/<slug>.md`) → **from-roadmap mode**, Step 1a below. 2. **No positional roadmap reference, and one or more `.task/roadmap/*.md` files have an unchecked (`- [ ]`) item, and there is no chat discussion to draft from** → present an `AskUserQuestion` fork (convention (c)): "How d

Read more
Read it on GitHub ↗

Showing the first part of this file.

Ships withtask

Docs & guides → spair.github.io/task-pipeline A plan file is only as good as the argument that produced it. That second line is where projects quietly go wrong: the model agrees and starts building before the plan was ever argued.

Get the whole plugin, auto-invoked
Stats
7
Stars
0
Views
0
Forks
Active
Maintenance
Shell
Language
MIT
License
8h ago
Last commit
1mo ago
Created

Repo: SpaiR/task-pipeline