Commit Graph

60 Commits

Author SHA1 Message Date
Forgotten
35880c8a1e Improve claude-local adapter execution and shared utils
Enhance claude-local server executor with better process management
and output handling. Improve stdout parser for UI transcript display.
Update adapter-utils types and server utilities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:29:24 -06:00
Forgotten
11d03728ca Streamline Paperclip skill and add API reference
Simplify SKILL.md to focus on core agent behavior and remove redundant
detail. Add skills/paperclip/references/api-reference.md with full API
endpoint documentation. Add doc/plans/agent-authentication.md design
plan.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:29:18 -06:00
Forgotten
631c859b89 Move adapter implementations into shared workspace packages
Extract claude-local and codex-local adapter code from cli/server/ui
into packages/adapters/ and packages/adapter-utils/. CLI, server, and
UI now import shared adapter logic instead of duplicating it. Removes
~1100 lines of duplicated code across packages. Register new packages
in pnpm workspace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 14:23:16 -06:00
Forgotten
47ccd946b6 Extract adapter registry across CLI, server, and UI
Refactor monolithic heartbeat service, AgentConfigForm, and CLI
heartbeat-run into a proper adapter registry pattern. Each adapter
type (process, claude-local, codex-local, http) gets its own module
with server-side execution logic, CLI invocation, and UI config form.
Significantly reduces file sizes and enables adding new adapters
without touching core code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:53:03 -06:00
Forgotten
3a91ecbae3 Improve heartbeat execution, run tracking, and agent detail display
Enhance heartbeat service with better process adapter error recovery
and run state management. Expand heartbeat-run CLI with additional
output and diagnostics. Improve AgentDetail page run history and
status display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:17:03 -06:00
Forgotten
d6024b3ca5 Enhance UI: favicon, AgentDetail overhaul, PageTabBar, and config form
Add favicon and web manifest branding assets. Major AgentDetail page
rework with tabbed sections, run history, and live status. Add
PageTabBar component for consistent page-level tabs. Expand
AgentConfigForm with more adapter fields. Improve NewAgentDialog,
OnboardingWizard, and Issues page layouts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:02:23 -06:00
Forgotten
11c8c1af78 Expand heartbeat service with process adapter improvements
Add richer process lifecycle management, output capture, and error
handling to the heartbeat service. Improve run event recording and
adapter state persistence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:02:17 -06:00
Forgotten
7e4a20645c Improve CLI: config store, heartbeat-run, and onboarding
Rework config store with better file handling. Expand heartbeat-run
command with richer output and error reporting. Improve configure
and onboard commands. Update doctor checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:02:12 -06:00
Forgotten
cc24722090 Replace PGlite with embedded-postgres and add startup banner
Switch from PGlite (WebAssembly) to embedded-postgres for zero-config
local development — provides a real PostgreSQL server with full
compatibility. Add startup banner with config summary on server boot.
Improve server bootstrap with auto port detection, database creation,
and migration on startup. Update DATABASE.md, DEVELOPING.md, and
SPEC-implementation.md to reflect the change. Update CLI database
check and prompts. Simplify OnboardingWizard database options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 11:45:43 -06:00
Forgotten
0d436911cd Polish UI components and rework AgentConfigForm
Major AgentConfigForm rework with improved adapter configuration
fields and layout. Refine sidebar, breadcrumbs, and card/tab
components for visual consistency. Clean up page layouts across
Activity, Agents, Approvals, Costs, Dashboard, Goals, Inbox,
Issues, Org, and Projects pages. Minor heartbeat-run CLI fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:43:25 -06:00
Forgotten
769d74d896 Gitignore scratch scripts and seed files
Ignore check-*.mjs, new-agent*.json, newcompany.json, and seed-*.mjs
files across repo root, server/, and packages/db/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:43:16 -06:00
Forgotten
b6e24fa7a5 Add design-guide skill for consistent UI development
Provides design system conventions, component index, typography scale,
status/priority systems, composition patterns, and rules for maintaining
the /design-guide showcase page. References frontend-design and
web-design-guidelines skills.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:12:18 -06:00
Forgotten
af44f45c31 Improve heartbeat-run CLI and agent detail UI
Rework heartbeat-run command with better error handling and output
formatting. Improve AgentConfigForm field layout. Add CSS for agent
run timeline. Enhance AgentDetail page with runtime status section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:12:31 -06:00
Forgotten
78fe49a3ea Gitignore build artifacts, temp files, and CLI tmp directory
Ignore compiled JS/sourcemap/declaration files in server/src,
tmp-* scratch scripts, and cli/tmp/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:12:26 -06:00
Forgotten
b95c05a242 Improve agent detail, issue creation, and approvals pages
Expand AgentDetail with heartbeat history and manual trigger controls.
Enhance NewIssueDialog with richer field options. Add agent connection
string retrieval API. Improve issue routes with parent chain resolution.
Clean up Approvals page layout. Update query keys and validators.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 20:46:12 -06:00
Forgotten
6dbbf1bbec Add CLI heartbeat-run command for manual agent invocation
Add heartbeat-run command that triggers a single agent heartbeat from
the CLI. Register it in the CLI entrypoint alongside existing commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 20:46:07 -06:00
Forgotten
c326aeceb5 Add Paperclip agent skill definition (SKILL.md)
Define the Paperclip skill that teaches agents how to interact with
the control plane API. Covers heartbeat protocol, task management,
coordination rules, and governance compliance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 20:46:03 -06:00
Forgotten
0b9bea667c Improve issue and approvals UI: parent chain, project names, approval details
shared:
- Add IssueAncestor type and ancestors?: IssueAncestor[] to Issue interface

