feat(orchestrator): close the loop on compound review findings#756
Merged
AlexMikhalev merged 30 commits intomainfrom Apr 4, 2026
Merged
feat(orchestrator): close the loop on compound review findings#756AlexMikhalev merged 30 commits intomainfrom
AlexMikhalev merged 30 commits intomainfrom
Conversation
…ence Refs #242 - New learning.rs module with LearningPersistence trait - InMemoryLearningPersistence for testing (7 tests pass) - DeviceStorageLearningPersistence using terraphim_persistence opendal Operator - SharedLearningStore high-level API with context file generation and JSONL import - Trust levels L0-L3 with auto-promotion on effective application - No direct rusqlite dependency; uses terraphim_persistence storage abstraction
Mobile-first custom Zola theme based on Proposal E design: - OKLCH colour scheme (deep void navy + warp blue) - Space Grotesk/Onest/JetBrains Mono typography - Canvas warp tunnel animation with scroll-driven speed - Responsive topbar nav with Terraphim logo branding - Homepage: hero, stats, capabilities, comparison, systems, roles, deploy, install CTA - Blog/docs: dark panel cards, prose styling, tags/categories pages - 2K display support (1800px+ breakpoint with scaled fonts) - Retains elasticlunr search, Google Analytics, Cloudflare Pages deploy - Old DeepThought templates preserved as .deepthought-bak files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sizes, remove AI-generated posts - Comparison table: fixed column widths (60/20/20), larger fonts, table-layout:fixed - Post cards: increased title/summary/meta/tag font sizes for readability - Prose: bumped base from 0.9rem to 1rem, with 2K scaling to 1.15rem - Removed 7 auto-generated blog posts (converted from dev sessions by AI agents) - Only genuine posts remain: "Announcing Terraphim AI" and "Teaching AI Coding Agents" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
opencode manages its own provider auth via ~/.config/opencode/opencode.json. It supports Kimi/Moonshot, Anthropic, MiniMax, etc. -- none of which use OPENAI_API_KEY. The validation gate was preventing all opencode agents from spawning on bigbox where no OpenAI key is configured. Refs #232
Notifications API rejected: no comment bodies, aggregates by issue, requires N extra API calls. Repo-wide comments API remains the choice.
…tion Align all section headings (overline, title, subtitle) to centre consistently across Core Capabilities, Comparison, Ship Systems, Roles, Deploy, and Install sections. Card content within grids remains left-aligned for readability. Replace single curl install command with 6-platform install grid covering macOS (Homebrew), Linux (curl), Cargo, NPM, Python (pip), and Windows (winget), with responsive layout (1-col mobile, 2-col tablet, 3-col desktop). Also increases TOC sidebar font size from 0.7rem to 0.8rem. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces per-issue comment polling with single repo-wide API call using Gitea's ?since= cursor parameter. Eliminates mention replay storm on restart. Changes: - MentionCursor: persistent cursor via terraphim_persistence (load_or_now) - MentionTracker: simplified to per-issue dispatch counter (no HashSet) - fetch_repo_comments: new GiteaTracker method for repo-wide comment API - IssueComment: added issue_number field for repo-wide comment parsing - MentionConfig: max_dispatches_per_tick (3), max_concurrent_mention_agents (5) - poll_mentions(): rewritten to use cursor, bounded concurrency - ManagedAgent: added spawned_by_mention flag for concurrency tracking Startup guard: on first run (no cursor), sets cursor=now to skip backlog. Backward compat: old watch_issues config still accepted but ignored. 12 tests pass (4 new cursor/tracker tests). Refs #186, closes #249
Gitea rejects timestamps with space-separated timezone offset. Use to_rfc3339_opts(Secs, true) to produce '2026-04-03T23:29:27Z' format.
fastest_op was picking dashmap (in-memory only), so cursor was never persisted across restarts. Use explicit sqlite operator lookup.
Gitea sends created_at as '2026-04-03T02:00:25+02:00' but since= parameter expects '2026-04-03T00:00:00Z'. advance_to() now converts all timestamps to UTC Z before storing.
Two fixes for overnight agent productivity:
1. Post-exit auto-commit: after any agent exits 0, orchestrator runs
git add -A && git commit to preserve working tree changes.
Previously agents wrote code but never committed it.
2. Compound review output parser: unwraps opencode JSON protocol
before parsing ReviewAgentOutput. opencode --format json wraps all
output as {type:text,part:{text:...}} which the parser couldn't
see. Also adds heuristic fallback to extract findings from
unstructured markdown reports (CVE mentions, CRITICAL keywords).
35 compound tests pass.
- Add gitea_issue, auto_file_issues, auto_remediate, remediation_agents to CompoundReviewConfig - Implement format_report() and actionable_findings() on CompoundReviewResult - Add create_issue() and search_issues_by_title() to GiteaTracker - Add post_raw() and tracker() methods to OutputPoster - Post structured compound review summary to Gitea after review completes - Auto-file Gitea issues for CRITICAL/HIGH findings with dedup - Spawn remediation agents for CRITICAL findings - Implement Default for CompoundReviewConfig Refs #242
…ata command parser - Add debug logging for compound review schedule diagnostics - Implement terraphim-automata based AdfCommandParser for @adf: mentions - Add manual trigger support via @adf:compound-review mention - Post compound review summary to Gitea issue after completion - Auto-file Gitea issues for CRITICAL/HIGH severity findings - Add remediation agent spawning for CRITICAL findings (disabled by default) - Deduplicate finding issues using search_issues_by_title - Add create_issue and search_issues_by_title to GiteaTracker - Add post_raw method to OutputPoster for arbitrary markdown posting Refs #242, #186
GiteaIssue (pub) exposed GiteaLabel (private) via its pub labels field, causing a private_interfaces lint failure with -D warnings in CI. Refs PR #756 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documents the Gitea API 422 fix, command collision bug discovery, and lessons learned from testing the compound review findings loop. Refs #186
- Rename `labels` to `_labels` in gitea.rs to suppress unused var warning - Apply cargo fmt to gitea_create_issue_test.rs - Add dev-dependencies for integration tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…gineering skills
14-agent fleet across Safety/Core/Growth layers, each with:
- Persona-specific knowledge graphs (50 markdown files in data/kg/)
- terraphim-agent shell pre-checks for domain context injection
- In-task search instructions for runtime KG queries
- V-model skill chains per agent layer
New files:
- data/kg/{vigil,ferrox,carthos,lux,echo,conduit,meridian,mneme}/*.md
- terraphim_server/default/persona_roles_config.json (8 persona roles)
Modified:
- orchestrator.example.toml: 3 -> 14 agents with full wiring
- config.rs: add role_config_path field to OrchestratorConfig
- Tests updated for 14-agent config
Refs #756
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The secret detection was scanning whole files, triggering false positives on pre-existing test fixture values like api_key = "..." in config.rs. Now scans only added lines from the staged diff. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Strip JSON syntax chars from issue titles and escape markdown in bodies. This fixes issue #276 where raw JSON was visible in the issue title.
Fix clippy failure in CI due to -D warnings treating dead code as error.
Fix clippy failure in CI due to -D warnings treating dead code as error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements automatic issue filing and remediation agent spawning for compound review findings.
Changes
GiteaTracker (terraphim_tracker)
create_issue()method for creating Gitea issues via APIsearch_issues_by_title()for deduplication before filingOutputPoster (terraphim_orchestrator)
post_raw()for posting arbitrary markdown to Giteatracker()accessor for underlying GiteaTrackerCompoundReviewConfig (terraphim_orchestrator)
gitea_issue: Target issue for posting review summariesauto_file_issues: Auto-file issues for CRITICAL/HIGH findingsauto_remediate: Spawn remediation agents for CRITICAL findingsremediation_agents: Map finding categories to agent namesCompoundReviewResult (terraphim_orchestrator)
format_report(): Structured markdown summary for Giteaactionable_findings(): Extract CRITICAL/HIGH severity findingsOrchestrator Integration
auto_remediate = trueTesting
auto_file_issues = trueConfiguration Example
Refs #242