session-orchestrator 4.1.0 → 5.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/.agents/skills/session-plan/SKILL.md +1 -1
- package/.agents/skills/session-start/SKILL.md +1 -1
- package/.agents/skills/ux-grill/SKILL.md +22 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +3 -2
- package/.codex-plugin/plugin.json +1 -1
- package/.codex-plugin/skills/session-plan/SKILL.md +1 -1
- package/.codex-plugin/skills/session-start/SKILL.md +1 -1
- package/.codex-plugin/skills/ux-grill/SKILL.md +21 -0
- package/.codex-plugin/skills/ux-grill/agents/openai.yaml +5 -0
- package/.cursor/commands/ux-grill.md +14 -0
- package/.cursor/skills/session-plan/SKILL.md +1 -1
- package/.cursor/skills/session-start/SKILL.md +1 -1
- package/.cursor/skills/ux-grill/SKILL.md +13 -0
- package/.cursor-plugin/plugin.json +1 -1
- package/AGENTS.md +2 -1
- package/CHANGELOG.md +128 -1
- package/README.md +98 -86
- package/agents/dialectic-deriver.md +11 -0
- package/agents/ux-evaluator.md +1 -1
- package/commands/close.md +3 -3
- package/commands/go.md +2 -0
- package/commands/memory-cleanup.md +4 -3
- package/commands/persona-panel.md +1 -1
- package/commands/session.md +3 -2
- package/commands/ux-grill.md +51 -0
- package/docs/README.md +4 -4
- package/docs/USER-GUIDE.md +117 -50
- package/docs/agent-authoring.md +2 -2
- package/docs/baseline.md +55 -1
- package/docs/ci-setup.md +1 -1
- package/docs/codex-setup.md +9 -0
- package/docs/components.md +9 -9
- package/docs/cursor-setup.md +1 -0
- package/docs/events-schema.md +13 -6
- package/docs/github-mirror-protection.md +61 -20
- package/docs/instruction-delivery.md +1 -1
- package/docs/memory-proposal-flow.md +3 -3
- package/docs/migration-v4.md +2 -2
- package/docs/migration-v5.md +62 -0
- package/docs/owner-config-schema.md +74 -90
- package/docs/persona-panel.md +4 -4
- package/docs/pi-setup.md +1 -0
- package/docs/rule-authoring.md +13 -6
- package/docs/scope-collision-guard.md +16 -0
- package/docs/session-config-reference.md +55 -22
- package/docs/session-config-template.md +9 -5
- package/docs/vault-docs-architecture.md +4 -2
- package/hooks/_lib/hook-import-set.json +70 -3
- package/hooks/_lib/lock-bootstrap.mjs +84 -1
- package/hooks/_lib/vcs-create-matcher.mjs +401 -16
- package/hooks/enforce-scope.mjs +201 -0
- package/hooks/hooks-codex.json +1 -1
- package/hooks/hooks-cursor.json +5 -0
- package/hooks/hooks.json +7 -2
- package/hooks/on-session-start.mjs +171 -49
- package/hooks/post-bash-issue-budget-refund.mjs +375 -0
- package/hooks/pre-auq-clarity.mjs +70 -18
- package/hooks/pre-bash-issue-budget.mjs +170 -26
- package/hooks/subagent-telemetry.mjs +106 -20
- package/package.json +5 -4
- package/pi/prompts/ux-grill.md +12 -0
- package/scripts/baseline-archetypes.mjs +28 -0
- package/scripts/ci/assert-vitest-green.mjs +4 -2
- package/scripts/dialectic-deriver.mjs +32 -8
- package/scripts/emit-session.mjs +72 -1
- package/scripts/lib/agent-status.mjs +441 -9
- package/scripts/lib/auq/schema.mjs +10 -3
- package/scripts/lib/auto-dialectic.mjs +0 -68
- package/scripts/lib/baseline-archetypes.mjs +439 -0
- package/scripts/lib/build-live-signals.mjs +5 -6
- package/scripts/lib/ci-status-banner.mjs +29 -6
- package/scripts/lib/claude-md-budget-lint.mjs +52 -2
- package/scripts/lib/config/issue-budget.mjs +68 -8
- package/scripts/lib/config/private-config-dir.mjs +3 -2
- package/scripts/lib/config/remote-hosts.mjs +2 -2
- package/scripts/lib/config-schema.mjs +79 -0
- package/scripts/lib/config.mjs +12 -1
- package/scripts/lib/eval/engine.mjs +7 -1
- package/scripts/lib/file-lock.mjs +151 -8
- package/scripts/lib/git-porcelain.mjs +113 -0
- package/scripts/lib/instruction-budget-guard.mjs +415 -47
- package/scripts/lib/io.mjs +29 -4
- package/scripts/lib/issue-budget-reconcile.mjs +392 -0
- package/scripts/lib/issue-budget.mjs +412 -9
- package/scripts/lib/learnings/evolve-telemetry.mjs +1 -2
- package/scripts/lib/learnings/sizing-subject.mjs +44 -0
- package/scripts/lib/locks/staging-fence-lock.mjs +19 -38
- package/scripts/lib/locks/state-md-lock.mjs +19 -41
- package/scripts/lib/maintenance-due-banner.mjs +450 -0
- package/scripts/lib/owner-config.example.yaml +29 -46
- package/scripts/lib/owner-yaml.mjs +14 -13
- package/scripts/lib/peer-cards/merger.mjs +143 -0
- package/scripts/lib/pre-dispatch-check.mjs +20 -14
- package/scripts/lib/project-hygiene.mjs +81 -30
- package/scripts/lib/quality-gate.mjs +27 -71
- package/scripts/lib/reconcile/engine.mjs +19 -1
- package/scripts/lib/reconcile/writer.mjs +278 -11
- package/scripts/lib/resource-probe/evaluate.mjs +19 -21
- package/scripts/lib/rules-sync.mjs +34 -4
- package/scripts/lib/scope-echo.mjs +346 -0
- package/scripts/lib/session-close-backfill.mjs +182 -40
- package/scripts/lib/session-end/phase-skip.mjs +85 -86
- package/scripts/lib/session-end/tail-runner.mjs +178 -0
- package/scripts/lib/session-lock.mjs +62 -2
- package/scripts/lib/session-record-repair.mjs +91 -0
- package/scripts/lib/session-schema/constants.mjs +6 -0
- package/scripts/lib/session-schema/filters.mjs +26 -1
- package/scripts/lib/session-schema/validator.mjs +20 -0
- package/scripts/lib/session-shape.mjs +558 -0
- package/scripts/lib/session-start-probes.mjs +429 -56
- package/scripts/lib/session-token-rollup.mjs +95 -10
- package/scripts/lib/state-md/frontmatter-mutators.mjs +22 -34
- package/scripts/lib/state-md.mjs +1 -0
- package/scripts/lib/subagents-schema.mjs +77 -9
- package/scripts/lib/telemetry/pricing.mjs +197 -0
- package/scripts/lib/telemetry/sync.mjs +50 -1
- package/scripts/lib/test-runner/artifact-paths.mjs +30 -5
- package/scripts/lib/test-runner/issue-reconcile.mjs +45 -8
- package/scripts/lib/tmux-layout/layouts.mjs +62 -4
- package/scripts/lib/ux-grill/collect.mjs +1163 -0
- package/scripts/lib/ux-grill/compare.mjs +285 -0
- package/scripts/lib/ux-grill/manifest.mjs +618 -0
- package/scripts/lib/ux-grill/measures.mjs +431 -0
- package/scripts/lib/ux-grill/paths.mjs +224 -0
- package/scripts/lib/ux-grill/pencil-coverage.mjs +284 -0
- package/scripts/lib/ux-grill/reconcile.mjs +344 -0
- package/scripts/lib/ux-grill/run-record.mjs +316 -0
- package/scripts/lib/ux-grill/schema.mjs +321 -0
- package/scripts/lib/validate/check-skill-script-paths.mjs +33 -10
- package/scripts/lib/validate/check-untracked-test-deps.mjs +33 -19
- package/scripts/lib/validate/check-unwired-features.mjs +56 -27
- package/scripts/lib/vault-mirror/process.mjs +2 -1
- package/scripts/lib/vault-status/board-lock.mjs +18 -0
- package/scripts/lib/vault-status/board-writer.mjs +8 -0
- package/scripts/lib/vault-status/narrative-mirror.mjs +4 -4
- package/scripts/lib/wave-resource-gate.mjs +23 -27
- package/scripts/lib/wave-sizing.mjs +10 -3
- package/scripts/materialize-wave-scope.mjs +68 -14
- package/scripts/mcp-server.sh +16 -1
- package/scripts/print-applicable-rules.mjs +7 -6
- package/scripts/print-learnings-index.mjs +3 -2
- package/scripts/release.mjs +7 -2
- package/scripts/session-shape.mjs +266 -0
- package/skills/_shared/config-reading.md +15 -9
- package/skills/_shared/private-capability-context.md +89 -0
- package/skills/bootstrap/SKILL.md +60 -209
- package/skills/bootstrap/_shared-template.md +99 -14
- package/skills/bootstrap/deep-template.md +36 -26
- package/skills/bootstrap/fast-template.md +44 -8
- package/skills/bootstrap/intensity-heuristic.md +10 -4
- package/skills/bootstrap/private-contract.md +119 -0
- package/skills/bootstrap/public-fallback.md +30 -18
- package/skills/bootstrap/references/bootstrap-ecosystem-health-flow.md +48 -0
- package/skills/bootstrap/references/bootstrap-refresh-lock-flow.md +37 -0
- package/skills/bootstrap/references/bootstrap-retroactive-flow.md +108 -0
- package/skills/bootstrap/references/bootstrap-rules-fetch-bridge.md +64 -0
- package/skills/bootstrap/standard-template.md +39 -24
- package/skills/claude-md-drift-check/SKILL.md +9 -2
- package/skills/claude-md-drift-check/checker.mjs +213 -21
- package/skills/discovery/SKILL.md +6 -173
- package/skills/discovery/probes/vault-staleness.mjs +35 -5
- package/skills/discovery/probes-docs.md +8 -4
- package/skills/discovery/probes-supply-chain.md +4 -2
- package/skills/discovery/probes-ui.md +8 -4
- package/skills/discovery/probes-vault.md +12 -4
- package/skills/discovery/references/discovery-interactive-triage.md +139 -0
- package/skills/discovery/references/discovery-triage-state.md +54 -0
- package/skills/docs-orchestrator/audience-mapping.md +1 -1
- package/skills/eval/rubric-v1.md +13 -0
- package/skills/evolve/SKILL.md +2 -458
- package/skills/evolve/references/evolve-analyze-mode.md +360 -0
- package/skills/evolve/references/evolve-dialectic-mode.md +139 -0
- package/skills/gitlab-ops/SKILL.md +3 -3
- package/skills/grill/SKILL.md +1 -1
- package/skills/memory-cleanup/SKILL.md +2 -2
- package/skills/plan/mode-new.md +9 -0
- package/skills/plan/mode-retro.md +4 -3
- package/skills/reconcile/SKILL.md +11 -1
- package/skills/session-end/SKILL.md +3 -2
- package/skills/session-end/drift-operations.md +20 -5
- package/skills/session-end/metrics-collection.md +1 -0
- package/skills/session-end/phase-3-2-docs-verification.md +1 -1
- package/skills/session-end/phase-3-6-tail.md +27 -67
- package/skills/session-end/phase-3-7a-recommendations.md +2 -2
- package/skills/session-end/references/phase-2-quality-gate.md +3 -3
- package/skills/session-end/references/phase-3-documentation-updates.md +8 -6
- package/skills/session-end/references/phase-5-issue-cleanup.md +32 -1
- package/skills/session-end/session-metrics-write.md +33 -12
- package/skills/session-plan/SKILL.md +46 -180
- package/skills/session-plan/references/session-plan-task-classification.md +152 -0
- package/skills/session-plan/wave-template.md +8 -15
- package/skills/session-start/SKILL.md +41 -7
- package/skills/session-start/phase-2-5-docs-planning.md +1 -1
- package/skills/session-start/phase-8-5-express-path.md +12 -9
- package/skills/session-start/references/operations-contract.md +114 -0
- package/skills/session-start/references/phase-1-5-session-continuity.md +2 -0
- package/skills/session-start/references/phase-4-ssot-environment-check.md +42 -24
- package/skills/session-start/references/phase-6-7-memory-banner-telemetry-consent.md +3 -1
- package/skills/session-start/soul.md +2 -2
- package/skills/test-runner/SKILL.md +1 -1
- package/skills/test-runner/rubric-v1.md +2 -2
- package/skills/tmux-layout/SKILL.md +3 -1
- package/skills/ux-grill/SKILL.md +211 -0
- package/skills/ux-grill/rubric-v2.md +201 -0
- package/skills/ux-grill/soul.md +76 -0
- package/skills/wave-executor/SKILL.md +32 -127
- package/skills/wave-executor/circuit-breaker.md +3 -1
- package/skills/wave-executor/references/wave-executor-quality-gate.md +61 -0
- package/skills/wave-executor/references/wave-executor-state-init.md +86 -0
- package/skills/wave-executor/references/wave-loop-dispatch.md +12 -2
- package/skills/wave-executor/references/wave-loop-review.md +19 -6
- package/skills/wave-executor/references/wave-loop-scope-manifest.md +6 -2
- package/templates/_shared/ux-manifest.template.md +149 -0
- package/templates/nextjs-minimal/package.json +1 -1
- package/templates/node-minimal/package.json +1 -1
- package/scripts/lib/multi-provider-build/providers.mjs +0 -64
- package/scripts/lib/multi-provider-build/templating.mjs +0 -130
- package/scripts/lib/owner-config/coerce.mjs +0 -29
- package/scripts/lib/owner-config/constants.mjs +0 -21
- package/scripts/lib/owner-config/defaults.mjs +0 -50
- package/scripts/lib/owner-config/error.mjs +0 -19
- package/scripts/lib/owner-config/index.mjs +0 -13
- package/scripts/lib/owner-config/merge.mjs +0 -52
- package/scripts/lib/owner-config/validate.mjs +0 -259
- package/scripts/lib/owner-config-loader.mjs +0 -170
- package/scripts/lib/owner-config.mjs +0 -28
- package/scripts/lib/soul-resolve.mjs +0 -130
- package/scripts/lib/vault-mirror/render.mjs +0 -8
- package/templates/_shared/journey-manifest.md +0 -114
|
@@ -21,10 +21,12 @@ if (!sources.includes('discovery')) { console.log('SKIPPED: supply-chain-slopche
|
|
|
21
21
|
"
|
|
22
22
|
|
|
23
23
|
# Step 2: Run the probe
|
|
24
|
-
|
|
24
|
+
# Probes live in the PLUGIN, not the project: ${PLUGIN_ROOT} is resolved per
|
|
25
|
+
# skills/_shared/config-reading.md. The probe still scans process.cwd() (project root).
|
|
26
|
+
test -f "${PLUGIN_ROOT}/skills/discovery/probes/supply-chain-slopcheck.mjs" || { echo "SKIPPED: supply-chain-slopcheck -- ${PLUGIN_ROOT}/skills/discovery/probes/supply-chain-slopcheck.mjs not found (PLUGIN_ROOT='${PLUGIN_ROOT}'; empty = unresolved, see skills/_shared/config-reading.md)"; exit 0; }
|
|
25
27
|
|
|
26
28
|
node --input-type=module -e "
|
|
27
|
-
import probe from '
|
|
29
|
+
import probe from '${PLUGIN_ROOT}/skills/discovery/probes/supply-chain-slopcheck.mjs';
|
|
28
30
|
const r = await probe({ repoRoot: process.cwd() });
|
|
29
31
|
for (const f of r.findings) {
|
|
30
32
|
console.log('FINDING:', JSON.stringify(f));
|
|
@@ -79,14 +79,18 @@ Value: <dimension if applicable>
|
|
|
79
79
|
|
|
80
80
|
### Probe: design-drift
|
|
81
81
|
|
|
82
|
+
> **Naming collision — unresolved (2026-09-11).** This probe, specified below, is agent-based: Pencil MCP tools, qualitative visual comparison, no fixed detection script. GitLab issue #1300 (`projects-baseline` design-first Pencil-token-contract epic, scope item B3-Wrapper) plans `skills/discovery/probes/design-drift.mjs` — a *second*, mechanical, git-only probe under the identical name `design-drift`, sourced from a staleness script in the sibling `projects-baseline` repo — and explicitly proposes replacing this section (lines 79–107 at the time of writing) with that new spec. Whether the two converge, take distinct names, or one supersedes the other is a naming/design decision for whoever implements #1300; it is not decided here. Resolve the name before writing any code against either contract.
|
|
83
|
+
|
|
82
84
|
**Activation:** Pencil MCP configured in Session Config (`pencil` path provided, e.g. `pencil: designs/app.pen`).
|
|
83
85
|
|
|
84
86
|
**Detection Method:**
|
|
85
87
|
|
|
86
88
|
Use Pencil MCP tools to compare design specifications against implementation:
|
|
87
|
-
1. `
|
|
88
|
-
2. `
|
|
89
|
-
3. `
|
|
89
|
+
1. `mcp__pencil__get_app_state` -- check current design file
|
|
90
|
+
2. `mcp__pencil__execute` with a Get visitor (depth 1 for top-level frames, depth 2 for their children) -- retrieve design node properties (colors, spacing, typography). Read the execute tool's input schema for the exact visitor shape; `.pen` files are encrypted, so never `Read`/`Grep` them.
|
|
91
|
+
3. `mcp__pencil__browser` -- view/capture design frames for visual comparison (no direct screenshot tool exists on the current surface)
|
|
92
|
+
|
|
93
|
+
Tool names have one definition in code: `PENCIL_TOOL_NAMES` in `scripts/lib/ux-grill/pencil-coverage.mjs`. The pre-2026 tool surface it replaced no longer exists (dead names enumerated in that module's JSDoc).
|
|
90
94
|
|
|
91
95
|
Compare against:
|
|
92
96
|
- CSS custom properties / design tokens in codebase
|
|
@@ -142,6 +146,6 @@ fpRisk: low | medium | high
|
|
|
142
146
|
|
|
143
147
|
**Default Severity:** Per-rule (high for the absolute-ban tells, low for advisory quality nits). `fpRisk` is reported so triage can weight high-FP rules (`ai-purple-gradient`) more skeptically.
|
|
144
148
|
|
|
145
|
-
> **Precision boundary (honest):** this regex tier cannot resolve CSS cascade, so `side-stripe-border` flags any ≥2px side accent even when the element is unrounded —
|
|
149
|
+
> **Precision boundary (honest):** this regex tier cannot resolve CSS cascade, so `side-stripe-border` flags any ≥2px side accent even when the element is unrounded — `rules/opt-in-stack/frontend.md` bans those (>1px accent), but a cascade-aware detector would narrow further. The heavier static-HTML + browser tiers are deliberately omitted (cost ≫ value for a probe/hook). See `scripts/lib/frontend-detect/rules.mjs`.
|
|
146
150
|
|
|
147
151
|
---
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
# Step 1: Verify the probe exists; skip if missing
|
|
13
|
-
|
|
13
|
+
# Probes live in the PLUGIN, not the project: ${PLUGIN_ROOT} is resolved per
|
|
14
|
+
# skills/_shared/config-reading.md. The probe still scans process.cwd() (project root).
|
|
15
|
+
test -f "${PLUGIN_ROOT}/skills/discovery/probes/vault-staleness.mjs" || { echo "SKIPPED: vault-staleness -- ${PLUGIN_ROOT}/skills/discovery/probes/vault-staleness.mjs not found (PLUGIN_ROOT='${PLUGIN_ROOT}'; empty = unresolved, see skills/_shared/config-reading.md)"; exit 0; }
|
|
14
16
|
|
|
15
17
|
# Step 2: Run the probe. It reads vault-integration.vault-dir from $CONFIG
|
|
16
18
|
# (passed from the discovery skill) and scans the vault.
|
|
17
19
|
node --input-type=module -e "
|
|
18
|
-
import {runProbe} from '
|
|
20
|
+
import {runProbe} from '${PLUGIN_ROOT}/skills/discovery/probes/vault-staleness.mjs';
|
|
19
21
|
const cfg = JSON.parse(process.env.SO_CONFIG || '{}');
|
|
20
22
|
const r = await runProbe(process.cwd(), cfg);
|
|
21
23
|
for (const f of r.findings) {
|
|
@@ -30,6 +32,10 @@ if (r.skipped_reason) console.log('SKIPPED:', r.skipped_reason);
|
|
|
30
32
|
|
|
31
33
|
**Default severity:** low (<7d delta), medium (≥7d delta). Missing frontmatter fields → low.
|
|
32
34
|
|
|
35
|
+
**Denominator:** staleness is `lastCommit - lastSync` — both read from the same `_overview.md` frontmatter — never `now - lastSync`. An overview without `lastCommit` falls back to the probe runtime (`basis: 'probe-runtime'` in the evidence, lower confidence).
|
|
36
|
+
|
|
37
|
+
**Passive skip (#1238):** a `01-projects/<slug>/` carrying a `_passive.md` marker is skipped BEFORE any staleness comparison — it is excluded from `scanned_projects` and counted instead in `metrics.passive_skipped` — the SAME key in the in-memory metrics and in the JSONL record — so the skip is visible rather than indistinguishable from a healthy project. The marker is checked before the `_overview.md` existence test, so a passive folder without an overview is counted too rather than falling into the silent non-project branch.
|
|
38
|
+
|
|
33
39
|
---
|
|
34
40
|
|
|
35
41
|
### Probe: vault-narrative-staleness
|
|
@@ -39,10 +45,12 @@ if (r.skipped_reason) console.log('SKIPPED:', r.skipped_reason);
|
|
|
39
45
|
**Detection Method:**
|
|
40
46
|
|
|
41
47
|
```bash
|
|
42
|
-
|
|
48
|
+
# Probes live in the PLUGIN, not the project: ${PLUGIN_ROOT} is resolved per
|
|
49
|
+
# skills/_shared/config-reading.md. The probe still scans process.cwd() (project root).
|
|
50
|
+
test -f "${PLUGIN_ROOT}/skills/discovery/probes/vault-narrative-staleness.mjs" || { echo "SKIPPED: vault-narrative-staleness -- ${PLUGIN_ROOT}/skills/discovery/probes/vault-narrative-staleness.mjs not found (PLUGIN_ROOT='${PLUGIN_ROOT}'; empty = unresolved, see skills/_shared/config-reading.md)"; exit 0; }
|
|
43
51
|
|
|
44
52
|
node --input-type=module -e "
|
|
45
|
-
import {runProbe} from '
|
|
53
|
+
import {runProbe} from '${PLUGIN_ROOT}/skills/discovery/probes/vault-narrative-staleness.mjs';
|
|
46
54
|
const cfg = JSON.parse(process.env.SO_CONFIG || '{}');
|
|
47
55
|
const r = await runProbe(process.cwd(), cfg);
|
|
48
56
|
for (const f of r.findings) {
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Discovery — Phase 5: Interactive Triage (Standalone Mode Only)
|
|
2
|
+
|
|
3
|
+
> Reference of the `discovery` skill, split out of `SKILL.md` (#1246). Body moved **byte-identical**; only this header is new.
|
|
4
|
+
> **Sibling-file paths inside this body are relative to the parent directory, not to `references/`**: `SKILL.md` → `../SKILL.md`. They were deliberately NOT rewritten, so the moved bytes stay verifiable against the pre-split file.
|
|
5
|
+
|
|
6
|
+
## Phase 5: Interactive Triage (Standalone Mode Only)
|
|
7
|
+
|
|
8
|
+
### 5.0 Load Triage State & Partition Findings
|
|
9
|
+
|
|
10
|
+
Before auto-defer and before presenting any findings for triage, load the persistent discovery triage state and filter findings through it:
|
|
11
|
+
|
|
12
|
+
1. Call `loadTriageState()` from `scripts/lib/discovery/triage-state.mjs` (uses default path `.orchestrator/metrics/discovery-triage.jsonl`). Returns an empty Map if the file does not exist — no error.
|
|
13
|
+
2. Call `filterFindings({ findings: verifiedFindings, stateMap })` to partition findings into three buckets:
|
|
14
|
+
- `toShow` — state is `open`, `reopened`, or **no prior state entry** (new findings — present for user triage)
|
|
15
|
+
- `suppressed` — state is `dismissed` or `accepted-as-known` (skip silently)
|
|
16
|
+
- `tracked` — state is `promoted-to-#NNN` (issue already filed; show as informational)
|
|
17
|
+
|
|
18
|
+
3. Emit a one-line state banner before the summary table:
|
|
19
|
+
```
|
|
20
|
+
Triage state: [N suppressed] suppressed (dismissed/accepted-as-known), [N tracked] tracked in existing issues. Presenting [N toShow] findings.
|
|
21
|
+
```
|
|
22
|
+
Omit the banner entirely if all three counts are zero (first run).
|
|
23
|
+
|
|
24
|
+
4. Render `tracked` findings as informational lines in the summary — NOT as interactive triage items:
|
|
25
|
+
```
|
|
26
|
+
[INFO] Finding "<title>" (<file_path>) is tracked in #<issue_id> — not re-triaged.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
5. Continue Phase 5 triage using only `toShow` findings. The `suppressed` bucket requires no user interaction.
|
|
30
|
+
|
|
31
|
+
6. After the user completes triage (Steps 1-4 below), append state changes to `.orchestrator/metrics/discovery-triage.jsonl` via `appendTriageEntry()` from `triage-state.mjs`:
|
|
32
|
+
- User selects "Create issue" → append `{ fingerprint, state: 'promoted-to-#<issue_id>', issue_id: <N>, timestamp, session_id }`
|
|
33
|
+
- User selects "Dismiss -- intentional" or "Dismiss -- false positive" → append `{ fingerprint, state: 'dismissed', user_decision: '<reason>', timestamp, session_id }`
|
|
34
|
+
- User selects "Accept all" for batch → append one `{ fingerprint, state: 'open', ... }` entry per finding (so they re-appear next run if not yet promoted)
|
|
35
|
+
|
|
36
|
+
### 5.1 Auto-Defer Low-Confidence Findings
|
|
37
|
+
|
|
38
|
+
Before presenting findings for triage, separate by confidence threshold:
|
|
39
|
+
|
|
40
|
+
1. Findings with confidence >= threshold → present for interactive triage (below)
|
|
41
|
+
2. Findings with confidence < threshold → auto-defer with summary:
|
|
42
|
+
"Auto-deferred [N] low-confidence findings (score < [threshold]). Review with `/discovery --include-deferred`."
|
|
43
|
+
3. List auto-deferred findings in a collapsed section (not interactive — informational only)
|
|
44
|
+
|
|
45
|
+
### 5.1 Present High-Confidence Findings
|
|
46
|
+
|
|
47
|
+
Present findings using AskUserQuestion -- NEVER plain text options. On Codex CLI where AskUserQuestion is unavailable, present as numbered Markdown lists.
|
|
48
|
+
|
|
49
|
+
Include confidence scores in the presentation:
|
|
50
|
+
```
|
|
51
|
+
[CRITICAL] (confidence: 85) hardcoded-values: API key found in src/config.ts:42
|
|
52
|
+
[HIGH] (confidence: 72) security-basics: eval() usage in src/utils/parser.ts:18
|
|
53
|
+
[MEDIUM] (confidence: 61) orphaned-annotations: TODO without issue in src/lib/auth.ts:55
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 1: Summary
|
|
57
|
+
|
|
58
|
+
Present a findings overview table:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
## Discovery Results
|
|
62
|
+
|
|
63
|
+
Probes run: [N] | Findings verified: [N] | False positives discarded: [N]
|
|
64
|
+
|
|
65
|
+
| Category | Critical | High | Medium | Low | Total |
|
|
66
|
+
|----------|----------|------|--------|-----|-------|
|
|
67
|
+
| Code | ... | ... | ... | ... | ... |
|
|
68
|
+
| Infra | ... | ... | ... | ... | ... |
|
|
69
|
+
| UI | ... | ... | ... | ... | ... |
|
|
70
|
+
| Arch | ... | ... | ... | ... | ... |
|
|
71
|
+
| Session | ... | ... | ... | ... | ... |
|
|
72
|
+
| Audit | ... | ... | ... | ... | ... |
|
|
73
|
+
| Vault | ... | ... | ... | ... | ... |
|
|
74
|
+
| Feature | ... | ... | ... | ... | ... |
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Step 2: Critical + High Findings -- Review Individually
|
|
78
|
+
|
|
79
|
+
For each Critical or High finding, use AskUserQuestion (on Codex CLI where AskUserQuestion is unavailable, present as numbered Markdown lists):
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
AskUserQuestion({
|
|
83
|
+
questions: [{
|
|
84
|
+
question: "<severity> finding in <file_path> — what should happen with it?",
|
|
85
|
+
header: "Finding",
|
|
86
|
+
options: [
|
|
87
|
+
{ label: "Create issue (<severity>)", description: "Files it as priority::<severity>, so it is tracked outside this session. The code below is copied into the issue body.",
|
|
88
|
+
preview: "<finding title>\n\n<file_path>:<line_number>\n```\n<matched_text with +/-3 lines context>\n```\n\n<description>\n\nRecommended fix: <recommended_fix>" },
|
|
89
|
+
{ label: "Adjust priority", description: "Same issue, a priority you pick — this question then comes back with the new label." },
|
|
90
|
+
{ label: "Dismiss -- intentional", description: "The code is deliberate. Nothing is filed, and the finding stays only in this run's report." },
|
|
91
|
+
{ label: "Dismiss -- false positive", description: "The probe misread the code. Nothing is filed; worth reporting if the same probe misfires again." }
|
|
92
|
+
],
|
|
93
|
+
multiSelect: false
|
|
94
|
+
}]
|
|
95
|
+
})
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
If user selects "Adjust priority", ask which priority with another AskUserQuestion. On Codex CLI where AskUserQuestion is unavailable, present as numbered Markdown lists.
|
|
99
|
+
|
|
100
|
+
### Step 3: Medium + Low Findings -- Review Batched
|
|
101
|
+
|
|
102
|
+
Group remaining findings by category. For each category with medium/low findings (on Codex CLI where AskUserQuestion is unavailable, present as numbered Markdown lists):
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
AskUserQuestion({
|
|
106
|
+
questions: [{
|
|
107
|
+
question: "Create issues for all [N] medium/low findings in [category]?",
|
|
108
|
+
header: "Findings",
|
|
109
|
+
options: [
|
|
110
|
+
{ label: "Accept all (Recommended)", description: "Medium and low findings are cheap to file and cheap to close. Cost: [N] issues, roughly one second apart.",
|
|
111
|
+
preview: "1. [title] -- [file_path]:[line] ([severity])\n2. [title] -- [file_path]:[line] ([severity])\n..." },
|
|
112
|
+
{ label: "Review individually", description: "One question per finding, same options as the critical ones. Cost: [N] more prompts." },
|
|
113
|
+
{ label: "Dismiss all", description: "Nothing is filed for this category. The findings stay in this run's report only." }
|
|
114
|
+
],
|
|
115
|
+
multiSelect: false
|
|
116
|
+
}]
|
|
117
|
+
})
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
If "Review individually" selected, walk through each like Step 2.
|
|
121
|
+
|
|
122
|
+
### Step 4: Batch Confirmation
|
|
123
|
+
|
|
124
|
+
Before creating any issues (on Codex CLI where AskUserQuestion is unavailable, present as numbered Markdown lists):
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
AskUserQuestion({
|
|
128
|
+
questions: [{
|
|
129
|
+
question: "Ready to create [N] issues?\n\n- [X] critical\n- [Y] high\n- [Z] medium\n- [W] low",
|
|
130
|
+
header: "Confirm",
|
|
131
|
+
options: [
|
|
132
|
+
{ label: "Create all [N] issues", description: "Proceed with issue creation" },
|
|
133
|
+
{ label: "Review list first", description: "Show full list before creating" },
|
|
134
|
+
{ label: "Cancel", description: "Do not create any issues" }
|
|
135
|
+
]
|
|
136
|
+
}]
|
|
137
|
+
})
|
|
138
|
+
```
|
|
139
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Discovery — Discovery Triage State (#419)
|
|
2
|
+
|
|
3
|
+
> Reference of the `discovery` skill, split out of `SKILL.md` (#1246). Body moved **byte-identical**; only this header is new.
|
|
4
|
+
> **Sibling-file paths inside this body are relative to the parent directory, not to `references/`**: `SKILL.md` → `../SKILL.md`. They were deliberately NOT rewritten, so the moved bytes stay verifiable against the pre-split file.
|
|
5
|
+
|
|
6
|
+
## Discovery Triage State (#419)
|
|
7
|
+
|
|
8
|
+
Persistent triage state prevents re-presenting the same finding on every `/discovery` run. State is stored in an append-only JSONL file and keyed by a stable fingerprint.
|
|
9
|
+
|
|
10
|
+
### State File
|
|
11
|
+
|
|
12
|
+
**Location:** `.orchestrator/metrics/discovery-triage.jsonl` (gitignored via `.orchestrator/metrics/*.jsonl` pattern — machine-local, never committed)
|
|
13
|
+
|
|
14
|
+
**Format:** One JSON object per line:
|
|
15
|
+
```json
|
|
16
|
+
{"fingerprint":"aabb1122ccdd3344","state":"dismissed","user_decision":"intentional — debug log","timestamp":"2026-05-17T10:00:00.000Z","session_id":"deep-2"}
|
|
17
|
+
{"fingerprint":"eeff5566aabb7788","state":"promoted-to-#119","issue_id":119,"timestamp":"2026-05-17T10:01:00.000Z","session_id":"deep-2"}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Fingerprint
|
|
21
|
+
|
|
22
|
+
`computeFingerprint({probe, file, severity, ruleId})` → 16-char hex (sha256 prefix).
|
|
23
|
+
|
|
24
|
+
`line_number` is **intentionally excluded** — it drifts on refactoring without the underlying issue changing. A finding is considered "the same" as long as the probe, file path, severity, and ruleId match.
|
|
25
|
+
|
|
26
|
+
### State Enum
|
|
27
|
+
|
|
28
|
+
| State | Meaning |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `open` | Actively needs triage or was explicitly marked for re-review |
|
|
31
|
+
| `dismissed` | User dismissed as intentional or false positive — suppressed on future runs |
|
|
32
|
+
| `accepted-as-known` | Known issue, accepted without creating a VCS issue — suppressed on future runs |
|
|
33
|
+
| `reopened` | Previously suppressed but re-surfaced by user decision — shown again |
|
|
34
|
+
| `promoted-to-#NNN` | VCS issue created; shown informational ("tracked in #NNN") on future runs |
|
|
35
|
+
|
|
36
|
+
### Re-run Semantics
|
|
37
|
+
|
|
38
|
+
On each `/discovery` run, Phase 5 loads the state file and partitions findings before presenting them:
|
|
39
|
+
|
|
40
|
+
- **New findings** (no fingerprint entry) → always shown
|
|
41
|
+
- **`open` or `reopened`** → shown for triage
|
|
42
|
+
- **`dismissed` or `accepted-as-known`** → suppressed (silent — no user interaction needed)
|
|
43
|
+
- **`promoted-to-#NNN`** → informational line only ("tracked in #NNN")
|
|
44
|
+
|
|
45
|
+
A suppressed finding re-appears only if its fingerprint changes — i.e., the probe, file path, severity, or ruleId changes. No TTL on dismissed state.
|
|
46
|
+
|
|
47
|
+
### Module
|
|
48
|
+
|
|
49
|
+
`scripts/lib/discovery/triage-state.mjs` — pure ESM, Node stdlib only. Exports:
|
|
50
|
+
- `computeFingerprint({probe, file, severity, ruleId}): string`
|
|
51
|
+
- `loadTriageState(stateFilePath?): Promise<Map<fingerprint, entry>>`
|
|
52
|
+
- `appendTriageEntry(stateFilePath, entry): Promise<void>`
|
|
53
|
+
- `filterFindings({findings, stateMap}): {toShow, suppressed, tracked}`
|
|
54
|
+
|
|
@@ -8,7 +8,7 @@ Rules for mapping session scope to target audiences, content sources, and docume
|
|
|
8
8
|
|
|
9
9
|
| Audience | Target files (globs) | Typical update triggers |
|
|
10
10
|
|----------|----------------------|-------------------------|
|
|
11
|
-
| User | `README.md`, `docs/user/**/*.md`, `docs/getting-started.md`, `examples/**/*.md` | new CLI command, breaking API change, install flow change, new user-facing feature, changed example output |
|
|
11
|
+
| User | `README.md`, `docs/user/**/*.md`, `docs/getting-started.md`, `examples/**/*.md` | new CLI command, breaking API change, install flow change, new user-facing feature, changed example output <!-- path-check: example --> |
|
|
12
12
|
| Dev | `CLAUDE.md` (or `AGENTS.md` on Codex CLI), `docs/dev/**/*.md`, `docs/adr/**/*.md` | architecture decision, major refactor, new module/subsystem, test coverage change, dependency upgrade, ADR-worthy choice |
|
|
13
13
|
| Vault/Ops | `<vault>/01-projects/<slug>/context.md`, `<vault>/01-projects/<slug>/decisions.md`, `<vault>/01-projects/<slug>/people.md` | project status change, ownership transition, stack/infra decision, cross-project dependency, migration, archival event |
|
|
14
14
|
|
package/skills/eval/rubric-v1.md
CHANGED
|
@@ -126,6 +126,19 @@ full-gate quality_gate events + `record.total_waves` / `record.waves`.
|
|
|
126
126
|
| `≥1` full-gate event in window; the **last by timestamp** has `exit_code === 0` | `pass` |
|
|
127
127
|
| `≥1` full-gate event in window; the **last by timestamp** has `exit_code !== 0` | `fail` |
|
|
128
128
|
|
|
129
|
+
Clarification, not a formula change: a record whose waves are **all**
|
|
130
|
+
coordinator-direct `Housekeeping` waves (the session-end writer rule since
|
|
131
|
+
#1321; predicate `isCoordinatorDirectHousekeeping` in
|
|
132
|
+
`scripts/lib/session-schema/filters.mjs`) counts as "no waves ran". The
|
|
133
|
+
decision keys on that wave shape only, never on `session_type`: a housekeeping
|
|
134
|
+
session that ran real waves stays `cannot-determine`. No record written before
|
|
135
|
+
#1321 has that shape. Measured 2026-09-12 on the working copy (the ledger is
|
|
136
|
+
gitignored, so no commit pins it): `jq -s
|
|
137
|
+
'[.[]|select((.waves|type)=="array" and (.waves|length)>0 and
|
|
138
|
+
all(.waves[]; .role=="Housekeeping" and .coordinator_direct==true))]|length'
|
|
139
|
+
.orchestrator/metrics/sessions.jsonl` → `0` of 427 records. So no historical
|
|
140
|
+
verdict changes, and `RUBRIC_VERSION` stays `rubric-v1`.
|
|
141
|
+
|
|
129
142
|
Scorer: `scoreGateHealth`. No `score` field.
|
|
130
143
|
|
|
131
144
|
### 4. `process-safety`
|