How amohash/counterpart works
Counterpart is a browser-based financial planning and decision workspace: a person edits assumptions and reviews projections while AI agents can inspect live state, propose changes, rebut proposals, and ask the person for input. The main flow runs from assumptions through financial calculations and decision support to human arbitration and refreshed views. Separate branches cover saved scenarios, board reporting, and WebMCP tools. The graph follows documented and excerpted links; unsampled UI wiring is omitted where not evidenced.
Main entry points: App.tsx Workspace UI · webmcp.ts Agent tools · model.ts Financial projections · BoardBrief.tsx Board brief view
Components 25
Model workspace
- Workspace UI
src/App.tsx - Model assumptions
src/hooks/useModelState.ts - Financial projections
src/model.ts - Charts and tables
src/hooks/useCharts.ts - Cross-tab sync
src/hooks/useCrossTabSync.ts
Decision support
- Proposal queue
src/hooks/useProposals.ts - Proposal lifecycle
src/proposal.ts - Pending decisions
src/components/decision-room/PendingDecisions.tsx - Financial health
src/health.ts - Risk analysis
src/risks.ts - Recommendations
src/recommendations.ts - Action plan
src/actionPlan.ts - Decision timeline
src/timeline.ts
Scenario planning
- Scenario workspace
src/components/scenarios/ScenarioWorkspace.tsx - Scenario library
src/hooks/useScenarios.ts - Scenario operations
src/scenarios.ts - Scenario comparisons
src/scenarioViewModel.ts
Agent interaction
- WebMCP integration
src/hooks/useWebmcp.ts - Agent tools
src/webmcp.ts - Human questions
src/questions.ts - Assumption annotations
src/hooks/useAnnotations.ts - Attention highlights
src/hooks/useHighlight.ts
Reporting
- Board brief view
src/components/reports/BoardBrief.tsx - Board brief generator
src/boardBrief.ts
Other components
- Human user
Connections 34
- Human user → Workspace UI: uses
README.md - Workspace UI → Model assumptions: reads and updates
src/App.tsx - Workspace UI → Proposal queue: manages proposals
src/App.tsx - Model assumptions → Financial projections: computes projections
- Workspace UI → Charts and tables: renders projections
src/App.tsx - Proposal queue → Proposal lifecycle: creates and updates
src/hooks/useProposals.ts - Workspace UI → Pending decisions: presents decisions
src/App.tsx - Pending decisions → Proposal lifecycle: displays proposal data
src/components/decision-room/PendingDecisions.tsx - Workspace UI → Cross-tab sync: synchronizes tabs
README.md - Cross-tab sync → Model assumptions: syncs state
src/hooks/useCrossTabSync.ts - Cross-tab sync → Proposal queue: syncs proposals
src/hooks/useCrossTabSync.ts - Financial projections → Risk analysis: supplies projections
src/risks.ts - Risk analysis → Recommendations: guides recommendations
src/recommendations.ts - Recommendations → Action plan: informs action plan
src/components/decision-room/ActionPlan.tsx - Workspace UI → Decision timeline: shows decision history
src/App.tsx - Workspace UI → Scenario workspace: renders scenario view
src/App.tsx - Scenario workspace → Scenario library: manages scenarios
- Scenario library → Scenario operations: loads and updates
src/hooks/useScenarios.ts - Scenario operations → Financial projections: derives metrics
src/scenarios.ts - Scenario workspace → Scenario comparisons: builds comparisons
src/components/scenarios/ScenarioWorkspace.tsx - WebMCP integration → Agent tools: registers tools
README.md - Agent tools → Financial projections: computes model
src/webmcp.ts - Agent tools → Proposal queue: queues proposals
- Agent tools → Human questions: validates questions
src/webmcp.ts - Agent tools → Assumption annotations: adds notes
- Agent tools → Attention highlights: highlights UI
- Agent tools → Scenario operations: runs scenarios
src/webmcp.ts - Agent tools → Decision timeline: reads decisions
src/webmcp.ts - Human user → Human questions: answers prompts
README.md - Board brief view → Financial projections: computes projections
src/components/reports/BoardBrief.tsx - Board brief view → Risk analysis: computes risks
src/components/reports/BoardBrief.tsx - Board brief view → Recommendations: computes recommendations
src/components/reports/BoardBrief.tsx - Board brief view → Board brief generator: generates brief
src/components/reports/BoardBrief.tsx - Board brief generator → Financial health: formats metrics
src/boardBrief.ts