Subagents Discipline logo

Subagents Discipline

Community
AvivK5498
subagents-discipline

Core engineering principles for implementation tasks

Overview

PublisherAvivK5498
RepositoryThe-Claude-Protocol
Skill namesubagents-discipline
Stars
348
Forks
25
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by AvivK5498 on GitHub. Read the source before you install it.

Installation

Install the Subagents Discipline AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AvivK5498/The-Claude-Protocol.git /tmp/The-Claude-Protocol
mkdir -p .claude/skills
cp -r /tmp/The-Claude-Protocol/templates/skills/subagents-discipline .claude/skills/subagents-discipline
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Subagents Discipline in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Subagents Discipline on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Subagents Discipline is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Implementation Principles

Rule 0: Read the Bead First

Before implementing anything, read the bead comments for context:

bash
bd show {BEAD_ID}
bd comments {BEAD_ID}

The orchestrator's dispatch prompt is automatically logged as a DISPATCH comment on the bead. This contains:

  • The investigation findings
  • Root cause analysis (file, function, line)
  • Related files that may need changes
  • Gotchas and edge cases

Use this context. Don't re-investigate. The comments contain everything you need to implement confidently.

If no dispatch or context comments exist, ask the orchestrator to provide context before proceeding.


Rule 1: Look Before You Code

Before writing code that touches external data (API, database, file, config):

  1. Fetch/read the ACTUAL data - run the command, see the output
  2. Note exact field names, types, formats - not what docs say, what you SEE
  3. Code against what you observed - not what you assumed
WITHOUT looking first:
  Assumed: column is "reference_images"
  Reality: column is "reference_image_url"
  Result:  Query fails

WITH looking first:
  Ran: SELECT column_name FROM information_schema.columns WHERE table_name = 'assets';
  Saw: reference_image_url
  Coded against: reference_image_url
  Result: Works

Rule 2: Test Functionally (Close the Loop)

Principle: Optimize for the fastest way to verify your work actually works.

You builtFast verificationSlower alternative
API endpointcurl the endpoint, check responseWrite integration test
Database changeRun migration, query the resultWrite migration test
Frontend componentLoad in browser, interact with itWrite component test
CLI toolRun the command, check outputWrite unit test
Config changeRestart service, verify behaviorN/A — just verify

Two strategies:

  1. User Journey Tests — Test actual behavior as a user experiences it:

    bash
    # API: curl with real data
    curl -X POST localhost:3000/api/users -d '{"name":"test"}' -H "Content-Type: application/json"
    
    # CLI: run the command
    bd create "Test" -d "Testing" && bd list
    
    # Error case: curl with invalid auth
    curl -X POST localhost:3000/api/users -H "Authorization: Bearer invalid"
  2. Component Tests — Supplement for regression prevention when fast verification isn't possible:

    • Complex logic with many edge cases
    • Code that runs in environments you can't easily replicate
    • Shared libraries used by multiple consumers

"Close the Loop" principle: Run the actual thing. Verify it works. Check error cases.

Good: "Curled endpoint with invalid auth, got 401 as expected" Bad: "Wrote tests, they compile"

Rule 3: Use Your Tools

Before claiming you can't fully test:

  1. Check what MCP servers you have access to - list available tools
  2. If any tool can help verify the feature works, use it
  3. Be resourceful - browser automation, database inspection, API testing tools

Rule 4: Log Your Approach (Optional)

If you deviated from the orchestrator's suggestion, found a better path, or made a choice future maintainers might question:

bash
bd comment {BEAD_ID} "APPROACH: Used X instead of Y because Z"

When to log:

  • Deviated from the suggested fix
  • Multiple valid solutions, chose one for a specific reason
  • Future maintainers might question the approach

Skip if the code is self-explanatory. This is not enforced.


For Epic Children

If your BEAD_ID contains a dot (e.g., BD-001.2), you're implementing part of a larger feature:

  1. Check for design doc: bd show {EPIC_ID} --json | jq -r '.[0].design'
  2. Read it if it exists - this is your contract
  3. Match it exactly - same field names, same types, same shapes

Red Flags - Stop and Verify

When you catch yourself thinking:

  • "This should work..." → run it and see
  • "I assume the field is..." → look at the actual data
  • "I'll test it later..." → test it now
  • "It's too simple to break..." → verify anyway

Frequently asked questions

What does the Subagents Discipline AI skill do?

Core engineering principles for implementation tasks

Why use Subagents Discipline on TypingMind?

Because you install it once and use it with any model. Subagents Discipline is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Subagents Discipline in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AvivK5498/The-Claude-Protocol/tree/main/templates/skills/subagents-discipline. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Subagents Discipline?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Subagents Discipline?

As many as you like. As long as a model supports skills, you can use Subagents Discipline with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Subagents Discipline AI skill free?

Yes. It is published on GitHub by AvivK5498 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