How serenbeam/khwami works
KHWAMI is both a documentation-first collection of reusable engineering guidance and a small CLI for bounded CREATE and ADOPT workflows. The primary runtime path takes a request and target through context resolution, workflow-specific analysis and proposal, permission and approved-scope checks, execution, validation, and a terminal report. CREATE can write explicitly approved files; ADOPT is currently read-only. The README establishes the guidance and repository-intelligence branches. Edges reflect README statements or shown/indexed references; unsampled implementation details are not inferred.
Main entry points: workflow-controller.js Workflow Controller · index.js CLI Entry · bootstrap.js Core Bootstrap · create-analysis.js CREATE Analysis
Components 25
CLI and Routing
- CLI Entry
src/cli/index.js - Core Bootstrap
src/core/bootstrap.js - Context Resolution
src/core/context-resolution.js - Workflow Controller
src/core/workflow-controller.js - Terminal Result
src/cli/index.js
CREATE Lifecycle
- CREATE Analysis
src/core/create-analysis.js - Project Shape
src/core/create-project-shape.js - CREATE Proposal
src/core/create-proposal.js - CREATE Actions
src/core/create-action-derivation.js - CREATE Execution
src/core/create-execution.js - CREATE Validation
src/core/create-validation.js
ADOPT Lifecycle
- ADOPT Analysis
src/core/adopt-analysis.js - Objective Reconciliation
src/core/adopt-requirement.js - ADOPT Proposal
src/core/adopt-proposal.js - ADOPT Actions
src/core/adopt-action-derivation.js - ADOPT Execution
src/core/adopt-execution.js - ADOPT Validation
src/core/adopt-validation.js
Scope and Validation
- Approved Scope
src/core/approved-scope.js - Change Detection
src/core/change-detection.js
Guidance and Intelligence
- Collaboration Standards
agents - Reusable Instructions
instructions - Engineering Prompts
prompts - Repository Intelligence
docs - Planning and State
WORKSPACE_STATE.md
Other components
- Engineer
Connections 27
- Engineer → CLI Entry: submits request
README.md - CLI Entry → Core Bootstrap: initializes core
src/cli/index.js - Core Bootstrap → Context Resolution: initializes
src/core/bootstrap.js - Core Bootstrap → Workflow Controller: initializes
src/core/bootstrap.js - CLI Entry → Workflow Controller: routes workflow
src/cli/index.js - Workflow Controller → Context Resolution: resolves context
src/core/workflow-controller.js - Workflow Controller → CREATE Analysis: analyzes CREATE
src/core/workflow-controller.js - CREATE Analysis → Project Shape: derives shape
src/core/create-analysis.js - Workflow Controller → ADOPT Analysis: analyzes ADOPT
src/core/workflow-controller.js - Workflow Controller → Objective Reconciliation: reconciles objective
src/core/workflow-controller.js - Workflow Controller → CREATE Proposal: builds proposal
src/core/workflow-controller.js - CREATE Proposal → CREATE Actions: derives actions
src/core/create-proposal.js - Workflow Controller → ADOPT Proposal: builds proposal
src/core/workflow-controller.js - Workflow Controller → ADOPT Actions: derives actions
src/core/workflow-controller.js - Workflow Controller → Change Detection: captures baseline
src/core/workflow-controller.js - Workflow Controller → Approved Scope: prepares scope
src/core/workflow-controller.js - Workflow Controller → CREATE Execution: executes CREATE
src/core/workflow-controller.js - Workflow Controller → ADOPT Execution: executes ADOPT
src/core/workflow-controller.js - Workflow Controller → CREATE Validation: validates CREATE
src/core/workflow-controller.js - Workflow Controller → ADOPT Validation: validates ADOPT
src/core/workflow-controller.js - ADOPT Validation → Change Detection: checks changes
src/core/adopt-validation.js - Workflow Controller → Terminal Result: returns result
README.md - Engineer → Collaboration Standards: uses standards
README.md - Engineer → Reusable Instructions: uses guidance
README.md - Engineer → Engineering Prompts: uses prompts
README.md - Engineer → Repository Intelligence: consults intelligence
README.md - Engineer → Planning and State: reviews state
README.md