Skip to content

feat(ce-work,ce-security-audit): add ruflo integration and trajectory capture#774

Draft
rtorino wants to merge 9 commits intoEveryInc:mainfrom
rtorino:feat/ruflo-integration-enhancements
Draft

feat(ce-work,ce-security-audit): add ruflo integration and trajectory capture#774
rtorino wants to merge 9 commits intoEveryInc:mainfrom
rtorino:feat/ruflo-integration-enhancements

Conversation

@rtorino
Copy link
Copy Markdown

@rtorino rtorino commented May 5, 2026

Summary

  • Add optional ruflo-agentdb memory integration for semantic session recall (graceful fallback to SESSION_STATE.md when ruflo isn't installed)
  • Add CE-native trajectory capture for documenting non-obvious execution paths as human-readable markdown in docs/solutions/
  • Add 6-signal model selection scoring table to subagent templates for confidence-based Haiku/Sonnet/Opus routing
  • Add optional ruflo CVE scanning step to /ce-security-audit (skipped when ruflo isn't installed)

Changes

File Type What
skills/ce-work/references/ruflo-memory-integration.md New Optional agentdb integration — semantic recall + task completion storage
skills/ce-work/references/trajectory-capture.md New CE-native execution trajectory capture as markdown
skills/ce-work/references/subagent-templates.md Modified (+15) Model selection scoring table
skills/ce-security-audit/SKILL.md Modified (+8) Optional ruflo CVE scanning step
skills/ce-work/SKILL.md Modified (+3) Phase 0 ruflo check + Phase 3-4 trajectory prompt

Design decisions

  • Zero hard dependencies on ruflo — every ruflo feature checks tool availability first, skips gracefully
  • Structural isolation — new reference docs over inline SKILL.md changes, preserving upstream mergeability
  • Trajectory capture is CE-native — writes to docs/solutions/ as markdown searchable by ce-learnings-researcher, no ruflo needed

Test plan

  • Run bun test — 1252 tests pass (verified)
  • Test /ce-work with SESSION_STATE.md present, ruflo NOT installed — should resume from state, skip ruflo silently
  • Test /ce-work with ruflo-agentdb installed — should query agentdb for related past patterns after session state check
  • Test /ce-security-audit diff without ruflo — should run CE agents, skip CVE step
  • Test /ce-security-audit diff with ruflo — should run CE agents + ruflo CVE scan, merge findings
  • Test subagent dispatch on multi-unit plan — model tier should vary based on scoring signals
  • Test trajectory capture after shipping non-routine work — should prompt to write trajectory doc

🤖 Generated with Claude Code

Raymond Torino and others added 9 commits April 21, 2026 11:58
Enhance CE with Superpowers' behavioral enforcement patterns:

- TDD guardrails: rationalization rebuttals, red-flag detection, delete-and-restart rule
- Testing anti-patterns: 5 named anti-patterns with iron laws
- Verification discipline: per-message freshness, claim-to-evidence mapping, linguistic red flags
- Subagent templates: implementer prompt, status vocabulary (DONE/DONE_WITH_CONCERNS/NEEDS_CONTEXT/BLOCKED), escalation decision trees, model-tier routing
- Spec-compliance reviewer: per-task distrust-based review agent
- Code-quality per-task reviewer: per-task quality check agent
- ce-work: wire reference docs and per-task review pipeline into subagent flow
- ce-debug: add revert-and-verify-failure step for regression tests

All enhancements are additive reference docs and agent files with minimal
insertions into ce-work and ce-debug, preserving upstream merge compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Session state persistence:
- Add session-state.md reference doc for SESSION_STATE.md format and behavior
- Wire session state read (Phase 1 step 0) and write (task completion) into ce-work

Security audit:
- Add STRIDE threat modeling sections to ce-security-sentinel.agent.md
- Create /ce-security-audit skill as thin wrapper dispatching existing security agents

Browser QA:
- Add single-spa-guide.md reference for mount detection, auth flow, WebSocket patterns
- Add element-ui-selectors.md reference for teleported component interaction patterns
- Wire framework-specific guide loading into ce-test-browser

Also removes Phase 1 test output files (test-output/).
Session state check was in Phase 1 step 0, which only runs when a plan
file is provided. Moving to Phase 0 ensures it runs for bare prompts
and empty invocations too — any /ce-work session should offer to resume.
# Conflicts:
#	plugins/compound-engineering/agents/code-quality-per-task-reviewer.md
#	plugins/compound-engineering/agents/spec-compliance-reviewer.md
#	plugins/compound-engineering/skills/ce-work/SKILL.md
… capture

Ruflo memory integration (optional):
- Add ruflo-memory-integration.md reference for optional agentdb semantic
  session recall with graceful fallback to SESSION_STATE.md
- Wire Phase 0 ruflo enrichment check into ce-work SKILL.md

Trajectory capture (CE-native):
- Add trajectory-capture.md reference for capturing non-obvious execution
  paths as human-readable markdown in docs/solutions/
- Wire Phase 3-4 trajectory capture prompt into ce-work SKILL.md

Model selection scoring:
- Add 6-signal scoring table to subagent-templates.md for confidence-based
  model tier selection (Haiku/Sonnet/Opus)

Security audit CVE scanning (optional):
- Add optional ruflo-security-audit CVE scanning step to ce-security-audit
  SKILL.md, skipped gracefully when ruflo is not installed

All ruflo features are optional with graceful fallback — zero hard dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant