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
In this repository10 other files it gives its agents.
- doc-api-routesSkill
- doc-architectureSkill
- doc-daemonSkill
- doc-databaseSkill
- doc-dependenciesSkill
- doc-frontendSkill
- doc-identitySkill
- doc-notificationsSkill
- doc-shared-packagesSkill
- doc-testingSkill
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
- Very specific: line 19
Default columns (todo, in_progress, done, blocked) are created automatically when a project is created.
- Very specific: line 45
Only humans can unblock via web UI → moves back to "todo", sets is_blocked=false
- Distinctive: line 65
When human moves task from "in_progress" to "todo":
- Distinctive: line 85
No comment types/categories
≈ “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.
Files
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 interventionDefault 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" columnWontDoRequested= 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
FeatureIDlinking them to a feature - Sub-projects were migrated to features (002_features.sql)
Blocking Workflow
- Agent calls
block_task→ task moves to "blocked" column, setsis_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 withwont_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=truekept (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
featureIDparameter 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→ 400high→ 300medium→ 200low→ 100
NO dynamic boosting, NO urgency calculations, NO dependency boosting
Comment System
author_typefield: "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
| Trigger | Scope | Severity |
Feature status → done | project | success |
Feature status → blocked | project | warning |
| Task blocked | project | warning |
| Task won't-do requested | project | warning |
| All feature tasks completed | project | success |
| Agent build failure | agent | error |
| System maintenance | global | info |
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
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.

