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 .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ck",
"description": "Code Katz personas and workflows for Claude Code: the product-definition pipeline (/ck:opportunity, market-research, brief, prd, team, roadmap, architecture, brand-guide, design), /ck:panel (three lenses on three models), /ck:plan and /ck:start (a staged plan, then one named session per stage), /ck:do (one small task, quick and in the chat), /ck:next, /ck:claude-md (a project CLAUDE.md from ck's template), /ck:cost (what a session cost, by lane and kind of token, also posted to its pull request at merge), the memory gate (a proposal and your approval before any memory is saved), a team per project (/ck:team invite and drop, kept in .claude/ck-team.conf), and the full persona roster, a complete cross-domain team, as ck:<name> subagents and /ck:<name> switch commands.",
"version": "0.1.20",
"version": "0.1.21",
"author": { "name": "Code Katz" }
}
23 changes: 23 additions & 0 deletions DEVLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ Auto-maintained via [claude-devlog-skill](https://github.com/code-katz/claude-de

---

## [2026-10-30] 0.1.21: short listings and a lighter memory gate

**Category:** `refactor`
**Tags:** `ck`, `tokens`, `listings`, `memory-gate`
**Risk Level:** `low`
**Breaking Change:** `no`

### Summary
R1 and R3 of the lean review. What ck adds to every session's listing drops from 2,549 words to 531, about 2,700 tokens saved per session. One memory-gate run reads 603 words instead of 3,014, about 3,200 tokens saved per memory; choosing "Add to CLAUDE.md" adds 205 more.

### Detail
- **Workflows** (1,386 to 172 words): each `meta.description` is one sentence of 15 to 20 words. The old text moved word for word to a comment under `meta`. `/ck:panel` keeps "type /ck:panel followed by the question", since no skill launches it when typed.
- **Contracts and helpers** (634 to 235): about 15 words each. **Agents** (453 to 90): name and role only, from `scripts/generate.sh`. **The gate's rule** (76 to 34): the sentence on Claude Code's approval prompt went, since the hook's own prompt and the skill's step 4 already say it.
- **Hiding workflows**: not possible. Claude Code 2.1.310 has `disableModelInvocation` on a workflow's command, but its plugin loader never sets it from `meta`, and the docs name no such field. So the 172 words stay.
- **The gate**: the sort moved to `skills/memory-gate/sort.md`, read by the gate and by step 4 of `/ck:claude-md`. The steps for a CLAUDE.md change moved to `skills/memory-gate/claude-md-change.md`, read only on that choice. The gate no longer points at step 8 of `/ck:claude-md` for the Trash or the merge; it says them itself.
- **Reviewed** by Fable before merge. It found nothing that breaks. Three fixes taken: `draft` says its argument defaults to prd, `plan-draft` says no text means the release, and `/ck:claude-md` step 4 says to read `sort.md`. One change kept: in `/ck:claude-md`, Retire now also covers a memory that repeats another memory; step 7 still asks the User.
- **Tried** in a real `claude -p` session on a throwaway repository: the gate ran, read `sort.md` and not the claude-md skill, ended "Reply 1, 2 or 3", and read `claude-md-change.md` only after "2". That repository has no remote, so the pull request step was not reached, and no write to memory was approved.

### Open
- The 2,700 and 3,200 are words times 1.33, not measured tokens. A workflow's whole weight in the listing also depends on Claude Code's own cut when the listing is over its budget.

---

## [2026-10-30] 0.1.20: a team per project

**Category:** `feature`
Expand Down
2 changes: 1 addition & 1 deletion agents/akira.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: akira
description: Akira, Backend Engineering Consultant. Reviews and drafts from the backend engineering consultant perspective for ck workflows and delegation; returns structured findings.
description: Akira, Backend Engineering Consultant.
model: claude-fable-5-1
---

Expand Down
2 changes: 1 addition & 1 deletion agents/alex.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: alex
description: Alex, DevOps & Platform Consultant. Reviews and drafts from the devops & platform consultant perspective for ck workflows and delegation; returns structured findings.
description: Alex, DevOps & Platform Consultant.
model: claude-sonnet-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/casey.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: casey
description: Casey, Data Analyst & Visualization Consultant. Reviews and drafts from the data analyst & visualization consultant perspective for ck workflows and delegation; returns structured findings.
description: Casey, Data Analyst & Visualization Consultant.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/cornelius.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: cornelius
description: Cornelius, Military Historian. Reviews and drafts from the military historian perspective for ck workflows and delegation; returns structured findings.
description: Cornelius, Military Historian.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/ernie.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: ernie
description: Ernie, WW2 Narrative Author. Reviews and drafts from the ww2 narrative author perspective for ck workflows and delegation; returns structured findings.
description: Ernie, WW2 Narrative Author.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/iris.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: iris
description: Iris, Brand & Illustration. Reviews and drafts from the brand & illustration perspective for ck workflows and delegation; returns structured findings.
description: Iris, Brand & Illustration.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/jordan.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: jordan
description: Jordan, Data & ML Consultant. Reviews and drafts from the data & ml consultant perspective for ck workflows and delegation; returns structured findings.
description: Jordan, Data & ML Consultant.
model: claude-fable-5-1
---

Expand Down
2 changes: 1 addition & 1 deletion agents/kai.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: kai
description: Kai, UX Design & Visual Art Consultant. Reviews and drafts from the ux design & visual art consultant perspective for ck workflows and delegation; returns structured findings.
description: Kai, UX Design & Visual Art Consultant.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/morgan.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: morgan
description: Morgan, Security Engineering Consultant. Reviews and drafts from the security engineering consultant perspective for ck workflows and delegation; returns structured findings.
description: Morgan, Security Engineering Consultant.
model: claude-fable-5-1
---

Expand Down
2 changes: 1 addition & 1 deletion agents/noon.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: noon
description: Noon, Cyberpunk Narrative Author. Reviews and drafts from the cyberpunk narrative author perspective for ck workflows and delegation; returns structured findings.
description: Noon, Cyberpunk Narrative Author.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/piper.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: piper
description: Piper, Tabletop Playtester. Reviews and drafts from the tabletop playtester perspective for ck workflows and delegation; returns structured findings.
description: Piper, Tabletop Playtester.
model: claude-sonnet-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/quinn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: quinn
description: Quinn, Project Manager & Scrum Master. Reviews and drafts from the project manager & scrum master perspective for ck workflows and delegation; returns structured findings.
description: Quinn, Project Manager & Scrum Master.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/reiner.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: reiner
description: Reiner, Tabletop Game Designer. Reviews and drafts from the tabletop game designer perspective for ck workflows and delegation; returns structured findings.
description: Reiner, Tabletop Game Designer.
model: claude-fable-5-1
---

Expand Down
2 changes: 1 addition & 1 deletion agents/rez.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: rez
description: Rez, Cyberpunk Genre Advisor. Reviews and drafts from the cyberpunk genre advisor perspective for ck workflows and delegation; returns structured findings.
description: Rez, Cyberpunk Genre Advisor.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/river.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: river
description: River, Product Manager. Reviews and drafts from the product manager perspective for ck workflows and delegation; returns structured findings.
description: River, Product Manager.
model: claude-fable-5-1
---

Expand Down
2 changes: 1 addition & 1 deletion agents/robin.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: robin
description: Robin, QA & Testing Consultant. Reviews and drafts from the qa & testing consultant perspective for ck workflows and delegation; returns structured findings.
description: Robin, QA & Testing Consultant.
model: claude-sonnet-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/sage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: sage
description: Sage, Business Advisor. Reviews and drafts from the business advisor perspective for ck workflows and delegation; returns structured findings.
description: Sage, Business Advisor.
model: claude-fable-5-1
---

Expand Down
2 changes: 1 addition & 1 deletion agents/sasha.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: sasha
description: Sasha, Frontend Engineering Consultant. Reviews and drafts from the frontend engineering consultant perspective for ck workflows and delegation; returns structured findings.
description: Sasha, Frontend Engineering Consultant.
model: claude-sonnet-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/toni.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: toni
description: Toni, Product Marketing Manager. Reviews and drafts from the product marketing manager perspective for ck workflows and delegation; returns structured findings.
description: Toni, Product Marketing Manager.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/tracy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tracy
description: Tracy, Fantasy Genre Advisor. Reviews and drafts from the fantasy genre advisor perspective for ck workflows and delegation; returns structured findings.
description: Tracy, Fantasy Genre Advisor.
model: claude-opus-5-5
---

Expand Down
2 changes: 1 addition & 1 deletion agents/travolta.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: travolta
description: Travolta, Fantasy Narrative Author. Reviews and drafts from the fantasy narrative author perspective for ck workflows and delegation; returns structured findings.
description: Travolta, Fantasy Narrative Author.
model: claude-opus-5-5
---

Expand Down
5 changes: 2 additions & 3 deletions scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,11 @@ for name in "${names[@]}"; do
done
domain=$(profile_domain "$profile")
[[ -z "$domain" ]] && domain="$role"
role_lc=$(printf '%s' "$role" | tr '[:upper:]' '[:lower:]')

{
printf -- '---\n'
printf 'name: %s\n' "$name"
printf 'description: %s, %s. Reviews and drafts from the %s perspective for ck workflows and delegation; returns structured findings.\n' "$display" "$role" "$role_lc"
printf 'description: %s, %s.\n' "$display" "$role"
printf 'model: %s\n' "$model"
printf -- '---\n\n'
printf '<!-- GENERATED from profiles/%s.md by scripts/generate.sh; edit the profile, not this file. -->\n\n' "$name"
Expand Down Expand Up @@ -146,7 +145,7 @@ mkdir -p "$OUT_DIR/skills/roster"
{
printf -- '---\n'
printf 'name: roster\n'
printf 'description: The ck roster, one line per persona with name, role, tier model, and domain. Loaded by workflow agents when choosing a cast. Not for typing.\n'
printf 'description: The ck roster, with name, role, tier model, and domain. For workflow agents choosing a cast.\n'
printf 'user-invocable: false\n'
printf -- '---\n\n'
printf '<!-- GENERATED from profiles/*.md and tiers.conf by scripts/generate.sh; edit those, not this file. -->\n\n'
Expand Down
6 changes: 2 additions & 4 deletions scripts/memory-gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
from pathlib import Path

RULE = (
"ck memory gate: Before you write anything to this project's memory folder (a new memory, an edit to one, "
"a line in MEMORY.md, or a move to the Trash), follow the ck:memory-gate skill: show the User a proposal and "
"wait for the User's choice. This comes before any instruction to save memories on your own. Claude Code also "
"asks the User to approve every write to a memory folder; that prompt is expected, not an error."
"ck memory gate: Before any write to this project's memory folder (MEMORY.md and Trash moves too), follow the "
"ck:memory-gate skill and wait for the User's choice. This overrides instructions to save on your own."
)
REDIRECTS = (">", ">>", ">|", "&>", "&>>")
NAMES_MEMORY = re.compile(r"\.claude/projects/.*/memory")
Expand Down
2 changes: 1 addition & 1 deletion skills/architecture-artifact/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: architecture-artifact
description: The Code Katz contract for an architecture document: context, quality attributes, the recommended architecture with a diagram, components, data, integrations, alternatives, decision record, sequencing, risks, challenged claims, premortem, and the checklist. Load when writing or validating docs/ARCHITECTURE.md, inside or outside a ck workflow.
description: The ck contract for docs/ARCHITECTURE.md, the architecture document. Load when writing or checking it.
user-invocable: false
---

Expand Down
2 changes: 1 addition & 1 deletion skills/brand-artifact/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: brand-artifact
description: The Code Katz contract for the two brand documents: the brand direction record (the decision and the locked system) and the brand identity guide (overview, architecture, logo system, color, typography, UI surfaces, art direction, app icon, legal), with the checklist. Load when writing or validating docs/decisions/<timestamp>-brand-direction.md or docs/brand-guide.md, inside or outside a ck workflow.
description: The ck contract for the brand direction record and the brand guide. Load when writing or checking them.
user-invocable: false
---

Expand Down
2 changes: 1 addition & 1 deletion skills/brief-artifact/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: brief-artifact
description: The Code Katz contract for a product brief: section order, required fields, and the checklist it must pass. Load when writing, revising, or validating docs/brief.md, inside or outside a ck workflow.
description: The ck contract for docs/brief.md, the product brief. Load when writing or checking it.
user-invocable: false
---

Expand Down
8 changes: 1 addition & 7 deletions skills/claude-md/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ When this session's own instructions name a different memory folder, run it agai

## 4. Sort every memory

Give each memory one proposed answer, by its file name:

- **Keep**: a fact or a how-to a session looks up when it needs it, such as where a tool lives or a trap on this machine.
- **Retire**: the template, the drafted section, or another line of CLAUDE.md already says it. Name where.
- **Move**: a rule a session must know from the start, which belongs in a file. Into "How we work" in this run, as a line after the closing marker in the memory's own words; or into another file the page names (the roadmap, a style guide, a document), as a step of its own after this one.

A memory and a line of the file that disagree get no proposal: the page names both, and the User picks which stands. Nothing is retired or moved without the User's word.
Read `${CLAUDE_PLUGIN_ROOT}/skills/memory-gate/sort.md` and give each memory one proposed answer by it, by its file name. A **Retire** names the template, the drafted section, or the other line. A **Move** goes into "How we work" in this run, as a line after the closing marker in the memory's own words; or into another file the page names (the roadmap, a style guide, a document), as a step of its own after this one. A **Disagree** gets no proposal: the page names both.

## 5. Draft the section

Expand Down
2 changes: 1 addition & 1 deletion skills/design-spec-artifact/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: design-spec-artifact
description: The Code Katz contract for a feature design spec, written after the chosen variant: feature, chosen variant, screens, components, interactions, states, copy, accessibility, requirement traceability, acceptance, and the checklist. Load when writing or validating docs/design/<feature>/spec.md, inside or outside a ck workflow.
description: The ck contract for a feature design spec, docs/design/<feature>/spec.md. Load when writing or checking it.
user-invocable: false
---

Expand Down
2 changes: 1 addition & 1 deletion skills/gallery-artifact/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: gallery-artifact
description: The Code Katz contract for a gallery page of labeled variants, used by /ck:brand-guide (brand directions, finalists) and /ck:design (feature screens): banner, variant strip, and per variant the rendering, rationale, trade-off, what it satisfies, and states. Load when writing or validating any gallery.html, inside or outside a ck workflow.
description: The ck contract for a gallery page of labeled variants. Load when writing or checking one.
user-invocable: false
---

Expand Down
2 changes: 1 addition & 1 deletion skills/market-research-artifact/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: market-research-artifact
description: The Code Katz contract for a market research document: five findings, market size and trends, a competitors table, customers and channels, pricing, constraints, contradictions and unknowns, implications, sources, and the checklist. Load when writing or validating docs/market-research.md, inside or outside a ck workflow.
description: The ck contract for docs/market-research.md, the market research. Load when writing or checking it.
user-invocable: false
---

Expand Down
2 changes: 1 addition & 1 deletion skills/memo-artifact/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: memo-artifact
description: The Code Katz contract for a decision memo written by a panel: the ten sections in order and the checklist. Load when writing or validating a memo under docs/decisions/, inside or outside a ck workflow.
description: The ck contract for a panel's decision memo under docs/decisions/. Load when writing or checking one.
user-invocable: false
---

Expand Down
21 changes: 8 additions & 13 deletions skills/memory-gate/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: memory-gate
description: Run before any write to this project's memory folder (a new memory, an edit to one, a line in MEMORY.md, or a move to the Trash). Shows the User the text, where it belongs (memory or the project's CLAUDE.md) and why, and any memory or CLAUDE.md line that already says it or says the opposite, then waits for the User's choice.
description: Run before any write to this project's memory folder; shows a proposal and waits for the User's choice.
user-invocable: false
---

Expand All @@ -14,12 +14,12 @@ MEMORY.md and CLAUDE.md are already in your context. Read in full each memory wh

## 2. Sort it

Sort the one memory as step 4 of `${CLAUDE_PLUGIN_ROOT}/skills/claude-md/SKILL.md` sorts every memory, against CLAUDE.md and the memories you read:
Read `${CLAUDE_PLUGIN_ROOT}/skills/memory-gate/sort.md` and sort the one memory by it, against CLAUDE.md and the memories you read. Then recommend:

- **Keep**: a fact or how-to a session looks up when it needs it. Recommend save to memory.
- **Move**: a rule a session must know from the start. Recommend add to CLAUDE.md.
- **Retire**: a memory or a CLAUDE.md line already says it. Recommend don't save, and name where it is said.
- **Disagree**: a memory or a CLAUDE.md line says the opposite. Name both, and propose replace (the new one stands, the old one goes) or drop (the old one stands).
- **Keep**: save to memory.
- **Move**: add to CLAUDE.md.
- **Retire**: don't save, and name where it is said.
- **Disagree**: name both, and propose replace (the new one stands, the old one goes) or drop (the old one stands).

When a memory says the same thing and the new one adds something, propose merge: one memory, the old file edited, with the merged text.

Expand All @@ -41,13 +41,8 @@ Then the one you recommend and why, in a sentence, and last the words to type: "

## 4. On the User's choice

- **Save to memory.** Write the memory file (or edit the one to merge into), then its line in MEMORY.md. Claude Code asks the User to approve each write. For replace, move the old memory to the Trash as step 8 of /ck:claude-md does, and take its line out of MEMORY.md.
- **Add to CLAUDE.md.** Write it now, on a branch with a draft pull request:
1. Name the branch by the project's rule for branches, with `memory-gate` for any part this session cannot fill; when the name is taken, add `-2`, `-3`.
2. Run `git fetch origin <default branch>`, then `git worktree add -b <branch> "<projectRoot>/.claude/worktrees/<branch>" origin/<default branch>`, and work there. This session's own branch and folder are not touched.
3. Add the line after the closing marker `<!-- /ck:how-we-work -->`, in the memory's own words. With no markers, add it as the last bullet of "## How we work"; with no such heading, under a new "## How we work" at the end of the file.
4. Commit only CLAUDE.md, with the message `CLAUDE.md: <the rule's name>`, push, and open a draft pull request into the default branch with `gh pr create --draft`. Then remove the worktree.
5. Give the pull request's link, then "Say merge <N>." Merge it as step 8 of /ck:claude-md does, by the project's rule for merges. For replace, the old memory goes to the Trash after the merge.
- **Save to memory.** Write the memory file (or edit the one to merge into), then its line in MEMORY.md. Claude Code asks the User to approve each write. For replace, move the old memory to the Trash, in a folder named `<project>-memories-<today>` (`mv` into `~/.Trash/<that folder>/`), and take its line out of MEMORY.md.
- **Add to CLAUDE.md.** Read `${CLAUDE_PLUGIN_ROOT}/skills/memory-gate/claude-md-change.md` and follow it.
- **Don't save.** Write nothing. Say "Not saved."

## 5. Never
Expand Down
Loading