Business . Technology . Strategy

My Agentic Playbook: Technical Project Manager Agent
AGENTIC WORKFLOW · CLAUDE CODE · AI AGENTS

My Agentic Playbook: Technical Project Manager Agent

The technical project manager agent behind my automated trading platform: Claude Code skill, protected-file guardrails, error triage over MCP, and the prompt.

SAT OCT 24 2026◆24 MIN READ◆NORIK DAVTIAN

I learned how to build AI agent automation the hard way, on my automated trading platform Matador, so you don’t have to. AI helped me ship code fast, and that speed brought a lot of chaos with it. I like building resilient systems, and no human can review, understand and manage that velocity the old way. AI agents run most of Matador’s product and engineering, and a bug in production software this sensitive costs me money, especially on an options trading platform, where everything is amplified. My solution is to use the same agents to manage the system at scale. Here I present the “Technical Project Manager” from my Agentic Playbook. You can integrate it into your repository in one sitting and run it on a scheduled interval to keep your project priorities aligned and your coding agents maintained.

Technical PM is an overloaded title. At most large companies it expands to program manager, in product teams to product manager, and in smaller shops to project manager. The agent in this playbook does the work behind all three, and I call it the project manager because that is the part it owns outright.

The PWhat the agent does
ProductIt proposes north star edits, and you ratify them.
ProjectIt keeps status and priorities in one tracker, claims work and dispatches it.
ProgramIt runs the daily, weekly and monthly cadence on a ledger.

I build AI-integrated pipelines for new-age AI software, and I have run production systems for fifteen years. The lesson that stuck is to build the recovery beside the feature, never after it. At Tesla Insurance my team took multi-plan subscription billing from a 30-second round trip to sub-millisecond, then chaos-tested it and gave it failover and self-healing recovery, while that business grew to $1B. Matador runs the same lesson against real capital every trading day, because a payment that fails silently and a market feed that dies silently fail the same way. Everything here follows one rule, automate as you build: anything I do twice becomes a file the next run reads. The question I ask in Matador’s repo every morning is the one this article answers: what can I hand an agent, and what must it never touch.

By the end you will have the whole system in your own repository. The prompt scaffolds it in one sitting. The project manager skill comes as a template you can copy, with its guardrails and the daily, weekly and monthly cadence it runs on, next to the six-label tracker, the dispatcher rules that decide what an agent may start, and the deny rules that make the protected files unwritable. The morning error-triage sweep reads production logs over MCP and reports in one line, so a new error reaches you before anyone asks about it. The spec of record and the memory index keep the agents honest about what is true, and seven steps you can finish in one sitting put all of it in place without ever handing an agent your merge button. The prompt comes first, because it does not need the rest of the article to run. Paste it into your coding agent at the root of your repository. It asks before it decides anything, opens no pull requests, and works whether or not the agent can reach this page.

Set up an automate-as-you-build workflow for this repository, modeled on https://norik.io/posts/ai-agents-trading-platform. Read it if you can reach it. The rules either way:

- Agents propose; the owner approves. Open no pull requests and change no application code during this setup.
- Three sources of truth that never overlap: a north star doc for direction, the tracker for status, plan docs and changelogs for reasoning and history.
- Protected files: where a bad change costs money or data. No agent edits one without a per-file OK from the owner.
- Claim before work: in progress plus an assignee before a branch exists. An open PR or existing branch means taken.
- Close by evidence: cite the commit that delivered it, never "looks done".

Read README, docs, CI config, package manifests, recent commits, and the tracker if you can reach it. Then, asking me whenever a step needs a decision rather than a guess:

