How e1i/mikoshi-construct works
mikoshi-construct is a CLI bootstrap and lifecycle toolkit for AI-native software projects. Its main workflow detects repository facts, lets the user configure a preset and agent target, materializes policy, contracts, harness tooling and agent instructions, then records provenance and model data. The generated repository is handed to an agent for discovery, planning and verified implementation. Separate commands support upkeep and inspection, including sync, doctor, attach/detach, graph, cost and task intake/mutation. Relationships for documented but unsampled subsystems are based on the README; their internal calls are not inferred.
Main entry points: init.ts Initialize project · plan.ts Plan materialization · index.ts Repository doctor · scripts Quality harness
Components 21
Project Bootstrap
- Construct CLI
src/program.ts - Initialize project
src/commands/init.ts - Detect repository
src/detect/index.ts - Preset configuration
src/presets/index.ts - Plan materialization
src/materialize/plan.ts - Project templates
templates
Project Records
- Provenance manifest
src/manifest.ts - Knowledge model
src/model/schema.ts
Repository Maintenance
- Template sync
src/sync/replay.ts - Repository doctor
src/commands/doctor/index.ts - Attach workflow
src/commands/attach/index.ts - Detach workflow
src/commands/detach/index.ts
Agent Lifecycle
- Agent instructions
src/ui/lore.ts - Quality harness
scripts - Repository discovery
templates/ai
Inspection Tools
- Model graph
src/commands/graph.ts - Task intake
src/commands/intake/index.ts - Mutation tools
src/commands/mutate/index.ts - Usage reporting
src/commands/cost/index.ts - Work board
src/commands/board/index.ts
Other components
- Project owner
Connections 28
- Project owner → Construct CLI: runs commands
README.md - Construct CLI → Initialize project: dispatches init
src/program.ts - Initialize project → Detect repository: detects facts
src/commands/init.ts - Initialize project → Preset configuration: configures preset
src/commands/init.ts - Initialize project → Plan materialization: plans files
src/commands/init.ts - Preset configuration → Plan materialization: selects groups
src/materialize/plan.ts - Plan materialization → Project templates: renders templates
src/materialize/plan.ts - Initialize project → Provenance manifest: records provenance
src/commands/init.ts - Initialize project → Knowledge model: reads model
src/commands/init.ts - Plan materialization → Agent instructions: materializes instructions
README.md - Plan materialization → Quality harness: materializes harness
README.md - Project owner → Repository discovery: hands off repository
README.md - Repository discovery → Agent instructions: fills markers
README.md - Project owner → Template sync: requests sync
README.md - Template sync → Provenance manifest: replays provenance
README.md - Project owner → Repository doctor: requests checks
README.md - Repository doctor → Provenance manifest: reads records
README.md - Repository doctor → Knowledge model: reads records
README.md - Project owner → Attach workflow: requests attach
README.md - Project owner → Detach workflow: requests detach
README.md - Project owner → Model graph: requests graph
README.md - Model graph → Knowledge model: draws model
README.md - Project owner → Task intake: starts planning
README.md - Project owner → Mutation tools: records mutations
README.md - Project owner → Usage reporting: requests usage
README.md - Project owner → Work board: views work
- Task intake → Quality harness: defines acceptance
README.md - Quality harness → Agent instructions: verifies implementation
README.md