@ikon85/agent-workflow-kit 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/ask-matt/SKILL.md +139 -0
- package/.agents/skills/ask-matt/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/audit-skills/SKILL.md +145 -0
- package/.agents/skills/board-to-waves/SKILL.md +135 -0
- package/.agents/skills/code-review/SKILL.md +64 -0
- package/.agents/skills/codebase-design/DEEPENING.md +37 -0
- package/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/.agents/skills/codebase-design/SKILL.md +114 -0
- package/.agents/skills/codebase-design/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/codex-adapter-sync/SKILL.md +151 -0
- package/.agents/skills/decision-gate/SKILL.md +67 -0
- package/.agents/skills/diagnose/SKILL.md +136 -0
- package/.agents/skills/diagnose/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
- package/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/.agents/skills/domain-modeling/SKILL.md +76 -0
- package/.agents/skills/domain-modeling/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/git-worktree-recover/SKILL.md +176 -0
- package/.agents/skills/grill-me/SKILL.md +54 -0
- package/.agents/skills/grill-me/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/grill-with-docs/ADR-FORMAT.md +47 -0
- package/.agents/skills/grill-with-docs/CONTEXT-FORMAT.md +60 -0
- package/.agents/skills/grill-with-docs/SKILL.md +137 -0
- package/.agents/skills/grill-with-docs/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/implement/SKILL.md +15 -0
- package/.agents/skills/implement/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/improve-codebase-architecture/ADR-FORMAT.md +47 -0
- package/.agents/skills/improve-codebase-architecture/CONTEXT-FORMAT.md +60 -0
- package/.agents/skills/improve-codebase-architecture/DEEPENING.md +37 -0
- package/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/.agents/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +46 -0
- package/.agents/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
- package/.agents/skills/improve-codebase-architecture/SKILL.md +88 -0
- package/.agents/skills/improve-codebase-architecture/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/kit-release/SKILL.md +56 -0
- package/.agents/skills/local-ci/SKILL.md +94 -0
- package/.agents/skills/orchestrate-wave/SKILL.md +261 -0
- package/.agents/skills/orchestrate-wave/references/builder-contract.md +67 -0
- package/.agents/skills/prototype/LOGIC.md +79 -0
- package/.agents/skills/prototype/SKILL.md +30 -0
- package/.agents/skills/prototype/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/prototype/UI.md +112 -0
- package/.agents/skills/research/SKILL.md +12 -0
- package/.agents/skills/research/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/.agents/skills/resolving-merge-conflicts/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/retro/SKILL.md +209 -0
- package/.agents/skills/scale-check/SKILL.md +141 -0
- package/.agents/skills/security-audit/SKILL.md +67 -0
- package/.agents/skills/setup-workflow/SKILL.md +187 -0
- package/.agents/skills/setup-workflow/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/setup-workflow/board-sync.md +111 -0
- package/.agents/skills/setup-workflow/code-review.md +26 -0
- package/.agents/skills/setup-workflow/domain.md +51 -0
- package/.agents/skills/setup-workflow/issue-tracker-github.md +35 -0
- package/.agents/skills/setup-workflow/issue-tracker-gitlab.md +34 -0
- package/.agents/skills/setup-workflow/issue-tracker-local.md +30 -0
- package/.agents/skills/setup-workflow/orchestrate-wave-seed.md +44 -0
- package/.agents/skills/setup-workflow/spec-completeness-seed.md +44 -0
- package/.agents/skills/setup-workflow/spec-self-critique-seed.md +43 -0
- package/.agents/skills/setup-workflow/triage-labels.md +18 -0
- package/.agents/skills/setup-workflow/workflow-overview.md +33 -0
- package/.agents/skills/spec-self-critique/SKILL.md +152 -0
- package/.agents/skills/spec-self-critique/scenarios.md +82 -0
- package/.agents/skills/tdd/SKILL.md +120 -0
- package/.agents/skills/tdd/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/tdd/deep-modules.md +33 -0
- package/.agents/skills/tdd/interface-design.md +31 -0
- package/.agents/skills/tdd/mocking.md +59 -0
- package/.agents/skills/tdd/refactoring.md +10 -0
- package/.agents/skills/tdd/tests.md +61 -0
- package/.agents/skills/to-issues/SKILL.md +325 -0
- package/.agents/skills/to-issues/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/to-prd/PROGRAM-PRD-FORMAT.md +162 -0
- package/.agents/skills/to-prd/SKILL.md +180 -0
- package/.agents/skills/to-prd/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/to-waves/SKILL.md +260 -0
- package/.agents/skills/to-waves/SLICE-METADATA-FORMAT.md +74 -0
- package/.agents/skills/triage/AGENT-BRIEF.md +168 -0
- package/.agents/skills/triage/OUT-OF-SCOPE.md +101 -0
- package/.agents/skills/triage/SKILL.md +122 -0
- package/.agents/skills/triage/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/verify-spike/SKILL.md +39 -0
- package/.agents/skills/wayfinder/SKILL.md +127 -0
- package/.agents/skills/wayfinder/THIRD-PARTY-NOTICES.md +29 -0
- package/.agents/skills/wrapup/SKILL.md +71 -0
- package/.agents/skills/wrapup/SOURCES.txt +6 -0
- package/.agents/skills/zoom-out/SKILL.md +7 -0
- package/.agents/skills/zoom-out/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/hooks/_hook_utils.py +184 -0
- package/.claude/hooks/drift-guard.py +176 -0
- package/.claude/hooks/skill-drift-hint.py +122 -0
- package/.claude/hooks/sync-board-status.py +191 -0
- package/.claude/skills/ask-matt/SKILL.md +139 -0
- package/.claude/skills/ask-matt/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/audit-skills/SKILL.md +145 -0
- package/.claude/skills/board-to-waves/SKILL.md +148 -0
- package/.claude/skills/code-review/SKILL.md +64 -0
- package/.claude/skills/codebase-design/DEEPENING.md +37 -0
- package/.claude/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/.claude/skills/codebase-design/SKILL.md +114 -0
- package/.claude/skills/codebase-design/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/codex-build/SKILL.md +126 -0
- package/.claude/skills/codex-build/THIRD-PARTY-NOTICES.md +35 -0
- package/.claude/skills/codex-review/SKILL.md +145 -0
- package/.claude/skills/codex-review/THIRD-PARTY-NOTICES.md +31 -0
- package/.claude/skills/decision-gate/SKILL.md +67 -0
- package/.claude/skills/diagnose/SKILL.md +136 -0
- package/.claude/skills/diagnose/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
- package/.claude/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/.claude/skills/domain-modeling/SKILL.md +76 -0
- package/.claude/skills/domain-modeling/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/git-guardrails-claude-code/SKILL.md +96 -0
- package/.claude/skills/git-guardrails-claude-code/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +28 -0
- package/.claude/skills/git-worktree-recover/SKILL.md +182 -0
- package/.claude/skills/grill-me/SKILL.md +54 -0
- package/.claude/skills/grill-me/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/grill-me-codex/SKILL.md +158 -0
- package/.claude/skills/grill-me-codex/THIRD-PARTY-NOTICES.md +32 -0
- package/.claude/skills/grill-with-docs/ADR-FORMAT.md +47 -0
- package/.claude/skills/grill-with-docs/CONTEXT-FORMAT.md +60 -0
- package/.claude/skills/grill-with-docs/SKILL.md +137 -0
- package/.claude/skills/grill-with-docs/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/grill-with-docs-codex/ADR-FORMAT.md +47 -0
- package/.claude/skills/grill-with-docs-codex/CONTEXT-FORMAT.md +60 -0
- package/.claude/skills/grill-with-docs-codex/SKILL.md +233 -0
- package/.claude/skills/grill-with-docs-codex/THIRD-PARTY-NOTICES.md +33 -0
- package/.claude/skills/implement/SKILL.md +15 -0
- package/.claude/skills/implement/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/improve-codebase-architecture/ADR-FORMAT.md +47 -0
- package/.claude/skills/improve-codebase-architecture/CONTEXT-FORMAT.md +60 -0
- package/.claude/skills/improve-codebase-architecture/DEEPENING.md +37 -0
- package/.claude/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/.claude/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +46 -0
- package/.claude/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
- package/.claude/skills/improve-codebase-architecture/SKILL.md +88 -0
- package/.claude/skills/improve-codebase-architecture/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/kit-release/SKILL.md +56 -0
- package/.claude/skills/local-ci/SKILL.md +94 -0
- package/.claude/skills/orchestrate-wave/SKILL.md +269 -0
- package/.claude/skills/orchestrate-wave/references/builder-contract.md +67 -0
- package/.claude/skills/prototype/LOGIC.md +79 -0
- package/.claude/skills/prototype/SKILL.md +30 -0
- package/.claude/skills/prototype/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/prototype/UI.md +112 -0
- package/.claude/skills/research/SKILL.md +12 -0
- package/.claude/skills/research/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/.claude/skills/resolving-merge-conflicts/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/retro/SKILL.md +209 -0
- package/.claude/skills/scale-check/SKILL.md +141 -0
- package/.claude/skills/security-audit/SKILL.md +67 -0
- package/.claude/skills/setup-pre-commit/SKILL.md +104 -0
- package/.claude/skills/setup-pre-commit/scripts/pre-commit.template.sh +35 -0
- package/.claude/skills/setup-workflow/SKILL.md +187 -0
- package/.claude/skills/setup-workflow/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/setup-workflow/board-sync.md +111 -0
- package/.claude/skills/setup-workflow/code-review.md +26 -0
- package/.claude/skills/setup-workflow/domain.md +51 -0
- package/.claude/skills/setup-workflow/issue-tracker-github.md +35 -0
- package/.claude/skills/setup-workflow/issue-tracker-gitlab.md +34 -0
- package/.claude/skills/setup-workflow/issue-tracker-local.md +30 -0
- package/.claude/skills/setup-workflow/orchestrate-wave-seed.md +44 -0
- package/.claude/skills/setup-workflow/spec-completeness-seed.md +44 -0
- package/.claude/skills/setup-workflow/spec-self-critique-seed.md +43 -0
- package/.claude/skills/setup-workflow/triage-labels.md +18 -0
- package/.claude/skills/setup-workflow/workflow-overview.md +33 -0
- package/.claude/skills/skill-manifest.json +389 -0
- package/.claude/skills/spec-self-critique/SKILL.md +152 -0
- package/.claude/skills/spec-self-critique/scenarios.md +82 -0
- package/.claude/skills/tdd/SKILL.md +120 -0
- package/.claude/skills/tdd/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/tdd/deep-modules.md +33 -0
- package/.claude/skills/tdd/interface-design.md +31 -0
- package/.claude/skills/tdd/mocking.md +59 -0
- package/.claude/skills/tdd/refactoring.md +10 -0
- package/.claude/skills/tdd/tests.md +61 -0
- package/.claude/skills/to-issues/SKILL.md +325 -0
- package/.claude/skills/to-issues/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/to-prd/PROGRAM-PRD-FORMAT.md +162 -0
- package/.claude/skills/to-prd/SKILL.md +180 -0
- package/.claude/skills/to-prd/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/to-waves/SKILL.md +260 -0
- package/.claude/skills/to-waves/SLICE-METADATA-FORMAT.md +74 -0
- package/.claude/skills/triage/AGENT-BRIEF.md +168 -0
- package/.claude/skills/triage/OUT-OF-SCOPE.md +101 -0
- package/.claude/skills/triage/SKILL.md +122 -0
- package/.claude/skills/triage/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/verify-spike/SKILL.md +39 -0
- package/.claude/skills/wayfinder/SKILL.md +127 -0
- package/.claude/skills/wayfinder/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/wrapup/SKILL.md +81 -0
- package/.claude/skills/wrapup/SOURCES.txt +6 -0
- package/.claude/skills/write-a-skill/GLOSSARY.md +201 -0
- package/.claude/skills/write-a-skill/SKILL.md +88 -0
- package/.claude/skills/write-a-skill/THIRD-PARTY-NOTICES.md +29 -0
- package/.claude/skills/zoom-out/SKILL.md +7 -0
- package/.claude/skills/zoom-out/THIRD-PARTY-NOTICES.md +29 -0
- package/LICENSE +28 -0
- package/PROVENANCE.md +39 -0
- package/README.md +619 -0
- package/agent-workflow-kit.package.json +1939 -0
- package/docs/agents/board-sync.md +71 -0
- package/docs/agents/code-review.md +14 -0
- package/docs/agents/domain.md +7 -0
- package/docs/agents/issue-tracker.md +12 -0
- package/docs/agents/security-audit-runbook-template.md +205 -0
- package/docs/agents/skills/orchestrate-wave.md +13 -0
- package/docs/agents/skills/spec-self-critique.md +18 -0
- package/docs/agents/triage-labels.md +10 -0
- package/docs/agents/wave-anchor-template.md +88 -0
- package/docs/conventions/spec-completeness.md +23 -0
- package/docs/index.html +56 -0
- package/docs/methodology.html +488 -0
- package/docs/methodology.svg +93 -0
- package/docs/workflow.png +0 -0
- package/package.json +40 -0
- package/scripts/anchor_table.py +343 -0
- package/scripts/board-sync.py +1232 -0
- package/scripts/board_config.py +147 -0
- package/scripts/board_fields.py +192 -0
- package/scripts/build-kit.mjs +116 -0
- package/scripts/build-kit.test.mjs +59 -0
- package/scripts/check-kit-staleness.mjs +45 -0
- package/scripts/check-kit-staleness.test.mjs +19 -0
- package/scripts/execute-ready-check.py +516 -0
- package/scripts/issue_deps.py +79 -0
- package/scripts/kit-release.mjs +100 -0
- package/scripts/kit-release.test.mjs +67 -0
- package/scripts/lib/audit-refs.mjs +146 -0
- package/scripts/lib/scrub.mjs +113 -0
- package/scripts/lib/scrub.test.mjs +187 -0
- package/scripts/loc_offender_core.py +196 -0
- package/scripts/loc_offender_gate.py +182 -0
- package/scripts/node_kind.py +68 -0
- package/scripts/portability_profile_scan.py +53 -0
- package/scripts/pr-body-check.py +263 -0
- package/scripts/program_graph.py +125 -0
- package/scripts/program_graph_parse.py +275 -0
- package/scripts/program_graph_validate.py +256 -0
- package/scripts/program_sync.py +160 -0
- package/scripts/release-delta-guard.mjs +96 -0
- package/scripts/release-delta-guard.test.mjs +53 -0
- package/scripts/test_board_sync_create_idempotency.py +104 -0
- package/scripts/test_dist_kit_smoke.py +199 -0
- package/scripts/test_kit_docs_language_census.py +178 -0
- package/scripts/test_skill_code_review_seed.py +89 -0
- package/scripts/test_skill_frontmatter_lint.py +226 -0
- package/scripts/test_skill_gh_lint.py +124 -0
- package/scripts/test_skill_language_census.py +254 -0
- package/scripts/test_skill_portability_lint.py +773 -0
- package/scripts/test_skill_publish_audit.py +300 -0
- package/scripts/test_skill_selfcontainment_lint.py +255 -0
- package/scripts/test_skill_setup_workflow_seeds.py +200 -0
- package/scripts/test_skill_stale_name_lint.py +126 -0
- package/scripts/test_skill_surface_refs.py +300 -0
- package/scripts/test_skill_trailing_artifact_lint.py +71 -0
- package/scripts/wrapup-land.py +573 -0
- package/src/cli.mjs +70 -0
- package/src/commands/diff.mjs +6 -0
- package/src/commands/init.mjs +59 -0
- package/src/commands/uninstall.mjs +43 -0
- package/src/commands/update.mjs +95 -0
- package/src/lib/atomicWrite.mjs +49 -0
- package/src/lib/bundle.mjs +133 -0
- package/src/lib/hash.mjs +13 -0
- package/src/lib/manifest.mjs +58 -0
- package/src/lib/sentinel.mjs +20 -0
- package/src/lib/settings.mjs +23 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# UI Prototype
|
|
2
|
+
|
|
3
|
+
Generate **several radically different UI variations** on a single route, switchable from a floating bottom bar. The user flips between variants in the browser, picks one (or steals bits from each), then throws the rest away.
|
|
4
|
+
|
|
5
|
+
If the question is about logic/state rather than what something looks like — wrong branch. Use [LOGIC.md](LOGIC.md).
|
|
6
|
+
|
|
7
|
+
## When this is the right shape
|
|
8
|
+
|
|
9
|
+
- "What should this page look like?"
|
|
10
|
+
- "I want to see a few options for this dashboard before committing."
|
|
11
|
+
- "Try a different layout for the settings screen."
|
|
12
|
+
- Any time the user would otherwise spend a day picking between three vague mockups in their head.
|
|
13
|
+
|
|
14
|
+
## Two sub-shapes — strongly prefer sub-shape A
|
|
15
|
+
|
|
16
|
+
A UI prototype is much easier to judge when it's **butting up against the rest of the app** — real header, real sidebar, real data, real density. A throwaway route on its own is a vacuum: every variant looks fine in isolation. Default to sub-shape A whenever there's a plausible existing page to host the variants. Only reach for sub-shape B if the prototype genuinely has no nearby home.
|
|
17
|
+
|
|
18
|
+
### Sub-shape A — adjustment to an existing page (preferred)
|
|
19
|
+
|
|
20
|
+
The route already exists. Variants are rendered **on the same route**, gated by a `?variant=` URL search param. The existing data fetching, params, and auth all stay — only the rendering swaps. This is the default; pick it unless there's a specific reason not to.
|
|
21
|
+
|
|
22
|
+
If the prototype is for something that doesn't yet have a page but *would naturally live inside one* (a new section of the dashboard, a new card on the settings screen, a new step in an existing flow) — that's still sub-shape A. Mount the variants inside the host page.
|
|
23
|
+
|
|
24
|
+
### Sub-shape B — a new page (last resort)
|
|
25
|
+
|
|
26
|
+
Only use this when the thing being prototyped genuinely has no existing page to live inside — e.g. an entirely new top-level surface, or a flow that can't be embedded anywhere sensible.
|
|
27
|
+
|
|
28
|
+
Create a **throwaway route** following whatever routing convention the project already uses — don't invent a new top-level structure. Name it so it's obviously a prototype (e.g. include the word `prototype` in the path or filename). Same `?variant=` pattern.
|
|
29
|
+
|
|
30
|
+
Before committing to sub-shape B, sanity-check: is there really no existing page this could be embedded in? An empty route hides design problems that a populated one would expose.
|
|
31
|
+
|
|
32
|
+
In both sub-shapes the floating bottom bar is identical.
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
### 1. State the question and pick N
|
|
37
|
+
|
|
38
|
+
Default to **3 variants**. More than 5 stops being radically different and starts being noise — cap there.
|
|
39
|
+
|
|
40
|
+
Write down the plan in one line, in the prototype's location or a top-of-file comment:
|
|
41
|
+
|
|
42
|
+
> "Three variants of the settings page, switchable via `?variant=`, on the existing `/settings` route."
|
|
43
|
+
|
|
44
|
+
This works whether the user is here to push back or not.
|
|
45
|
+
|
|
46
|
+
### 2. Generate radically different variants
|
|
47
|
+
|
|
48
|
+
Draft each variant. Hold each one to:
|
|
49
|
+
|
|
50
|
+
- The page's purpose and the data it has access to.
|
|
51
|
+
- The project's component library / styling system (TailwindCSS, shadcn, MUI, plain CSS, whatever).
|
|
52
|
+
- A clear exported component name, e.g. `VariantA`, `VariantB`, `VariantC`.
|
|
53
|
+
|
|
54
|
+
Variants must be **structurally different** — different layout, different information hierarchy, different primary affordance, not just different colours. Three slightly-tweaked card grids isn't a UI prototype, it's wallpaper. If two drafts come out too similar, redo one with explicit "do not use a card grid" guidance.
|
|
55
|
+
|
|
56
|
+
### 3. Wire them together
|
|
57
|
+
|
|
58
|
+
Create a single switcher component on the route:
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
// pseudo-code — adapt to the project's framework
|
|
62
|
+
const variant = searchParams.get('variant') ?? 'A';
|
|
63
|
+
return (
|
|
64
|
+
<>
|
|
65
|
+
{variant === 'A' && <VariantA {...data} />}
|
|
66
|
+
{variant === 'B' && <VariantB {...data} />}
|
|
67
|
+
{variant === 'C' && <VariantC {...data} />}
|
|
68
|
+
<PrototypeSwitcher variants={['A','B','C']} current={variant} />
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For sub-shape A (existing page): keep all the existing data fetching above the switcher; only the rendered subtree changes per variant.
|
|
74
|
+
|
|
75
|
+
For sub-shape B (new page): the throwaway route under `/prototype/<name>` mounts the same switcher.
|
|
76
|
+
|
|
77
|
+
### 4. Build the floating switcher
|
|
78
|
+
|
|
79
|
+
A small fixed-position bar at the bottom-centre of the screen with three pieces:
|
|
80
|
+
|
|
81
|
+
- **Left arrow** — cycles to the previous variant (wraps around).
|
|
82
|
+
- **Variant label** — shows the current variant key and, if the variant exports a name, that name too. e.g. `B — Sidebar layout`.
|
|
83
|
+
- **Right arrow** — cycles forward (wraps around).
|
|
84
|
+
|
|
85
|
+
Behaviour:
|
|
86
|
+
|
|
87
|
+
- Clicking an arrow updates the URL search param (use the framework's router — `router.replace` on Next, `navigate` on React Router, etc) so the variant is shareable and reload-stable.
|
|
88
|
+
- Keyboard: `←` and `→` arrow keys also cycle. Don't intercept arrow keys when an `<input>`, `<textarea>`, or `[contenteditable]` is focused.
|
|
89
|
+
- Visually distinct from the page (e.g. high-contrast pill, subtle shadow) so it's obviously not part of the design being evaluated.
|
|
90
|
+
- Hidden in production builds — gate on `process.env.NODE_ENV !== 'production'` or an equivalent check, so a stray prototype merge can't ship the bar to users.
|
|
91
|
+
|
|
92
|
+
Put the switcher in a single shared component so both sub-shapes can reuse it. Locate it wherever shared UI lives in the project.
|
|
93
|
+
|
|
94
|
+
### 5. Hand it over
|
|
95
|
+
|
|
96
|
+
Surface the URL (and the `?variant=` keys). The user will flip through whenever they get to it. The interesting feedback is usually **"I want the header from B with the sidebar from C"** — that's the actual design they want.
|
|
97
|
+
|
|
98
|
+
### 6. Capture the answer and clean up
|
|
99
|
+
|
|
100
|
+
Once a variant has won, write down which one and why (commit message, ADR, issue, or a `NOTES.md` next to the prototype if running AFK and the user hasn't responded yet). Then:
|
|
101
|
+
|
|
102
|
+
- **Sub-shape A** — delete the losing variants and the switcher; fold the winner into the existing page.
|
|
103
|
+
- **Sub-shape B** — promote the winning variant to a real route, delete the throwaway route and the switcher.
|
|
104
|
+
|
|
105
|
+
Don't leave variant components or the switcher lying around. They rot fast and confuse the next reader.
|
|
106
|
+
|
|
107
|
+
## Anti-patterns
|
|
108
|
+
|
|
109
|
+
- **Variants that differ only in colour or copy.** That's a tweak, not a prototype. Real variants disagree about structure.
|
|
110
|
+
- **Sharing too much code between variants.** A shared `<Header>` is fine; a shared `<Layout>` defeats the point. Each variant should be free to throw out the layout.
|
|
111
|
+
- **Wiring variants to real mutations.** Read-only prototypes are fine. If a variant needs to mutate, point it at a stub — the question is "what should this look like", not "does the backend work".
|
|
112
|
+
- **Promoting the prototype directly to production.** The variant code was written under prototype constraints (no tests, minimal error handling). Rewrite it properly when you fold it in.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
description: Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Spin up a **background agent** to do the research, so you keep working while it reads.
|
|
7
|
+
|
|
8
|
+
Its job:
|
|
9
|
+
|
|
10
|
+
1. Investigate the question against **primary sources** — official docs, source code, specs, first-party APIs — not a secondary write-up of them. Follow every claim back to the source that owns it.
|
|
11
|
+
2. Write the findings to a single Markdown file, citing each claim's source.
|
|
12
|
+
3. Save it where the repo already keeps such notes; match the existing convention, and if there is none, put it somewhere sensible and say where.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This skill is adapted from **Matt Pocock's skills**
|
|
4
|
+
(https://github.com/mattpocock/skills), `skills/engineering/research` @ d574778, Copyright (c) 2026 Matt Pocock,
|
|
5
|
+
used under the MIT License. Locally adapted (fork-and-own); see PROVENANCE.md.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Matt Pocock
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resolving-merge-conflicts
|
|
3
|
+
description: "Use when you need to resolve an in-progress git merge/rebase conflict."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
1. **See the current state** of the merge/rebase. Check git history, and the conflicting files.
|
|
7
|
+
|
|
8
|
+
2. **Find the primary sources** for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.
|
|
9
|
+
|
|
10
|
+
3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. Always resolve; never `--abort` as an escape from resolving — the only exception is a merge/rebase started by mistake, in which case abort cleanly and start over.
|
|
11
|
+
|
|
12
|
+
4. Discover the project's **automated checks** and run them — typically typecheck, then tests, then format. Fix anything the merge broke.
|
|
13
|
+
|
|
14
|
+
5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This skill is adapted from **Matt Pocock's skills**
|
|
4
|
+
(https://github.com/mattpocock/skills), `skills/engineering/resolving-merge-conflicts` @ d574778, Copyright (c) 2026 Matt Pocock,
|
|
5
|
+
used under the MIT License. Locally adapted (fork-and-own); see PROVENANCE.md.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Matt Pocock
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
```
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: retro
|
|
3
|
+
disable-model-invocation: false
|
|
4
|
+
description: Use when the user explicitly asks for a retro after a session with PR-activity. Analyzes session friction and proposes concrete config mutations (Memory/Skill/CLAUDE.md/Hook) with per-patch approval. No file is written — findings live in the mutated config.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Retro — In-Session Deep-Dive
|
|
8
|
+
|
|
9
|
+
Trigger: user types `/retro` (optionally with a PR/Issue number, e.g. `/retro 274`).
|
|
10
|
+
|
|
11
|
+
## What this skill does
|
|
12
|
+
|
|
13
|
+
A retro is a session-contained vehicle for surfacing friction and turning it into concrete config improvements. The retro itself is NOT a persistent artifact — the artifact is the **change** to Memory, Skill, CLAUDE.md, or a Hook. If nothing should change, nothing is persisted.
|
|
14
|
+
|
|
15
|
+
## Symmetry Principle (mandatory)
|
|
16
|
+
|
|
17
|
+
**Retro input = user friction + agent friction. Both equally weighted.**
|
|
18
|
+
|
|
19
|
+
The user describes their pains in plain language. The executing agent contributes its own session pains from the tool-call trace in parallel. **Both** go through the analysis pipeline. The agent analyzes (root cause + config component) and proposes measures. The user votes per patch.
|
|
20
|
+
|
|
21
|
+
The retro is never just "agent asks user about friction". That would be the wrong entry point — the user often only sees symptoms, while the agent sees the real tool-call failures, memory stalls, hook misses, and skill conflicts in the trace.
|
|
22
|
+
|
|
23
|
+
## Why this exists
|
|
24
|
+
|
|
25
|
+
Two purposes:
|
|
26
|
+
|
|
27
|
+
1. **Feature-level learning** — capture friction while it is fresh so the same trap is not stepped into next session.
|
|
28
|
+
2. **Config-health surveillance** — accumulate evidence that a CLAUDE.md rule, Skill, Memory note, or Hook is outdated, missing, or actively in the way. Each retro is the trigger source for incremental config cleanup.
|
|
29
|
+
|
|
30
|
+
The previous file-based workflow (`pr-retro-stub.py` hook + filled retro files in `.claude/retros/` + batch-PR) was removed because filed retros are read by no one — only the config mutations matter.
|
|
31
|
+
|
|
32
|
+
## Process
|
|
33
|
+
|
|
34
|
+
### 1. Detect PR context
|
|
35
|
+
|
|
36
|
+
Two signals:
|
|
37
|
+
|
|
38
|
+
- **Branch-Pattern:** Run `git branch --show-current`. If it matches `feat/<N>-…` / `fix/<N>-…` / `chore/<N>-…` / `docs/<N>-…`, the issue number is `<N>`.
|
|
39
|
+
- **Skill-Argument:** if the user typed `/retro <num>`, that number wins over the branch.
|
|
40
|
+
|
|
41
|
+
If neither yields a number, ask the user:
|
|
42
|
+
|
|
43
|
+
> "No PR context detected — run the retro anyway? If yes, give me the issue/PR number or say 'none'."
|
|
44
|
+
|
|
45
|
+
User may skip (silent exit), give a number, or say "none" (proceed without a PR/issue anchor).
|
|
46
|
+
|
|
47
|
+
### 2a. User friction probe (one question, outcome language)
|
|
48
|
+
|
|
49
|
+
Ask exactly:
|
|
50
|
+
|
|
51
|
+
> "Was there friction in the session? If yes, in 1-2 sentences: what was it?"
|
|
52
|
+
|
|
53
|
+
A plain-language description is expected ("worktree setup is annoying", "LSP is acting up"). It is the **agent's job** to derive the technical root cause + config component from it — the agent should NEVER ask the user for that.
|
|
54
|
+
|
|
55
|
+
### 2b. Agent friction self-probe (mandatory, parallel to 2a)
|
|
56
|
+
|
|
57
|
+
The executing agent scans the session itself for friction. Mandatory checklist:
|
|
58
|
+
|
|
59
|
+
- Which tool calls failed or had to be retried? (permission denials, edit-before-read errors, bash-pipe aborts)
|
|
60
|
+
- Which memories turned out to be stale on inspection? (content contradicts today's code)
|
|
61
|
+
- Which pre-commit/hook checks needed workarounds?
|
|
62
|
+
- Which skill steps contradicted CLAUDE.md? (e.g. a plugin skill says npm install, CLAUDE.md says pnpm)
|
|
63
|
+
- Which bash calls ran with CWD drift / sequential permission approval / missing absolute path?
|
|
64
|
+
- Which `<system-reminder>` spam patterns recurred?
|
|
65
|
+
|
|
66
|
+
Mark own findings explicitly as **"<Agent>-Finding: …"** in the output, on equal footing with user findings. Examples: **"Codex-Finding: …"** on Codex, **"Claude-Finding: …"** on Claude.
|
|
67
|
+
|
|
68
|
+
### 2c. Memory sweep probe (mandatory if threshold breached — only if a memory directory exists)
|
|
69
|
+
|
|
70
|
+
First check existence — consumers without Claude auto-memory (e.g. a pure Codex install) have no memory directory. Derive the path portably (project slug = absolute main-tree path with `/`→`-`; worktree-safe via the git common dir, fallback `pwd`):
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
PROJ_ROOT=$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null | xargs -r dirname)
|
|
74
|
+
MEMDIR="$HOME/.claude/projects/$(printf '%s' "${PROJ_ROOT:-$(pwd)}" | tr '/' '-')/memory"
|
|
75
|
+
test -d "$MEMDIR" && echo present || echo absent
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Directory missing → one sentence in the output: "Memory sweep probe: no memory directory (no Claude auto-memory) — skipped." No patch proposal, step counts as satisfied. Otherwise continue:
|
|
79
|
+
|
|
80
|
+
Count empirically — active memory set + index size:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
ls -1 "$MEMDIR/"*.md | grep -v '/MEMORY\.md$' | wc -l
|
|
84
|
+
wc -l "$MEMDIR/MEMORY.md"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Threshold trigger (either is enough):
|
|
88
|
+
- Active memory set ≥ 65 files (sweep trigger above the CLAUDE.md target "active set <35" — fires only on real bloat, not a healthy-but-full set; tuned across retros)
|
|
89
|
+
- MEMORY.md > 120 lines
|
|
90
|
+
|
|
91
|
+
If the trigger is breached:
|
|
92
|
+
- One sentence in the output: "Memory sweep probe: N active memory files, X lines MEMORY.md — over the token-hygiene target (<35 files)."
|
|
93
|
+
- Include a config patch proposal in step 3:
|
|
94
|
+
"Patch X — memory set over <35. Identify + delete stale/completed memories (prune-on-touch). Check content before every deletion; move deleted memory files to `archive/` (instead of hard-deleting) so recovery stays possible. **Affects:** memory · **Weight:** low (hygiene, isolated)."
|
|
95
|
+
Like every step-4 patch, this one also carries the `Affects / Weight` line (3b/step 4).
|
|
96
|
+
|
|
97
|
+
If 0 triggers:
|
|
98
|
+
- One-liner in the output: "Memory sweep ok (N files / X lines)."
|
|
99
|
+
- No patch proposal.
|
|
100
|
+
|
|
101
|
+
**Skip allowance:** only when the memory directory is missing (see above) — otherwise none, the sweep probe runs on every retro.
|
|
102
|
+
|
|
103
|
+
**Why here (mandatory step, not just memory):** memory is passive (only fires if the agent thinks of it); `/retro` runs routinely after PR activity and is the natural enforcement vehicle. The entry must happen BEFORE the symmetric analysis so it can flow into the process as a patch proposal if needed.
|
|
104
|
+
|
|
105
|
+
**Threshold tuning:** sweep trigger = ≥65 files / >120 lines MEMORY.md (target stays "active set <35", trigger sits with headroom above it so healthy-full sets don't fire on every retro); threshold tuned upward across retros — raise further on the next empty-handed hit.
|
|
106
|
+
|
|
107
|
+
### 3. Symmetric analysis (agent, on its own)
|
|
108
|
+
|
|
109
|
+
For **every** friction point (user-reported AND self-found), the agent analyzes:
|
|
110
|
+
|
|
111
|
+
- **Root cause:** which tool call / memory / hook / skill was concretely involved?
|
|
112
|
+
- **Config component:** which mutation would prevent it next time? (memory / skill / CLAUDE.md / hook / helper script / issue / nothing)
|
|
113
|
+
- **Repeatable or one-off?** One-off incidents → no patch needed.
|
|
114
|
+
|
|
115
|
+
If the user's description in step 2a is ambiguous, the agent may ask **ONE** clarifying outcome question — e.g. "where was it most annoying — during setup, mid-work, or during cleanup?". Never multiple-choice with memory names, hook paths, or config classes.
|
|
116
|
+
|
|
117
|
+
### 3b. Determine target + weight (threshold ladder)
|
|
118
|
+
|
|
119
|
+
Before formulating a patch in step 4, place **every** friction point on the threshold ladder. **Weight** = how durable/far-reaching the rule is (drives the visible patch line in step 4 + the user's approval depth). **Target** = where the patch physically goes.
|
|
120
|
+
|
|
121
|
+
| Weight | Target (tier) | When |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| **high** | CLAUDE.md / hard rule (or durable hook) | durable + cross-cutting + **incident-backed**; applies **across all phases** (even without a spec — during build, git, deploy) |
|
|
124
|
+
| **medium** | `spec-self-critique` (project check) | recurring **spec-structural** defect, **catchable from the spec before building** |
|
|
125
|
+
| **low** | Memory | isolated infra/domain gotcha (a fact to recall, not a pattern) |
|
|
126
|
+
| **minimal** | Inline note / "nothing" | one-off, no pattern, no durable config artifact |
|
|
127
|
+
|
|
128
|
+
**Domain/glossary gap** (the defect sits in the **grill input**, not the spec structure — a term was fuzzy/missing before a spec even existed) → target `CONTEXT.md` / `docs/adr/`, **weight medium**. This way learning findings reach the **plan START** (what `grill-with-docs` reads) for the first time, not just the spec gate. Boundary to `spec-self-critique` (also medium): that one holds a **structural** spec defect; this one a **substantive** domain/term gap.
|
|
129
|
+
|
|
130
|
+
**Borderline high vs medium — two-stage test (CLAUDE.md vs `spec-self-critique`):**
|
|
131
|
+
1. **Phase reach first:** "Would looking at the SPEC *before* building have prevented the friction?" → **Yes** = spec quality hole → `spec-self-critique` (medium). → **No, applies always/cross-phase** → CLAUDE.md candidate.
|
|
132
|
+
2. **Incident gate for the high tier:** CLAUDE.md / hard rule **only** if durable + cross-cutting + **went wrong for real at least once** (incident-backed). A pure one-off observation without recurrence → downgrade to memory/inline, **not** a hard rule.
|
|
133
|
+
|
|
134
|
+
**Borderline medium vs low:** when in doubt, **medium** wins (an active spec gate beats passive memory recall) — a spec-structural finding mis-routed to `low`/memory sits in passive recall and **never** fires again at the next spec, while a medium finding in the `spec-self-critique` layer fires guaranteed.
|
|
135
|
+
|
|
136
|
+
**Tier says roughly where, class says which file.** For a **skill** target, the class routing in step 4 ("class first") decides **which** file — e.g. a "medium → `spec-self-critique`" patch (published class) lands in the **project layer** `docs/agents/skills/spec-self-critique.md`, not the scaffolding.
|
|
137
|
+
|
|
138
|
+
**A GitHub issue is NOT a weight tier.** A real follow-up = work to track → `python3 scripts/board-sync.py create` (step-4 table), **orthogonal** to the ladder; its "weight" follows the follow-up scope. The ladder classifies **config patches**, not "turn it into a ticket".
|
|
139
|
+
|
|
140
|
+
**Target missing in the project — separate two cases cleanly:**
|
|
141
|
+
- **(a) Tier skill missing entirely** (e.g. a foreign project without `spec-self-critique`): no durable spec-time gate exists. **Memory is NOT a substitute** — passive recall doesn't catch a recurring spec defect before building. Report honestly: *"this project has no durable target for this tier"* + propose a `/setup-workflow` follow-up. **No fake guard via memory.**
|
|
142
|
+
- **(b) Skill exists, project-layer file missing** (`docs/agents/skills/<skill>.md`): **create / append** — that is the normal retro-sink behavior that `spec-self-critique` step 0 expects anyway. **No** downgrade.
|
|
143
|
+
|
|
144
|
+
### 4. Patch proposals (concrete recommendation, no multiple-choice with tech refs)
|
|
145
|
+
|
|
146
|
+
**Generalization check FIRST (mandatory, before formulating) — class, not symptom.** Before cutting a patch, abstract one level up: *"What is this incident an EXAMPLE of?"* The patch covers the **class / principle** (every scenario where the same mechanism bites) — the concrete incident is only the **example**, not the scope. Symptom-tight patches (exactly-this-one-trigger) miss the next variant of the same class, forcing the user to steer again. **BUT class ≠ speculation:** only include **verified** members of the class (verify-first), structure it **extensibly** instead of stuffing in unproven patterns — too broad (unverified) is the same mistake as too narrow, just inverted. (retro: an over-narrow symptom patch was widened to the correct class, while an unverified pattern was deliberately left out.)
|
|
147
|
+
|
|
148
|
+
For every friction point: the agent formulates **one concrete recommendation** with a short rationale in plain language. Format:
|
|
149
|
+
|
|
150
|
+
> **Patch X — [one line: what].**
|
|
151
|
+
> **Why:** [one line, why it removes the friction].
|
|
152
|
+
> **What changes:** [one line, visible effect].
|
|
153
|
+
> **Affects:** [target in plain language] · **Weight:** [high / medium / low / minimal] — [short rationale from the ladder (3b)].
|
|
154
|
+
|
|
155
|
+
**Every patch carries the `Affects / Weight` line** (from 3b) — including the memory-sweep patch from step 2c (Affects: memory · Weight: low). The weight drives approval depth: "high / CLAUDE.md" = durable always-on rule, worth more scrutiny; "minimal / inline" = throwaway. Wording in plain language (no tech jargon in the user-facing view).
|
|
156
|
+
|
|
157
|
+
Optionally present the diff/script/edit as a code block (for visual review), but NOT as a multiple-choice option with tech vocabulary.
|
|
158
|
+
|
|
159
|
+
Possible mutation targets (internal for Claude, do NOT list in user-facing output):
|
|
160
|
+
|
|
161
|
+
| Mutation type | Where |
|
|
162
|
+
|---|---|
|
|
163
|
+
| New/changed memory note | `~/.claude/projects/<project>/memory/<slug>.md` (plus update the `MEMORY.md` index) |
|
|
164
|
+
| CLAUDE.md rule adjustment | `CLAUDE.md` (Hard Rules section) |
|
|
165
|
+
| Skill improvement (generic/portable) | `.claude/skills/<skill>/SKILL.md` |
|
|
166
|
+
| Project-specific skill lore (`generic`/`vendored` skill) | `docs/agents/skills/<skill>.md` (project layer) |
|
|
167
|
+
| New/changed hook | `.claude/hooks/<name>.py` + test |
|
|
168
|
+
| New helper script | `scripts/<name>.sh` (+ tracked `.claude/settings.json` allowlist —: `.local.json` doesn't propagate to worktrees) |
|
|
169
|
+
| New GitHub issue | `python3 scripts/board-sync.py create` |
|
|
170
|
+
| "Do nothing" | one-off incident, no recurrence risk |
|
|
171
|
+
|
|
172
|
+
**Skill patch routing (class first).** If a patch targets a skill, FIRST read `.claude/skills/skill-manifest.json` **best-effort**. Published classes (`generic`/`vendored`): **project-specific** lore → `docs/agents/skills/<skill>.md` (project layer), **generic/portable** improvement → `.claude/skills/<skill>/SKILL.md`. `project-private`: the skill dir is fine. **Manifest missing** (foreign install) → safe default: lore goes to `docs/agents/skills/<skill>.md`, NEVER into a published skill dir. (Keeps published skills self-contained; e.g. `spec-self-critique` is `generic` → its project-specific checks belong in the project layer, not the scaffolding.)
|
|
173
|
+
|
|
174
|
+
### 5. Per-patch approval (yes / no / modify)
|
|
175
|
+
|
|
176
|
+
Per patch:
|
|
177
|
+
|
|
178
|
+
> "Patch X — [what line]. Apply? (Yes / No / Modify)"
|
|
179
|
+
|
|
180
|
+
<!-- mirror-xform:start codex-user-input-mechanism -->
|
|
181
|
+
Use `AskUserQuestion` with ≤3 options. Option labels in plain language, **never memory slugs or hook paths in the labels**. On "Modify", ask in plain language what should be different.
|
|
182
|
+
<!-- mirror-xform:end -->
|
|
183
|
+
|
|
184
|
+
### 6. Implementation
|
|
185
|
+
|
|
186
|
+
For each approved patch, execute the mutation immediately (Edit / Write / Bash). Do NOT batch — apply one at a time so the user can interrupt.
|
|
187
|
+
|
|
188
|
+
### 7. Exit
|
|
189
|
+
|
|
190
|
+
The retro is **opt-in** (user triggers `/retro`); it is **offered before PR creation**, never enforced. If done, it happens before the PR (not after merge). After all patches:
|
|
191
|
+
|
|
192
|
+
1. Summarize in 2-3 sentences what changed + what was deferred.
|
|
193
|
+
2. Fold a **`## Retro / Meta-Findings` section into the PR body** — into the PR still to be created, or via `gh pr edit` if already open: the honest friction analysis (user **and** agent findings) + the applied patches.
|
|
194
|
+
3. Repo file patches (CLAUDE.md/hook/skill/script) get **committed as part of the slice PR**; memory patches are filesystem-only (not in the PR).
|
|
195
|
+
|
|
196
|
+
Never create a file in `.claude/retros/`.
|
|
197
|
+
|
|
198
|
+
## What NOT to do
|
|
199
|
+
|
|
200
|
+
- **Do NOT create files in `.claude/retros/`.** The directory is historical archive only.
|
|
201
|
+
- **Repo file patches belong in the slice PR** (the retro runs BEFORE PR creation) — commit them + add findings as a meta section in the PR body. Only memory/filesystem patches stay uncommitted.
|
|
202
|
+
- **Do NOT skip the friction probe.** If you don't ask explicitly, you may silently invent friction that wasn't there.
|
|
203
|
+
- **Do NOT propose patches without user approval.** Every config mutation gets explicit yes/no.
|
|
204
|
+
|
|
205
|
+
## Format conventions
|
|
206
|
+
|
|
207
|
+
- German prose for user-facing questions and summaries (project convention).
|
|
208
|
+
- Correct umlauts (ä, ö, ü, ß — never ae/oe/ue/ss in prose).
|
|
209
|
+
- File links as `[name](path)`, clickable in <maintainer>'s VS Code.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scale-check
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
description: "Route an undertaking to the right altitude before any planning starts — a short plain-language dialog (3–6 questions) deciding between a Program, a Feature, a single Direct-Slice, or a Bug, then hand back a paste-ready start prompt for the chosen route. Use at the very start of a new build when the size is unclear (a new app, a big cross-cutting feature, or a where-do-I-start question). Owns the altitude criteria catalog; when in doubt it routes to Feature. NOT for slicing a chosen plan (to-issues) and NOT for clustering an existing backlog (board-to-waves)."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# scale-check — Route an undertaking to its altitude
|
|
8
|
+
|
|
9
|
+
Answers one question in plain language: **"how big is this, and where do I start?"**
|
|
10
|
+
The output is a **verdict** (Program / Feature / Direct-Slice / Bug), the **route**
|
|
11
|
+
that fits it, and a **paste-ready start prompt** for that route. No requirements
|
|
12
|
+
interview, no code, no board writes — this is a routing dialog, not a planning
|
|
13
|
+
skill.
|
|
14
|
+
|
|
15
|
+
This skill is the **single owner of the altitude criteria catalog** below. Other
|
|
16
|
+
skills only *reference* it — a backlog-grooming pass escalates a candidate that
|
|
17
|
+
trips the program criteria, and the skill router names it as the first step for a
|
|
18
|
+
new build without a clear size. Keep the catalog here and cite it from there;
|
|
19
|
+
never fork a second copy.
|
|
20
|
+
|
|
21
|
+
## When to reach for it
|
|
22
|
+
|
|
23
|
+
- A new undertaking whose size is genuinely unclear — greenfield app, "a bunch of
|
|
24
|
+
related work", a feature that might be bigger than one feature.
|
|
25
|
+
- Someone asks "where do I start?" / "is this a program?" / "do I need a PRD?".
|
|
26
|
+
- **Not** when the size is already obvious: a one-line fix goes straight to a
|
|
27
|
+
Direct-Slice, a known bug straight to a diagnosis — you can skip the dialog and
|
|
28
|
+
hand back that route directly.
|
|
29
|
+
|
|
30
|
+
## The dialog — 3 to 6 plain-language questions
|
|
31
|
+
|
|
32
|
+
Ask **one question at a time**, in plain language (no PM jargon), and recommend an
|
|
33
|
+
answer where the person hesitates. Stop early once the verdict is unambiguous (two
|
|
34
|
+
program criteria already tripped, or an obvious single-slice/bug). Each answer maps
|
|
35
|
+
to the criteria catalog below.
|
|
36
|
+
|
|
37
|
+
1. **Is this fixing something that used to work, or building something new?**
|
|
38
|
+
→ "fixing" ends the dialog: **Bug** route.
|
|
39
|
+
2. **In one sentence, what should exist at the end that doesn't today?**
|
|
40
|
+
(Frames the whole thing in outcome language — everything below hangs off this.)
|
|
41
|
+
3. **Does it arrive in one go, or in several stages you'd ship and learn from
|
|
42
|
+
separately** (a first usable version, then expansions)?
|
|
43
|
+
4. **Is it one clear area of the app, or several parts that each stand on their
|
|
44
|
+
own** (a whole new app counts as "several")?
|
|
45
|
+
5. **Realistically, is this a handful of focused changes, or many separate work
|
|
46
|
+
sessions stretching over a longer horizon — and does its shape need big
|
|
47
|
+
structural calls locked before day one** (data model, phasing, cross-area
|
|
48
|
+
sequencing) **that would be expensive to revisit mid-build?**
|
|
49
|
+
6. **Are there distinct acceptance stages** — e.g. a pilot that has to pass before
|
|
50
|
+
a wider rollout — **that gate what comes after them, and would progress only
|
|
51
|
+
make sense as a rollup across many waves rather than one issue's status?**
|
|
52
|
+
|
|
53
|
+
Questions 3–6 are the four program-signal probes, each reaching two of the six
|
|
54
|
+
altitude criteria (3→C1, 4→C2, 5→C3+C5, 6→C4+C6); question 1 catches bugs,
|
|
55
|
+
question 2 anchors the outcome. You rarely need all six.
|
|
56
|
+
|
|
57
|
+
## Altitude criteria (the single source of truth)
|
|
58
|
+
|
|
59
|
+
Count how many of these the undertaking trips. **Two or more → Program route.**
|
|
60
|
+
Fewer than two → it is a Feature (or smaller). **When it is borderline or you are
|
|
61
|
+
unsure, route to Feature, never Program** — an emergent wave can always be promoted
|
|
62
|
+
later, but program scaffolding you never needed is pure waste, and the Feature
|
|
63
|
+
route can grow into a program the moment a second criterion clearly trips.
|
|
64
|
+
|
|
65
|
+
- **C1 — Staged delivery.** It ships in several successive stages (a first usable
|
|
66
|
+
version, then expansions), not a single release.
|
|
67
|
+
- **C2 — Multiple subsystems.** It spans several parts that each stand on their own,
|
|
68
|
+
or is a whole new app (greenfield), not one feature area.
|
|
69
|
+
- **C3 — Long horizon.** It realistically needs many separate build sessions/waves,
|
|
70
|
+
not a handful of slices.
|
|
71
|
+
- **C4 — Acceptance gates.** It has distinct acceptance stages (pilot → rollout,
|
|
72
|
+
phase gates) that gate later work.
|
|
73
|
+
- **C5 — Upfront structure decisions.** Its shape needs structure-bearing decisions
|
|
74
|
+
locked before the first build day (data model, phasing, cross-area sequencing) —
|
|
75
|
+
decisions that would be expensive to revisit mid-build.
|
|
76
|
+
- **C6 — Program-level overview.** Progress only makes sense as a rollup across many
|
|
77
|
+
waves, not as one issue's status.
|
|
78
|
+
|
|
79
|
+
A single criterion is a strong Feature that may grow; **two or more is the program
|
|
80
|
+
threshold**. The threshold is deliberately low and the tie always breaks to Feature.
|
|
81
|
+
|
|
82
|
+
## Verdicts, routes, and start prompts
|
|
83
|
+
|
|
84
|
+
Report the verdict, which criteria tripped (for a Program) or why it stayed below
|
|
85
|
+
threshold, and the matching paste-ready start prompt. All four routes are existing
|
|
86
|
+
skills — this skill only picks the entry point.
|
|
87
|
+
|
|
88
|
+
### Program (≥2 criteria)
|
|
89
|
+
|
|
90
|
+
A multi-wave undertaking: grill it once into a Program-PRD with a wave plan, then
|
|
91
|
+
unfold that plan onto the board after a chat preview gate.
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
New program: <one-sentence outcome from Q2>.
|
|
95
|
+
Tripped altitude criteria: <e.g. C1 staged delivery, C2 multiple subsystems, C4 gates>.
|
|
96
|
+
1. Run a program grill with `grill-with-docs` — lock scope → phases → waves and any
|
|
97
|
+
structure-bearing decisions (escalate a single bounded choice to `decision-gate`).
|
|
98
|
+
2. `to-prd` — it auto-detects the program mode from the Wellenplan chapter and writes
|
|
99
|
+
a Program-PRD (native anchor over the waves).
|
|
100
|
+
3. `to-waves` — unfold the wave plan into named wave stubs + slice leaves after the
|
|
101
|
+
chat preview gate (nothing is written to the board until you approve it).
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Feature (0–1 criteria, or any doubt)
|
|
105
|
+
|
|
106
|
+
One coherent feature — the standard single-wave line, unchanged.
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
New feature: <one-sentence outcome from Q2>.
|
|
110
|
+
`grill-with-docs` (sharpen the terms + decisions) → `to-prd` (publish the Draft-PRD)
|
|
111
|
+
→ `to-issues` (slice it into independently buildable tracer-bullet slices).
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Direct-Slice (a single, well-understood change)
|
|
115
|
+
|
|
116
|
+
One behavior, already clear enough to build — no PRD, no slicing.
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Small change: <one-sentence behavior>.
|
|
120
|
+
`tdd` — one behavior at a time, red → green → refactor. No PRD, no decomposition.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Bug (something that used to work)
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Bug: <what's broken — expected vs. actual>.
|
|
127
|
+
`diagnose` — reproduce, minimize, hypothesize, instrument, fix, regression-test.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Output shape
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
scale-check: verdict=<Program | Feature | Direct-Slice | Bug>
|
|
134
|
+
criteria tripped=<C1,C2,… | none | n/a (bug/direct)>
|
|
135
|
+
route=<program grill → to-prd → to-waves | grill-with-docs → to-prd → to-issues | tdd | diagnose>
|
|
136
|
+
start-prompt: <the paste-ready block above, filled in>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Make the doubt-default visible: if it landed on Feature only because it was
|
|
140
|
+
borderline, say so — "one criterion tripped (C2); routed to Feature by the
|
|
141
|
+
tie-breaks-to-Feature rule — promote a wave later if a second one clearly appears."
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-audit
|
|
3
|
+
description: Run the whole application's security audit as an independent two-model pass — two AI models audit the same code separately — then harden the remediation plan before any fix lands. Use when the user wants a security audit / security review of the entire app ("audit the app for vulnerabilities", "is the app secure", "security check before release"), before a release, or after the attack surface changes (new endpoint, new input source, auth change, dependency bump). NOT for reviewing a single diff/PR (that is a code review) and NOT for infrastructure hardening (firewall/ports/TLS/SSH/backups — audited separately from the application layer).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# security-audit — application-layer security audit (two-model run)
|
|
7
|
+
|
|
8
|
+
Application-layer security audit of the whole repo. This skill is the **run
|
|
9
|
+
procedure**; the checklist itself lives in a **runbook you own per project**. The
|
|
10
|
+
generic runbook structure ships as a template you copy and fill:
|
|
11
|
+
**`docs/agents/security-audit-runbook-template.md`** — copy it into your project
|
|
12
|
+
(for example `docs/security/audit-runbook.md`), replace each `<placeholder>` with
|
|
13
|
+
your actual stack, and keep it as the checklist single source of truth. Read your
|
|
14
|
+
filled runbook first.
|
|
15
|
+
|
|
16
|
+
**Scope guard:** code + config only. Infrastructure (firewall, exposed ports,
|
|
17
|
+
TLS, SSH, backups) is audited **separately** — an exposed database port beats any
|
|
18
|
+
code fix. Keep the two audits apart.
|
|
19
|
+
|
|
20
|
+
## Workflow — two-model run
|
|
21
|
+
|
|
22
|
+
Run in a **fresh session** (token hygiene). Anchor the campaign to a single
|
|
23
|
+
tracking issue (an umbrella / cluster issue); open a new one per fresh audit.
|
|
24
|
+
|
|
25
|
+
1. **Model-A pass (read-only).** Work the runbook's audit prompt → a findings
|
|
26
|
+
table with exact `file:line`, a severity, and a confirmed/suspected tag on
|
|
27
|
+
every finding. Cite real evidence — never claim a vulnerability you did not
|
|
28
|
+
locate in the code; prefer a flagged false positive over a silent omission.
|
|
29
|
+
Write it to a scratch file.
|
|
30
|
+
2. **Model-B pass (read-only, independent).** Hand a *second* model the **same**
|
|
31
|
+
prompt in its own read-only sandbox. A second model refutes the first model's
|
|
32
|
+
false positives and catches what it missed — that independence is the whole
|
|
33
|
+
point. Generic operational gotchas when the second model is Codex:
|
|
34
|
+
- **Fresh session — never resume an existing one** during a parallel run:
|
|
35
|
+
context bleeds across sessions and you get hallucinated, off-topic verdicts.
|
|
36
|
+
- **Do not pipe the `--json` event stream through `grep`** (it can hang) —
|
|
37
|
+
write the raw json to a file and parse the thread id separately.
|
|
38
|
+
- The sandbox sees only tracked files; if you run it inside a git worktree,
|
|
39
|
+
copy any hook config into the worktree, or it fails closed to deny-all.
|
|
40
|
+
3. **Consolidate.** Merge both passes into one report (the runbook's findings
|
|
41
|
+
template). Where the two models **disagree**, the finding goes onto a "needs
|
|
42
|
+
human verification" list — it is **never silently dropped**. Each finding keeps
|
|
43
|
+
its confirmed/suspected tag together with its evidence.
|
|
44
|
+
4. **Harden the remediation plan.** Draft a remediation plan (which gaps, what
|
|
45
|
+
fix, what order, what blast radius), then grill **the plan** with a plan-review
|
|
46
|
+
pass: a relentless interview on scope and priority plus an adversarial
|
|
47
|
+
second-model review of the plan until it is approved. The audit produced the
|
|
48
|
+
*what*; the grill hardens the *how*. A human signs off before any code is
|
|
49
|
+
touched. (Your project layer names the concrete plan-review skill.)
|
|
50
|
+
5. **Fix by slices.** Each confirmed gap → its own issue → a worktree → a
|
|
51
|
+
test-first fix → live-verify → a PR linked under the tracking anchor. Tick the
|
|
52
|
+
anchor's checklist on merge. Gaps discovered mid-fix → filed as their own
|
|
53
|
+
issue, linked under the same anchor.
|
|
54
|
+
|
|
55
|
+
## Why two models + a grill
|
|
56
|
+
|
|
57
|
+
Security findings are the textbook "plausible-but-wrong" case — one model's miss
|
|
58
|
+
or false positive is expensive to catch later. An independent second model is
|
|
59
|
+
cheap adversarial verification; grilling the plan stops over- or under-fixing
|
|
60
|
+
before any code is touched.
|
|
61
|
+
|
|
62
|
+
## Project layer
|
|
63
|
+
|
|
64
|
+
Your project's runbook (copied from the template above) carries the stack-coupled
|
|
65
|
+
checklist — the concrete framework, ORM, auth library, and deploy platform, and
|
|
66
|
+
the exact commands to run. The standing tracking anchor and any category / board
|
|
67
|
+
wiring live there too, not in this generic skeleton.
|