1. Propose the protected-files list, one reason per file.
2. Define "verified" as the exact commands: typecheck, lint, build, test.
3. Propose the label set (P0, P1, decision, backlog, blocked, in-progress); list issues with the wrong label or no "Do" section (the concrete steps an agent executes).
4. Draft docs/NORTH_STAR.md in stages with exit criteria, from what the repo already says.
5. Start docs/KNOWN_ERRORS.md from recurring errors in logs, tests or issues, as pattern | meaning | benign or actionable.
6. Write the project-manager skill (Claude Code: .claude/skills/project-manager/SKILL.md) with three sections: Project facts (tracker, agent identity, north star path, approver, protected files, verify commands, worktree root, agent cap); Guardrails (protected files are absolute; claim before you start; you open PRs, the approver merges; read-only when unsure; read code from origin/main, never the working tree); Modes (daily, groom, prioritize, dispatch).
7. Write the memory index you read on entry (Claude Code: .claude/memory/MEMORY.md), one file per correction, seeded with three things in this repo that surprised you or contradicted its docs.
8. Add the protected-files rule to the file you read on entry (CLAUDE.md, AGENTS.md or equivalent), and in Claude Code also write it as Edit deny rules in a committed .claude/settings.json, so the rule is enforced rather than read.
9. Propose what runs daily, weekly, monthly.

Show me the plan before writing any file. Then write the files. Open no pull requests.

While it runs, here is the job it does. With AI we ship fast, and the time it takes to close a bug has to speed up with it. Prioritizing P0 is essential. Figuring out what is next on the agenda and removing the obstacles in front of it, the way a real engineering manager would, is all this skill defines. It starts every morning with the errors.

Error triage every morning, before anyone asks

A production error costs you once when it happens and again every morning when somebody re-derives what it means. An agent now pays the second cost, every morning, before anyone asks.

The agent runs on my laptop and reads production logs through the observability platform’s MCP server. The log store strips the dynamic parts from every line and derives a pattern from what remains, and the agent groups by that pattern, which collapses tens of thousands of near-identical lines into a handful of buckets. It checks each bucket against the error catalog, a file with one row per known pattern, keyed on the alert’s own text so an agent can match it, that says what the pattern means and whether it is benign or actionable. The agent reads the biggest buckets and labels each one BENIGN (count it, move on), KNOWN (compare it to baseline), NEW (not in the catalog, so it leads the report with an example line) or SPIKE (a known-benign pattern at abnormal volume, the label that catches real incidents). Nobody reads a daily report they cannot skim, so a quiet day’s report is one line.

TRIAGE <date>: <total> patterns | <new> new | <spikes> spiking | <actionable> actionable

The sweep shortens one distance: between a thing going wrong and a human holding a description of it that the agent has named and classified. A morning sweep caps that distance at hours instead of however long it takes for somebody to get suspicious. The sweep observes and proposes. It opens no pull requests, and when a new pattern recurs it drafts a catalog row and asks me before adding it. It runs on my laptop rather than in the cloud, because a cloud checkout cannot reach the log source and could only report that nothing is reachable.

The sweep only fills the catalog, and the catalog is what an agent needs when an unfamiliar alert arrives. Hand it one with no catalog and it investigates for an hour, then writes a convincing postmortem of something that never happened. The row that has saved me the most time describes an error-level alert that looks exactly like production until the stack trace shows a path under a user’s home directory and a fixture account number: a developer’s local test run fired a real alert into the production log source.

The project manager is a file

Triage is the work I do not plan. The planned work runs through my technical project manager agent, which is a file rather than a chat window: a job description that carries its own commands, which I version beside the code it manages and review in a pull request. It lives at .claude/skills/project-manager/SKILL.md, the skill format Claude Code reads, and it is plain markdown, so nothing in it belongs to one agent. Every project-specific fact sits in one block at the top.

---
name: project-manager
description: Technical project manager for this repo. Owns the north star and keeps every open issue, plan doc and chore in order behind it.
argument-hint: "[daily|groom|prioritize|dispatch]"
---

# Project Manager

## Project facts

Fill these in. Nothing else below is project-specific.

tracker:         github | linear | jira | trello (reached over its MCP server)
agent_identity:  <bot user the agent assigns to>
north_star:      docs/NORTH_STAR.md
approver:        <name>
protected_files: <path>, <path>, ...
verify_with:     <typecheck> <lint> <build> <test>
worktree_root:   .claude/worktrees/
agent_cap:       2