IssueDetail:
- Show clickable parent chain breadcrumb above issue title when issue has parents
- Ancestors rendered root-first (reversed from API order) with chevron separators

IssueProperties:
- Project field now shows project name with a link instead of raw UUID
- Assignee field now links to agent detail page
- Parent field shows immediate parent title (from ancestors[0]) with link
- Show request depth when > 0

Approvals:
- Pending/All filter tabs with pending count badge
- HireAgentPayload renders name, role, title, capabilities, adapter type
- CeoStrategyPayload renders plan/description text in a monospace block
- Decision note shown when present
- Requester agent name shown in header
- Approve button uses green styling; empty state with icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:16:57 -06:00
Forgotten
fb8a77a53b Upgrade Companies page: stats, delete, status badge, dropdown menu
Server:
- companyService.stats() returns per-company agent/issue counts in one query pair
- companyService.remove() cascades deletes across all child tables in dependency order
- GET /companies/stats endpoint (board-accessible)
- DELETE /companies/:companyId endpoint (board-only)

UI:
- Companies page shows agent count, issue count, spend/budget, and created-at per card
- Company status shown as a colored badge (active/paused/archived)
- Three-dot dropdown menu with Rename and Delete Company actions
- Inline delete confirmation to prevent accidental data loss
- 'New Company' button opens onboarding wizard instead of inline form

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:14:05 -06:00
Forgotten
00de7e46f1 Add DesignGuide page for component development reference
Showcases all UI primitives (Button, Badge, Input, Textarea, Card, Dialog,
Tooltip, Tabs, Skeleton, etc.) with Paperclip's dark theme. Accessible at
/design-guide; not linked in the main sidebar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:54 -06:00
Forgotten
c0ae9423f0 UI polish: sidebar nav, Companies/Issues layout, assignee in issue defaults
- Sidebar: add Approvals and Companies links, remove temporary Design Guide link
- Companies: replace inline create form with 'New Company' button (opens onboarding)
- Issues: move filter tabs inline with page heading (consistent with Agents)
- DialogContext: add assigneeAgentId to NewIssueDefaults
- NewIssueDialog: wire assigneeAgentId default (pre-select assignee when opening
  from agent detail page)
- CommandPalette: minor cleanup
- App: add DesignGuide route (dev-only, no sidebar link)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:49 -06:00
Forgotten
51780d1421 Improve OnboardingWizard: model picker and styled working directory input
- Step 2 now queries adapter models and shows a model selection dropdown
- Working directory input uses the shared folder icon + border style from
  AgentConfigForm for visual consistency
- Directory picker button falls back gracefully when showDirectoryPicker is
  unavailable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:41 -06:00
Forgotten
580a3ab647 Improve Agents page: org-first view, filter tabs in header, tree filtering
- Default view is now org chart instead of list
- Filter tabs (All/Active/Paused/Error) moved inline with page heading
- filterOrgTree() recursively filters org nodes, preserving parents that have
  matching descendants even if the parent itself doesn't match the tab filter
- agentMap memoized for O(1) lookup when rendering

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:36 -06:00
Forgotten
080964a361 Refactor NewAgentDialog and AgentDetail to use AgentConfigForm
NewAgentDialog now delegates adapter/heartbeat config to AgentConfigForm in
create mode. AgentDetail replaces its inline ConfigSection/ConfigField/ConfigBool
components with AgentConfigForm in edit mode, cutting ~250 lines.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:30 -06:00
Forgotten
7ec37d5acb Extract AgentConfigForm and agent-config-primitives components
Shared primitives (Field, ToggleField, ToggleWithNumber, CollapsibleSection,
DraftInput, DraftTextarea, DraftNumberInput, HintIcon, help text, adapterLabels,
roleLabels) extracted into agent-config-primitives.tsx.

