build-autonomous-agents
Skill3 starsChanged 3 months agoMITView on GitHub
Designs and implements a bounded agent for a product feature, or one finite agent workflow, with a runtime-neutral contract. Use when building an agent, finite workflow, subagent, tool, or channel integration into an application, adding Flue to an application, migrating an older Flue integration, or designing review loops and when an agent should ask a person.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- api-designSkill
- backend-craftSkill
- meilisearchSkill
- design-coreSkill
- design-datavizSkill
- design-flowsSkill
- design-formsSkill
- design-product-uiSkill
- design-researchSkill
- design-reviewSkill
- design-slidesSkill
- design-systemsSkill
- design-webSkill
- agent-syncSkill
- coding-disciplineSkill
- completion-gateSkill
- deliver-dependency-upgradesSkill
- documentation-and-adrsSkill
- grill-harness-with-docsSkill
- learn-agentic-engineeringSkill
- pnpmSkill
- scaffold-harnessSkill
- scaffold-monorepoSkill
- shift-left-securitySkill
- start-gateSkill
- update-harnessSkill
- write-a-skillSkill
- frontend-craftSkill
- ansible-automationSkill
- gitea-actionsSkill
- gitea-teaSkill
- manage-infrastructure-as-codeSkill
- multi-stage-dockerfileSkill
- secure-linux-web-hostingSkill
- integrate-product-complianceSkill
- plain-numbersSkill
- product-craftSkill
- run-product-engineeringSkill
- playwright-best-practicesSkill
- testing-strategiesSkill
- writing-coreSkill
- writing-editorialSkill
- writing-engineeringSkill
- writing-marketingSkill
- writing-productSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 19 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
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
- Distinctive: line 10
Keep the workload contract portable even when Flue is the selected runtime, so the product does not have to change when the runtime does.
- Distinctive: line 15
Read the target's instructions, domain context, architecture, tests, delivery controls, security boundaries, and existing runtime …
- Distinctive: line 40
Use a subagent only when its independent context, tools, or evaluation boundary improves the result enough to justify delegation.
- Distinctive: line 68
Use the target's existing runtime when it meets the contract.
- Distinctive: line 72
Before adopting or changing Flue:
- Very specific: line 76
Use the installed CLI's flue docs search and flue docs read commands first because those docs match the installed version.
- Distinctive: line 78
Check official upstream docs, changelog, package metadata, and types when adopting or upgrading.
- Distinctive: line 80
Prefer the latest reviewed stable release.
- Distinctive: line 82
Read REFERENCE.md for current Flue boundaries and migration hazards.
- Very specific: line 85
Do not copy imports from @flue/runtime/internal.
- Distinctive: line 93
keep authentication, authorization, business data, provider credentials, persistence, and application of results application-owned
- Distinctive: line 99
Start deterministic seams with a failing behavior test and agent judgment with a representative failing eval case.
- Distinctive: line 106
Treat local host execution as trusted execution, not isolation.
- Distinctive: line 107
Keep conversation state, workspace state, and business state distinct.
- Distinctive: line 108
Do not assume an interrupted finite workflow resumes at an arbitrary TypeScript step.
- Distinctive: line 118
Put external side effects behind application-owned idempotency keys.
- Distinctive: line 119
When an agent hands work to an asynchronous job and resumes afterwards, put the finished job's outcome into its context and refuse a second …
- Distinctive: line 132
Use a durable external orchestrator when step-level resumability is required.
- Distinctive: line 133
Keep model-visible data, logs, traces, and run history free of unnecessary secrets and personal data.
- Distinctive: line 138
Test representative success, refusal, malformed output, tool failure, timeout, retry, duplicate delivery, cancellation, and …
- Distinctive: line 160
completion-gate: - verify before claiming completion
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Build Autonomous Agents
Build the smallest agent that can produce and verify the intended outcome. Keep the workload contract portable even when Flue is the selected runtime, so the product does not have to change when the runtime does.
1. Ground the Workload
Read the target's instructions, domain context, architecture, tests, delivery controls, security boundaries, and existing runtime integration.
State:
- the user or operational outcome
- trigger, owner, input, output, and completion condition
- allowed data, tools, repositories, network access, secrets, and side effects
- required human approval, cancellation, and rollback points
First test whether deterministic code, an existing application service, a script, or a CI job can solve the problem. Do not add an agent when those are sufficient: they are cheaper, testable, and never improvise.
2. Select the Smallest Unit
| Need | Unit |
| Deterministic operation | Function or application service |
| Bounded capability the model may call | Tool |
| Reusable application-controlled orchestration | Action |
| Finite inspectable operation | Workflow |
| Continuing stateful interaction | Agent |
| Focused separable responsibility | Subagent |
Use a subagent only when its independent context, tools, or evaluation boundary improves the result enough to justify delegation.
For review loops, questions to people, and repair bounds, read REVIEW-LOOPS.md. Core rules: a send-back always records what to fix; a person is asked only what only they can answer, after the agents repaired what they could within a shared bound.
3. Write the Execution Contract
Define before implementation:
- validated input and output schemas
- model-visible context, Skills, and tools
- deterministic validation and application of results
- work identity, deduplication key, state owner, and retention
- isolation and permission boundary
- timeout, token or spend budget, concurrency, and stop condition
- retry, idempotency, recovery, duplicate-effect handling, and failure owner
- durable checkpoint, next wake condition, progress deadline, and reconciliation
- eval cases, telemetry, alerts, and incident owner
Separate probabilistic judgment from deterministic effects. Prefer a typed proposal that application code validates and applies over letting model output mutate business state directly.
4. Select and Verify the Runtime
Use the target's existing runtime when it meets the contract. For a TypeScript system that needs a harness-first agent runtime, Flue is the current default candidate, not part of the product contract.
Before adopting or changing Flue:
- Detect the installed version, package manager, deployment target, and existing integration.
- Use the installed CLI's
flue docs searchandflue docs readcommands first because those docs match the installed version. - Check official upstream docs, changelog, package metadata, and types when adopting or upgrading.
- Prefer the latest reviewed stable release. Do not adopt a nightly merely because it is newer.
- Read REFERENCE.md for current Flue boundaries and migration hazards.
Do not copy imports from @flue/runtime/internal; they are not a portable
public integration boundary.
5. Implement One Vertical Slice
The application stays the authority over its users and data, because an agent runtime that owns them turns every model mistake into a business-state defect:
- keep authentication, authorization, business data, provider credentials, persistence, and application of results application-owned
- expose meaningful queued, running, review, success, and failure states
- make any consequential result reviewable before application where risk requires it
Start deterministic seams with a failing behavior test and agent judgment with a representative failing eval case. Implement the narrowest path from input through verified outcome before adding channels, schedules, subagents, or generalized abstractions.
6. Prove Safety and Recovery
- Treat local host execution as trusted execution, not isolation.
- Keep conversation state, workspace state, and business state distinct.
- Do not assume an interrupted finite workflow resumes at an arbitrary TypeScript step.
- Persist every useful increment and the next eligible action outside the live model session. Every routine non-terminal state must have a wake condition or a reconciler that owns progress; a human prompt is not a scheduler. A required human response waits on a durable correlated event with a deadline and escalation; it is never inferred or auto-approved.
- Detect expired claims and missed progress deadlines. Inspect retained state and external effects before a bounded requeue; alert the named failure owner when safe recovery is not possible.
- Put external side effects behind application-owned idempotency keys.
- When an agent hands work to an asynchronous job and resumes afterwards, put the finished job's outcome into its context and refuse a second hand-off of unchanged input deterministically. Without both, a review agent re-delegated a paid review after every clean one, for hours.
- A deterministic backstop that moves a stage forward when the agent does not must also fire on the agent's failure paths (turn limit, idle turns) once the stage's output exists. A person's newer decision - sending work back - must outrank any prompt text telling the agent to move on: make it a typed condition on the transition, not an instruction.
- Answer a call to a tool the run does not hold with an explicit refusal that names the available tools, and keep the conversation after a turn without a valid tool call. Dropping either silently made agents ask the user for context they already had.
- Use a durable external orchestrator when step-level resumability is required.
- Keep model-visible data, logs, traces, and run history free of unnecessary secrets and personal data.
7. Evaluate and Observe
Test representative success, refusal, malformed output, tool failure, timeout, retry, duplicate delivery, cancellation, and permission-denied cases. Assert schemas, tool calls, side effects, latency, and cost where relevant.
Emit enough structured evidence to answer:
- what triggered the run
- which version and configuration ran
- what tools and effects occurred
- why it stopped
- whether the outcome passed deterministic checks and evals
Complete the work only when the bounded outcome works end to end, failure and recovery behavior is demonstrated, permissions and budgets are explicit, and the runtime can be replaced without changing the product contract. An idle system has no admissible signal; a paused, blocked, or partial run exposes its reason, owner, retained checkpoint, and next wake or escalation condition.
Related Skills
- scaffold-harness - assess maturity and the repository harness
- coding-discipline - implement the smallest safe change
- completion-gate - verify before claiming completion
- product-craft - define product value and human oversight
- upstream tdd - drive deterministic seams from behavior
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.

