Tag: Claude Code

  • What 3 months building a 99-agent Claude Code system taught me about context

    What 3 months building a 99-agent Claude Code system taught me about context

    I went quiet for seven weeks. I was building something called RennOS, a Claude Code setup with 99 specialized agents across 20 departments that runs my whole brand and a chunk of my personal life. For most of those seven weeks, it was broken in a specific, frustrating way: the agents would start sharp and get dumber the longer I used them.

    Then something clicked. I stopped writing CLAUDE.md for myself. I started writing it for a version of Claude that has zero memory of this project, zero knowledge of what I tried yesterday, zero sense of what the file it just opened is supposed to do. That one mindset shift is when 99 agents actually started cooperating.

    This is what I learned about context, and why the fix is almost never a better prompt.

    Why your sessions get dumber

    There’s a post on r/ClaudeAI from a couple of months ago that stuck with me: “You accidentally say ‘Hello’ to Claude and it consumes 4% of your session limit.” 6,200 upvotes. The replies were full of people describing the same thing, a session starts fine, then halfway through the model starts forgetting what you asked twenty messages ago, or blending two unrelated tasks together, or confidently hallucinating a file path that doesn’t exist.

    The instinct is to blame the prompt. Or blame the model. Or wait for a bigger context window. I did all three for about a month.

    What’s actually happening is simpler. Context inside a session is like a desk. Every message adds another sheet of paper. Eventually there’s no room left to think, and the model starts reaching for whatever’s on top. Joshua Chakmanho put it cleanly on Twitter recently: “the more the context accumulates, the more dumb the model is.” That matched my experience exactly.

    The fix isn’t a bigger desk. It’s a different workflow. Here are the four patterns that actually moved the needle for me.

    1. Treat every session like a cold start

    This is the mindset shift. Everything else follows from it.

    Clean wooden desk in warm morning light with a blank open notebook, sharpened pencil, and steaming tea, representing a fresh Claude Code session cold start.

    Stop thinking of your chat history as memory. It isn’t memory. It’s scratch paper that gets thrown away when the session ends, and it poisons the model’s attention long before that. If you’re relying on “I told Claude about this earlier in the conversation,” you’re building on sand.

    The first thing I did inside RennOS was make the CEO agent, the top-level orchestrator, explicitly state in its own instructions that every session is a cold start. Not as a reminder to me. As a reminder to itself. The CEO agent opens every session by reading a set of files in .claude/ceo-memory/, because it genuinely does not remember what it decided yesterday. It has to re-read.

    That sounds inefficient. It isn’t. A session that rebuilds its context from durable files is always sharper than a session that’s been stewing in its own output for two hours.

    2. Keep memory in markdown, not in the session

    Once you accept the cold start, the next question is obvious. Where does the state live?

    Wooden library card catalog with blank brass label holders and one drawer open revealing blank index cards, representing markdown memory files Claude Code agents read on demand.

    For me it lives in markdown files on disk. Nothing fancier than that. Andrej Karpathy has been talking about a pattern he calls WikiLLM. The idea is you give the model a wiki of text files and let it read what it needs instead of cramming everything into the prompt. Community implementations of the pattern have collectively pulled in thousands of GitHub stars over the past week, which suggests the rest of the ecosystem is landing on the same answer.

    RennOS uses this everywhere. The CEO agent has .claude/ceo-memory/ with files like org-chart.md, workflows.md, active_projects.md, and decisions.md. Each of the 99 specialized agents has its own .claude/agent-memory/<agent-name>/MEMORY.md, which gets loaded the moment that agent is spawned. Shared knowledge like brand identity and the content calendar lives in data/, where any agent can read or write it.

    The Twitter workflow alone has its own eight-file brain under data/social/twitter/brain/: voice, patterns, posts, viral, analytics, growth-strategy, daily-activity, and a MEMORY file. When the short-form writer gets spawned to draft a reply, it reads those files fresh. No session state required. No “remember what we talked about on Tuesday.” Just files.

    The payoff is that the system survives a cold start perfectly. Close the laptop, open it tomorrow, and every agent boots up with the same brain it had yesterday. Better, actually, because the files have been edited to be clearer.

    3. Split the roles

    This one took me the longest to accept, because it felt wasteful at first.

    Warmly lit workshop with three separate craft stations for writing, editing, and labeling, representing Claude Code's split-role multi-agent architecture.

    The instinct when you’re using Claude Code is to let one session do everything: research the problem, plan the approach, write the code, review the code, commit the code. It feels faster. It isn’t. By the time the model is reviewing its own code, its context is half-full of the exact reasoning it used to write it, which is the worst possible state for catching its own bugs.

    Inside RennOS, every agent has exactly one job. There is a long-form-writer for blog posts. There’s a content-editor that reviews drafts and never writes them from scratch. There’s an seo-specialist that adds metadata and never touches the prose. There’s a research agent that reads the web and dumps findings into data/, and a strategy agent that reads those findings and makes recommendations. They talk to each other through files, not through a shared session.

    You don’t need 99 agents to get this benefit. You can get most of it with two. Open one Claude Code session to research and plan. Close it. Open a fresh one to implement. Close it. Open a third to review. The review session has no attachment to the implementation because it genuinely didn’t write it. It’s the closest thing to a real second opinion you’ll get out of a single model.

    If you try only one thing from this post, try that.

    4. Write every file for a future amnesiac

    This is the pattern the thesis tweet is about, and it’s the one that changed the most things at once.

    For the first month of RennOS, I wrote CLAUDE.md the way I’d write a note to myself. Short, gestural, full of phrases like “the usual workflow” and “the main agents.” I knew what I meant. The problem is Claude didn’t. Every cold-start session would open that file, hit a phrase like “the usual workflow,” and just… guess. Sometimes it would guess well. Often it wouldn’t.

    The shift was writing every file for a hypothetical fresh session that has never seen this project. That means:

    • Name the specific thing, not the category. Not “the main agents,” but “the CEO agent at .claude/CLAUDE.md, which delegates to 99 specialists listed in ceo-memory/org-chart.md.”
    • State the assumptions. If a workflow expects Asana to be connected, say so in the file, not in your head.
    • Leave no implicit context. If a decision has a reason, write the reason down. A future session will not remember why.
    • Define acronyms the first time. My own ADHD brain was happy to write “UAT gate” without defining User Acceptance Testing. A cold-start Claude was not.

    This is also where the 230+ skill playbook files in .claude/skills/ stopped being a mess and started being useful. Each skill is a markdown recipe another agent can follow, written for a reader who has never done this task before. They work because they assume nothing.

    The rule is simple. If a file only makes sense to someone who already has the context in their head, it will fail every cold-start session that opens it. Which is all of them.

    What to do Monday morning

    You don’t need to build RennOS to get the benefit of any of this. Here’s the smallest useful thing you can do.

    Pick one project where your Claude Code sessions keep going sideways. Open the project folder and create a CLAUDE.md file. Write it for a version of Claude that has never seen this project before. Name the specific files that matter. State the assumptions. Write down the two or three decisions that have a reason you’d otherwise have to explain out loud. Keep it short, but keep it specific.

    Then next time you open a session, let it read that file first and nothing else. Ask your question. See what happens.

    That single file changed more for me than any prompt tweak I’ve ever made. It’s a small habit with a big shape, and once you feel the difference you start writing everything this way.

    I’m going to keep sharing what worked and what didn’t from the RennOS build in future posts. No hype. No fear. Just what I tested.

  • I Built Kiro IDE’s Workflow in Claude Code Slash Commands

    I Built Kiro IDE’s Workflow in Claude Code Slash Commands

    Look, I was getting tired of jumping between AI coding tools like some kind of digital nomad with commitment issues.

    One day I’d be in Cursor for quick edits.

    Next day trying out Kiro for its spec-driven magic.

    Then back to Claude Code because I actually like working in the terminal (yes, I’m that developer).

    Each switch meant losing context.

    Starting over.

    Explaining my project again like I had coding amnesia.

    It was exhausting.

    Then I had a thought.

    What if I could get Kiro’s best features without being locked into their platform?

    What if I could build the same structured workflow using Claude Code’s slash commands?

    Turns out, I could.

    And it works better than I expected.

    Why Kiro IDE Changed Everything

    Kiro didn’t just give us another AI coding assistant (because we clearly needed the 47th one).

    They gave us a philosophy.

    Spec-driven development instead of “vibe coding.”

    Instead of throwing prompts at AI and hoping for the best (the developer equivalent of throwing spaghetti at the wall), Kiro makes you think first.

    It takes your messy idea and forces it into a proper specification.

    Then it breaks that spec into actual tasks.

    Then it builds each task methodically.

    The agent hooks were genius too.

    Every time you save a file, hooks check your work.

    Tests get written automatically.

    Documentation gets updated.

    Security scans happen in the background.

    It’s like having a senior developer watching over your shoulder.

    But not in the “why didn’t you use a semicolon here” annoying way.

    This structured approach solved something I didn’t even know was broken.

    Most AI tools make you feel productive but leave you with a mess.

    Kiro made you actually productive and left you with maintainable code.

    The difference between feeling good and being good.

    The Claude Code Alternative

    Here’s what most people don’t understand about Claude Code’s slash commands.

    They think they’re just shortcuts.

    Quick ways to type common prompts.

    They’re wrong (but in a really understandable way).

    Slash commands are programmable workflows.

    You can build entire development processes inside them.

    And unlike Kiro, you’re not locked into someone else’s platform.

    You own your commands.

    You can modify them.

    You can share them.

    You can use them anywhere Claude Code works.

    Which is everywhere (unless you’re still coding on a toaster, in which case we need to talk).

    The token efficiency alone makes this worth it.

    Instead of writing the same context-heavy prompt over and over, you write it once.

    Save it as a command.

    Reuse it forever.

    Your conversations stay focused.

    Your costs stay low.

    Your workflows stay consistent.

    Building the Kiro Workflow Commands

    I started by studying what made Kiro actually work.

    The actual mechanics.

    Turns out, Kiro’s magic comes from one thing.

    Enforced structure.

    Requirements before design.

    Design before implementation.

    No skipping steps.

    No “I’ll figure it out as I go.”

    So I built four commands that enforce the same discipline.

    The Add Feature Command

    /add-feature user authentication system

    This is where everything starts.

    Give it any rough idea and it forces you through three phases.

    First, it creates user stories in EARS format (Event-driven Acceptance Requirements Specification for the nerds).

    Won’t move forward until you approve the requirements.

    Then it builds comprehensive design documentation with Mermaid diagrams.

    Won’t proceed until you sign off on the architecture.

    Finally, it creates numbered task lists with requirement traceability.

    Every task connects back to a specific requirement.

    No orphaned code.

    No feature creep.

    The Steering Documents Command

    /create-steering-docs

    This solves the context problem that kills most AI projects.

    It analyzes your repo and creates three persistent knowledge files.

    Product overview and target audience.

    Technical stack and development guidelines.

    Project structure and architecture patterns.

    Now Claude remembers your decisions across sessions.

    No more re-explaining your tech choices every conversation.

    The Start Task Command

    /start-task user-authentication

    Here’s where the magic happens.

    It reads all your specification files for context.

    Executes ONE task at a time.

    Marks tasks as in-progress, then completed.

    Waits for your approval before moving forward.

    No runaway AI building half your app while you grab coffee.

    The beautiful part?

    You can’t skip phases.

    You can’t bypass approvals.

    You can’t execute tasks without specifications.

    The commands literally won’t let you.

    Real-World Implementation

    Clone the repo.

    Copy the .claude folder to your project or home directory.

    Run Claude Code.

    Four new commands appear instantly.

    I tested this workflow on a React authentication system.

    Here’s exactly how it went.

    Started with /add-feature user authentication with signup and login

    Claude generated comprehensive user stories.

    “As a new user, I want to create an account so that I can access the application.”

    Each story got acceptance criteria in EARS format.

    Event: User submits valid registration form 

    Action: System creates new user account 

    Result: User receives confirmation and can log in

    I approved the requirements.

    Claude moved to design phase.

    Architecture diagrams with Mermaid.

    Component breakdowns.

    Database schemas.

    API endpoint specifications.

    I approved the design.

    Claude created 23 numbered tasks.

    Each task referenced specific requirements.

    Each task had clear success criteria.

    No ambiguity.

    No guesswork.

    Then I used /start-task user-authentication to begin implementation.

    Claude read all the specification files.

    Executed the first task only.

    Created the user model with validation.

    Marked it in-progress (~).

    Waited for my approval.

    I said “looks good.”

    Claude marked it complete (x).

    Asked if I wanted the next task.

    The whole flow took a few minutes from idea to first working code.

    And the output quality?

    Better than anything I’d built manually.

    Because every line connected back to a requirement.

    Because every component fits the approved architecture.

    Because I couldn’t skip steps even if I wanted to.

    Performance-wise, it’s no contest.

    No IDE startup time.

    No platform switching.

    No subscription requirements.

    Just pure workflow efficiency with actual guardrails.

    Ready to Try It Yourself?

    Here’s the thing about developers.

    We’re skeptical by nature (occupational hazard).

    You’ve read this far, but you’re probably thinking “sounds good in theory, but does it actually work?”

    Fair question.

    I built this because I needed it.

    Not because I thought it would make a good article.

    So I’m putting my money where my mouth is.

    The entire implementation is open source on GitHub.

    No paywalls.

    No “sign up for my newsletter first” nonsense.

    Just working code you can use immediately.

    GitHub Repository: https://github.com/AshExplained/ccspecdev

    Clone it.

    Test it.

    Break it (please try to break it).

    Here’s what I want from you.

    Try the workflow on a real feature.

    Something you’re actually building.

    Not a toy project.

    Use /add-feature with your actual requirements.

    Go through the full Requirements → Design → Tasks progression.

    Execute some tasks with /start-task.

    Then tell me what sucks.

    What’s missing?

    What would make it better?

    What assumptions did I get wrong?

    Open an issue.

    Submit a pull request.

    Roast me in the comments.

    All feedback is good feedback.

    Because here’s what I learned building this.

    The best workflows aren’t designed in isolation.

    They’re battle-tested by real developers solving real problems.

    Your problems might be different from mine.

    Your workflow preferences might clash with my assumptions.

    That’s exactly what I want to know.

    So we can make this better.

    For everyone.

    The Real Win

    Look, Kiro is impressive.

    The team built something genuinely useful (no shade, seriously).

    But sometimes developers don’t want another platform.

    We want better workflows.

    We want structure without constraints.

    We want power without lock-in.

    These four Claude Code commands give you Kiro’s methodology without Kiro’s limitations.

    You get the spec-driven development.

    You get the enforced phase progression.

    You get the requirement traceability.

    You get the structured approach to AI coding.

    But you keep your freedom.

    You keep your tools.

    You keep control.

    And you get true ownership of your workflow.

    Try the commands yourself.

    Make it yours.

    Because the future of AI development is about building the right workflows.

    And now you can build those workflows anywhere.