AkurAI Build
Menu

popagent

public

Latest change a976edbfb97c44a0e4fbac194e5e94b27b53f1f8 - Create follow-up tasks autonomously from completed scheduled reports by AkurAI Build

# Task-derived work

Follow-up planning for scheduled runs and the read-only company-state tool.
Task/schedule storage, retry, and lifecycle facts live in [AGENTS_AGENT.md](AGENTS_AGENT.md).

## Autonomous follow-up tasks

`src/follow-ups.ts` turns a completed *scheduled* run into queued tasks when
its schedule has `follow_ups=TRUE` (`followUps` in the API/UI, default off).
`createFollowUps` runs a tool-free planner agent with structured output
(`followUpPlanSchema`, at most `MAX_FOLLOW_UPS`=5 items of title/prompt/
rationale/severity) on the schedule's model (routed when `policy/routing`),
treats the report as untrusted data, and refuses deploy/promotion/DNS/secret/
outreach actions by instruction. Titles are normalized and compared with
`AgentTaskStore.recentFollowUpPrompts` (open, or created within 7 days, in the
same workspace) so a daily report does not re-file the same gap. Created tasks
carry `follow_up_of_task_id`, are enqueued immediately, and are announced once
in `#general`; tasks that are themselves follow-ups never plan further ones.
Planner failures are logged (`task.follow_ups.failed`) and never affect the
completed parent. Contracts: `src/follow-ups.test.ts`, `src/tasks.test.ts`.

## Live company state tool

`companyStatus` (`src/tools/company-status.ts`) is a read-only, bounded snapshot
of registered workspaces, tasks in a look-back window grouped by status with
output excerpts, the Needs-attention bucket, schedules with their latest run,
autonomy state, and recent evolution signals. It exists because workspace shell
commands run in the network-disabled sandbox and cannot reach `./popagent` or
the HTTP API. Seed migration `2026-08-16-company-status-tool-v1` grants it to
the Orchistrator and tells it that its final task output is posted to `#general`
by the platform. Contract: `src/tools/company-status.test.ts`.