Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ A private `.agents/workflow.local.md` takes precedence when present. Run
- **Specs**: `.agents/specs/`
- **High-level designs**: `docs/design/`
- **Tickets**: GitHub Issues in `jinyeow/dotfiles`
- **Labels**: `spec-ready`, `design-ready`, `triaged`, `ready`, `needs-info`, `wontfix`
- **Labels**: `spec-ready`, `design-ready`, `triaged`, `ready`, `ready-for-human`, `needs-info`, `wontfix`
- **Domain docs**: single-context layout with root `CONTEXT.md` and `docs/adr/`
- **Wayfinding**: GitHub parent/child issues for maps; use `wayfinder:map`, `wayfinder:research`, `wayfinder:prototype`, `wayfinder:grilling`, and `wayfinder:task`; use GitHub's native blocking relationships; frontier means open, unblocked, unassigned child issues; claim by assigning the issue to the implementing developer.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ Not sure which one fits? Run `/router` — a manual index that maps these as flo

| Skill | Source | Purpose |
|---|---|---|
| `grill-with-docs` | mattpocock/skills | Stateful grilling against the domain model; updates `CONTEXT.md`/ADRs inline |
| `grilling` | mattpocock/skills | Stateless relentless-interview primitive to stress-test a plan |
| `grill-with-docs` | mattpocock/skills | Thin pointer invoking `grilling` and `domain-modeling` together |
| `grilling` | mattpocock/skills | Relentless-interview primitive to stress-test a plan, in batched frontier rounds |
| `domain-modeling` | mattpocock/skills | Challenge terminology against `CONTEXT.md`, sharpen fuzzy language, record ADRs |
| `prototype` | mattpocock/skills | Throwaway prototype for a state/logic question or UI exploration |
| `to-spec` | mattpocock/skills | Turn the conversation into a spec |
| `to-hld` | local | Turn the discussion into a high-level design doc — decisions + mermaid |
Expand Down
8 changes: 6 additions & 2 deletions ai-agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,18 @@ own `SKILL.md` frontmatter, trimmed to one line. Claude-native skills live in `.
- **`council-code`** — Thin council alias for technical designs, ADRs, APIs, and approach documents.
- **`council-doc`** — Thin council alias for presentations, proposals, and important documents.
- **`council-plan`** — Thin council alias for project plans, roadmaps, and migrations.
- **`critique-plan`** *(trial)* — Stress-test a drafted plan against the project's domain model before any code is written: terminology drift, wrong bounded context, ADR contradictions, bad dependency edges, reinvented concepts. Adapted from [ayoubben18/ab-method](https://github.com/ayoubben18/ab-method) (MIT).
- **`deep-review`** — Heavy multi-dimension cross-model code review of a branch diff or PR, the opt-in deep pass, not the default.
- **`diagnosing-bugs`** — Diagnosis loop for hard bugs and performance regressions.
- **`dispatch-implement`** — Dispatch one subagent per ticket to run `/implement` on it.
- **`domain-modeling`** — Build and sharpen a project's domain model: challenge terminology against `CONTEXT.md`, sharpen fuzzy language, and record ADRs as decisions crystallise.
- **`fix-findings`** — Apply fixes for findings produced by quick-review or deep-review.
- **`grilling`** — Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree.
- **`grill-with-docs`** — Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise.
- **`grilling`** — Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree in batched frontier rounds.
- **`grill-with-docs`** — Thin pointer invoking `grilling` and `domain-modeling` together for a grilling session that also updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise.
- **`health`** — Manual engineering health audit of your agent setup: Claude/Codex config drift, hooks, MCP, skills, memory and skill supply-chain security, and AI-maintainability drift.
- **`i-have-adhd`** — Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time estimates, make wins visible. `disable-model-invocation: true` — invoke explicitly with `/i-have-adhd`; stays on until "stop adhd mode". Adapted from [ayghri/i-have-adhd](https://github.com/ayghri/i-have-adhd) (MIT).
- **`implement`** — Implement a piece of work from a spec or set of tickets: TDD at agreed seams, review, then commit.
- **`implement-spec`** — Implement a whole spec as one pull request, working the ticket frontier with concurrent implementer subagents until every ticket lands, then review and open the PR.
- **`improve-codebase-architecture`** — Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/.
- **`jj`** — Use when working in a Jujutsu (jj) repository: making/describing changes, syncing with a remote, rewriting history, managing bookmarks or workspaces, or recovering via the op log.
- **`linkedin-jobs`** — Read LinkedIn job alert emails and recruiter InMails, extract role details, and present them as structured cards grouped by inferred category.
Expand All @@ -74,6 +77,7 @@ own `SKILL.md` frontmatter, trimmed to one line. Claude-native skills live in `.
- **`redraft`** — Scrap the current fix and redo it properly, using everything learned while building the mediocre version.
- **`refactor-agents-md`** — Refactor an AGENTS.md file to follow progressive disclosure: split it into a minimal root file plus linked category files.
- **`resolving-merge-conflicts`** — Use when you need to resolve an in-progress git merge/rebase conflict.
- **`retro`** — Conduct a retrospective on a coding session, surfacing improvements to the agent's environment (docs, checks, conventions) rather than to the code itself.
- **`review-ado-pr`** — Review an Azure DevOps pull request locally, end-to-end.
- **`review-fix-loop`** — Iterative review-fix cycle for a branch or PR.
- **`review-me`** — Interrogate the user on the current diff as an adversarial reviewer and withhold the PR until they pass.
Expand Down
23 changes: 20 additions & 3 deletions ai-agents/SKILL-OWNERSHIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ is the orchestrating session's own top-level `sandbox_mode` — which may itself
findings-store write path on Codex hosts remains an open gap. `storm-research` is portable
too, as of #172 resolving the #95 spike below: its five expert-lens prompts and
citation-verifier fan-out need only parallel dispatch with distinct per-child prompts, no
per-child tool scoping, on Pi via `pi-subagents`' `subagent({ tasks: [...] })` reusing the
builtin `researcher` agent; see `ai-agents/skills/storm-research/DISPATCH.md`. `walkthrough`
per-child tool scoping. At the pinned `pi-subagents@0.60.0` this is `subagent({ workflowScript:
"return runs.all([...])" })` reusing the builtin `researcher` agent — the top-level
`tasks: [...]` call shape this note previously named was removed upstream at 0.41.0; see
`ai-agents/skills/storm-research/DISPATCH.md`. `walkthrough`
is portable too, as of #91: its `~/.claude/learner-profile.md` path now resolves to the
runtime's own config home (`~/.claude/`, `~/.codex/`, `~/.pi/agent/`); its stale
`.claude/tickets.md`/`.claude/specs/*.md` reference was corrected to the current
Expand All @@ -45,7 +47,22 @@ all three runtimes, but only Claude Code's dispatch is wired (the `Agent` tool,
`isolation: "worktree"` for parallel children so they do not race one shared `.git/index`); on
Codex CLI (`[agents.implementer]` + `spawn_agent`, #211) and Pi (`pi-subagents`, #212) the skill
stops and reports instead of dispatching until those tickets land. Parallel dispatch is gated off
in favor of sequential-only until #213 confirms the base flow against real usage.
in favor of sequential-only until #213 confirms the base flow against real usage. `implement-spec`
is portable too: it only orchestrates calls into `to-spec`, `to-tickets`, `dispatch-implement`,
`review-fix-loop`, and `to-pullrequest` — all already portable or tracked as such — so it carries
no runtime-specific mechanics of its own. It inherits `dispatch-implement`'s current Claude-Code-
only dispatch and sequential-only gate at each frontier batch until that skill's own blockers
clear. `critique-plan`
is portable too, and new: it dispatches one isolated read-only subagent to critique a drafted
plan against the domain model, reusing `domain-modeling`'s `CONTEXT.md`/`ADR-FORMAT.md`/
`CONTEXT-FORMAT.md` conventions rather than a runtime-specific mechanism. Marked trial in
`ai-agents/README.md` — adapted from
[ayoubben18/ab-method](https://github.com/ayoubben18/ab-method) (MIT); not yet a settled
convention. `domain-modeling` is portable too, split out of `grill-with-docs` to match
[mattpocock/skills](https://github.com/mattpocock/skills)' current design: the CONTEXT.md/ADR
discipline stands on its own, independently model-invocable, while `grilling` (also
mattpocock/skills) carries the interview mechanics and `grill-with-docs` is now a thin pointer
skill invoking both. No runtime-specific mechanism involved.

## Portable support (`ai-agents/skills/_shared/`)

Expand Down
86 changes: 86 additions & 0 deletions ai-agents/skills/critique-plan/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
name: critique-plan
description: Stress-test a drafted plan against the project's domain model before any code is written — terminology drift, wrong bounded context, ADR contradictions, bad dependency edges, reinvented concepts. Use before implementing from a spec or ticket set, or when the user asks to critique, pressure-test, or sanity-check a plan against the domain model.
metadata:
status: trial
---

# Critique Plan (pre-implementation)

Stress-test a drafted plan against the project's domain model before any code is written. This
skill produces pushbacks, not suggestions — it never gold-plates a plan that is already sound.

Silence is the expected outcome. A plan that speaks the canonical language and respects the
documented decisions gets a one-line "No objections." Do not manufacture concerns to look
thorough.

"The plan" is whatever came out of `to-spec` or `to-tickets`, a set of tickets already on the
tracker, or whatever the user pastes in standalone.

## Process

### 1. Load the domain model

Read only what exists; skip missing files silently — don't flag them or offer to create them.
Look for `CONTEXT.md` (or `CONTEXT-MAP.md` plus each context's own `CONTEXT.md`, per
[domain-modeling](../domain-modeling/SKILL.md#file-structure)) and `docs/adr/`.

If neither exists, say so in one line and stop — there is no domain model to critique against.

### 2. Spin up one read-only domain critic

Dispatch a single isolated, read-only subagent with the plan verbatim and the files from step 1.
It returns pushbacks as text and edits nothing. Isolating it keeps the critique out of the
planning session's context. Its brief:

Fire only on a genuine conflict, one of:

- **Terminology drift** — the plan names a concept differently from the glossary/`CONTEXT.md`, or
reuses a canonical term for a new meaning.
- **Wrong bounded context** — work placed in the wrong context, or a unit that straddles a
documented boundary.
- **Contradicts an ADR** — reverses a recorded decision and the friction is real enough to reopen
it. Cite `ADR-NNNN`.
- **Bad dependency edge** (ticket set) — a "blocked by" edge crosses a context boundary the wrong
way, two "independent" tickets share a domain concept, or a ticket is mis-scoped (an epic, or
several tickets dressed as one).
- **Reinvents a named concept** — introduces a new abstraction for something the domain model
already names.

For each, return: **What** (the ticket/decision in question), **Conflicts with** (the exact
term / `CONTEXT.md` section / `ADR-NNNN`), **Why it matters** (concrete cost, not taste),
**Suggested resolution**.

Example pushback: "Ticket 3 calls it `archiveOrder`, but the glossary defines archiving as
retention only — this ticket also stops billing, which is Cancellation. Rename to `cancelOrder`
so the code matches the domain, or the two concepts will blur across the codebase."

A deliberately deferred decision the plan already marks as such (a stated placeholder, an
explicit TBD) is not a gap to flag — the user chose to defer it. Fire on it only if the
placeholder itself conflicts with the domain model: it contradicts an ADR, or it quietly
redefines a canonical term.

Out of scope for this critic: implementation quality, performance, tests, code style, "you could
also…" ideas — anything not anchored in the domain model. Those belong to `spec-review` (does the
diff match the spec) or `quick-review`/`deep-review` (code quality), which run after
implementation. With nothing anchored, the critic returns exactly:
`No objections — the plan is consistent with the domain model.`

### 3. Surface pushbacks — advisory, never blocking

Bring the pushbacks back into the planning session. The user resolves each their own way:

- **Accept** → amend the plan (rename, re-scope, fix the edge, move contexts) right there.
- **Dismiss** → drop it. If the dismissal rests on a load-bearing reason a future planner would
need in order not to re-raise it, offer to record an ADR using
[domain-modeling's ADR-FORMAT.md](../domain-modeling/ADR-FORMAT.md). Skip ephemeral ("not now")
and self-evident reasons.

When a resolution sharpens a term, update `CONTEXT.md` inline using
[domain-modeling's CONTEXT-FORMAT.md](../domain-modeling/CONTEXT-FORMAT.md).

If the critic returned "No objections," say so in one line and move on. Don't pad it.

`grilling`/`domain-modeling` is a full interactive re-grill of the design; `critique-plan` is a
single-pass, silent-by-default gate — one critic, real conflicts only, then straight back to the
workflow.
36 changes: 21 additions & 15 deletions ai-agents/skills/deep-review/DISPATCH.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ use; no change from current behavior.
### Pi (`pi-subagents`)

Express the allowlist as the child agent's `tools:` frontmatter — confirmed present at the
pinned `pi-subagents@0.40.0` (`RunnerSubagentStep.tools?: string[]`, shipped source,
`package/src/runs/shared/parallel-utils.ts`; also `agent-serializer.ts:10,58-63`). A dimension
pinned `pi-subagents@0.60.0` (`RunnerSubagentStep.tools?: string[]`, shipped source,
`package/src/runs/shared/parallel-utils.ts:44`; also `agent-serializer.ts:11,67-72`). A dimension
with `no` in "Reads beyond diff?" gets `tools: read, grep`; one with `yes` gets
`tools: read, grep, glob`. Never include `bash`, `edit`, or `write` — a reviewer that needs to
mutate anything is out of contract.
Expand Down Expand Up @@ -151,19 +151,23 @@ adapter, not one of the seven dimension workers.

## Dispatch call shape (Pi)

Two shapes exist in the pinned `pi-subagents@0.40.0` source: an ad-hoc multi-call in one turn,
and the scripted `runs.all`/`workflowScript` batch API. **This skill uses ad-hoc multi-call**,
matching what `council` already exercises in practice (`council`'s `CRITIQUE` step: "Launch all
charter seats as fresh isolated workers, together when parallel dispatch is available" — no
scripted workflow). Rationale:
At the pinned `pi-subagents@0.60.0`, two shapes exist for launching several children: an ad-hoc
multi-call in one turn (repeated single-child `subagent({ agent, task })` calls), and the
scripted `runs.all`/`workflowScript` batch API. As of 0.41.0, the package removed the older
top-level `tasks: [...]` array shape entirely — `workflowScript` is now the only way to batch
children in a single tool call — but ad-hoc multi-call was never affected by that removal, since
it never used `tasks[]`. **This skill uses ad-hoc multi-call**, matching what `council` already
exercises in practice (`council`'s `CRITIQUE` step: "Launch all charter seats as fresh isolated
workers, together when parallel dispatch is available" — no scripted workflow). Rationale:

- Consistency — `deep-review`/`quick-review` compose with `council`'s contract; diverging to a
scripted API for one skill and ad-hoc for the rest adds a second dispatch idiom for no
functional gain.
- Evidence asymmetry — the `tools:` scoping field and the parallel-batch *mechanism* are
confirmed in the pinned 0.40.0 shipped source; the exact `runs.all()` call-site spelling is
confirmed only against newer (0.44.0) docs, not source-verified at the pin. Ad-hoc multi-call
avoids depending on the unverified spelling.
- Evidence asymmetry no longer applies at the current pin — the `tools:` scoping field, the
parallel-batch mechanism, and the `runs.all()` call-site spelling (`docs/workflows.md:38,88-92`
at the pinned 0.60.0) are all now confirmed directly in the pinned version's own shipped
source and docs, not inferred from a newer version. Ad-hoc multi-call remains the choice for
the consistency reason above, not because the scripted shape is unverified.

This is **source-verified against the pinned version, not executed as a live smoke test** — no
live Pi session was driven interactively in this session to confirm ad-hoc multi-call actually
Expand Down Expand Up @@ -265,8 +269,10 @@ way whether `config_file` honors per-role `sandbox_mode`.

`findings-schema.md` requires reviewer/verifier/fixer workers to **return** results — never
write the store themselves. Under Pi, a child's `outputMode` defaults to `"inline"`
(`package/src/api/preflight.ts:398` at the pinned 0.40.0: `outputMode: input.outputMode ??
"inline"`), meaning the child's result resolves back to the caller as text rather than being
(`package/src/shared/settings.ts:387` at the pinned 0.60.0: `task.outputMode ?? config.outputMode
?? "inline"`), meaning the child's result resolves back to the caller as text rather than being
written to a file by the child. This holds the invariant by default — the orchestrator stays
the sole writer as long as dispatch never sets `outputMode: "file-only"`. Do not set it for
reviewer, verifier, or fixer children.
the sole writer as long as dispatch never sets `outputMode: "file-only"` and no project/user
`subagents` config sets a global `outputMode: "file-only"` default (the added
`config.outputMode` term at this version); this repo's `pi/settings.json` sets no such config.
Do not set it for reviewer, verifier, or fixer children.
Loading