* fix(shellcheck): declare and assign separately in router.sh (SC2155) * feat(plugin): enhance context management and skill invocation - Update .context-manifest.json to include profile and detailed source information. - Revise context-scout.md to clarify context root discovery and navigation. - Modify commands to replace deprecated skills with updated ones (brainstorming → approach, systematic-debugging → debugger). - Streamline install-context.md for clarity and remove interactive profile selection. - Improve oac-status.md to provide a more comprehensive status report. - Add OAC system paths to session-start.sh for better context management. - Remove obsolete skills and improve documentation for existing commands.
3.5 KiB
Guide: Compatibility Layer Development Workflow
Purpose: Step-by-step workflow for developing compatibility layer features
Last Updated: 2026-02-04
Core Workflow
Development follows a structured 6-stage approach:
1. Discover (Context)
↓
2. Propose (Approval)
↓
3. Init Session (Setup)
↓
4. Plan (Breakdown)
↓
5. Execute (Implement)
↓
6. Validate & Handoff
Stage 1: Discover
Goal: Understand requirements before implementation
Actions:
- Use
ContextScoutto discover relevant context files - For external packages: Check install scripts first, then use
ExternalScout - Read context standards (code-quality.md is MANDATORY)
No files created - Read-only exploration
Stage 2: Propose
Goal: Get user approval BEFORE any file creation
Present lightweight summary:
- What we're building (1-2 sentences)
- Components list
- Approach (direct execution vs delegation)
- Context discovered
Wait for user approval before proceeding
Stage 3: Init Session
Goal: Create session and persist context (ONLY after approval)
Actions:
- Create session directory:
.tmp/sessions/{YYYY-MM-DD}-{task-slug}/ - Write
context.mdwith:- Task requirements
- Context files (standards to follow)
- Reference files (source material)
- Components
- Exit criteria
This becomes single source of truth for all agents
Stage 4: Plan
Decision: Simple vs Complex?
Simple (1-3 files, <30min):
- Skip TaskManager
- Execute directly in Stage 5
Complex (4+ files, >60min):
- Delegate to
TaskManager - Creates
.tmp/tasks/{feature}/task.json+ subtasks - Present plan for confirmation
Stage 5: Execute
Incremental approach (one component at a time):
-
Plan Component (if using component-planning):
- Create
component-{name}.md - Request approval for design
- Create
-
Execute:
- Load context from session
- Implement → Validate → Mark complete
- If delegating: Pass subtask JSON to
CoderAgent
-
Integrate:
- Verify integration with previous components
Critical: Never implement entire plan at once
Stage 6: Validate & Handoff
Actions:
- Run full system integration tests
- Delegate to
TestEngineerorCodeReviewer(pass session context) - Summarize what was built
- Ask user to clean up
.tmpfiles
Key Principles
Context First: Load standards BEFORE coding Approval Gates: Never execute without approval Incremental: One step at a time, validate each Stop on Failure: Report → Propose fix → Request approval → Then fix
Example: Adapter Implementation
1. Discover:
- ContextScout finds baseadapter-pattern.md
- Load code-quality.md standards
2. Propose:
"Implement WindsurfAdapter (514 lines)
- Bidirectional conversion
- Extends BaseAdapter
- JSON config format"
3. Init Session:
Create .tmp/sessions/2026-02-04-windsurf-adapter/
Write context.md with standards + references
4. Plan:
Simple (1 file) → Skip TaskManager
5. Execute:
- Create WindsurfAdapter.ts
- Implement toOAC(), fromOAC()
- Export in index.ts
- npm run build (validate)
6. Validate:
- Compilation: ✅ 0 errors
- Ready for unit tests (next phase)
Reference
Related:
- standards/code-quality.md (MANDATORY before coding)
- concepts/compatibility-layer.md
- examples/baseadapter-implementation.md