AgentConfigForm is a dual-mode form supporting both create (controlled values)
and edit (save-on-blur per field) modes, used by NewAgentDialog and AgentDetail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:26 -06:00
Forgotten
b13c5f4b34 Inject PAPERCLIP_* env vars into all adapter process runs
Agents spawned via process, claude_local, and codex_local adapters now
automatically receive PAPERCLIP_AGENT_ID, PAPERCLIP_COMPANY_ID, and
PAPERCLIP_API_URL in their environment, eliminating the need to manually
configure these in adapter_config.env.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:19 -06:00
Forgotten
04f708c32e Add issue ancestors, @-mention wakeups on comments
- issueService.getAncestors() walks parent chain, returning up to 50 ancestors
- GET /issues/:id now includes ancestors array for context delivery to agents
- POST /issues/:id/comments now parses @-mentions and wakes mentioned agents

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:14 -06:00
Forgotten
6232d2397d Add chain-of-command API for agents
- agentService.getChainOfCommand() walks the reporting tree upward
- GET /agents/:id now returns chainOfCommand array with the full management hierarchy
- GET /agents/me endpoint returns the calling agent with its chain of command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 20:07:02 -06:00
Forgotten
5306142542 Add CLI package, config file support, and workspace setup
Add cli/ package with initial scaffolding. Add config-schema to shared
package for typed configuration. Add server config-file loader for
paperclip.config.ts support. Register cli in pnpm workspace. Add
.paperclip/ and .pnpm-store/ to gitignore. Minor Companies page fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:39:47 -06:00
Forgotten
0975907121 Add onboarding wizard and revamp agent creation flow
Add OnboardingWizard component for first-time company setup. Rework
NewAgentDialog into a multi-step wizard with adapter selection and
config. Add server route for agent connection string generation.
Wire onboarding into Dashboard and Layout. Update DialogContext with
onboarding state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:24:33 -06:00
Forgotten
8f17b6fb52 Build out agent management UI: detail page, create dialog, list view
Add NewAgentDialog for creating agents with adapter config. Expand
AgentDetail page with tabbed view (overview, runs, config, logs),
run history timeline, and live status. Enhance Agents list page with
richer cards and filtering. Update AgentProperties panel, API client,
query keys, and utility helpers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:33:04 -06:00
Forgotten
b12bf6e7dd Add new agent dialog state to DialogContext
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:25:10 -06:00
Forgotten
3dc3813266 Adopt React Query and live updates across all UI pages
Replace custom useApi/useAgents hooks with @tanstack/react-query.
Add LiveUpdatesProvider for WebSocket-driven cache invalidation.
Add queryKeys module for centralized cache key management. Rework
all pages and dialogs to use React Query mutations and queries.
Improve CompanyContext with query-based data fetching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:24:48 -06:00
Forgotten
c9c75bbc0a Implement agent runtime services and WebSocket realtime
Expand heartbeat service with full run executor, wakeup coordinator,
and adapter lifecycle. Add run-log-store for pluggable log persistence.
Add live-events service and WebSocket handler for realtime updates.
Expand agent and issue routes with runtime operations. Add ws dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:24:43 -06:00
Forgotten
2583bf4c43 Add agent runtime DB schemas and expand shared types
New schemas: agent_runtime_state, agent_wakeup_requests,
heartbeat_run_events. New migrations for runtime tables. Expand
heartbeat types with run events, wakeup reasons, and adapter state.
Add live event types. Update agent schema and shared constants.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:24:38 -06:00
Forgotten
13ef123026 Reorganize docs: move specs and plans to doc/ subdirectories
Move doc/specs/ui.md to doc/spec/ui.md. Move plans/module-system.md to
doc/plans/. Add doc/spec/agents-runtime.md and docs/ reference specs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:24:31 -06:00
Forgotten
774d74bcba Refine agent runs spec and fix Companies page layout
Add run log store as sixth component with pluggable storage adapter.
Rename wakeup triggers (ping→on_demand, add automation). Clarify
lightweight event timeline vs full-log storage separation. Fix
Companies page loading/error state layout shift.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:14:06 -06:00
Forgotten
d912670f72 Polish UI: enhance dialogs, command palette, and page layouts
Expand NewIssueDialog with richer form fields. Add NewProjectDialog.
Enhance CommandPalette with more actions and search. Improve
CompanySwitcher, EmptyState, and IssueProperties. Flesh out Activity,
Companies, Dashboard, and Inbox pages with real content and layouts.
Refine sidebar, routing, and dialog context. CSS tweaks for dark theme.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:53:20 -06:00
Forgotten
102f61c96d Add agent runs subsystem spec
Define agent execution runtime, adapter protocol, wakeup orchestration,
and live status delivery. Covers process and HTTP adapters, heartbeat
scheduling, run lifecycle, and status streaming.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:53:06 -06:00
Forgotten
f4339668f3 Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
Forgotten
fad1bd27ce Add shared UI primitives, contexts, and reusable components
Add shadcn components: avatar, breadcrumb, checkbox, collapsible,
command, dialog, dropdown-menu, label, popover, scroll-area, sheet,
skeleton, tabs, textarea, tooltip. Add shared components: BreadcrumbBar,
CommandPalette, CompanySwitcher, CommentThread, EmptyState, EntityRow,
FilterBar, InlineEditor, MetricCard, PageSkeleton, PriorityIcon,
PropertiesPanel, StatusIcon, SidebarNavItem/Section. Add contexts for
breadcrumbs, dialogs, and side panels. Add keyboard shortcut hook and
utility helpers. Update layout, sidebar, and main app shell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:00 -06:00
Forgotten
22e7930d0b Overhaul UI with shadcn components and new pages
Add shadcn/ui components (badge, button, card, input, select,
separator). Add company context provider. New pages: Activity,
Approvals, Companies, Costs, Org chart. Restyle existing pages
(Dashboard, Agents, Issues, Goals, Projects) with shadcn components
and dark theme. Update layout, sidebar navigation, and routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:32 -06:00
Forgotten
abadd469bc Add server routes for companies, approvals, costs, and dashboard
New routes: companies, approvals, costs, dashboard, authz. New
services: companies, approvals, costs, dashboard, heartbeat,
activity-log. Add auth middleware and structured error handling.
Expand existing agent and issue routes with richer CRUD operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:27 -06:00
Forgotten
8c830eae70 Expand data model with companies, approvals, costs, and heartbeats
Add new DB schemas: companies, agent_api_keys, approvals, cost_events,
heartbeat_runs, issue_comments. Add corresponding shared types and
validators. Update existing schemas (agents, goals, issues, projects)
with new fields for company association, budgets, and richer metadata.
Generate initial Drizzle migration. Update seed data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:22 -06:00
Forgotten
fade29fc3e Reorganize docs and add implementation spec
Move GOAL.md, PRODUCT.md, SPEC.md from repo root into doc/. Add
AGENTS.md (contributor guidance), doc/DEVELOPING.md (dev setup),
doc/SPEC-implementation.md (V1 implementation contract), and
doc/specs/ui.md (UI design spec). Update ClipHub doc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:07:15 -06:00
Forgotten
9722bd7106 Add ClipHub company template registry spec
ClipHub is a public registry for sharing and discovering Paperclip
company configurations. Defines template publishing, semantic search,
forking, versioning, moderation, and agent/team sub-packages. Includes
data model sketch, user flows, architecture, and V1 scope.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 20:58:21 -06:00
Forgotten
5e9b61541d Refine spec: remove goal field, add budgets, simplify agent auth
Remove standalone Company goal field — direction is now defined by
Initiatives. Add budget delegation model (Board → CEO → managers).
Simplify agent auth to connection-string generation. Adopt Better Auth.
Capitalize domain terms consistently (Company, Agent, Board, Adapter).
Clarify cost tracking scope: token/LLM budgets are core, external
revenue tracking is a future plugin.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 20:58:17 -06:00
Forgotten
5c795c5176 Refine spec: cross-team rules, cost model, and V1 scope
Clarify that cross-team collaboration rules live in the Paperclip SKILL.
Simplify task hierarchy description. Change cost denomination to both
tokens and dollars. Move HTTP adapter to V1. Minor wording cleanups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 20:49:02 -06:00
Forgotten
54f3526252 Add database setup guide and clean up spec formatting
Add doc/DATABASE.md documenting the three database modes: embedded
PGlite, local Docker PostgreSQL, and hosted production. Fix markdown
table alignment and minor whitespace in SPEC.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 20:21:15 -06:00
Forgotten
d2f76585b8 Update product spec with adapter model and expanded governance
Replace SOUL.md/HEARTBEAT.md prescriptive format with adapter-based
agent configuration. Expand board governance with approval gates,
board powers, and live control surface. Add agent export formats,
communication model, and additional spec detail throughout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 19:59:54 -06:00