## Guardrails - read before acting

These exist because each one has already cost real work or real money.

- Protected files are absolute: you never edit them, and neither does any agent you launch.
- Claim before you start: in progress, assigned to agent_identity, branch named after the item.
- You open PRs; the approver merges.
- Read-only when unsure: if the snapshot fails, report and stop.

## Modes

daily | groom | prioritize | dispatch
.claude/skills/project-manager/
├── SKILL.md                project facts · guardrails · modes
└── references/
    ├── cadence.md          daily, weekly, monthly, on a ledger
    ├── critical-path.md    the longest chain of "Blocked by" edges
    ├── dispatch.md         who may start work, and what nobody touches
    ├── prioritization.md   P0 before P1; a decision is not work
    └── report.md           the one-line-a-day output contract

The skill file stays short, and each mode’s procedure lives in a reference file it loads only when that mode runs, which keeps the daily run cheap. It plans against the north star doc. I run it by hand with /project-manager when I want a groom or a dispatch, and a routine named project-manager-daily runs the daily mode every morning on my laptop, which is the scheduled interval the opening promised.

What keeps it honest is three sources of truth that never overlap. The north star doc holds direction, in stages with exit criteria; the agent proposes edits and I ratify them. Issues and milestones are the only place status lives. Plan docs and changelogs hold reasoning and history, never status, and that last clause kills a class of drift: a roadmap file that says “in progress” is a lie within a week, while an issue carrying that label is a fact the agent can query. Every run also starts from the same read-only snapshot of issues, pull requests, branches, commits and the dependency audit, so two runs never disagree because one read a stale checkout, and if the snapshot fails the run reports and stops. And the agent reads code from origin/main, never the working tree, because my checkout usually sits twenty commits behind and a citation from a stale tree is a hallucination with a line number on it.

Maintenance runs on a ledger

The same skill runs the cadence on a ledger rather than on the weekday, so a missed Monday still owes its weekly. Daily, the agent runs the dependency audit, and a critical or high advisory with a non-major fix becomes a pull request the same day, since there is nothing for me to decide. The agent verifies it with the exact commands the skill names and never fixes one by jumping a major version. Weekly, it batches version bumps, grooms, re-prioritizes, and lists stale branches without deleting any. Monthly, it fact-checks the two or three specs nobody has touched for the longest time. The first run of anything outward-facing waits for my yes, except the security patch, which the agent opens without asking; I still merge it.

Where status lives, and who may write it

That one place where status lives has to be machine-readable, and the agent has to be able to write to it. Mine is GitHub Issues, which the agent drives through GitHub’s command-line tool; Linear, Jira and Trello do the same job through their MCP servers. The label set stays small enough that each label has a job.

P0           Capital safety or live security exposure - before anything else
P1           Reliability, or a blocker on the path to the next stage

decision     Not work - a call a human makes
backlog      An umbrella checklist, not an item
blocked      A "Blocked by:" line names an open issue
in-progress  The dispatcher started an agent; a comment names the branch

The weekly groom turns described dependencies into declared ones: when an issue body says “after we land the transaction work”, it turns that sentence into a Blocked by: line naming the open issue. The critical path is the longest chain of those edges, and its head, the one item unblocked right now, is what to work on today. The agent closes an issue by evidence: it posts the commit that delivered it as the closing comment, and it never closes one because it looks done. The agent never closes a decision; it lists the options, recommends one, and says what the decision blocks.

Who may start work, and what nobody touches

A planner that only plans is a diary, so the skill ends in a dispatcher. A script computes eligibility and prints two lists, launch now and not dispatched, and why, and the agent pastes the second into the report verbatim. Only P0 and P1 items qualify, and the script excludes a decision, an umbrella, a blocked item and anything already in flight. It holds back an item with no “Do” section, because the agent would be guessing at scope, and an item that asks for a plan, because a plan needs a conversation with me first. The agent’s judgment never widens eligibility: if a rule is wrong, I change it in a pull request. The only lock is the claim: the dispatcher marks the item in progress, assigns it and names the branch after it.

