@istmx/skills 1.0.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/README.md +49 -0
- package/bin/cli.js +251 -0
- package/istm/SKILL.md +65 -0
- package/istm-animate/SKILL.md +87 -0
- package/istm-animate/animations/animation_utils.md +280 -0
- package/istm-animate/animations/animations.md +220 -0
- package/istm-animate/animations/core_motion.md +250 -0
- package/istm-animate/animations/examples/README.md +29 -0
- package/istm-animate/animations/examples/nuxt/app/app.vue +3 -0
- package/istm-animate/animations/examples/nuxt/app/composables/useGSAP.ts +91 -0
- package/istm-animate/animations/examples/nuxt/app/pages/index.vue +55 -0
- package/istm-animate/animations/examples/nuxt/nuxt.config.ts +4 -0
- package/istm-animate/animations/examples/nuxt/package.json +18 -0
- package/istm-animate/animations/examples/react/App.jsx +46 -0
- package/istm-animate/animations/examples/react/index.html +12 -0
- package/istm-animate/animations/examples/react/main.jsx +9 -0
- package/istm-animate/animations/examples/react/package.json +21 -0
- package/istm-animate/animations/examples/react/vite.config.js +7 -0
- package/istm-animate/animations/examples/vanilla/index.html +33 -0
- package/istm-animate/animations/examples/vanilla/main.js +36 -0
- package/istm-animate/animations/examples/vue/app.vue +47 -0
- package/istm-animate/animations/examples/vue/index.html +15 -0
- package/istm-animate/animations/examples/vue/main.js +9 -0
- package/istm-animate/animations/examples/vue/package.json +19 -0
- package/istm-animate/animations/examples/vue/vite.config.js +7 -0
- package/istm-animate/animations/framework_motion.md +262 -0
- package/istm-animate/animations/motion.csv +17 -0
- package/istm-animate/animations/motion.md +11 -0
- package/istm-animate/animations/motion_catalog.json +226 -0
- package/istm-animate/animations/motion_performance.md +75 -0
- package/istm-animate/animations/motion_plugins.md +429 -0
- package/istm-animate/animations/react_animations.md +132 -0
- package/istm-animate/animations/scroll_trigger_effects.md +291 -0
- package/istm-animate/animations/timeline_sequencing.md +103 -0
- package/istm-architecture/SKILL.md +109 -0
- package/istm-architecture/frameworks/angular.csv +51 -0
- package/istm-architecture/frameworks/astro.csv +54 -0
- package/istm-architecture/frameworks/avalonia.csv +57 -0
- package/istm-architecture/frameworks/flutter.csv +53 -0
- package/istm-architecture/frameworks/javafx.csv +76 -0
- package/istm-architecture/frameworks/jetpack-compose.csv +53 -0
- package/istm-architecture/frameworks/laravel.csv +51 -0
- package/istm-architecture/frameworks/nextjs.csv +53 -0
- package/istm-architecture/frameworks/nuxtjs.csv +59 -0
- package/istm-architecture/frameworks/react-native.csv +52 -0
- package/istm-architecture/frameworks/react.csv +54 -0
- package/istm-architecture/frameworks/svelte.csv +54 -0
- package/istm-architecture/frameworks/swiftui.csv +51 -0
- package/istm-architecture/frameworks/uwp.csv +56 -0
- package/istm-architecture/frameworks/vue.csv +50 -0
- package/istm-architecture/frameworks/winui.csv +60 -0
- package/istm-architecture/frameworks/wpf.csv +57 -0
- package/istm-architecture/templates/agents.md +229 -0
- package/istm-architecture/templates/architecture.md +111 -0
- package/istm-architecture/templates/design.md +138 -0
- package/istm-architecture/templates/project-overview.md +215 -0
- package/istm-awwward-designer/SKILL.md +43 -0
- package/istm-awwward-designer/libraries/threejs.csv +54 -0
- package/istm-awwward-designer/references/accessibility.md +774 -0
- package/istm-awwward-designer/references/anim-anti-patterns.md +576 -0
- package/istm-awwward-designer/references/animation-map.md +166 -0
- package/istm-awwward-designer/references/animation-standards.md +86 -0
- package/istm-awwward-designer/references/anti-patterns.md +191 -0
- package/istm-awwward-designer/references/color-systems.md +604 -0
- package/istm-awwward-designer/references/css-performance.md +477 -0
- package/istm-awwward-designer/references/descender-safety.md +490 -0
- package/istm-awwward-designer/references/design-audit.md +93 -0
- package/istm-awwward-designer/references/font-loading.md +378 -0
- package/istm-awwward-designer/references/image-optimization.md +440 -0
- package/istm-awwward-designer/references/invention-gate.md +356 -0
- package/istm-awwward-designer/references/micro-interactions.md +825 -0
- package/istm-awwward-designer/references/page-transitions.md +365 -0
- package/istm-awwward-designer/references/performance-standards.md +79 -0
- package/istm-awwward-designer/references/quality-gate.md +103 -0
- package/istm-awwward-designer/references/responsive-design.md +778 -0
- package/istm-awwward-designer/references/scoring-guide.md +201 -0
- package/istm-awwward-designer/references/scroll-patterns.md +668 -0
- package/istm-awwward-designer/references/stitch-brief.md +124 -0
- package/istm-awwward-designer/references/tech-stack.md +204 -0
- package/istm-awwward-designer/references/technical-audit.md +133 -0
- package/istm-awwward-designer/references/technique-families.md +293 -0
- package/istm-awwward-designer/references/testing.md +535 -0
- package/istm-awwward-designer/references/text-animation.md +585 -0
- package/istm-awwward-designer/references/typography.md +504 -0
- package/istm-awwward-designer/references/usability-audit.md +108 -0
- package/istm-awwward-designer/references/visual-standards.md +97 -0
- package/istm-design/SKILL.md +98 -0
- package/istm-design/colors/color_theory.md +293 -0
- package/istm-design/colors/colors.csv +193 -0
- package/istm-design/colors/colors_catalog.json +4034 -0
- package/istm-design/colors/palette.json +21 -0
- package/istm-design/styles/design_system.md +288 -0
- package/istm-design/styles/html-tailwind.csv +56 -0
- package/istm-design/styles/nuxt-ui.csv +71 -0
- package/istm-design/styles/product_design.md +55 -0
- package/istm-design/styles/shadcn.csv +61 -0
- package/istm-design/styles/style.md +12 -0
- package/istm-design/styles/styles.csv +85 -0
- package/istm-design/styles/styles_catalog.json +2018 -0
- package/istm-design/styles/ui-reasoning.csv +162 -0
- package/istm-design/styles/uno.csv +60 -0
- package/istm-design/typography/font_and_font.md +10 -0
- package/istm-design/typography/google-fonts.csv +1924 -0
- package/istm-design/typography/sans_serif_fonts.md +112 -0
- package/istm-design/typography/typography.csv +75 -0
- package/istm-design/typography/typography_catalog.json +964 -0
- package/istm-design/ux/app-interface.csv +31 -0
- package/istm-design/ux/charts.csv +26 -0
- package/istm-design/ux/icons.csv +106 -0
- package/istm-design/ux/landing.csv +35 -0
- package/istm-design/ux/products.csv +193 -0
- package/istm-design/ux/react-performance.csv +45 -0
- package/istm-design/ux/responsive_rules.md +62 -0
- package/istm-design/ux/storytelling.md +47 -0
- package/istm-design/ux/ux-guidelines.csv +100 -0
- package/istm-design/ux/ux_guidelines.json +1190 -0
- package/istm-system-design/SKILL.md +88 -0
- package/istm-system-design/principles/01-architecture-patterns.md +24 -0
- package/istm-system-design/principles/02-database-selection.md +32 -0
- package/istm-system-design/principles/03-api-design.md +25 -0
- package/istm-system-design/principles/04-authentication-security.md +23 -0
- package/istm-system-design/principles/05-caching-performance.md +21 -0
- package/istm-system-design/principles/06-asynchronous-processing.md +17 -0
- package/istm-system-design/principles/07-infrastructure-deployment.md +22 -0
- package/istm-system-design/principles/08-low-level-design.md +35 -0
- package/istm-system-design/principles/09-state-management.md +14 -0
- package/istm-system-design/principles/10-error-handling-and-logging.md +26 -0
- package/istm-system-design/principles/11-testing-strategy.md +18 -0
- package/istm-system-design/principles/12-seo-and-web-vitals.md +18 -0
- package/istm-system-design/stacks/SETUP.md +82 -0
- package/istm-system-design/stacks/STACK.md +67 -0
- package/istm-system-design/stacks/WORKFLOW.md +84 -0
- package/istm-system-design/templates/api-route.ts.template +32 -0
- package/istm-system-design/templates/migrations.md.template +30 -0
- package/istm-system-design/templates/schema.drizzle.ts.template +17 -0
- package/istm-system-design/templates/schema.prisma.template +28 -0
- package/istm-system-design/templates/trpc-router.ts.template +22 -0
- package/istm-system-design/templates/zod-validators.ts.template +14 -0
- package/istm-workflow/istm-audit/SKILL.md +108 -0
- package/istm-workflow/istm-audit/agent-prompt.md +393 -0
- package/istm-workflow/istm-audit/agents/openai.yaml +7 -0
- package/istm-workflow/istm-audit/modes/area.md +19 -0
- package/istm-workflow/istm-audit/modes/gapfill.md +12 -0
- package/istm-workflow/istm-audit/modes/greenfield.md +24 -0
- package/istm-workflow/istm-audit/modes/tool-skills.md +39 -0
- package/istm-workflow/istm-audit/modes/whole-repo.md +5 -0
- package/istm-workflow/istm-audit/patterns/clean-architecture.md +15 -0
- package/istm-workflow/istm-audit/patterns/domain-driven.md +16 -0
- package/istm-workflow/istm-audit/patterns/functional.md +16 -0
- package/istm-workflow/istm-audit/patterns/solid-oop.md +17 -0
- package/istm-workflow/istm-check/SKILL.md +52 -0
- package/istm-workflow/istm-check/agents/openai.yaml +7 -0
- package/istm-workflow/istm-check/modes/review.md +156 -0
- package/istm-workflow/istm-check/modes/verify.md +197 -0
- package/istm-workflow/istm-check/review-agent-prompt.md +57 -0
- package/istm-workflow/istm-check/review-guide.md +133 -0
- package/istm-workflow/istm-craft/SKILL.md +37 -0
- package/istm-workflow/istm-craft/agent-modes/architecture.md +73 -0
- package/istm-workflow/istm-craft/agent-modes/cross-cutting.md +65 -0
- package/istm-workflow/istm-craft/agent-modes/enhancement.md +45 -0
- package/istm-workflow/istm-craft/agent-modes/feature.md +85 -0
- package/istm-workflow/istm-craft/agent-prompt.md +249 -0
- package/istm-workflow/istm-craft/agents/openai.yaml +7 -0
- package/istm-workflow/istm-craft/internal/after-subagent.md +90 -0
- package/istm-workflow/istm-craft/internal/design-conversation.md +140 -0
- package/istm-workflow/istm-craft/internal/tool-discovery.md +58 -0
- package/istm-workflow/istm-craft/spec-template.md +278 -0
- package/istm-workflow/istm-debug/SKILL.md +102 -0
- package/istm-workflow/istm-debug/agents/openai.yaml +7 -0
- package/istm-workflow/istm-develop/SKILL.md +144 -0
- package/istm-workflow/istm-develop/agents/openai.yaml +7 -0
- package/istm-workflow/istm-develop/checklist.md +95 -0
- package/istm-workflow/istm-develop/flow/build.md +133 -0
- package/istm-workflow/istm-develop/flow/git.md +34 -0
- package/istm-workflow/istm-develop/logical-guide.md +99 -0
- package/istm-workflow/istm-develop/ui/existing.md +23 -0
- package/istm-workflow/istm-develop/ui/generate.md +131 -0
- package/istm-workflow/istm-develop/ui/image.md +41 -0
- package/istm-workflow/istm-develop/ui/implementation.md +281 -0
- package/istm-workflow/istm-develop/ui/mcp.md +11 -0
- package/istm-workflow/istm-develop/ui-guide.md +164 -0
- package/istm-workflow/istm-document/SKILL.md +123 -0
- package/istm-workflow/istm-document/agent-prompt.md +57 -0
- package/istm-workflow/istm-document/agents/openai.yaml +7 -0
- package/istm-workflow/istm-document/templates/changelog.md +54 -0
- package/istm-workflow/istm-document/templates/postmortem.md +58 -0
- package/istm-workflow/istm-document/templates/pr.md +43 -0
- package/istm-workflow/istm-document/templates/release-note.md +41 -0
- package/istm-workflow/istm-scope/SKILL.md +100 -0
- package/istm-workflow/istm-scope/agents/openai.yaml +7 -0
- package/istm-workflow/istm-scope/approaches/facade.md +33 -0
- package/istm-workflow/istm-scope/approaches/journey.md +31 -0
- package/istm-workflow/istm-scope/approaches/skateboard.md +33 -0
- package/istm-workflow/istm-scope/approaches/tracer-bullet.md +34 -0
- package/istm-workflow/istm-scope/modes/add.md +14 -0
- package/istm-workflow/istm-scope/modes/plan-brownfield.md +11 -0
- package/istm-workflow/istm-scope/modes/plan-greenfield.md +20 -0
- package/istm-workflow/istm-scope/modes/plan-monorepo.md +8 -0
- package/istm-workflow/istm-scope/modes/plan.md +120 -0
- package/istm-workflow/istm-scope/modes/replan.md +13 -0
- package/istm-workflow/istm-scope/scope-template.md +148 -0
- package/istm-workflow/istm-sync/SKILL.md +166 -0
- package/istm-workflow/istm-sync/agent-prompt.md +211 -0
- package/istm-workflow/istm-sync/agents/openai.yaml +7 -0
- package/istm-workflow/istm-test/SKILL.md +233 -0
- package/istm-workflow/istm-test/agent-prompt.md +62 -0
- package/istm-workflow/istm-test/agents/openai.yaml +7 -0
- package/istm-workflow/istm-test/modes/setup.md +97 -0
- package/istm-workflow/istm-test/writing-guide.md +196 -0
- package/package.json +35 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Audit Mode: area scan (Phase 3)
|
|
2
|
+
|
|
3
|
+
Trigger: a path or area name was given (e.g. `/audit src/auth`).
|
|
4
|
+
|
|
5
|
+
Pre-flight additionally:
|
|
6
|
+
1. Check the area path exists. If not: stop immediately, tell the engineer "Path `<area>` not found. Check the path and try again.", and do nothing further.
|
|
7
|
+
2. Root `.istm-context/agents.md` (the canonical file): missing, with no legacy CLAUDE.md to migrate → run the whole-repo scan (`modes/whole-repo.md`) fully first (write root .istm-context/agents.md + CLAUDE.md pointer), then continue with the area scan. Only a legacy root `CLAUDE.md` → run the legacy migration first. Exists → proceed directly.
|
|
8
|
+
3. Check if `<area>/.istm-context/agents.md` exists; note present or missing.
|
|
9
|
+
|
|
10
|
+
The main thread writes the area's `.istm-context/agents.md` itself, following the AREA phase in `agent-prompt.md`. Reading the area is the expensive part: for a large area, offload it to a read only `scout` subagent on the cheapest model (Claude Code: `haiku`, not inheriting the session model) that returns a compact map, then write from it; a small area, read directly. Read `agent-prompt.md` at write time. The inputs to apply: `PHASE=area`, `AREA=<path>`, root .istm-context/agents.md path, area .istm-context/agents.md path or MISSING. Add the nested pointer line to root `.istm-context/agents.md` via the Edit tool; do not create root again. The AREA phase produces its `Root gaps flagged` output for you to handle below.
|
|
11
|
+
|
|
12
|
+
After writing, handle the `Root gaps flagged` section:
|
|
13
|
+
- `ROOT_GAPS: none` → relay the full report, done.
|
|
14
|
+
- Gaps exist → ask (one option marked recommended, the picker adds a free text custom slot last): Question: "I found things in `<area>` not reflected in root .istm-context/agents.md. What should I do?" Option 1: `Add them now (recommended)`, description: "I'll apply the additions immediately". Option 2: `Show me the diff`, description: "Print exactly what would change; I'll apply it manually". Option 3: `Skip for now`, description: "Leave root .istm-context/agents.md as is".
|
|
15
|
+
- On `Add them now`: locate the `ROOT_GAPS:` block and extract each line starting with `- ` (each holds the exact markdown to insert and the target section, `target section: ## <section>`). Apply one Edit call per gap into root `.istm-context/agents.md`. Do not paraphrase.
|
|
16
|
+
- On `Show me the diff`: print each addition as a fenced markdown block with the target section labelled. Do not write.
|
|
17
|
+
- On `Skip for now`: do nothing.
|
|
18
|
+
|
|
19
|
+
Relay the full report after the choice is applied.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Audit Mode: gap-fill (Phase 4: root .istm-context/agents.md already exists)
|
|
2
|
+
|
|
3
|
+
Trigger: no area argument, codebase exists, AND root .istm-context/agents.md already exists (including right after a legacy `CLAUDE.md` migration). Audit the whole codebase against what's written and fill the holes, conservatively.
|
|
4
|
+
|
|
5
|
+
Pre-flight additionally: note root `.istm-context/agents.md`'s path, and list all nested `.istm-context/agents.md` paths (excluding `node_modules` and `.git`) to pass inline.
|
|
6
|
+
|
|
7
|
+
The main thread does the gap-fill itself, following the GAP-FILL phase in `agent-prompt.md`. The scan reads the whole codebase against the existing docs: for a large repo, offload the reading to a read only `scout` subagent on the cheapest model (Claude Code: `haiku`, not inheriting the session model) that returns a compact map, then work from it; a small repo, read directly. Read `agent-prompt.md` at write time. The inputs to apply: `PHASE=gap-fill`, root .istm-context/agents.md path, nested .istm-context/agents.md paths list.
|
|
8
|
+
|
|
9
|
+
After the scan, handle proposals before applying:
|
|
10
|
+
- Nested docs you created for clearly undocumented areas → already written; list them in the relay.
|
|
11
|
+
- `ROOT_GAPS` and `PROPOSED_ADDITIONS` to existing files → ask (`Add them now` / `Show me the diff` / `Skip for now`) exactly as in the area scan; apply with `Edit` (verbatim, no paraphrase) on `Add them now`.
|
|
12
|
+
- `CONTRADICTIONS` (docs the code disproves) → surface to the engineer, do not auto fix (these touch possibly curated lines). Relay each as "`<doc>` says *X*, but the code/spec shows *Y*" and let them decide (correct it, or update the code). Never silently overwrite.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Audit Mode: greenfield setup (Phase 1)
|
|
2
|
+
|
|
3
|
+
Trigger: the preliminary check classified greenfield, including the workflow setup case (a stack spec exists but no root .istm-context/agents.md, so the project is freshly scaffolded and still needs its standards), or Phase 0 → `New project`. There may already be a manifest and scaffold source; that is the scaffold, not an already existing codebase, so still ask the standards.
|
|
4
|
+
|
|
5
|
+
Step 1, ask coding patterns AND tooling. The main thread asks, as decision panels, up to 4 per round, as many rounds as it takes. Every panel has exactly one option marked `(recommended)` and always ends with a free text custom input slot (Claude Code's picker adds that "Other" automatically; in a plain text fallback add it explicitly as the last option). Be thorough, not minimal; this is the one place conventions and tooling get set, so grill the engineer on every convention and tooling choice rather than assuming a default. First read the real scaffolded project (manifest, existing config, tools the scaffold installed), then tailor every question: skip one the stack already settles, list an already installed tool first as the recommended pick, phrase options for the actual language and framework. Answers are captured into `.istm-context/agents.md`. `/audit` records the choices, installs nothing; installing (packages, config files, hooks that run before commit, CI) is the `/develop tooling` sub task that follows, but ask the tooling questions here where the choice is made and recorded.
|
|
6
|
+
|
|
7
|
+
Architecture & code conventions:
|
|
8
|
+
- Architecture style: present all four preset options without reading their files into context yet: Clean Architecture (`patterns/clean-.istm-context/architecture.md`), Functional (`patterns/functional.md`), Domain Driven Design (`patterns/domain-driven.md`), and SOLID OOP (`patterns/solid-oop.md`). At write time (Step 3) you read only the chosen preset file.
|
|
9
|
+
- Type strictness (typed languages only; skip if untyped): `strict` (no `any`, exhaustive types) · `gradual` (strict for new code) · `loose`.
|
|
10
|
+
- Module & folder structure: `folder-by-feature` (colocate by feature) · `by-layer` (controllers/services/repos) · match what the scaffold already set.
|
|
11
|
+
- Additional code standards (multi select): documented public APIs · a consistent error handling pattern · validate env vars at startup · named exports only (no default exports) · consistent naming conventions · accessibility baseline on UI (WCAG AA) · conventional commit messages.
|
|
12
|
+
|
|
13
|
+
Tooling (asked here, installed by `/develop tooling`):
|
|
14
|
+
- Linting & formatting (adaptive): the standard linter + formatter for this stack (suggested; list an already installed one first) · a specific alternative · minimal for now.
|
|
15
|
+
- Checks before commit: lint + format + typecheck on every commit (suggested) · format only · none.
|
|
16
|
+
- Testing gate (captured as the convention, the runner is set up by `/test`): unit + integration with a framework (suggested) · typecheck + manual `/check verify` only · tests first (TDD).
|
|
17
|
+
- Continuous integration: a basic CI check on push (lint, typecheck, test) (suggested) · not yet · already configured.
|
|
18
|
+
- Git integration (recorded as the `## Git` block in .istm-context/agents.md): let the workflow branch per feature, commit as milestones land, and drive PRs (`on`, suggested for solo/most) · manage git yourself (`off`). If `on`, also capture `branch prefix` (default `feat/`) and `commit` granularity (`per-milestone` (suggested) · `end-of-build` · `manual`). Push and PRs always confirm regardless. **On `on`, if the project is not yet a git repo (`git rev-parse` fails), run `git init` now and offer an initial commit of the scaffold and docs, so the repo exists from the moment integration is enabled.** On `off`, never init; the engineer owns git.
|
|
19
|
+
|
|
20
|
+
Adapt the list: drop what doesn't apply (no CI question for a throwaway prototype, no type strictness for an untyped language); add any stack specific convention worth pinning.
|
|
21
|
+
|
|
22
|
+
Step 2, resolve SELECTED_PATTERNS: a named pattern → the absolute path of the matching `patterns/*.md` file (path only, do not inline its contents). "Other" (free text) → the engineer's exact typed text, passed inline (no file).
|
|
23
|
+
|
|
24
|
+
Step 3, run the Tool skills sweep (`modes/tool-skills.md`, whose web/registry discovery runs in a `researcher` subagent), then write the files yourself. Read `agent-prompt.md` and the selected pattern preset file now, and follow the GREENFIELD phase instructions to write root `.istm-context/agents.md` + its `CLAUDE.md` pointer. The inputs to apply: `PHASE=greenfield`; `SELECTED_PATTERNS=<pattern file path, or the Other free text>`; `ADDITIONAL_STANDARDS=<all the other Step 1 selections: code standards, type strictness, folder structure, AND the tooling choices (lint/format, pre-commit, testing gate, CI), AND the git integration choice written as a `## Git` block (`integration`, `branch prefix`, `commit`)>`; `MONOREPO_OR_NO` (`yes, apps: web, api, …` if detected); plus the sweep's `INSTALLED_SKILLS` / `DECLINED_TOOLS` for the `## Agent skills` section (one bullet per skill with its location, per `agent-prompt.md`). Capture the tooling choices clearly (a short `## Tooling` note or explicit Rules lines) so `/develop tooling` installs exactly what was chosen. Per `agent-prompt.md`, seed `## Stack` from the architecture spec (the workflow setup case always has one), seed `## Build approach` from the scope header (else `<TBD, set by /scope>`), and add per workspace nested docs if `MONOREPO=yes`.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Tool skills & MCP sweep (offer matching Agent Skills and MCP servers)
|
|
2
|
+
|
|
3
|
+
Read this from the greenfield mode (after scaffold) and the whole-repo mode, once the real stack is known (greenfield: from the scaffolded manifests read in Step 1; brownfield: from the repo scan). `/architect` offers when a tool is chosen; this covers whatever is already installed.
|
|
4
|
+
|
|
5
|
+
## Step 1: Ask first (the consent gate)
|
|
6
|
+
|
|
7
|
+
<!-- TOOL-CONSENT:START (identical in /architect, /audit and /sync; edit all or none) -->
|
|
8
|
+
**Asking is mandatory. Searching is not.** Nothing is searched, fetched, installed, or spawned for Agent Skill and MCP discovery until the engineer has picked. Offer four choices: find them for me, I will name the ones I want, no and record the decline, or not now. Only the first may run a search command. Never silently skip the offer, and never run a search before the engineer agrees to one.
|
|
9
|
+
<!-- TOOL-CONSENT:END -->
|
|
10
|
+
|
|
11
|
+
Say in your own words why it is worth doing: an Agent Skill teaches the agent a tool's real conventions, so the build follows them instead of guessing at them, and an MCP server gives it live access to the real system rather than assumptions about it. Then ask (capability first: `AskUserQuestion` on Claude Code, else the same options as plain text; exactly one recommended; the picker adds its own free text option):
|
|
12
|
+
|
|
13
|
+
- **question**: "Want me to find Agent Skills and MCP servers for this project's stack?"
|
|
14
|
+
- **header**: "Agent skills"
|
|
15
|
+
- **options**:
|
|
16
|
+
1. `Yes, find them for me` (recommended): "I'll search the registry for what this project already uses, then show you what I find. Nothing installs without your pick."
|
|
17
|
+
2. `I'll name the ones I want`: "Tell me which skills or servers, and I'll add exactly those. No searching."
|
|
18
|
+
3. `No, skip it`: "Build without them. I'll record the decline so nothing offers them again."
|
|
19
|
+
4. `Not now, later`: "I'll note the candidates in the report so you can add them when you want."
|
|
20
|
+
|
|
21
|
+
Act on the pick. `Yes` → Step 2, then Step 3. `I'll name the ones I want` → no search: take the list, confirm each with `npx skills add <owner>/<repo> --list` where practical, install per Step 3, record per Step 4. `No, skip it` → run nothing, record the decline per Step 4. `Not now, later` → run nothing, name the candidate tools in the report.
|
|
22
|
+
|
|
23
|
+
## Step 2: Discover (only after `Yes, find them for me`)
|
|
24
|
+
|
|
25
|
+
- Build a `TOOL_DISCOVERY_SET` first, covering every layer the project really uses: runtime, framework, router, styling or UI kit, database, ORM, auth, payments, email, storage, search, queues, AI or vector DB, testing, observability, hosting. Include package names and common aliases from the manifests. Do not stop after the first technology.
|
|
26
|
+
- **Run it in the background, keep working.** Hand the set to a read only discovery subagent and do NOT wait on it. Set its model explicitly to a fast, low cost tier, never inheriting the session model (Claude Code: the `researcher` type, which pins the model and carries the registry CLI plus web tools). It returns ONLY the compact candidate list, grouped by technology, minus installed and declined. Greenfield: start it right after the consent pick so the searches overlap the coding standards questions; collect the result just before the offer. Fallbacks: no background support → the same subagent, blocking; no subagent → search inline; no search capability → skip and note it in the report. The offer panel always stays on the main thread, since a subagent cannot prompt the engineer.
|
|
27
|
+
- For each item not already covered by an installed skill or connected MCP (`npx skills list`, your connector list) or recorded as declined in `.istm-context/agents.md`: detect Agent Skills with `npx skills find <tool-or-package>`; if weak, retry aliases from package or org names; collect every credible candidate and confirm with `npx skills add <owner>/<repo> --list` when practical. Detect MCP servers from the connector list first, else search `"<tool>" "MCP server"`. Never hardcode a list of which tools have skills or servers.
|
|
28
|
+
- Keep discovery capped and cacheable: the discovery subagent does the searches (not one subagent per tool). Max 5 web searches and 8 fetched pages total, official registry and docs first. Reuse `.istm-context/.agent-cache/tool-discovery/<slug>.md` if under 30 days old, after filtering installed and declined items.
|
|
29
|
+
|
|
30
|
+
## Step 3: Offer what you found, then install what is picked
|
|
31
|
+
|
|
32
|
+
- Offer Agent Skills as one panel allowing several picks: "Install relevant Agent Skills for this stack?", every found skill grouped by technology, plus skip and decline. Then MCPs separately, as optional: "Optional MCP servers that could help this stack", plus skip and decline. Never install or connect automatically. Found nothing? Say so and move on; never invent a candidate to fill the panel.
|
|
33
|
+
- Install each selected skill: `npx skills add <owner>/<repo> -y`. Connecting an MCP is a user config step (their MCP or connector settings, e.g. `claude mcp add …`); you can't do it for them, so point them there. Once connected the tools are used automatically.
|
|
34
|
+
|
|
35
|
+
## Step 4: Record
|
|
36
|
+
|
|
37
|
+
Carry `INSTALLED_SKILLS` / `MCP_SERVERS` / `DECLINED_TOOLS` into the `## Agent skills` section of the `.istm-context/agents.md` you write, in the exact format `agent-prompt.md` gives: one bullet per installed skill so only needed skills load, plus compact `Declined:` and `MCP servers:` lines. Use the project's real skills dir, never a hardcoded Claude only path. The declines stop a later run from offering them again. Project wide tech at root; area specific ones in the nested area doc.
|
|
38
|
+
|
|
39
|
+
No search, install, or connect capability? Skip the offer; note in the report which tools might have a skill or MCP worth a manual look.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Audit Mode: whole-repo scan (Phase 2: root + judged nested)
|
|
2
|
+
|
|
3
|
+
Trigger: pre-flight classified the repo as clearly established (real feature code, real history, no in-progress workflow setup), or Phase 0 → `Existing codebase`. Run the Tool skills sweep (`modes/tool-skills.md`, web/registry discovery in a `researcher` subagent) once the scan has identified the stack, before/with writing `.istm-context/agents.md`.
|
|
4
|
+
|
|
5
|
+
The main thread writes root + nested `.istm-context/agents.md` itself, following the WHOLE-REPO phase in `agent-prompt.md`. The scan reads across the codebase, the one expensive part: for a large repo, offload just the reading to a read only `scout` subagent on the cheapest model (Claude Code: `haiku`, not inheriting the session model), briefed to return a compact map (stack, commands, major areas, conventions, gotchas), and write from that map; for a small repo, read it directly. The inputs to apply: `PHASE=whole-repo`, root .istm-context/agents.md noted as MISSING, `MONOREPO_OR_NO`. Read `agent-prompt.md` at write time.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Clean Architecture
|
|
2
|
+
|
|
3
|
+
**MCQ label**: Clean Architecture
|
|
4
|
+
**MCQ description**: Strict layer separation, domain logic never touches frameworks or I/O. Scales well for complex business rules.
|
|
5
|
+
|
|
6
|
+
## Conventions
|
|
7
|
+
|
|
8
|
+
- Code is organized in four layers: `domain` (entities, value objects), `application` (use cases), `infrastructure` (DB, APIs, frameworks), `presentation` (UI, controllers).
|
|
9
|
+
- Dependency rule: outer layers depend on inner layers, never the reverse. Domain has zero external imports.
|
|
10
|
+
- Use cases are thin orchestrators. They call domain logic and infrastructure interfaces, never implement business rules themselves.
|
|
11
|
+
- Infrastructure implements interfaces defined in the domain or application layer (dependency inversion).
|
|
12
|
+
- No framework code (Express, Next.js, Prisma, etc.) appears inside `domain/` or `application/`.
|
|
13
|
+
- Entities contain business rules and enforce their own invariants. They are plain objects with no ORM decorators.
|
|
14
|
+
- All cross boundary communication uses DTOs or plain objects. No domain entities leak into the presentation layer.
|
|
15
|
+
- Tests: domain and application layers are unit tested with no mocks of infrastructure. Infrastructure is integration tested against real systems.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Domain Driven Design
|
|
2
|
+
|
|
3
|
+
**MCQ label**: Domain Driven Design (DDD)
|
|
4
|
+
**MCQ description**: Model the business domain explicitly. Bounded contexts, aggregates, and domain events. Best for complex, evolving business logic.
|
|
5
|
+
|
|
6
|
+
## Conventions
|
|
7
|
+
|
|
8
|
+
- The codebase is organized around bounded contexts. Each context owns its model and does not share domain objects with other contexts.
|
|
9
|
+
- Aggregates are the consistency boundary. Only aggregate roots are referenced by ID across context lines.
|
|
10
|
+
- Domain events model things that happened (`UserRegistered`, `OrderPlaced`). They are immutable facts, past tense, named after business occurrences.
|
|
11
|
+
- The ubiquitous language of the business domain is used in code. Class names, method names, and variables mirror terms the domain expert uses.
|
|
12
|
+
- Value objects represent domain concepts with no identity (e.g. `Money`, `Email`, `Address`). They are immutable and validated on construction.
|
|
13
|
+
- Repositories abstract persistence. The domain layer defines the repository interface; infrastructure implements it.
|
|
14
|
+
- Application services coordinate use cases. They do not contain domain logic. That belongs in aggregates and domain services.
|
|
15
|
+
- Anti corruption layers isolate external systems (third party APIs, legacy services) from the domain model.
|
|
16
|
+
- Context maps document how bounded contexts relate: shared kernel, customer supplier, conformist, anti corruption layer.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Functional & Immutable
|
|
2
|
+
|
|
3
|
+
**MCQ label**: Functional / Immutable
|
|
4
|
+
**MCQ description**: Pure functions, no shared mutable state. Predictable, easy to test, composable.
|
|
5
|
+
|
|
6
|
+
## Conventions
|
|
7
|
+
|
|
8
|
+
- Functions are pure by default: same input always produces same output, no side effects.
|
|
9
|
+
- Data is immutable. Use `const`, `Object.freeze`, `readonly`, or immutable data structures. Never mutate in place.
|
|
10
|
+
- Side effects (I/O, network, state changes) are pushed to the edges of the system and kept explicit.
|
|
11
|
+
- Prefer function composition over inheritance. Avoid classes where a plain function works.
|
|
12
|
+
- No shared mutable state. Module level variables are constants only.
|
|
13
|
+
- Transformations use `map`, `filter`, `reduce` over imperative loops where it improves readability.
|
|
14
|
+
- Avoid `null`. Use `Option`/`Maybe` types or explicit `undefined` with union types.
|
|
15
|
+
- Error handling uses `Result`/`Either` types or explicit error returns rather than exceptions for expected failures.
|
|
16
|
+
- Tests are trivial: pure functions need no mocks, just input/output assertions.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# SOLID OOP
|
|
2
|
+
|
|
3
|
+
**MCQ label**: SOLID + OOP
|
|
4
|
+
**MCQ description**: Classic object oriented design with SOLID principles. Dependency injection, interfaces, and single responsibility classes.
|
|
5
|
+
|
|
6
|
+
## Conventions
|
|
7
|
+
|
|
8
|
+
- **Single Responsibility**: each class has one reason to change. Split classes that do more than one job.
|
|
9
|
+
- **Open/Closed**: classes are open for extension, closed for modification. Add behaviour via new classes or composition, not by editing existing ones.
|
|
10
|
+
- **Liskov Substitution**: subclasses must be substitutable for their base class without changing program correctness. Prefer composition over deep inheritance.
|
|
11
|
+
- **Interface Segregation**: prefer small, focused interfaces over large ones. Callers depend only on methods they use.
|
|
12
|
+
- **Dependency Inversion**: high level modules depend on abstractions, not concretions. Wire dependencies at the composition root via constructor injection.
|
|
13
|
+
- No service locator or global registry. Dependencies are explicit in constructors.
|
|
14
|
+
- Classes are small (aim for under 200 lines). If a class grows beyond that, look for a responsibility to extract.
|
|
15
|
+
- Favour composition over inheritance beyond one level deep.
|
|
16
|
+
- Name classes after what they do, not what they extend (`UserRepository`, not `AbstractBaseUserImpl`).
|
|
17
|
+
- Tests inject fakes or stubs via constructor. No patching of globals or module internals.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check
|
|
3
|
+
allowed-tools: Bash, Read, Grep, Glob, Write, Agent
|
|
4
|
+
argument-hint: [verify | review]
|
|
5
|
+
description: "Run /check before merge to confirm a change is sound. Two modes: `/check verify` drives the real app and proves behavior against the spec (every acceptance criterion met, every specced surface built); `/check review` runs a senior code review on a different model than wrote the code. Verify after /develop, review before a PR. Writes findings to .istm-context/reviews/; never edits your code."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Output style (plain words, no dashes, no hyphens)
|
|
9
|
+
|
|
10
|
+
<!-- OUTPUT-STYLE:START -->
|
|
11
|
+
Write everything this skill produces, files and messages alike, in plain simple language. Keep technical terms that carry real meaning; explain each in plain words. Never use a dash or a hyphen as punctuation: no em dash, no en dash, and no hyphenated compounds. Write `read only`, not `read-only`. Say it in simple words, or reword the sentence. Code, file paths, command flags, and values other skills match on keep their hyphens. Use short sentences, commas, or parentheses. Clear beats clever.
|
|
12
|
+
<!-- OUTPUT-STYLE:END -->
|
|
13
|
+
|
|
14
|
+
## What this skill does
|
|
15
|
+
|
|
16
|
+
`/check` is the gate before merge. It confirms a change is sound in two different ways, run as two modes; they are separate jobs and you usually run both, verify first:
|
|
17
|
+
|
|
18
|
+
- **`verify`** (runtime proof): run the real app and watch the change behave. Proves the feature actually works and conforms to the spec (every acceptance criterion met, every specced surface built), which green tests never reveal. Read only on code, owns no durable files. Runs on the main thread. Typically after `/develop`.
|
|
19
|
+
- **`review`** (fresh model code review): a rigorous senior read of the diff, on a **different model than wrote the code**, because a model reviewing its own output shares its blind spots. Writes findings ranked by severity to `.istm-context/reviews/`. Read only on code. Typically before opening a PR.
|
|
20
|
+
|
|
21
|
+
Neither mode edits your code. `verify` points failures at `/debug` or `/develop`; `review` reports findings for the implementer to fix.
|
|
22
|
+
|
|
23
|
+
## Pick the mode (route before doing anything else)
|
|
24
|
+
|
|
25
|
+
This is the first step, always, before reading any mode file or touching the repo. Look at what followed `/check`:
|
|
26
|
+
|
|
27
|
+
- The argument **starts with `verify` (or `run`)** → runtime proof. Read `modes/verify.md` and follow it fully. Pass any remaining arguments (a feature name, a scope) through.
|
|
28
|
+
- The argument **starts with `review`** → code review. Read `modes/review.md` and follow it fully. Pass the review steering through unchanged (e.g. `/check review with opus`, `/check review uncommitted`).
|
|
29
|
+
- **No mode word, or anything ambiguous** (bare `/check`, or a feature name with no mode like `/check auth`) → do NOT guess and do NOT default to a mode. Show the two options as a plain text panel and **stop and wait** for the engineer to type their choice. This is the case that makes `/check` safe to type with nothing after it.
|
|
30
|
+
|
|
31
|
+
**How to present the choice (plain text, works on every agent, no interactive modal):**
|
|
32
|
+
|
|
33
|
+
Print exactly this, then stop and wait for the reply. Do not proceed, do not assume `verify`, until the engineer answers. Route on their typed word (`verify` / `review` / `both`).
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Which check do you want to run? Type one:
|
|
37
|
+
• verify run the real app and prove the change works against its spec (usually right after /develop)
|
|
38
|
+
• review a fresh model senior read of the diff, ranked findings (usually right before a PR)
|
|
39
|
+
• both verify first, then review
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Do not use an interactive picker or modal for this; it is a typed choice shown inline, so it behaves the same in every AI tool. (The `argument-hint` in this skill's frontmatter also surfaces `verify | review` in Claude Code's own autocomplete as you type, before submit; other tools ignore that field, which is why this inline panel is the portable path.)
|
|
43
|
+
|
|
44
|
+
If a feature name was passed with no mode (`/check auth`), carry it through as the target once the engineer picks the mode; still ask the mode.
|
|
45
|
+
|
|
46
|
+
Do not mix the two in one run. If the engineer types **both**, do `verify` first (confirm it works), and only then offer `review` as the next step.
|
|
47
|
+
|
|
48
|
+
## Portability (any OS, any agent)
|
|
49
|
+
|
|
50
|
+
Any Agent Skills client on macOS, Linux, or Windows. `git` is the only required CLI and behaves the same everywhere; other shell snippets are POSIX reference, not literal scripts, so use your agent's own cross platform file, process, and browser tools and apply branching logic yourself. Each mode file adds its own portability notes (browser/HTTP driving for `verify`, the cross model spawn and bundled file handling for `review`). No subagent support falls back to running the work inline, noted per mode.
|
|
51
|
+
|
|
52
|
+
Bundled files live in this skill's folder: `modes/verify.md`, `modes/review.md`, and (for review) `review-agent-prompt.md` and `review-guide.md`. Read only the mode file you routed to; the main agent resolves the review bundled files to absolute paths when it spawns the reviewer.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# OpenAI Codex adapter. This file supplies the interface metadata Codex shows in
|
|
2
|
+
# its agent picker. The skill's actual instructions live in ../SKILL.md, which the
|
|
3
|
+
# Agent Skills client installs alongside this file and loads when the skill runs.
|
|
4
|
+
interface:
|
|
5
|
+
display_name: "Check"
|
|
6
|
+
short_description: "Prove a change works, or review it, before merge"
|
|
7
|
+
default_prompt: "Run the check skill: read its SKILL.md, then pick a mode. Use verify to drive the real app and prove the change works, or review for a fresh-model code review of the diff."
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# /check review (fresh model code review)
|
|
2
|
+
|
|
3
|
+
The `review` mode of `/check`: a senior code review, before merge, on a different model than wrote the code. Follow it fully.
|
|
4
|
+
|
|
5
|
+
## What this skill does
|
|
6
|
+
|
|
7
|
+
Your role: the senior reviewer with fresh eyes, the one who didn't write the code. Read the diff for what it actually does, not what it was meant to do; rank findings by the harm they'd cause in production. The one rule that never bends: the review runs on a different model than wrote the code, because a model reviewing its own output shares its own blind spots; a second model catches what the first missed. Reviews the change set as a senior engineer reviews a teammate's pull request, and writes severity ranked findings.
|
|
8
|
+
|
|
9
|
+
- Different Claude model, automatically: the review runs in a subagent on the contrasting Claude model. No API keys, no external setup.
|
|
10
|
+
- Read only on code: produces findings, never edits the code under review.
|
|
11
|
+
- Want a different provider? For the most independent review, switch your active model (`/model`, or your other AI tool) and run the review there; a recommendation, not machinery. The skill never sends your code anywhere itself.
|
|
12
|
+
|
|
13
|
+
Owns review findings (`.istm-context/reviews/`). Does not write code, tests, specs, or the `.istm-context/agents.md`/`CLAUDE.md` context files.
|
|
14
|
+
|
|
15
|
+
## Asks vs acts
|
|
16
|
+
|
|
17
|
+
Acts, with one deliberate exception: it confirms which model wrote the code before reviewing (a single MCQ, with the detected value selected by default), because the model can't reliably detect itself and a wrong guess silently breaks the cross model guarantee (see Step 1). Everything else (scoping, reviewing, writing findings) it does without asking. It states which model is reviewing so you can still redirect, and pauses if there is nothing to review (clean tree, no branch diff). The confirm is skipped when you pass an explicit `with <model>` override and detection was unambiguous.
|
|
18
|
+
|
|
19
|
+
Steering: `/check review` (default contrasting model), `/check review with opus` (force a reviewer), or `/check review uncommitted` (scope to working tree changes only).
|
|
20
|
+
|
|
21
|
+
## Artifact ownership
|
|
22
|
+
|
|
23
|
+
`.istm-context/reviews/<YYYY-MM-DD>-<branch>.md`, created by this skill only. The subagent writes it; the main model relays a summary.
|
|
24
|
+
|
|
25
|
+
Artifact base: findings live under `docs/` by default. If `docs/` is a published docs site (`docusaurus.config.*`, `.vitepress/`, `mkdocs.yml`, Astro Starlight, or Nextra detected), use `.workflow/` instead (`.workflow/reviews/`). Always follow whichever base, `docs/` or `.workflow/`, already exists (paths here assume `docs/`).
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Portability (any OS, any agent)
|
|
30
|
+
|
|
31
|
+
Any Agent Skills client on macOS, Linux, or Windows:
|
|
32
|
+
- Commands: `git` is the only required CLI and behaves the same on every OS; run the `git` lines as shown. Other shell snippets are POSIX reference, not literal scripts: don't assume `find`, `grep`, `sed`, `cat`, `test`/`[ ]`, `ls`, `xargs`, or `for` exist. Use your agent's cross-platform file tools (read, search/glob, write) for those, and apply branching logic yourself rather than via shell `if`/variables/redirects.
|
|
33
|
+
- Bundled files: referenced by paths relative to this skill's folder. The main agent resolves the folder to an absolute path (it already resolves these relative paths, so it knows the folder) and passes absolute file paths in the subagent prompt; it must not read the bundled files' contents into the main context; the subagent reads them by path. Fallback: if your client's subagents cannot read files, read and inline the contents instead.
|
|
34
|
+
- No subagent support? The cross-model benefit then needs you to switch your active model (or open the diff in another assistant) and run the review there; otherwise run it inline, noting the reviewer shares the author model's blind spots.
|
|
35
|
+
|
|
36
|
+
## Execution
|
|
37
|
+
|
|
38
|
+
### 1. Determine the author model, then pick a DIFFERENT reviewer
|
|
39
|
+
|
|
40
|
+
Do not rely on self-introspection: the model executing this skill cannot reliably name itself, and the "You are powered by…" line in the system prompt is written at session start and goes stale the moment the user switches with `/model`. Detect from durable config, then confirm.
|
|
41
|
+
|
|
42
|
+
**1a: Detect the author model (best effort).** The author model is whatever is generating code in this session. Using your file tools, read `ANTHROPIC_MODEL` from the env if set, and check `.claude/settings.local.json`, `.claude/settings.json`, and the user-level `.claude/settings.json` in the home directory for a `"model"` value. Map ids to families: `claude-opus-*` → `opus`, `claude-sonnet-*` → `sonnet`, `claude-haiku-*` → `haiku`, `claude-fable-*` → `fable`. Use the system-prompt value only as a last-resort weak hint, possibly stale.
|
|
43
|
+
|
|
44
|
+
**1b: Confirm the author model (one question).** A wrong guess silently reviews code with the same model and defeats the skill, so confirm before spawning. Pre-select the detected family as the recommended option. Present via your agent's interactive option picker (`AskUserQuestion` on Claude Code), or as plain-text options with the same choices if it has none:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
"Which model wrote this code? I'll review on a different one."
|
|
48
|
+
header: "Author model"
|
|
49
|
+
options:
|
|
50
|
+
- label: "<detected> (detected, recommended)" # e.g. "opus (detected, recommended)"
|
|
51
|
+
description: "I'll review with <contrasting model> for a fresh perspective"
|
|
52
|
+
- label: "<next strong model>"
|
|
53
|
+
description: "Review will run on <its contrast>"
|
|
54
|
+
- label: "<another strong model>"
|
|
55
|
+
description: "Review will run on <its contrast>"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Skip the question only when detection was unambiguous and the user passed an explicit `with <model>` reviewer override (the override settles which model reviews). Otherwise ask.
|
|
59
|
+
|
|
60
|
+
**1c: Map to the contrasting Claude reviewer.** No API keys, no external setup; a subagent spawns a different-model reviewer and that model does the review:
|
|
61
|
+
|
|
62
|
+
| Author model | Reviewer model to spawn |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `opus` | `sonnet` |
|
|
65
|
+
| `sonnet` | `opus` |
|
|
66
|
+
| `fable` | `opus` |
|
|
67
|
+
| `haiku` | `sonnet` |
|
|
68
|
+
|
|
69
|
+
Rules:
|
|
70
|
+
- The reviewer must never be the same family as the author, the one invariant this skill exists to guarantee.
|
|
71
|
+
- Never review with `haiku`; review is high-value reasoning, use a strong model.
|
|
72
|
+
- If no differing strong model is available (an org `availableModels`/`enforceAvailableModels` restriction, or a client whose subagents inherit the parent's model, e.g. Antigravity's `invoke_subagent`, which runs on the parent model), fall back to the strongest available model that differs from the author. If none differs, run the review inline on the author's model and say so plainly: a degraded review that shares the author's blind spots, not the cross-model guarantee. When independence matters, prefer switching your active model (below) over accepting the same-model review.
|
|
73
|
+
- If the user passed `with <model>`: honor it only if it differs from the author. If they named the author's own model, refuse and explain: "That's the model that wrote the code. Reviewing with it shares its blind spots. Using `<contrast>` instead."
|
|
74
|
+
|
|
75
|
+
State the final choice plainly before spawning:
|
|
76
|
+
> "Author on `opus`; running the review on `sonnet`, a second model catches what the author model is blind to."
|
|
77
|
+
|
|
78
|
+
Want a different provider (GPT, Gemini)? Don't wire up API keys; switch your active model in your AI tool (`/model` for a different Claude, or open the change in your other assistant) and run the review there. The skill recommends this in its closing note for high-stakes changes; it never sends your code anywhere itself.
|
|
79
|
+
|
|
80
|
+
### 2. Scope the change set (cheap, names only, let the subagent read the diff)
|
|
81
|
+
|
|
82
|
+
Keep the main context lean: gather file names and the base ref only. The subagent runs the actual `git diff` and reads files. Choose a mode (apply the branching logic yourself, not via shell `if`/variables):
|
|
83
|
+
- Base branch `BASE`: `git rev-parse --verify main`; on success use `main`, otherwise `master`.
|
|
84
|
+
- Current branch `CUR`: `git rev-parse --abbrev-ref HEAD`.
|
|
85
|
+
- If `CUR` equals `BASE` (working directly on the base branch) → `MODE=uncommitted`. Gather changed names with `git diff --name-only HEAD` plus untracked files via `git ls-files --others --exclude-standard`.
|
|
86
|
+
- Otherwise (feature branch: review everything that differs from the base, the PR-equivalent) → `MODE=branch`. Resolve the merge base with `git merge-base "$BASE" HEAD`, then gather names with `git diff --name-only <merge-base>` (committed-since-branch + uncommitted) plus untracked files via `git ls-files --others --exclude-standard`.
|
|
87
|
+
|
|
88
|
+
If the user passed `uncommitted`, force `MODE=uncommitted` regardless of branch.
|
|
89
|
+
|
|
90
|
+
De-duplicate the file list. Exclude lock files and generated output (`dist/`, `build/`, `.next/`, `coverage/`) from the count, but the subagent still sees the full diff.
|
|
91
|
+
|
|
92
|
+
If the change set is empty: stop and tell the engineer there's nothing to review (make a change first, or point /check review at a branch). Do not spawn.
|
|
93
|
+
|
|
94
|
+
### 3. Gather lightweight pointers (do NOT read heavy files here)
|
|
95
|
+
|
|
96
|
+
Paths and cheap signals only; the subagent reads on demand. Using your file tools: list the 3 most-recent spec files under `.istm-context/specs/` (paths only), and resolve the test signal, one of three states, not a yes/no:
|
|
97
|
+
- `TESTS = configured`: `test-preferences.json` sets `"tool"` to a framework (a runner is set up). Judge test adequacy normally.
|
|
98
|
+
- `TESTS = none-by-design`: `test-preferences.json` has `"tool": null` and a `"gate"` (e.g. `"typecheck+verify"`), or the nearest `.istm-context/agents.md`/governing spec states a "no test runner" convention. Deliberate: the gate is typecheck + `/check verify`, not a suite.
|
|
99
|
+
- `TESTS = none-yet`: no `test-preferences.json` at all, and no stated convention. A genuine gap.
|
|
100
|
+
|
|
101
|
+
Pass to the subagent: project-context contents inline (read `.istm-context/agents.md`, canonical, or `CLAUDE.md` as fallback; short), the 3 recent spec paths, the base ref / merge-base, and the diff scope. The subagent reads a governing spec's **build-spec sections only** (`index.md`: Requirements, Decision, the design section, Consequences), the contract to review against; not `rationale.md` (decision history), unless a specific finding hinges on the reasoning. It runs `git diff` itself and reads the changed files and their tests.
|
|
102
|
+
|
|
103
|
+
### 4. Spawn the review subagent: on the contrasting Claude model
|
|
104
|
+
|
|
105
|
+
Resolve this skill's folder to an absolute path (you, the main agent, already resolve these relative paths, so you know the folder) and pass the absolute paths of two bundled files in the spawn prompt: `review-agent-prompt.md` (the spawn template) and `review-guide.md` (the rubric). Do not read their contents into the main context; the subagent's first action is to `Read` `review-agent-prompt.md` by path and follow it. Pass the dynamic values as a labeled list in the spawn prompt (`Placeholder values: ...`). Fallback: if your client's subagents cannot read files, read both files and inline their contents into a filled prompt instead (the old behavior). Then spawn:
|
|
106
|
+
|
|
107
|
+
- `model`: the reviewer model chosen in Step 1 (different family from the author)
|
|
108
|
+
- `description`: `"Review: <N> changed files on <reviewer-model>"`
|
|
109
|
+
- Tools: `Read`, `Bash`, `Grep`, `Glob`, `Write`, no `Edit` (the reviewer reports, it does not change code)
|
|
110
|
+
- `prompt`: the absolute path to `review-agent-prompt.md` (Read it first, then follow it), plus `Placeholder values:`, a labeled list supplying:
|
|
111
|
+
1. `REVIEW_GUIDE`: the absolute path to `review-guide.md` (the subagent reads it as its rubric)
|
|
112
|
+
2. Diff scope: `MODE`, `BASE`, `MERGE_BASE`, and the changed-file list with the exact `git diff` command to run
|
|
113
|
+
3. Project-context contents (inline), `.istm-context/agents.md` or `CLAUDE.md` fallback, the conventions the review must enforce
|
|
114
|
+
4. Recent spec paths (read if relevant), or inline the relevant spec text if your client gives subagents no file access
|
|
115
|
+
5. The test signal (`configured` / `none-by-design` / `none-yet`) so it judges test adequacy correctly; never nag for tests on a `none-by-design` project
|
|
116
|
+
6. Output path for findings: `.istm-context/reviews/<date>-<branch>.md`
|
|
117
|
+
|
|
118
|
+
### 5. Relay the result
|
|
119
|
+
|
|
120
|
+
If the subagent errored or wrote no findings file, report the failure and offer to re-run; don't relay an empty or fabricated review. Otherwise it writes the findings file and returns a compact summary. Relay:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
## /check review complete
|
|
124
|
+
|
|
125
|
+
**Reviewed by**: <reviewer-model> (you're on <author-model>)
|
|
126
|
+
**Scope**: <N> files, <branch vs base | uncommitted>
|
|
127
|
+
**Findings file**: `.istm-context/reviews/<date>-<branch>.md`
|
|
128
|
+
|
|
129
|
+
**Verdict**: <Approve | Approve with nits | Changes requested | Blocked>
|
|
130
|
+
|
|
131
|
+
**Blockers** (<count>):
|
|
132
|
+
- <file:line, one line each>
|
|
133
|
+
|
|
134
|
+
**Major** (<count>):
|
|
135
|
+
- <file:line, one line each>
|
|
136
|
+
|
|
137
|
+
**Minor / nits**: <count>, see the findings file
|
|
138
|
+
|
|
139
|
+
**Strengths**: <one or two genuine positives>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Show all blockers and majors in chat; collapse minors/nits to a count with a pointer to the file. If there are zero blockers and zero majors, lead with the verdict and keep it short.
|
|
143
|
+
|
|
144
|
+
For a high-stakes change (verdict was Blocked or Changes requested, or the change is high/critical severity), append one line:
|
|
145
|
+
> "For an independent second opinion from a different provider, switch your model with `/model` (or paste the diff into another assistant) and re-run /check review, no API keys needed."
|
|
146
|
+
|
|
147
|
+
**Tick the scope box (closing gate).** If the reviewed feature has a row in `.istm-context/scope/`, tick its `Review it` box (the review ran; the box marks that, not that it passed) and confirm it in the report: "Scope: ticked `Review it`." No matching row → say so ("no scope row matched `<feature>`, tick it manually or enroll it"). This is the only scope edit review makes; it writes no code, tests, or specs.
|
|
148
|
+
|
|
149
|
+
This skill is complete after relaying. It does not fix the findings (the implementer does that) and does not invoke other skills. If the engineer wants the issues fixed, that's a normal follow-up; /check review's job is the assessment.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Reference files (in this skill's folder; relative paths)
|
|
154
|
+
|
|
155
|
+
- `review-agent-prompt.md`: lean spawn template; the main model passes its absolute path in the spawn prompt and the subagent reads and follows it
|
|
156
|
+
- `review-guide.md`: rubric, severity, findings format. The main model passes its absolute path in the subagent prompt; the subagent reads it (inline its text only if your client's subagents cannot read files).
|