agentleFS
mo-cmykmo-cmyk/mazarbul/.claude/skills/task-execution-protocol/SKILL.md

task-execution-protocol

Skill2 starsChanged 33 days agoApache-2.0View on GitHub

Phased implementation protocol for non-trivial Mazarbul work. USE WHEN starting a feature that crosses several surfaces (kernel + CLI + MCP + TUI), before opening any non-bugfix PR, or when the user describes a multi-surface change. Phases: Route, Contracts, Boundaries, Implement, Validate, Document. NOT FOR typo fixes, single-file bug fixes, or pure refactors.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run mise run test on main first to establish a baseline, and note the tests covering adjacent behaviour.

    line 37
  2. Very specific:

    Every derived store (SQLite, LadybugDB, sqlite-vec, FTS5) must be rebuildable from the log.

    line 45
  3. Distinctive:

    Every new fact, entity, or relation carries source, confidence, and timestamp.

    line 48
  4. Distinctive:

    Never log secrets, tokens, or user content at info level.

    line 52
  5. Distinctive:

    Treat as API. Follow AIP naming.

    line 55
  6. Very specific:

    Do not open a PR until all three are green.

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Task Execution Protocol

The systematic approach for any non-trivial change. Follow the phases in order.


Phase 0: Route

Identify the task type and read the matching docs before writing code.

Task typeRead first
Kernel / storage / event logagent-docs/synthesis.md, agent-docs/designs/storage.md, agent-docs/designs/event-log.md
New MCP toolagent-docs/tech/mcp-go.md, agent-docs/designs/mcp-server.md, aip-naming skill
New CLI commandagent-docs/tech/cobra.md, agent-docs/lifecycle-theming.md
TUI screenagent-docs/tui-design.md, tui-design skill
Ingestion / connectoragent-docs/ingestion.md, agent-docs/plugins.md
Sync / team scopeagent-docs/sync.md, agent-docs/team.md, agent-docs/privacy.md
Bug fixThe package involved, plus agent-docs/lessons-learned.md

Also read at least one existing file in every package you will modify, to match established patterns.


Phase 1: Contracts

Map interfaces and dependencies before writing a line:

  • Which Go interfaces in internal/ will you implement or extend? Prefer existing ones over new ones.
  • Which event kinds will you append? New kinds need a JSON Schema under schemas/ and must be replayable by maz rebuild.
  • Which existing helpers cover what you need? Search before writing a new one; no new util/common/helpers packages.
  • Run mise run test on main first to establish a baseline, and note the tests covering adjacent behaviour.

Phase 2: Boundaries

Event log (source of truth):

  • Append-only. Never rewrite or delete events; supersede them.
  • Every derived store (SQLite, LadybugDB, sqlite-vec, FTS5) must be rebuildable from the log. If your change adds derived state, verify maz rebuild reproduces it.

Provenance:

  • Every new fact, entity, or relation carries source, confidence, and timestamp.

Privacy and scopes:

  • Does the change read or write across scopes (personal, draft, team)? Check agent-docs/privacy.md.
  • Never log secrets, tokens, or user content at info level. Ingested text goes through the scrubber.

Public surfaces (CLI flags, MCP tool schemas, config keys, env vars, error codes):

  • Treat as API. Follow AIP naming. Breaking changes need an explicit decision from the user.

External calls (LLM providers, remote connectors):

  • Respect budget gates, handle offline/degraded mode, and never block the hot path on the network.

Phase 3: Implement

  1. Types and JSON Schema (schemas/, Go structs with json: tags, AIP field names).
  2. Kernel / storage changes in internal/kernel/, with table-driven tests.
  3. Surface wiring: MCP tool (internal/mcp/tools/), CLI command (internal/cli/), TUI (internal/tui/).
  4. Hot paths: add or update a *_bench_test.go and record the baseline in the PR.

Phase 4: Validate

mise run fmt
mise run lint
mise run test

Do not open a PR until all three are green. For TUI changes also run mise run tui:snap and review the snapshot diff.


Phase 5: Document

  • User-facing change? Update the matching agent-docs/*.md and append to agent-docs/mintlify-backlog.md (AGENTS.md rule 11).
  • New dependency? Add agent-docs/tech/<lib>.md.
  • Architectural decision? Add an ADR under agent-docs/adr/.
  • PR description follows agent-docs/pr-description-template.md; commits follow Conventional Commits.

Gotchas

Concrete pitfalls encountered when using this skill. Add new ones as you hit them.

  • (empty, add the first real entry the next time you hit a non-obvious pitfall)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.