Protected files sit above all of it. No agent edits any of six files without my explicit approval. They sit between a signal and a fill: the coordinator that turns a signal into an intent, the worker that runs it, the client that routes live versus paper, live and paper execution, and the pricing helper. Change one badly and you get a fill. The pricing helper joined the list after an incident. I write the rule in four places, because one copy is easy to miss: in the instructions file every coding agent reads on entry, in the skill’s guardrails, in the dispatch script, which refuses to start any issue whose body names one of those files, and in the agent’s own settings, where it stops being a request and becomes a refusal. Here is the fourth copy, with the names made generic.

{
  "permissions": {
    "deny": [
      "Edit(**/signalCoordinator.ts)",
      "Edit(**/orderWorker.ts)",
      "Edit(**/tradingClient.ts)",
      "Edit(**/liveExecution.ts)",
      "Edit(**/paperExecution.ts)",
      "Edit(**/pricingHelper.ts)",
      "Read(./.env)",
      "Read(./.env.*)"
    ]
  }
}

Claude Code checks deny rules before anything else. A deny beats every allow rule, holds in every permission mode including the one that skips prompts, and no hook can override it. An Edit rule covers every tool that writes a file, and it also catches the shell commands Claude Code recognizes, such as sed and tee and a redirect into the file. The two Read rules keep the secrets out of the context window by the same mechanism. The **/ prefix matters because my agents work in worktrees under .claude/worktrees, and a path anchored at the root would miss them. A script that opens the file itself still gets through, so the fourth copy narrows the gap rather than closing it, and the dispatch script only filters issue text, so I read every diff.

Great documentation prevents AI drifting

The skill and the catalog tell the agents what to do; the documents tell them what is true. Great documentation does for a model what it does for a new engineer. It explains the system in a fraction of the tokens the code would cost. It carries the motivation, why a decision went one way and what it ruled out, and no amount of reading code recovers that. A changelog tells the agent what changed last week without opening a single file. Then the agent can go straight to the part it needs and get the job done, instead of touring the repository first.

If your agent has to read the code to learn all of that, do not feel bad when it hallucinates. You allowed the drift. Code is if this, then that, and an if-this-then-that without the real data behind it is open to interpretation. An agent’s failure mode is confident wrongness: give it a plausible field name and it writes a query around it, gets an empty result, and explains the empty result to you. All of it looks like work while it happens. Nothing in a folder of equally weighted markdown says whether a file is a promise or a leftover, so an agent reads a two-year-old plan as fact and builds on it.

Every document in the repo therefore declares, in its first lines, what genre it is, how much authority it carries and when it was last true.

There are levels to docs

Documentation in the Matador repo is not one folder of markdown. It runs in levels, from direction at the top to history at the bottom, and each level owns one kind of truth. The agent reads top down: a few hundred tokens of north star and architecture orient it, the spec of record tells it what is true today, the plan tells it why, and the changelog tells it what moved last week. It only descends further when the job needs the trail.

  • North star: direction only, in stages with exit criteria. The agent proposes edits and I ratify them.
  • ARCHITECTURE.md: the map. Layering, data flow, and where business logic may live. The first thing anyone reads.
  • Spec of record, one per subsystem: what is true right now, with a status line that says what enforces and what only advises.
  • pipeline/: the plan of record. Phases, promotion gates, and the decisions reserved for a human. Reasoning lives here, never status.
  • research/: investigations that open by stating they changed nothing and naming the window they looked at. Never commitments.
  • guide/ and design/: user-facing docs read at build time and rendered inside the product, and the mockups and prototypes behind them.
  • archive/: plans whose feature shipped, moved rather than deleted, each stamped with the date and branch that delivered it.
  • changelogs/ and postmortems/: what shipped and what broke, with timelines.
  • Audits: the date is in the filename, so staleness shows without opening the file.

