Design · Evaluate · Review · Execute · Knowledge
A Kiro Power that enforces structured analysis, planning, approval, and review for all development tasks. No vibe coding. Strong focus on security, maintainability, and persistent context retention.
Unlike typical AI coding assistants that jump straight into code generation, D.E.R.E.K enforces a disciplined workflow that prevents common pitfalls:
- 🚫 AI generates code based on vague requirements
- 🚫 No validation that the solution matches actual needs
- 🚫 Context lost between sessions
- 🚫 Security and quality issues discovered too late
- 🚫 Repeated mistakes because learnings aren't captured
- ✅ Approval gates prevent wasted work on misunderstood requirements
- ✅ Persistent memory maintains context across sessions
- ✅ Security-first approach with built-in review processes
- ✅ Knowledge accumulation so you don't repeat mistakes
- ✅ Structured planning with clear requirements → design → implementation flow
Think of it as "working memory on disk" - your project context persists and evolves, not just in the AI's ephemeral context window.
D.E.R.E.K transforms your development workflow by:
- Analyzing tasks before jumping into code
- Planning with persistent markdown files as "working memory on disk"
- Requiring approval before implementation (approval gates)
- Reviewing code for quality and security after implementation
- Retaining knowledge across sessions with a project memory system
Persistent markdown files in .kiro/resources/ that maintain context across sessions:
- PROJECT.md - Project overview, tech stack, architecture
- PROGRESS.md - Current task tracking and status
- DECISIONS.md - Key decisions with rationale
- KNOWLEDGE.md - Finalized learnings and patterns
- SCRATCHPAD.md - Temporary working notes
Memory Sharing via MCP: D.E.R.E.K includes the derek-memory MCP server that exposes your project memory as resources and provides tools to generate beautiful HTML documentation. Share specs with your team or view them in a browser with automatic sensitive data sanitization.
Automatically tracks how out-of-sync your memory files are from actual code changes:
- Drift Score - Percentage of tracked files changed since last memory update
- Four Tiers - 🟢 Healthy (0–20%) · 🟡 Review (21–50%) · 🟠 Soft_Block (51–75%) · 🔴 Hard_Block (76–100%)
- Session-Start Check - Drift is calculated automatically every time a session begins
- On-Demand Commands - Check drift anytime with
check driftordrift status - Optional Hook - Real-time drift recalculation on every file save (copy
derek-power/hooks/drift-detection.kiro.hookto.kiro/hooks/)
Specialized investigation workflows for complex debugging and analysis:
- Structured Investigation - Discovery → Analysis → Hypothesis → Validation → Documentation
- Investigation Memory - Persistent tracking with INVESTIGATION.md, EVIDENCE.md, FINDINGS.md
- Specialized Agents - Investigation Discovery, Analysis, and Tracer agents
- Evidence Collection - Systematic gathering and validation of findings
- Knowledge Transfer - Automatic transfer of discoveries to project memory
For simple tasks, bug fixes, and small changes:
- Uses
.kiro/resources/PROGRESS.md - Lightweight phase tracking
- Quick iteration
For complex specifications requiring multiple files/components:
- Uses
.kiro/specs/<spec-name>/folders - Structured requirements → design → tasks workflow
- Approval gates at each phase
- Temporary knowledge capture during implementation
Prevents wasted work on misunderstood requirements:
- ⛔ Requirements must be approved before design
- ⛔ Design must be approved before implementation
- Explicit human approval required at each gate
Built-in security awareness with specialized steering files for:
- Secure coding practices
- Code review with security focus
- Security audits and compliance
- Backend security implementation
# Say to Kiro:
"init"This creates the project memory system and analyzes your codebase.
# Say to Kiro:
"create spec authentication"This creates .kiro/specs/authentication/ with:
requirements.md- What to builddesign.md- How to build (after requirements approved)tasks.md- Implementation tracking (after design approved)notes.md- Temporary knowledge during implementation
# After reviewing requirements.md:
"approve requirements"
# After reviewing design.md:
"approve design"
# After implementation complete:
"complete spec".kiro/
├── resources/ # Global Project Memory
│ ├── PROJECT.md # Project overview
│ ├── PROGRESS.md # Current task tracking
│ ├── DECISIONS.md # Decision log
│ ├── KNOWLEDGE.md # Finalized learnings
│ ├── SCRATCHPAD.md # Temporary notes
│ ├── INVESTIGATION.md # Current investigation (debug mode)
│ ├── EVIDENCE.md # Investigation evidence
│ ├── FINDINGS.md # Investigation findings
│ └── HYPOTHESES.md # Investigation hypotheses
│
└── specs/ # Folder Specifications
├── authentication/ # Example spec
│ ├── requirements.md # WHAT to build
│ ├── design.md # HOW to build
│ ├── tasks.md # Implementation tracking
│ └── notes.md # Temporary knowledge
│
└── payment-integration/ # Another spec
├── requirements.md
├── design.md
├── tasks.md
└── notes.md
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Requirements│────►│ Design │────►│ Tasks │────►│ Implement │
│ (WHAT) │ │ (HOW) │ │ (TRACK) │ │ (CODE) │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
⛔ APPROVAL ⛔ APPROVAL 📝 notes.md
GATE GATE (temp knowledge)
│
▼
Transfer to
KNOWLEDGE.md
init- Initialize project memory systemreinit- Refresh PROJECT.md only (preserves other files)share memory- Generate shareable HTML documentationserve memory- Start HTTP server to view HTML in browser (http://localhost:8080)
check drift/drift status- Calculate and display current drift score, tier, and top 5 changed filesdrift history- Show last 5 drift entries from PROGRESS.mdacknowledge drift- Clear Soft_Block gate and proceed with current task
debug mode- Enter investigation mode with specialized workflowsinvestigate [target]- Start focused investigation of component/issuetrace [path]- Trace execution flows and data pathsexit debug- Complete investigation and save findings
create spec [name]- Create new folder specapprove requirements- Proceed to design phaseapprove design- Proceed to implementation phasecomplete spec- Finalize and transfer learnings
show spec status- Display current spec progressupdate task [ID]- Update specific task status
D.E.R.E.K includes comprehensive steering files organized by category:
analysis.md- Task analysis frameworkplanning.md- Planning framework (quick & folder spec)review.md- Post-implementation reviewcontext.md- Context retention across sessionsderek-init.md- Project initialization
core.code-archaeologist.md- Deep codebase explorationcore.code-reviewer.md- Security-aware code reviewcore.debugger.md- Error resolution & debuggingcore.performance-optimizer.md- Performance optimization
- Go:
specialized.golang-pro.md - Python: 9 agents (Django, FastAPI, ML/Data, Testing, Security, etc.)
- Rails: 3 agents (Backend, API, ActiveRecord)
- React: 2 agents (Component Architect, Next.js)
- Vue: 3 agents (Component Architect, Nuxt, State Manager)
- TypeScript:
specialized.typescript-pro.md - Data & AI: 8 agents (AI Engineer, Data Engineer, Database Optimizer, etc.)
infrastructure.cloud-architect.mdinfrastructure.deployment-engineer.mdinfrastructure.devops-incident-responder.mdinfrastructure.performance-engineer.md
security-auditor.md- Comprehensive security audits- Backend security coding practices built-in
Kiro Native Specs are built into Kiro and provide a structured way to build features with requirements, design, and implementation phases. They're great for formal feature development.
D.E.R.E.K extends this concept with additional capabilities focused on persistent memory, security, and knowledge retention:
| Feature | Kiro Native Specs | D.E.R.E.K |
|---|---|---|
| Requirements → Design → Implementation | ✅ Yes | ✅ Yes |
| Approval Gates | ✅ Yes | ✅ Yes |
| Persistent Project Memory | ❌ No | ✅ Yes (PROJECT.md, KNOWLEDGE.md, etc.) |
| Cross-Session Context | ✅ Strong (memory system) | |
| Knowledge Accumulation | ❌ No | ✅ Yes (learnings persist) |
| Security-First Workflow | ✅ Built-in (security steering files) | |
| Temporary Notes During Work | ❌ No | ✅ Yes (notes.md → KNOWLEDGE.md) |
| Decision Logging | ❌ No | ✅ Yes (DECISIONS.md) |
| Quick Planning Mode | ❌ No | ✅ Yes (PROGRESS.md) |
| Specialized Agent Roles | ❌ No | ✅ Yes (70+ steering files) |
| Memory Sharing | ❌ No | ✅ Yes (HTML export) |
| Drift Detection | ❌ No | ✅ Yes (memory freshness tracking) |
Use Kiro Native Specs When:
- ✅ You want the standard Kiro workflow
- ✅ Your project doesn't need persistent memory
- ✅ You're working on isolated features
- ✅ Context retention isn't critical
Use D.E.R.E.K When:
- ✅ You need context to persist across sessions
- ✅ Security is a primary concern
- ✅ You want to accumulate project knowledge over time
- ✅ You need specialized agent roles (Python, Rails, React, etc.)
- ✅ You want to track decisions and learnings
- ✅ You're working on complex, multi-session projects
- ✅ You need both quick planning and formal specs
- ✅ You want real-time awareness of memory freshness (drift detection)
Yes! D.E.R.E.K complements Kiro's native specs:
- Use D.E.R.E.K's memory system (PROJECT.md, KNOWLEDGE.md) alongside native specs
- Use D.E.R.E.K's security and specialized steering files with any workflow
- Use D.E.R.E.K's quick planning for small tasks, native specs for formal features
Think of D.E.R.E.K as "Kiro specs + persistent memory + security focus + knowledge retention"
- ✅ New features requiring multiple files/components
- ✅ Authentication, authorization systems
- ✅ API endpoints with complex logic
- ✅ Database schema changes
- ✅ Integration with external services
- ✅ Refactoring major components
- ✅ Work spanning multiple sessions
- ✅ Bug fixes
- ✅ Single-file changes
- ✅ Configuration updates
- ✅ Documentation updates
- ❌ No more coding based on misunderstood requirements
- ❌ No more forgetting context between sessions
- ❌ No more repeating the same mistakes
- ❌ No more security vulnerabilities from rushed code
- ✅ Structured analysis before coding
- ✅ Clear implementation guidance
- ✅ Transparent progress tracking
- ✅ Knowledge accumulation over time
- ✅ Effective handoffs between sessions
- ✅ Security-first development
"create spec authentication"
Kiro generates requirements.md with:
- Problem statement
- User stories
- Functional requirements
- Non-functional requirements
- Security requirements
"approve requirements"
Kiro generates design.md with:
- Architecture overview
- Data model
- API design
- Security design
- Testing strategy
"approve design"
Kiro generates tasks.md with:
- Phased task breakdown
- Dependencies
- Estimates
- Acceptance criteria
Work through tasks, capturing discoveries in notes.md
"complete spec"
Transfers valuable learnings from notes.md to KNOWLEDGE.md
Folder specs integrate seamlessly with the global project memory:
- PROJECT.md provides architecture context for all specs
- PROGRESS.md links to active specs
- DECISIONS.md receives decisions from spec implementations
- KNOWLEDGE.md receives finalized learnings after spec completion
Specs can reference other files using #[[file:path]] syntax:
## References
- #[[file:.kiro/resources/PROJECT.md]] - Project architecture
- #[[file:app/api/v1/base.rb]] - API base class
- #[[file:docs/api-spec.yaml]] - OpenAPI specificationThis allows specs to:
- Reference existing code patterns
- Link to API specifications
- Include external documentation
- Connect to project context
- ✅ After completing a major feature or spec - Clean slate for new work
- ✅ When switching to unrelated tasks - Keep context focused
- ✅ When context feels cluttered - Too many tangents or failed attempts
- ✅ After long debugging sessions - Fresh perspective on new problems
- ✅ When hitting context limits - Kiro will warn you, but be proactive
- ✅ Working on related tasks - Building on previous context
- ✅ Iterating on the same feature - Refinements and adjustments
- ✅ Following up on reviews - Addressing feedback from previous work
- ✅ Within the same spec - Requirements → Design → Implementation flow
The Problem: Long chat sessions can lose context, repeat mistakes, or become unfocused.
D.E.R.E.K's Solution: Persistent memory means you can start fresh sessions without losing context!
Best Practices:
- Update memory files regularly - Write to PROJECT.md, PROGRESS.md, KNOWLEDGE.md as you work
- Complete specs properly - Use
complete specto transfer learnings before starting new sessions - Log decisions immediately - Add to DECISIONS.md when making architectural choices
- Use SCRATCHPAD.md for temporary notes - Brain dump during long sessions
- Start new sessions confidently - Your project memory persists across sessions
Example Workflow:
Session 1: "init" → Analyze codebase → Update PROJECT.md
Session 2: "create spec authentication" → Requirements → Approve
Session 3: Continue spec → Design → Approve → Start implementation
Session 4: Complete implementation → "complete spec" → Transfer to KNOWLEDGE.md
Session 5: New feature, fresh session, but all context is in memory files!
- � Use descriptive first messages - "Continue authentication spec" vs "help"
- 🎯 Stay focused per session - One feature or problem at a time
- 🔄 Reference memory files - Say "check PROJECT.md" to reload context
- 🧹 Clean up before ending - Update PROGRESS.md with current status
- ⚡ Start fresh when stuck - New session + memory files = fresh perspective
D.E.R.E.K includes hooks in derek-power/hooks/ to help manage sessions:
auto-summary-on-context-limit.kiro.hook- Auto-summarize when approaching limitssummary-session-command.kiro.hook- Generate session summaries on demandclear-chat-history.kiro.hook- Clean slate while preserving memorydrift-detection.kiro.hook- Real-time drift score on every file save (copy to.kiro/hooks/to enable)
These hooks ensure you never lose important context even when starting new sessions.
Run init before starting work on an unfamiliar project
Never skip requirements or design approval - it prevents wasted work
Keep specs focused and manageable
Mark tasks complete immediately, log errors as they occur
Move valuable discoveries from notes.md to KNOWLEDGE.md after completion
Reference PROJECT.md for context, update KNOWLEDGE.md with learnings
D.E.R.E.K includes the derek-memory MCP server for sharing project specifications:
Generate HTML Documentation:
"share memory"
This creates a beautiful HTML file with all your project specs, requirements, design docs, and tasks.
View in Browser:
"serve memory"
Opens at http://localhost:8080/ - perfect for:
- 📤 Sharing specs with team members
- 👀 Reviewing project progress in a clean UI
- 📋 Presenting designs to stakeholders
- 🔄 Onboarding new developers
What Gets Shared:
- PROJECT.md - Project overview and architecture
- PROGRESS.md - Current task tracking
- DECISIONS.md - Decision log with rationale
- KNOWLEDGE.md - Accumulated learnings
- All folder specs (requirements, design, tasks, notes)
Security Note: The MCP server automatically sanitizes sensitive data (API keys, passwords, tokens) before generating HTML.
MCP Configuration:
The derek-memory MCP is already configured in derek-power/mcp.json. It auto-detects your .kiro folder and works across all your projects with a single configuration.
- Clone the repository:
git clone https://github.com/dereknguyen269/derek-power.git- Copy the
derek-powerfolder to your Kiro powers directory:
# macOS/Linux
cp -r derek-power/derek-power ~/.kiro/powers/
# Or manually copy to your Kiro workspace .kiro/powers/ directory-
Restart Kiro or reload powers from the command palette
-
Verify installation by saying to Kiro:
"init"
- Download the power from: https://github.com/dereknguyen269/derek-power/tree/main/derek-power
- Place the
derek-powerfolder in your Kiro powers directory:- User-level:
~/.kiro/powers/derek-power/ - Workspace-level:
<workspace>/.kiro/powers/derek-power/
- User-level:
- Restart Kiro or reload powers
D.E.R.E.K activates automatically when you use keywords like:
- "init", "initialize project"
- "create spec", "spec planning"
- "approve requirements", "approve design"
- "analyze task", "review code"
- "share memory", "show spec status"
- "check drift", "drift status", "drift history", "acknowledge drift"
Current version: 0.1.5
