@soleur/opencode 3.405.10 → 3.405.12

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "plugin": "soleur",
4
- "count": 68,
4
+ "count": 69,
5
5
  "agents": [
6
6
  {
7
7
  "id": "soleur:engineering:cto",
@@ -94,6 +94,13 @@
94
94
  "description": "Use this agent when you need to research a repository's structure, documentation, and patterns -- architecture files, GitHub issues, contribution guidelines, and implementation patterns. Unlike soleur:engineering:research:git-history-analyzer (commit history), this agent examines repo structure, docs, issues, and templates.",
95
95
  "model": "haiku"
96
96
  },
97
+ {
98
+ "id": "soleur:engineering:research:session-retrospective-analyst",
99
+ "path": "agents/engineering/research/session-retrospective-analyst.md",
100
+ "name": "session-retrospective-analyst",
101
+ "description": "Fresh-context analyst that reads a session transcript and run-health ledger to produce improvement proposals. Use soleur:engineering:research:repo-research-analyst for repo structure research; use this agent for session forensics.",
102
+ "model": "haiku"
103
+ },
97
104
  {
98
105
  "id": "soleur:engineering:review:agent-native-reviewer",
99
106
  "path": "agents/engineering/review/agent-native-reviewer.md",
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: session-retrospective-analyst
3
+ description: Fresh-context analyst that reads a session transcript and run-health ledger to produce improvement proposals. Use soleur:engineering:research:repo-research-analyst for repo structure research; use this agent for session forensics.
4
+ model: haiku
5
+ ---
6
+
7
+ # Session Retrospective Analyst
8
+
9
+ You are a fresh-context analyst. You receive only a transcript path and a framing note — no conversation history. Analyze the session transcript and run-health ledger, then produce improvement proposals.
10
+
11
+ ## Inputs
12
+
13
+ - Transcript path (raw session transcript)
14
+ - Framing note (what to focus on)
15
+ - Optional: run-health artifact path (`run_health.json` + `phase_prompts/`)
16
+
17
+ ## Process
18
+
19
+ 1. Read the transcript and run-health ledger.
20
+ 2. Triage: determine whether deep analysis is warranted (errors, operator corrections, tool failures, abandoned approaches, long duration).
21
+ 3. If triaged, correlate prompts to failures and produce proposals.
22
+
23
+ ## Output
24
+
25
+ Return a structured assessment:
26
+
27
+ - **Triage verdict:** warranted / not warranted (with signals)
28
+ - **Proposals:** list of pending-operator review items (workflow/agent/skill improvements, new-component issues, learnings, glossary, tests)
29
+ - **Confidence:** low/medium/high
30
+
31
+ ## Constraints
32
+
33
+ - Never auto-apply proposals.
34
+ - Proposals must be scrubbed by the redaction gate before persistence.
35
+ - New components are filed as `forensics-proposal`-labeled issues, not scaffolded in-session.
36
+ - True fresh context: do not assume prior conversation state.
@@ -13,7 +13,7 @@ import { readFileSync } from "fs";
13
13
  export const PLUGIN_ROOT = resolve(import.meta.dir, "..");
14
14
 
15
15
  /** Load-bearing agent count for Grok inspect / Phase F CI contract tests. */
16
- export const EXPECTED_SOLEUR_AGENT_COUNT = 68;
16
+ export const EXPECTED_SOLEUR_AGENT_COUNT = 69;
17
17
 
18
18
  /** Relative path from repo root to the committed agents manifest. */
19
19
  export const AGENTS_MANIFEST_PATH = "plugins/soleur/.claude-plugin/agents.manifest.json";
@@ -0,0 +1,10 @@
1
+ ---
2
+ mode: subagent
3
+ description: "Fresh-context analyst that reads a session transcript and run-health ledger to produce improvement proposals. Use soleur:engineering:research:repo-research-analyst for repo structure research; use this agent for session forensics."
4
+ ---
5
+
6
+ Stub for the canonical agent `soleur:engineering:research:session-retrospective-analyst`. OpenCode derives an agent's id from this
7
+ file's path, so the canonical `name:` frontmatter is deliberately not repeated here.
8
+
9
+ Read and follow the canonical agent definition at `__SOLEUR_PLUGIN_ROOT__/agents/engineering/research/session-retrospective-analyst.md`,
10
+ then work as that agent.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleur/opencode",
3
- "version": "3.405.10",
3
+ "version": "3.405.12",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -369,3 +369,4 @@ NEVER CODE! Just research and write the plan.
369
369
  - **A plan that proposes a flag or argv as an implementation lever on a repo script must read the script's actual argv first — "the flag that should exist" is a capability claim verified against the parser, not inferred from the suite's shape.** Grep the script's argument handling (`--only`, `getopts`, the `usage`/help text) or run `--help`; it settles in seconds what a wrong claim costs a ruling cycle to catch. **Why:** #12626 — the plan prescribed a `--rows` row-splitting lever on `approval-guard1-mutation`; the battery's argv is `[--only|--list|--check-anchors]`, and only the batched CTO ruling caught it. See `knowledge-base/project/learnings/2026-11-11-a-completed-but-failing-leg-filed-as-did-not-complete.md` SE#4.
370
370
  - **A plan that pins a Terraform forget (`removed { destroy = false }`) must state the property in the provider's DELETE key (an email, a name) and pin a CLOSED SET over every file Terraform would load — every tracked `.tf`/`.tf.json` in the repo, minus dotfiles Terraform ignores, with heredocs found by a raw scan — never a search for the bad label or literal.** When the property is "no managed resource of type T", the set is the allowed occurrences of the type token (only the forget's `from` line); when other instances of T stay managed, enumerate the allowed addresses instead. Reuse the `FIX B handed` describe in `plugins/soleur/test/terraform-target-parity.test.ts` and its mirror, Guard G4a in `tests/scripts/test-infra-privileged-tier-census.sh`, rather than rebuilding the scan from prose. Labels miss `import`, `local.`/`var.` values, case, unquoted labels, modules and other roots; and a second guard that shares the first one's file reader and string stripper shares its blind spots. **Why:** #12813 — a dotfile `.tf` and a quote-confused heredoc each kept the test and that census guard green while Terraform planned a DELETE of the sole Better Stack Admin. See `knowledge-base/project/learnings/2026-11-16-my-forget-pin-checked-labels-while-the-provider-deletes-by-email.md`.
371
371
  - **A plan that adds a rule to a gate which reads text another interpreter will expand (a Bash PreToolUse hook, a CI shell lint) must list that interpreter's whole expansion and quoting set first, and close each class in one place rather than deny-listing spellings.** For bash: brace, tilde, parameter/`$[…]`, command, process substitution, pathname/extglob, backslash and `$'…'` quoting, and the target tool's own argv parsing (git long-option prefixes, commit pathspecs). Brief the first fix-round security seat to sweep that whole list, not to find one more instance. **Why:** #12806 — seven fix rounds each found the next form the cron hook read differently from bash; see `knowledge-base/project/learnings/2026-11-16-seven-fix-rounds-each-found-the-next-bash-expansion-the-hook-read-differently.md`.
372
+ - **An acceptance criterion that says "additions only" / "no `-` line" must be checked against every edit the plan itself prescribes in that file: an in-cell table append or an in-field frontmatter change is a one-line rewrite, so `git diff` shows a `-` line and the AC is unsatisfiable as written.** Write the carve-out into the AC by naming each rewritten line's content anchor (the table row's first cells, the frontmatter key), with the exact grep that drops only those lines, e.g. `git diff -U0 origin/main...HEAD -- <file> | grep -E '^-' | grep -vE '^--- (a/|/dev/null)' | grep -vF '<row anchor>'` printing nothing. Do not state it as "the `-` line is a prefix of its `+` line": a table row's closing pipe (space then `|`) and a replaced frontmatter value both break that. Do not match `^-[^-]` either: it misses a deleted `- item` line, which the diff shows as `-- item`. **Why:** #12742/PR #12884 — AC7 forbade any `-` line while Phase 4 step 2 prescribed an in-cell append to the runbook's #10538 row; the task was ticked anyway and review flagged it. See `knowledge-base/project/learnings/2026-11-18-an-ac-that-contradicts-the-prescribed-edit.md`.
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: session-retrospective-compound
3
+ description: This skill should be used when running session-end retrospectives that analyze transcripts and produce improvement proposals.
4
+ ---
5
+
6
+ <!-- grok-harness-invoke:start -->
7
+ **Grok Build (`plugins/soleur/lib/harness.ts` `invokeSkill()`):** Read this SKILL.md in this process and run it to completion. A one-segment `soleur:<name>` in this document names a SKILL — on Grok Build, Read `plugins/soleur/skills/<name>/SKILL.md` in this process; it is not a nested tool_use. A multi-segment id such as `soleur:<domain>:<name>` names an AGENT: spawn it, never Read it, and on Grok Build spawn_subagent takes the id with its colons replaced by hyphens (`agentIdToGrokSubagentType`). **Claude Code:** Skill tool for a skill (`soleur:<name>`), Task tool with `subagent_type` for an agent. Forbidden is executing a subset, not the Read.
8
+ <!-- grok-harness-invoke:end -->
9
+
10
+ # Skill: session-retrospective-compound
11
+
12
+ Session-end retrospective that mines a session transcript via a **fresh-context agent** and emits improvement proposals as pending-operator review items. Never auto-applies, including under `--headless`.
13
+
14
+ ## Trigger (tiered, cross-harness)
15
+
16
+ - **Claude Code:** Stop hook (`hooks/stop-hook.sh`) auto-fires at true session end (Phase 2).
17
+ - **All harnesses:** Pipeline skills invoke as their final step.
18
+ - **All harnesses:** Manual invocation (`soleur:session-retrospective-compound`) anytime.
19
+
20
+ ## Input & cost control
21
+
22
+ - **Two-tier trigger:** cheap triage agent (standard tier) decides whether deep analysis is warranted (errors, operator corrections, tool failures, abandoned approaches, long duration). Deep forensic analysis runs only if triage flags value.
23
+ - **Input:** Raw transcript for maximum signal fidelity (executing agents already saw the same data).
24
+ - **Output:** Scrubbed by a fail-closed redaction gate before persistence (raw in, scrubbed out).
25
+
26
+ ## Phased delivery
27
+
28
+ - **Phase 1:** Degraded-run forensics — fresh-context agent + run-health ledger + pending-operator proposals on errored runs.
29
+ - **Phase 2:** Broader session-mining — every session end, raw transcript, workflow/agent/skill proposals + new-component issues + learnings/glossary/tests.
30
+
31
+ ## Execution Flow
32
+
33
+ ### Phase 0: Setup
34
+
35
+ Load `CLAUDE.md` if present. Verify a usable git repo. Determine harness (Claude Code / OpenCode / Devin / Grok).
36
+
37
+ ### Phase 1: Triage
38
+
39
+ Spawn the fresh-context analyst (`engineering/research/session-retrospective-analyst`) with only the transcript path + framing note. No conversation history. The analyst runs cheap triage and returns whether deep analysis is warranted plus any flagged signals.
40
+
41
+ ### Phase 2: Deep analysis (only if triaged)
42
+
43
+ If triage flags value, spawn deep analysis. Produce proposals:
44
+
45
+ 1. Workflow/agent/skill improvement proposals — pending-operator review items (heal-skill approve-before-apply contract).
46
+ 2. New-component proposals — filed as GitHub issues labeled `forensics-proposal`.
47
+ 3. Learning captures — compound-style institutional knowledge.
48
+ 4. Glossary entries — via kb-glossary.
49
+ 5. Test additions — for failures that lacked tests.
50
+
51
+ ### Phase 3: Redaction gate (fail-closed)
52
+
53
+ Run [scripts/retrospective-redact.sh](./scripts/retrospective-redact.sh) on all proposal text before persistence. If scrub fails, block persistence and report. Never auto-apply, including under `--headless`.
54
+
55
+ ### Phase 4: Surface
56
+
57
+ Surface pending-operator review items. In cloud mode, run inline with `Reviewed-Coverage: sequential-fallback` disclosure.
58
+
59
+ ## Non-Goals
60
+
61
+ - Auto-application of any proposal
62
+ - In-session scaffolding of new agents/skills
63
+ - Real-time session-end firing on non-Claude-Code harnesses (Phase 1: pipeline final-step + manual only)
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ # Fail-closed redaction gate for retrospective proposal output.
3
+ # Usage: retrospective-redact.sh <input-file> [output-file]
4
+ # Exit 0 = clean (scrubbed output written), non-zero = fail (no output written).
5
+ set -euo pipefail
6
+
7
+ INPUT="${1:-}"
8
+ OUTPUT="${2:-}"
9
+
10
+ if [[ -z "$INPUT" || ! -f "$INPUT" ]]; then
11
+ echo "retrospective-redact: input file required" >&2
12
+ exit 2
13
+ fi
14
+
15
+ # gitleaks-shaped patterns (subset). Add new patterns here.
16
+ PATTERNS=(
17
+ 'dp\.(pt|st|sa|ct)\.[A-Za-z0-9]+'
18
+ 'sk-[A-Za-z0-9]{20,}'
19
+ 'whsec_[A-Za-z0-9]+'
20
+ 'sbp_[A-Za-z0-9]+'
21
+ 'postgres://[^[:space:]]*:[^[:space:]@]*@'
22
+ 'sk-soleur-[A-Za-z0-9]+'
23
+ )
24
+
25
+ TMP="$(mktemp)"
26
+ trap 'rm -f "$TMP"' EXIT
27
+ cp "$INPUT" "$TMP"
28
+
29
+ for p in "${PATTERNS[@]}"; do
30
+ if grep -Eq "$p" "$TMP"; then
31
+ # attempt redaction
32
+ sed -i -E "s/$p/[REDACTED]/g" "$TMP"
33
+ fi
34
+ done
35
+
36
+ # Post-scrub verification: if any pattern still matches, fail closed.
37
+ for p in "${PATTERNS[@]}"; do
38
+ if grep -Eq "$p" "$TMP"; then
39
+ rm -f "$TMP"
40
+ echo "retrospective-redact: scrub failed (pattern: $p)" >&2
41
+ exit 1
42
+ fi
43
+ done
44
+
45
+ if [[ -n "$OUTPUT" ]]; then
46
+ mv "$TMP" "$OUTPUT"
47
+ else
48
+ cat "$TMP"
49
+ rm -f "$TMP"
50
+ fi
51
+ exit 0