A plan whose feature ships moves to the archive that week, and the monthly pass fact-checks the specs nobody has touched for longest, because a level only helps while what sits in it is still true.

The spec of record, one per subsystem, is the clearest case. Watchbird’s spec, for the layer that reads the market before each entry, opens like this:

# Watchbird - Pre-Trade Signal Intelligence (Spec of Record)

**Status:** Shadow phases merged. Enforcement landed 2026-08-21 for ACCOUNT-RISK rules only. Market-context rules remain SHADOW ONLY - they cannot change, delay, or drop a trade.
**Roadmap:** pipeline/WATCHBIRD_PLAN.md
**Siblings:** WATCHDOG_FREEFORM_RULES.md, WATCHDOG_EXTENDING.md

The Status line says which part of the system enforces and which only advises, with the date. It states the negative outright, that shadow rules cannot change, delay or drop a trade, so no reader grants the system more authority than it has. Pre-trade advice ran as a dry run first: it watched thousands of signals, logged every piece of advice it would have given, and acted on none of it. A rule graduates only after it has been right in the dark for long enough that its record can carry the argument.

Matador's Automation page, Watchbird tab: three advisory rules that read the market before each entry, with a recorder counting signals on paper
Watchbird, the pre-entry layer. Every rule here advises and the trade still goes; only account-risk rules may block. The recorder has logged 2,948 signals so far, and every rule shown is still advisory.

Watchdog, its sibling, watches positions after entry under the same rule of authority. Plain-English rules watch each open position and step in before a loss grows, and every new rule starts on paper.

Matador's Automation page, Watchdog tab: plain-English rules on open positions, with a history of a 2×ATR trailing stop tightening
Watchdog, the while-open layer. A 2×ATR trailing stop, a daily loss limit and a cap on time in a trade, each as a plain-English rule. New rules start on paper, and the history logs every stop move with its reason.

Corrections too small for a doc

Some corrections are too small for a spec and too expensive to lose. Those go into a memory index: one short file per correction, and an index the agent reads before it does anything else. The trigger is the second time I correct an agent on the same thing, which is the automate-as-you-build rule again. In Claude Code the index lives at .claude/memory/MEMORY.md, and the prompt above seeds it for you. Here is a slice of mine, shortened and with the names made generic.

- [Prod logs and error triage](reference_prod_logs.md) — production logs over the observability MCP, /error-triage command, daily routine
- [Never push to main without permission](feedback_no_push_main.md) — always ask before pushing to main
- [Never switch branches during a pipeline run](feedback_no_branch_switch_during_pipeline.md) — kills the running batch
- [Everything is immutable](feedback_immutable_data.md) — INSERT-only, never UPDATE/UPSERT; current value is the most recent row by created_at
- [No dirty defaults in low-level helpers](feedback_no_dirty_defaults.md) — fix missing fields at the caller or validation boundary, never inside persistence helpers
- [The pricing helper is protected pipeline](feedback_pricing_helper_protected.md) — sets live-money prices; ask and disclose live impact before editing, even though it is not on the explicit do-not-modify list

Each line is a title, a link to the file and a one-line hook, so the agent decides from the index alone whether a file is worth opening. Reference lines point at how-tos it would otherwise rediscover every session. Feedback lines are corrections, and two of them show the shape. Everything is immutable: nothing in the schema enforces that, so an agent would happily write a reasonable UPDATE and quietly overwrite the history every other query depends on, and one line in a file blocks code that looks right and is wrong. The last line protects the pricing helper even though it is not on the explicit do-not-modify list. I wrote it the day that file caused an incident, and nothing autonomous has touched the file since. The memory held that line on its own until the deny rule in the settings made it mechanical.

Postmortems feed the same index. A postmortem sits at the bottom of the levels, in history, and an agent reads it only when a job sends it there, so the lesson inside never reaches the next session on its own. Every postmortem therefore ends with one line that moves up: the lesson, written as a rule the agent can follow, in its own memory file. If a mistake was important enough to write up, it should not happen twice, and a rule the agent reads on entry is how you make sure of that.

