@soleur/opencode 3.405.11 → 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.11",
3
+ "version": "3.405.12",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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