agentleFS
JLugagneJLugagne/agach/.claude/skills/doc-business-rules/SKILL.md

doc-business-rules

Skill0 starsChanged 8 months agoMITView on GitHub

Agach business rules: blocking workflow, won't-do workflow, GetNextTask logic, resolution auto-append, priority system, comment system, features

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Default columns (todo, in_progress, done, blocked) are created automatically when a project is created.

    line 19
  2. Very specific:

    Only humans can unblock via web UI → moves back to "todo", sets is_blocked=false

    line 45
  3. Distinctive:

    When human moves task from "in_progress" to "todo":

    line 65
  4. Distinctive:

    No comment types/categories

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Agach Business Rules

Column Structure (5 Columns)

1. backlog       (position -1) - Backlog, created on-demand via EnsureBacklog
2. todo          (position 0)  - Tasks to be done
3. in_progress   (position 1)  - Tasks being worked on
4. done          (position 2)  - Completed tasks
5. blocked       (position 3)  - Tasks requiring human intervention

Default columns (todo, in_progress, done, blocked) are created automatically when a project is created. Backlog column is created on-demand via EnsureBacklog().

Task Fields

Required at creation: Title and Summary Resolution: Filled when agent stops work or human moves task back to todo

Key State Flags:

  • IsBlocked = true when task is IN the "blocked" column
  • WontDoRequested = true when task is IN "blocked" column awaiting human decision

Token Tracking: InputTokens, OutputTokens, CacheReadTokens, CacheWriteTokens, Model Cold Start Tracking: ColdStartInputTokens, ColdStartOutputTokens, etc. (SET semantics, not accumulated) Duration Tracking: StartedAt, DurationSeconds, HumanEstimateSeconds Session: SessionID for Claude Code session resuming

Features

  • Features are project-scoped groupings of tasks
  • Status: draft → ready → in_progress → done → blocked
  • Tasks have optional FeatureID linking them to a feature
  • Sub-projects were migrated to features (002_features.sql)

Blocking Workflow

  • Agent calls block_task → task moves to "blocked" column, sets is_blocked=true
  • Task is visible in Blocked column (not flagged in Todo)
  • Only humans can unblock via web UI → moves back to "todo", sets is_blocked=false
  • Blocked tasks invisible to get_next_task

Won't-Do Workflow

  • Agent calls request_wont_do → task moves to "blocked" column with wont_do_requested=true
  • Human sees task in Blocked column with "Won't Do Requested" badge
  • Human approves → task moved to "done" column with wont_do_requested=true kept (displays as "won't do")
  • Human rejects → adds comment, moves back to "todo", clears wont_do_requested
  • Won't-do-requested tasks in "blocked" column invisible to get_next_task
  • Won't-do tasks in "done" column count as resolved dependencies

GetNextTask Rules

  • Returns highest-priority task in "todo" column (not backlog) with all dependencies resolved
  • A dependency is "resolved" if its task is in the "done" column (including won't-do approved)
  • Filters: is_blocked=false, wont_do_requested=false
  • Role filtering: empty role → unassigned tasks only; specified role → matching or unassigned
  • Sorts by priority_score DESC, created_at ASC
  • Optional featureID parameter to scope search to a specific feature

Resolution Auto-Append

When human moves task from "in_progress" to "todo":

if resolution == "" {
    resolution = "[Moved back to Todo by human on {date} - task was not completed]"
} else {
    resolution += "\n\n[Moved back to Todo by human on {date} - task was not completed]"
}

Priority System

Simple 4-level system only:

  • critical → 400
  • high → 300
  • medium → 200
  • low → 100

NO dynamic boosting, NO urgency calculations, NO dependency boosting

Comment System

  • author_type field: "agent" or "human"
  • No comment types/categories
  • Auto-comments for system actions (blocking, won't-do, etc.)

Chat Sessions

  • Feature-scoped chat sessions that spawn Claude CLI processes on the daemon
  • State: active → ended / timeout
  • 30-minute idle TTL with 25-minute warning
  • Token usage tracked per session (input/output/cache_read/cache_write)
  • JSONL capture of full conversation, uploaded to server on session end

Agent/Role System

  • Global agents (roles) with slugs, icons, colors, tech stacks, prompt templates
  • Project-scoped agent assignment via project_agents
  • Specialized agents: variants under a parent agent with specific skill sets
  • Skills: global definitions assignable to agents and specialized agents
  • Agent cloning: duplicate an existing agent with new slug/name

Notification Triggers

TriggerScopeSeverity
Feature status → doneprojectsuccess
Feature status → blockedprojectwarning
Task blockedprojectwarning
Task won't-do requestedprojectwarning
All feature tasks completedprojectsuccess
Agent build failureagenterror
System maintenanceglobalinfo

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.