-
Notifications
You must be signed in to change notification settings - Fork 6
docs: add agent design patterns documentation and improvement plan #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,8 @@ | |||||
|
|
||||||
| The result: AI agents that work *with* your development process, not around it. | ||||||
|
|
||||||
| **Built on proven patterns**: aidevops implements [industry-standard agent design patterns](#agent-design-patterns) validated across Claude Code, Manus, and Cursor - including multi-layer action spaces, context isolation, and iterative execution loops. | ||||||
|
|
||||||
| **[aidevops](https://aidevops.sh)** knows what you need to know. | ||||||
|
|
||||||
| ## **Why This Framework?** | ||||||
|
|
@@ -378,6 +380,25 @@ See `.agent/tools/terminal/terminal-title.md` for customization options. | |||||
| - **Performance Auditing**: PageSpeed Insights and Lighthouse integration | ||||||
| - **Uptime Monitoring**: Updown.io integration for website and SSL monitoring | ||||||
|
|
||||||
| ## **Agent Design Patterns** | ||||||
|
|
||||||
| aidevops implements proven agent design patterns identified by [Lance Martin (LangChain)](https://x.com/RLanceMartin/status/2009683038272401719) and validated across successful agents like Claude Code, Manus, and Cursor. | ||||||
|
|
||||||
| | Pattern | Description | aidevops Implementation | | ||||||
| |---------|-------------|------------------------| | ||||||
| | **Give Agents a Computer** | Filesystem + shell for persistent context | `~/.aidevops/.agent-workspace/`, 100+ helper scripts | | ||||||
| | **Multi-Layer Action Space** | Few tools, push actions to computer | Per-agent MCP filtering (~12-20 tools each) | | ||||||
| | **Progressive Disclosure** | Load context on-demand | Subagent tables, YAML frontmatter, read-on-demand | | ||||||
| | **Offload Context** | Write results to filesystem | `.agent-workspace/work/[project]/` for persistence | | ||||||
| | **Cache Context** | Prompt caching for cost | Stable instruction prefixes | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The description "Prompt caching for cost" is a bit abrupt and the implementation details are incomplete compared to
Suggested change
|
||||||
| | **Isolate Context** | Sub-agents with separate windows | Subagent files with specific tool permissions | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The description "Sub-agents with separate windows" is ambiguous and could be misinterpreted as GUI windows. Using "separate context windows" as in
Suggested change
|
||||||
| | **Ralph Loop** | Iterative execution until complete | `ralph-loop-helper.sh`, `full-loop-helper.sh` | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The implementation details for the 'Ralph Loop' pattern are incomplete in this summary table. The
Suggested change
|
||||||
| | **Evolve Context** | Learn from sessions | `/remember`, `/recall` with SQLite FTS5 | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The implementation details for the 'Evolve Context' pattern are incomplete. The
Suggested change
|
||||||
|
|
||||||
| **Key insight**: Context is a finite resource with diminishing returns. aidevops treats every token as precious - loading only what's needed, when it's needed. | ||||||
|
|
||||||
| See `.agent/aidevops/architecture.md` for detailed implementation notes and references. | ||||||
|
|
||||||
| ## **Requirements** | ||||||
|
|
||||||
| ```bash | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,6 +111,18 @@ Tasks with no open blockers - ready to work on. Use `/ready` to refresh this lis | |
| - Notes: Document how to analyze CI timing data for adaptive wait optimization. Include commands for extracting timing from GitHub Actions logs and updating shared-constants.sh. | ||
| - [ ] t050 Move SonarCloud hotspot patterns from AGENTS.md to code-review subagent #refactor #docs ~30m (ai:15m test:10m read:5m) logged:2025-01-11 | ||
| - Notes: AGENTS.md lines 85-89 contain SonarCloud hotspot patterns (S5332, S6506 exclusions). Move to tools/code-review/ subagent to reduce root AGENTS.md size. Low priority - patterns work fine where they are. | ||
| - [ ] t052 Agent Design Pattern Improvements #plan → [todo/PLANS.md#agent-design-pattern-improvements] ~1d (ai:6h test:4h read:2h) logged:2025-01-11 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The anchor in 🤖 Was this useful? React with 👍 or 👎 |
||
| - Notes: Implement remaining improvements from Lance Martin's agent design patterns analysis. Includes: YAML frontmatter for subagents, automatic session reflection, cache-aware prompts, tool description indexing, memory consolidation. | ||
| - [ ] t053 Add YAML frontmatter to source subagents #architecture #agents ~2h (ai:1.5h test:30m) logged:2025-01-11 blocked-by:t052 | ||
| - Notes: Add description, triggers, tools fields to all .agent/**/*.md files. Update generate-opencode-agents.sh to parse frontmatter for better progressive disclosure. | ||
| - [ ] t054 Automatic session reflection to memory #workflow #memory ~4h (ai:2.5h test:1h read:30m) logged:2025-01-11 blocked-by:t052 | ||
| - Notes: Create session-distill-helper.sh to extract learnings. Integrate with /session-review. Auto-call /remember with distilled insights. | ||
| - [ ] t055 Document cache-aware prompt patterns #docs #optimization ~1h (ai:30m test:15m read:15m) logged:2025-01-11 blocked-by:t052 | ||
| - Notes: Add guidance to build-agent.md for stable-prefix patterns and avoiding instruction reordering for better prompt cache hits. | ||
| - [ ] t056 Tool description indexing for on-demand MCP discovery #tools #context ~3h (ai:2h test:45m read:15m) logged:2025-01-11 blocked-by:t052 | ||
| - Notes: Cursor-style MCP description sync to .agent-workspace/mcp-descriptions/. Add search tool for on-demand discovery instead of loading all tool definitions upfront. | ||
| - [ ] t057 Memory consolidation and pruning #memory #optimization ~2h (ai:1h test:45m read:15m) logged:2025-01-11 blocked-by:t052 | ||
| - Notes: Add memory-helper.sh consolidate command. Periodic reflection to merge similar memories and prune stale/superseded entries. | ||
|
|
||
| <!--TOON:backlog[38]{id,desc,owner,tags,est,est_ai,est_test,est_read,logged,status,blocked_by,blocks,parent}: | ||
| t010,Evaluate Merging build-agent and build-mcp into aidevops,,plan|architecture|agents,4h,2h,1h,1h,2025-12-21T14:00Z,pending,,, | ||
|
|
@@ -157,6 +169,12 @@ t047,TODO/PLANS sync with GitHub/GitLab/Gitea issues + cross-platform tools rese | |
| t048,Add worktree cleanup reminder to postflight workflow,,workflow|git,30m,15m,10m,5m,2025-01-10T00:00Z,pending,,, | ||
| t049,Add timing analysis commands to ralph-loop workflow,,workflow|automation,30m,15m,10m,5m,2025-01-10T00:00Z,pending,,, | ||
| t050,Move SonarCloud hotspot patterns from AGENTS.md to code-review subagent,,refactor|docs,30m,15m,10m,5m,2025-01-11T00:00Z,pending,,, | ||
| t052,Agent Design Pattern Improvements,,plan|architecture|agents|context|optimization,1d,6h,4h,2h,2025-01-11T00:00Z,pending,,, | ||
| t053,Add YAML frontmatter to source subagents,,architecture|agents,2h,1.5h,30m,,2025-01-11T00:00Z,pending,t052,, | ||
| t054,Automatic session reflection to memory,,workflow|memory,4h,2.5h,1h,30m,2025-01-11T00:00Z,pending,t052,, | ||
| t055,Document cache-aware prompt patterns,,docs|optimization,1h,30m,15m,15m,2025-01-11T00:00Z,pending,t052,, | ||
| t056,Tool description indexing for on-demand MCP discovery,,tools|context,3h,2h,45m,15m,2025-01-11T00:00Z,pending,t052,, | ||
| t057,Memory consolidation and pruning,,memory|optimization,2h,1h,45m,15m,2025-01-11T00:00Z,pending,t052,, | ||
| --> | ||
|
|
||
| <!--TOON:subtasks[0]{id,desc,est,status,blocked_by,parent}: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate-opencode-agents.shis referenced here (and below with line ranges), but in this repo it lives at.agent/scripts/generate-opencode-agents.sh(deployed to~/.aidevops/agents/scripts/), so the current reference may be hard to follow. Consider pointing to the full path and avoiding hardcoded line numbers that may drift as the script evolves.🤖 Was this useful? React with 👍 or 👎