architecture
Use when the user asks to improve architecture, find refactoring opportunities, surface deepening opportunities, consolidate tightly-coupled modules, or make a…
Use this skill when running systematic quality discovery and issue detection. Runs modular probes adapted to the project's tech stack, presents findings interactively for user triage, and creates VCS issues for confirmed problems. Invoked standalone via /discovery or embedded in
$ npx -y skills add Kanevry/session-orchestrator --skill discovery --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/discoveryContext preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when running systematic quality discovery and issue detection. Runs modular probes adapted to the project's tech stack, presents findings interactively for user triage, and creates VCS issues for confirmed problems. Invoked standalone via /discovery or embedded in
name: discovery user-invocable: false tags: [quality, discovery, probes, issues] model: sonnet model-preference: sonnet model-preference-codex: gpt-5.4-mini model-preference-cursor: claude-sonnet-4-6 description: > Use this skill when running systematic quality discovery and issue detection. Runs modular probes adapted to the project's tech stack, presents findings interactively for user triage, and creates VCS issues for confirmed problems. Invoked standalone via /discovery or embedded in session-end.
Two modes of operation:
<!-- scope-enum SSOT (#762): this line is the canonical token list; the wiring test derives SCOPE_TOKENS from it. Add/remove tokens HERE first, the test guards the other surfaces. --> The `scope` argument accepts: `all` (default), `code`, `infra`, `ui`, `arch`, `session`, `audit`, `vault`, `feature`, or comma-separated like `code,session`.
Read `skills/_shared/bootstrap-gate.md` and execute the gate check. If the gate is CLOSED, invoke `skills/bootstrap/SKILL.md` and wait for completion before proceeding. If the gate is OPEN, continue to Phase 1.
<HARD-GATE> Do NOT proceed past Phase 0 if GATE_CLOSED. There is no bypass. Refer to `skills/_shared/bootstrap-gate.md` for the full HARD-GATE constraints. </HARD-GATE>
Read and parse Session Config per `skills/_shared/config-reading.md`. Store result as `$CONFIG`.
Discovery-relevant fields (parse these specifically):
Detect the project's tech stack via marker file checks. Use Glob and run checks in parallel:
| Marker File(s) | Activates | |---------------------------------------|-------------------------| | `package.json` | JS/TS probes | | `tsconfig.json` | TypeScript probes | | `requirements.txt` / `pyproject.toml` | Python probes | | `Dockerfile` / `docker-compose.yml` | Container probes | | `vercel.json` / `.vercel/` | Vercel probes | | `.github/workflows/` | GitHub CI probes | | `.gitlab-ci.yml` | GitLab CI probes | | `supabase/` | Supabase probes | | `next.config.*` / `nuxt.config.*` | SSR probes | | `tailwind.config.*` | Tailwind probes | | Pencil in Session Config | design-drift probe | | `.orchestrator/bootstrap.lock` | harness-audit probe | | `.vault.yaml` OR Session Config `vault-integration.enabled: true` | vault probes | | `package.json` / `requirements.txt` / `Cargo.toml` **AND** Session Config `slopcheck.enabled: true` AND `slopcheck.sources` includes `"discovery"` | supply-chain probe (`skills/discovery/probes-supply-chain.md`) | | `docs/` directory present **AND** Session Config `docs-staleness.enabled: true` | docs-staleness probe (`skills/discovery/probes-docs.md`) | | `CLAUDE.md` (or `AGENTS.md` on Codex CLI) or `README.md` present in repo root | ssot-code-diff probe (`skills/discovery/probes-docs.md`) — always active within the docs category, no Session Config gate |
1. Start with all probes whose marker files are present 2. If `discovery-probes` is set in config, intersect with that list 3. If a `scope` argument was passed, restrict to that category 4. Remove probes whose activation conditions are not met
The audit probe activates when `bootstrap.lock` is present OR when `discovery-probes` config explicitly lists `audit`.
The vault probe activates when `.vault.yaml` is present in the repo root OR when `vault-integration.enabled: true` in Session Config OR when `discovery-probes` config explicitly lists `vault`.
The feature probe activates ONLY when the scope argument includes `feature` OR when `discovery-probes` config explicitly lists `feature`. It never activates under bare `all` — feature discovery is an explicitly requested scan, and its interactive router (below) cannot run in embedded mode.
Default exclude paths (always apply):
Add any paths from `discovery-exclude-paths` in Session Config.
> **VCS Reference:** Detect the VCS platform per the "VCS Auto-Detection" section of the gitlab-ops skill.
Report: "Discovery: [N] probes active across [categories]. Stack: [detected]. Threshold: [severity]."
Fires ONLY when the active scope set includes `feature` AND the skill is running standalone (coordinator context). In embedded mode (session-end dispatches discovery as an Explore subagent — AskUserQuestion is unavailable in subagents per `.claude/rules/ask-via-tool.md` AUQ-004), the router MUST NOT fire; proceed directly with the grounded scan as the non-interactive default.
Judgment-based PM work (opportunity framing, personas, market-sizing) deliberately stays OUT of the verified-findings pipeline (Epic #750) — this router is the fork point that keeps grounded, evidence-anchored discovery separate from open-ended product judgment.
When the gate above is satisfied, present exactly this AskUserQuestion (AUQ-003 shape) before proceeding to Phase 3:
AskUserQuestion({
questions: [{
question: "Scope `feature` was requested. How shouldGive your agents a working rhythm. You type three commands: /session reads your repository, your open issues and the last session, proposes what to work on, and waits for your correction.
Repo: Kanevry/session-orchestrator
Use when the user asks to improve architecture, find refactoring opportunities, surface deepening opportunities, consolidate tightly-coupled modules, or make a…
Use this skill when running an autonomous session-orchestration loop. Chains session-start → session-plan → wave-executor → session-end for N iterations with…
Use this skill when scaffolding the minimum repository structure required by session-orchestrator. Invoked automatically by the Bootstrap Gate when CLAUDE.md,…
Use when you have a feature idea but the scope or UX is still ambiguous — runs a lightweight Socratic design dialogue (3-5 AUQ rounds) and writes a spec…
Use when detecting drift between CLAUDE.md (or AGENTS.md, the Codex CLI alias) / _meta narrative and live repository state. Ten checks: absolute-path…
Monitor iterative improvement loops for convergence. Three signals — shrinking diff, pass-rate plateau, velocity — drive a Stop/Continue/Investigate decision…