How work gets done
Five real requests, each walked through the system from the moment it arrives to the moment it changes what happens next. They take the same eight steps every time. Only what fills each step changes. Read two or three and the architecture stops being a diagram you have to trust and becomes something you watched happen. Two of the five work today, two are partly built, and the fifth does not work yet. The fifth is the most useful of the five.
This page is the one place in these docs that names files and tables. Every step below says which part of the system does it, so the walkthroughs and the architecture describe the same thing.
The eight stations
Section titled “The eight stations”Work arrives through one of three doors: a message, a schedule, or an event. Whichever door it came through, it then follows one path. Two of the stations are easy to miss. The workflow is there because nobody ever picks a tool. The brand is there because it is what makes the same method produce different work.
| # | Station | Built from | Records |
|---|---|---|---|
| 1 | Trigger What starts the work: a message, a schedule, or an event? | web/src/app/api/chat/route.ts · tools/agent_chat_bridge/bridge.ts · tools/run_agent_cron.sh · tools/sync_crons.py · tools/ingest/cron_runner.py | chat_threads · chat_messages · runs · signals |
| 2 | Workflow Which workflow does this activity run? | flows/ · tools/flow_progress.py | flows · decision_plays |
| 3 | Context What does the agent already know when it wakes? | tools/recall.py · tools/memory_write.py | memory_entries · wiki_docs · pipeline_tasks |
| 4 | Skill Which know-how loads, just before the step that needs it? | skills/ · tools/skill_runner.py · tools/wilson_mcp.py | skills · skill_invocations |
| 5 | Brand Whose voice, look and customers does the output follow? | brands/ · tools/brand_file.py · tools/elements.py | brands · elements · design_systems |
| 6 | Action Does it make something, pull a lever, or ask a person? | tools/media_generate.py · tools/amazon_ads_cycle.py · tools/agent_chat_bridge/bridge.ts | generation_runs · action_levers · interventions · cockpit_settings |
| 7 | Track Where does the result live, and who decides it is good? | tools/pipeline_create.py · tools/append_task_version.py · tools/media_publish.py · tools/media_storage.py · web/src/components/workbench/ | goals · pipeline_tasks · task_versions · publish_operations · media_assets · task_reviews |
| 8 | Learn What changes next time, from the rating and from the outcome? | tools/recompute_skill_ratings.py · tools/showdown.py · tools/measure.py | task_reviews · skills · metric_snapshots · interventions · patterns |
The first and sixth stations vary the most, and they vary independently. A request can arrive through any of three doors and end in any of three kinds of action, which gives nine combinations on one path. The line from the last station back to the third is what makes this a system rather than a very good assistant.
Watch it happen five times
Section titled “Watch it happen five times”Each of these is a real request, phrased the way it would actually be said. Pick one.
“Scout, give me three cover options for the holiday activity book.” works today
Asked in chat · Scout, the Code Pineapple agent · you decide at the end
- 01TriggerHow it knows to startYou type it into the chat panel on whatever screen you are on. The message starts a run in its own isolated workspace with a short-lived pass.
web/src/app/api/chat/route.ts · tools/agent_chat_bridge/bridge.ts · chat_threads · chat_messages · runs - 02WorkflowThere is always oneAn image task runs a workflow: brief, generate options, run the checks, present them. Scout names the workflow it chose.
flows/ · tools/flow_progress.py · flows - 03ContextWhat it already knewScout wakes knowing its open tasks, the decisions from last session and what you said about this book.
tools/recall.py · memory_entries · pipeline_tasks - 04SkillKnow-how, just in timeThe image skill loads immediately before the render step, not at the start of the conversation.
skills/generate-images/ · tools/skill_runner.py · skills · skill_invocations - 05BrandOn brandThe brand's palette, audience and customers' own phrases load at run time. That is the only reason this is a Code Pineapple cover.
brands/code-pineapple/brand-essence.md · brands/code-pineapple/customer.md · tools/elements.py · brands · elements - 06ActionMake, pull a lever, or askMake something. Three renders, each through the one gateway that holds the provider key and records a receipt before the render finishes.
tools/media_generate.py · generation_runs · media_assets - 07TrackVersion, task, goalThree versions on one task. The publish gate refuses to move the task to review until every file is registered.
tools/append_task_version.py · tools/media_publish.py · pipeline_tasks · task_versions · publish_operations - 08LearnRating and outcomeYou approve A and comment “warmer sky” on C. The rating is credited to the skill that made it, not to the agent in general.
web/src/components/workbench/ · tools/recompute_skill_ratings.py · task_reviews · skills
“Every morning, tell me the three things that matter today.” works today
Set up once as a routine · Mia, your personal agent · nothing waits on you
- 01TriggerHow it knows to startA schedule fires every morning. It is set up once, kept in the agent's routine list and applied by one tool, never edited by hand.
tools/run_agent_cron.sh · tools/sync_crons.py · runs - 02WorkflowThere is always oneThe daily-priorities routine: read the plate, rank it against the quarter's goals, name the commitments and the decisions waiting.
skills/daily-priorities/ · skills - 03ContextWhat it already knewYour open tasks, review flags you have not answered, routines that failed in the last two days, and last session's summary. The same bundle whether you opened the app or the schedule did.
tools/recall.py · memory_entries · pipeline_tasks · goals - 04SkillKnow-how, just in timeThe ranking know-how loads for the ranking step only.
skills/daily-priorities/ · skill_invocations - 05BrandOn brandNone. This is personal, and personal stays private to you and Mia by how it is stored, not by a setting.
tools/memory_write.py · memory_entries - 06ActionMake, pull a lever, or askAsk a person. Mia hands you three things and two decisions in your thread. No spend, so nothing to approve.
tools/agent_chat_bridge/bridge.ts · chat_messages - 07TrackVersion, task, goalThe note itself, and anything you decide in reply, written deliberately rather than scraped from the log later.
tools/memory_write.py · memory_entries - 08LearnRating and outcomeYou say “push podcast prep to Thursday.” Whichever agent draws Thursday's plan reads it; nothing sits between writing and reading.
tools/recall.py · memory_entries
“When a pin passes a thousand views, tell me why and prep more like it.” partly built
A threshold on a number nobody watches · Scout · lands in your review queue
- 01TriggerHow it knows to startA number crosses a line. The pin's numbers arrive through a scheduled pull and land as signals. The pull is running; the threshold that turns a number into a trigger is not built.
tools/ingest/pinterest_plugin.py · tools/ingest/cron_runner.py · signals · pinterest_pin_metrics_daily - 02WorkflowThere is always oneThe channel engine's cycle: find which stage leaked, pick a move, forecast, act, compare with the forecast.
web/src/lib/db/schema/content-loop/goal-layer.ts · decision_plays · funnel_math - 03ContextWhat it already knewThe brand's funnel numbers, which stage is weakest, and the ideas already tried and rejected, so a dead idea is not proposed again.
web/src/lib/db/schema/content-loop/learning-layer.ts · funnel_math · graveyard · patterns - 04SkillKnow-how, just in timeA hook-analysis skill for the why, then a pin-writing skill for the drafts. Two skills, two moments.
skills/hook-extract/ · skills/pinterest-writer/ · skill_invocations - 05BrandOn brandNew hooks are written from the customers' own phrases, not from generic copy that happens to convert.
brands/code-pineapple/customer.md · brands - 06ActionMake, pull a lever, or askMake something, after analysing. The analysis is structured: topic, unique angle, the common belief, the contrarian reality, the hook formula and why it works. The table is built; nothing has filled it yet.
web/src/lib/db/schema/content-loop/signal-layer.ts · signal_analysis · productions - 07TrackVersion, task, goalDrafted pins queue as a task for your review. Nothing posts unapproved.
tools/append_task_version.py · productions · posts · task_versions - 08LearnRating and outcomeThe forecast is compared with what happened, and the result should pre-fill the next forecast. That field exists and has no writer.
tools/measure.py · patterns · metric_snapshots
“Stop wasting money on targets that never convert.” partly built
The daily advertising cycle · Scout, for Code Pineapple's books · you see it on the ledger
- 01TriggerHow it knows to startThe daily advertising cycle. Nobody asks; the cycle is the trigger, run under the same contract as a conversation.
tools/run_agent_cron.sh · tools/amazon_ads_cycle.py · cycles - 02WorkflowThere is always oneA play is a workflow with teeth: a trigger, the evidence it requires, its steps, its limits, an exit criterion and a cooldown so it cannot thrash the same target.
tools/amazon_ads_cycle.py · decision_plays - 03ContextWhat it already knewBreakeven, the monthly spend cap, the maximum bid, whether the kill switch is on, and whether acting alone is allowed at all.
web/src/lib/db/schema/amazon-ads.ts · cockpit_settings - 04SkillKnow-how, just in timeThe diagnosis picks the lever that moves the leaking stage, because each lever names the number it moves.
web/src/lib/db/schema/amazon-ads.ts · action_levers - 05BrandOn brandLevers are brand-scoped, so one brand's rule cannot fire against another brand's campaign.
web/src/lib/db/schema/amazon-ads.ts · action_levers - 06ActionMake, pull a lever, or askPull a lever: bid to the floor on a target with clicks and no orders. Of 27 levers, 15 can be pulled through the platform's interface; the other 12 (cover, price, subtitle, categories) are yours. Acting alone is switched off today, so the cycle proposes rather than pulls.
tools/amazon_ads_cycle.py · action_levers · interventions · cockpit_settings - 07TrackVersion, task, goalOne record carries the whole chain: what was intended, what was applied, what was forecast, what happened, and whether they reconcile.
web/src/lib/db/schema/amazon-ads.ts · interventions - 08LearnRating and outcomeForecast against actual on the same record is what moving a play from “propose only” to “just handle it” should be argued from. Nothing computes that promotion yet.
tools/measure.py · interventions · metric_snapshots
“When someone important emails me, let me know, and tell me why you thought so.” does not work yet
The useful one: every station bends, and four of them break · Mia
- 01TriggerHow it knows to startAn email arrives and has to be judged important. A pin's view count is objective; this is not. The scheduled pulls cover social and store data. None reads mail.
tools/ingest/cron_runner.py · signals - 02WorkflowThere is always oneA triage workflow: classify, decide whether it clears the bar, draft the note to you. It does not exist, and it is the cheap part.
flows/ · flows - 03ContextWhat it already knewWho matters to you. The Contacts screen lists brand audiences; there is no record of the people in your life.
tools/recall.py · memory_entries - 04SkillKnow-how, just in timeA rubric plus inference: what makes someone matter, and the signs that this sender is one. This part fits; a skill with a rubric is what skills are for.
skills/ · skills - 05BrandOn brandNone. It is personal, so there is no brand to stay on, and no brand rule to catch a bad call.
tools/memory_write.py · memory_entries - 06ActionMake, pull a lever, or askA fourth kind of action: reach you out of band. Today only two narrow pipes do that, the coding factory's phone notifications and Mia's scheduled email. No agent can choose it as an action.
web/src/lib/factory/push/ · tools/agent_chat_bridge/bridge.ts · chat_messages - 07TrackVersion, task, goalThe event record cannot hold it: a signal requires a post, a post link and a view count, and an email has none of them.
web/src/lib/db/schema/content-loop/signal-layer.ts · signals - 08LearnRating and outcomeWhether the judgement was right needs you to say so, and there is nowhere to say it. Ratings attach to a version, not to a trigger.
web/src/components/workbench/ · task_reviews
Status checked against the running system on 2026-10-06. Each grey line names the files and tables behind that step; the build fails if one stops existing.
What was the same every time
Section titled “What was the same every time”These are the principles, not because they were chosen as principles, but because they are what survived five walkthroughs that otherwise had nothing in common.
- There are only three ways in. A message, a schedule, an event. These are not three subsystems. They are three doors onto one recorded path, and the same rules apply whichever one a request uses. A fourth door would be a real architectural change.
- There is always a workflow. The activity selects the workflow, and the workflow says which skills run, in what order, with what checks. That is why a use case is the right unit to explain the system with: a use case is a workflow with a trigger on the front.
- Nothing starts cold. Every run began with context already loaded: the open tasks, the decisions from last time. A program assembles it when the agent wakes, kept lean on purpose, with the detail left until a step asks for it.
- Know-how arrives just in time, per step. The skill loads immediately before the step that needs it, not at the start. That keeps a session small enough to stay sharp while still being expert at the moment it matters.
- Brand is loaded, not baked in. The same skill makes a Code Pineapple cover or a RiseBlox one because the brand loads at run time. A skill never knows which brand it is for until it runs.
- An action is one of exactly three kinds. Make something, pull a lever in a system, or ask a person. This is the sharpest test of whether a request fits: if it needs a fourth kind of action, that is a genuine gap, and the email walkthrough is one.
- Money always stops and asks. Including inside a scheduled run in the middle of the night. The guardrail does not depend on anyone watching.
- Output is a version on a task, or it did not happen. Versions belong to tasks, and tasks serve goals. Anything that leaves the system unregistered is lost work.
- Every run ends by changing what the next one knows. A rating lands on the version it was given on and scores the skill that made it. An outcome is compared with its forecast. Over time, a skill or play that has earned it should move up the trust ladder, from propose only to just handle it.
Where it is thin
Section titled “Where it is thin”The walkthroughs are also an audit. These are the places where the path is designed but not yet carrying weight. What works today holds the current status of each.
- Track has a hole in the middle. Versions, tasks and goals are real records. Projects are not: a task carries a project name as a label, and there is no project record to group them. A task can point at a goal, but nothing works out which goal a task moves.
- Learn has one input of two. Ratings score skills today. The outcome input, where a forecast is compared with what happened and the result shapes the next forecast, has its fields and no writer. Moving a skill or a play up the trust ladder is a rule followed by hand, not something the system computes.
- Acting alone is switched off. The advertising cycle proposes changes; it does not pull levers by itself yet.
- The event door is shaped like a social post. An event record requires a post, a link and a view count, so anything that is not a post (an email, a booking, a payment) has nowhere to land. The email walkthrough shows what that costs.
- There is no fourth action. Reaching you outside the app is limited to a scheduled email and the coding factory’s phone notifications. An agent cannot choose to do it.
Related
Sources: How Work Gets Done (walkthrough page, 2026-10-02), absorbed and re-checked against the running system 2026-10-06, docs/DECISIONS.md (ADR-029, ADR-028), docs/architecture/overview.md (the loop), docs/architecture/concept-map.json (stations), docs/architecture/engine.md · Last verified 2026-10-06

