원클릭으로
after-task
Mandatory knowledge capture after completing work. Documents solution in Graphiti and tracks effectiveness for system improvement.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Mandatory knowledge capture after completing work. Documents solution in Graphiti and tracks effectiveness for system improvement.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Comprehensive discovery before starting any spec or major task. Searches Graphiti, recommends vibe/MCPs, surfaces patterns.
This skill should be used when conducting focused code reviews that emphasize clarity, data flow understanding, and minimal assumptions. Trigger when reviewing pull requests, code changes, or when explicitly asked to review code. Produces structured reviews with priority-based feedback.
This skill should be used when testing ScreenGraph end-to-end flows (drift detection, agent runs) while monitoring backend and frontend logs in real-time. Use when the user wants to observe system behavior across services, debug live runs, or verify event streaming.
Lightweight tactical guidance during implementation. Just MCP suggestions and quick lookups, no heavy Graphiti searches.
Workflow for using Graphiti MCP tools to capture preferences, procedures, and facts consistently.
Self-improving context loader that MUST be run before every prompt. Searches Graphiti for relevant past work, loads appropriate vibe, and provides intelligent recommendations.
| name | after-task |
| description | Mandatory knowledge capture after completing work. Documents solution in Graphiti and tracks effectiveness for system improvement. |
Use AFTER:
MANDATORY - Don't skip this! Future you will thank you.
1. Document solution in Graphiti (group_id="screengraph")
- Problem statement
- Solution approach
- Key learnings and gotchas
- Files modified
- Related specs/bugs
2. Optional: Track MCP effectiveness
- Which MCPs were actually used
- What worked well
- What could be better
Token cost: ~600 tokens
Frequency: Once per spec/major-task
ROI: Future specs benefit = exponential improvement
add_memory({
name: "[Spec/Bug Number]: [Short Title]",
episode_body: `
[Tags: domain, type, technology]
**Problem**: [What we were trying to solve]
**Solution**: [High-level approach, not code details]
**Key Learnings**:
- [Learning 1]
- [Learning 2]
**Gotchas**:
- [Gotcha 1 with workaround]
- [Gotcha 2 with workaround]
**Files Modified**:
- [file 1]
- [file 2]
**Tests Added**:
- [test file 1]
**Related**: [Spec-XXX, BUG-YYY, FR-ZZZ]
**Date**: [YYYY-MM-DD]
`,
group_id: "screengraph",
source: "text"
});
track_effectiveness({
task: "[Original task description]",
mcps_used: ["graphiti", "encore-mcp", "svelte"],
outcome: "helpful", // or "partially_helpful" or "not_helpful"
feedback: "[What worked well or what was missing]"
});
This helps the orchestrator learn and improve recommendations!
add_memory({
name: "Spec-001: Automate Appium Lifecycle",
episode_body: `
[Tags: spec, backend, appium, devops, lifecycle]
**Problem**: Manual Appium server management was error-prone and time-consuming
**Solution**:
- Created lifecycle management service
- Automated start/stop/health-check
- Integration with agent setup flow
**Key Learnings**:
- Appium sessions need explicit health monitoring
- Port conflicts must be detected before starting
- Process management requires PID tracking
**Gotchas**:
- Appium doesn't expose ready signal (must poll /status)
- Zombie processes if not cleaned up properly
- Port 4723 conflicts with other Appium instances
**Files Modified**:
- backend/appium/lifecycle.service.ts
- backend/agent/nodes/setup/EnsureDevice/node.ts
- .cursor/commands/backend/Taskfile.yml
**Tests Added**:
- backend/appium/tests/lifecycle.test.ts
**Related**: Spec-001
**Date**: 2025-11-13
`,
group_id: "screengraph",
source: "text"
});
add_memory({
name: "BUG-015: Agent Stalls on Privacy Consent Dialog",
episode_body: `
[Tags: bug, backend, agent, appium, dialogs]
**Problem**: Agent hung when app showed privacy consent modal
**Solution**:
- Added pre-flight dialog detection
- User prompted to handle consent manually
- Check runs before policy execution starts
**Key Learnings**:
- First-run experience often has modals
- Can't automate all user interactions
- Human-in-loop pattern works well
**Gotchas**:
- Different apps have different consent flows
- Some dialogs block entire UI hierarchy
- Must check BEFORE starting automation
**Files Modified**:
- backend/agent/nodes/setup/EnsureDevice/device-check.ts
**Related**: BUG-015, Spec-001
**Date**: 2025-11-13
`,
group_id: "screengraph",
source: "text"
});
add_memory({
name: "Refactor: Agent State Machine to Single Sink Pattern",
episode_body: `
[Tags: refactor, backend, agent, architecture]
**Problem**: Multiple terminal states added complexity
**Solution**:
- Single "completed" state
- stopReason field captures why (success/error/canceled)
- Frontend uses stopReason for UI decisions
**Key Learnings**:
- Simpler state machines are easier to debug
- stopReason pattern is flexible
- Database schema aligned with code
**Gotchas**:
- Must migrate existing runs to new pattern
- Frontend needs update to check stopReason
**Files Modified**:
- backend/agent/machine/AgentMachine.ts
- backend/db/migrations/008_single_sink.up.sql
- frontend/src/routes/runs/[runId]/+page.svelte
**Related**: Architecture decision docs
**Date**: 2025-11-05
`,
group_id: "screengraph",
source: "text"
});
# Pre-push succeeded
git push origin feature-X
# Now document (BEFORE creating PR)
@after-task [completed spec/task]
# Review documentation template
# Fill in learnings
# Add to Graphiti
# PR merged to main
# Document if not done already
@after-task [completed work]
Good documentation includes:
Bad documentation:
If you skip @after-task:
If you run @after-task:
Future you will thank present you.
From founder_rules.mdc:
**After Completing Task:**
1. ✅ Document solution via Graphiti
2. ✅ Include: problem, solution, gotchas, files
3. ✅ Use tags for organization
This isn't optional. It's how the system improves.
Purpose: Capture institutional knowledge so future work benefits from past work. The self-improvement loop closes here.