How kitikousei/coding-harness works
Pi Agent Platform automates long engineering tasks through requirements analysis, impact assessment, planning, test-first implementation, test repair, review, and final reporting. A CLI starts tasks or workflows; Temporal coordinates execution, while stage activities assemble capability-constrained agent runs and persist artifacts. The dashboard exposes progress, logs, approvals, artifacts, and cost. The README documents the workflow and dashboard capabilities; source excerpts show stage execution, workspace preparation, testing, capability enforcement, and artifact storage. Some workflow-to-activity wiring is documented but not visible in the sampled workflow excerpt.
Main entry points: runStage.ts Stage runner · LongEngineeringTaskWorkflow.ts Temporal workflow · stage-activities.ts Temporal activities · server.ts Dashboard server
Components 27
Task entry
- CLI commands
pi-agent-platform/src/cli/commands/workflow.ts - Task metadata
pi-agent-platform/src/tasks/TaskMetadata.ts
Workflow orchestration
- Temporal workflow
pi-agent-platform/src/workflows/LongEngineeringTaskWorkflow.ts - Workflow contract
pi-agent-platform/src/workflows/TaskWorkflowContract.ts - Temporal activities
pi-agent-platform/src/activities/stage-activities.ts - Report activities
pi-agent-platform/src/activities/report-activities.ts
Stage execution
- Nine engineering stages
pi-agent-platform/src/workflows/LongEngineeringTaskWorkflow.ts - Stage runner
pi-agent-platform/src/stages/runStage.ts - Prompt assembly
pi-agent-platform/src/stages/PromptAssembler.ts - Test resolution and execution
pi-agent-platform/src/testing/TestRunner.ts
Agent and resources
- Stage capabilities
pi-agent-platform/src/capability/CapabilityRegistry.ts - Sandbox enforcement
pi-agent-platform/src/capability/StageEnforcer.ts - MCP server manager
pi-agent-platform/src/capability/MCPServerManager.ts - Skill loader
pi-agent-platform/src/capability/SkillLoader.ts - Output validation
pi-agent-platform/src/capability/OutputValidator.ts - Agent runtimes
pi-agent-platform/src/agent-runtimes/RuntimeFactory.ts - Git worktree
pi-agent-platform/src/workspace/WorkspaceManager.ts - Task artifacts
pi-agent-platform/src/artifacts/LocalArtifactStore.ts - Cost tracking
pi-agent-platform/src/cost/CostTracker.ts - CodeGraph CLI
pi-agent-platform/src/codegraph/CodeGraphCLI.ts
Dashboard
- Dashboard server
pi-agent-platform/src/dashboard/server.ts - Dashboard UI
pi-agent-platform/src/dashboard/public/app.js - Dashboard task store
pi-agent-platform/src/dashboard/task-store.ts - Event stream
pi-agent-platform/src/dashboard/event-stream.ts - Temporal client
pi-agent-platform/src/dashboard/temporal-client.ts
Other components
- Engineer
- Temporal service
Connections 31
- Engineer → CLI commands: starts task
README.md - CLI commands → Temporal workflow: starts workflow
README.md - CLI commands → Task metadata: records task
pi-agent-platform/src/cli/commands/workflow.ts - Temporal workflow → Workflow contract: uses contract
pi-agent-platform/src/workflows/LongEngineeringTaskWorkflow.ts - Temporal workflow → Temporal service: runs on
README.md - Temporal workflow → Nine engineering stages: orchestrates
README.md - Temporal workflow → Temporal activities: dispatches
- Temporal workflow → Report activities: dispatches
- Temporal activities → Stage runner: runs stage
pi-agent-platform/src/activities/stage-activities.ts - Temporal activities → Git worktree: prepares workspace
pi-agent-platform/src/activities/stage-activities.ts - Temporal activities → Test resolution and execution: runs tests
pi-agent-platform/src/activities/stage-activities.ts - Temporal activities → Agent runtimes: creates runtime
pi-agent-platform/src/activities/stage-activities.ts - Stage runner → Stage capabilities: loads manifest
pi-agent-platform/src/stages/runStage.ts - Stage runner → Sandbox enforcement: checks tools
pi-agent-platform/src/stages/runStage.ts - Stage runner → MCP server manager: starts servers
pi-agent-platform/src/stages/runStage.ts - Stage runner → Skill loader: loads skills
pi-agent-platform/src/stages/runStage.ts - Stage runner → Prompt assembly: builds prompt
pi-agent-platform/src/stages/runStage.ts - Stage runner → Agent runtimes: runs agent
pi-agent-platform/src/stages/runStage.ts - Stage runner → Output validation: validates outputs
pi-agent-platform/src/stages/runStage.ts - Stage runner → Task artifacts: writes events
pi-agent-platform/src/stages/runStage.ts - Stage runner → Cost tracking: tracks usage
pi-agent-platform/src/stages/runStage.ts - Test resolution and execution → Task artifacts: writes results
pi-agent-platform/src/testing/TestRunner.ts - MCP server manager → CodeGraph CLI: configures server
pi-agent-platform/src/capability/MCPServerManager.ts - Dashboard server → Dashboard task store: serves task data
pi-agent-platform/src/dashboard/server.ts - Dashboard server → Event stream: serves event stream
pi-agent-platform/src/dashboard/server.ts - Dashboard server → Temporal client: queries workflows
pi-agent-platform/src/dashboard/server.ts - Dashboard UI → Dashboard server: uses web API
- Dashboard task store → Cost tracking: reads cost
pi-agent-platform/src/dashboard/task-store.ts - Dashboard task store → Task artifacts: reads artifacts
- Temporal client → Temporal service: queries and signals
pi-agent-platform/src/dashboard/temporal-client.ts - Dashboard server → Engineer: presents status
README.md