Guiding principles belong in the index too, each as one line with a link to the doc that explains it. Everything is immutable is one: the line carries the rule, INSERT-only and never UPDATE, and the file behind it spells out what that means in practice and what it rules out. The agent reads the line on entry, in a handful of tokens, and follows the link only when the job touches the rule, which is the same deal a new engineer gets: the principle in the first hour, the reasoning when they need it.

A correction I make in conversation is gone by the next session. A correction I write to a file loads before the next session starts, and it keeps working after I replace the agent.

What survives when I replace the agents

Take Matador out of this and the agentic workflow still stands. The agents own the operations between decisions, and I own the decisions. It is the same division I use for video production in the agentic video workflow, where the agent drives the browser and keeps the record while I make the taste calls.

The automate-as-you-build loop: build, automate, run agents, manage, and a feedback loop back into build01Buildfeature + its recovery02Automatetwice → becomes a file03Run Agentsgroom · dispatch · triage04Manageratify · diff · merge05Feedback Loopincident → catalog · correction → memoryAUTOMATE AS YOU BUILD · ANYTHING DONE TWICE BECOMES A FILE THE NEXT RUN READS
The loop the article describes. Build the feature with its recovery, turn anything done twice into a file, let the agents run the files, manage by ratifying and reading the diff, and feed every incident and correction back into the record the next build starts from.

The method is three commitments: I name the files where a bad change costs money or data, the agent claims work in the tracker before a branch exists, and nothing reaches production without me reading the diff. The skill, the catalog, the labels and the memory index are those commitments, which I wrote into files an agent reads.

I rewrite the agents and the prompts every few months, and the files survive every rewrite; the record is what compounds. I built the trading layer the same way. The Matador algorithmic options trading post covers paper trading with live data, and the badly sized trade that turned position sizing into a guardrail.

Enjoy the freedom of self-building, self-healing, self-maintaining software

It takes one sitting, which is the promise at the top. The prompt does the typing and you make the calls, so each step is a decision rather than a project, and each one makes the next safe to take.

  1. Name the protected files, where a bad change costs money or data, in one commit with no code.
  2. Write that rule four times: in your agent instructions, in the project-manager skill the prompt wrote, in whatever decides what an agent may start, and as deny rules in your agent’s settings, where it is enforced rather than read.
  3. Move task status into one tracker your agent can write to, with a label set and a claim rule: in progress plus an assignee.
  4. Add a “Do” section to your top five issues.
  5. Open your error catalog with one row: the last production error you chased, and what it actually was.
  6. Write one memory file for the thing you have already corrected your agent on twice.
  7. Then let it open a pull request. Never let it merge.

The prompt scaffolds steps 1, 3, 5 and 6, writes three of the four copies in step 2, and leaves every decision in them to you. From then on the loop fills its own files: the next thing you fix twice becomes a memory, and the next time something goes quiet, the fix will already have a file to live in.

Matador is open to experienced traders by invitation at mtadr.com; trading is risky, and nothing here is financial advice.

Nothing in this loop is specific to trading. Run it for any function in your business, or any sub-function of one. Want your social media posts written and scheduled every morning? Give the agents the job and let the manager run the agents. Want eyes on your competitors’ pricing, with a report the day something moves? Same loop: one skill, one tracker, one catalog of what the agents found and what you decided. Anything they do twice becomes a file, the manager keeps the agenda, and you keep the merge button.

Run the prompt on your repo and tell me what it found: I’m @NorikDavtian. If you want me to look into your product and show you where the agents loop fits, and what breaks on the way to 100x, the call is free. No pitch.

Schedule a call →

Your agents already ship fast. Now give them a manager.

Steal My Agentic Playbook

Follow my progress as I ship new builds, orchestrate AI agents, and post field notes from the studio. No spam — just signal.

Norik.io · Business · Technology · Strategy