with one click
agenfk
// Agile, measurable, and reliable workflow enforcement for AI-assisted engineering.
// Agile, measurable, and reliable workflow enforcement for AI-assisted engineering.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | agenfk |
| description | Agile, measurable, and reliable workflow enforcement for AI-assisted engineering. |
| compatibility | opencode |
| metadata | {"framework":"agenfk","workflow":"agile"} |
This skill enforces the core AgenFK Engineering workflow to ensure all software tasks are Agile, Measurable, Visual, Repeatable, Reliable, and Flexible.
MANDATORY: You are strictly prohibited from modifying ANY file in the codebase without an active task in
IN_PROGRESSstatus and a successfulworkflow_gatekeepercall. Bypassing this workflow is a critical operational failure.
IN_PROGRESS, stop immediately and create one.workflow_gatekeeper before the first edit of every session.git commit, npm test, or direct file writes to circumvent validate_progress.log_token_usage before completion.AgenFK supports two distinct operation modes based on the slash command invoked:
/agenfk)add_comment(itemId, content) for EVERY significant tool execution or logical step (e.g. "Analyzed file X", "Implemented function Y", "Running tests").update_item({ status: "REVIEW" }) to enter REVIEW, then call workflow_gatekeeper(itemId) to get exit criteria, then validate_progress to advance through intermediate steps and reach DONE./agenfk-deep)task tool at every phase transition.task tool.itemId to the workflow_gatekeeper(intent, role, itemId) to authorize changes against the specific task.IN_PROGRESS.update_item({ status: "REVIEW" }).ALWAYS use MCP tool invocations (list_items, create_item, update_item, get_item, etc.) for all workflow state operations.
NEVER use any of the following shortcuts โ PreToolUse hooks will block them mechanically:
| Forbidden | Use instead |
|---|---|
Reading .agenfk/db.sqlite or .agenfk/db.json directly (via Bash or Read tool) | list_items(projectId) ยท get_item(id) |
curl / wget to http://localhost:3000 (direct REST API) | list_items() ยท create_item() ยท update_item() |
agenfk list, agenfk status, agenfk get, npx agenfk ... (CLI state queries) | list_items() ยท get_item() ยท list_projects() |
If MCP tools are not available in your context, surface the connectivity problem clearly rather than falling back to a bypass route.
Initialization
git status โ if the working tree has uncommitted or modified files, STOP and ask the user how to proceed (stash, commit, or discard). Never start new work on a dirty working tree.git branch --show-current โ if NOT on main (or master) and the current branch does not belong to an item you're about to resume, run git checkout main (or master).git pull to ensure you have the latest upstream changes..agenfk/project.json in the project root.list_projects() via MCP to see existing projects..agenfk/project.json with the { "projectId": "..." }.GET /projects/<projectId>/flow (via REST or agenfk flow show --project <projectId> via CLI) to discover the active workflow flow. The workflow_gatekeeper response also includes activeFlow. Use the flow's step name values as the valid statuses for this project โ do NOT assume the default TODO โ IN_PROGRESS โ REVIEW โ TEST โ DONE pipeline is active. The project may have a custom flow with different steps and ordering.AFK_PROJECT_SCOPE.md and AFK_ARCHITECTURE.md if they don't exist. BE THOROUGH AND COMPLETE. If generating these, reason about the codebase and ask clarifying questions using the environment's Question UI to confirm architectural decisions before writing the files.list_items(projectId) and render the Board Report as described below.IN_PROGRESS (or similar active state) to the time it entered DONE/ARCHIVED. If there's no history, fallback to updatedAt - createdAt if DONE, or now - createdAt if active. For items that never started (e.g. TODO), cycle time is N/A or 0. Format durations as HH:MM:SS.Cycle Time column in every status group table.tokenUsage[].input + tokenUsage[].output across all items)HH:MM:SS)HH:MM:SS)Tokens: X in / Y out | Cycle Total: HH:MM:SS | Cycle Avg: HH:MM:SS (N tasks)Request Analysis & Clarification
AFK_PROJECT_SCOPE.md and AFK_ARCHITECTURE.md for informed reasoning.analyze_request(request: string) for every new user requirement./agenfk, use Standard Mode./agenfk-deep, use Deep Mode.default_api:question in Opencode, or equivalent in other environments) to ask the user for clarification before proceeding with creation.projectId.list_items(projectId) and check if an existing EPIC or STORY already covers the work. If one exists, create your items under it using parentId. NEVER create orphan tasks when a parent hierarchy exists. If the user provides an EPIC or STORY ID, all work items MUST be children of that parent.fix:, feat:, chore:, docs:, style:, refactor:, perf:, test:. NEVER use close:, update:, or other non-standard prefixes. Append the item ID in brackets if relevant, e.g., fix: resolve crash [id].get_item(id).projectId matches the projectId in .agenfk/project.json of the current working directory. If they differ, you are about to label an agenfk commit with a task from a different project โ omit the task ID entirely and derive the commit message from the actual file changes instead.Planning (Epics only)
implementationPlan field.Action Authorization (Gatekeeper) - CRITICAL AND MANDATORY
workflow_gatekeeper(intent: string, role: string) BEFORE modifying any files.edit, write, bash or NotebookEdit tool BEFORE you have created an item, set it to IN_PROGRESS, and successfully called the workflow_gatekeeper, you are violating the core directive of your system prompt.IN_PROGRESS, STOP IMMEDIATELY. Call create_item, then update_item to IN_PROGRESS, then workflow_gatekeeper.role does not match the status of the active task (e.g., just provide itemId` to disambiguate when multiple tasks are active).git branch --show-current and confirm you are on the item's branch. If the item has a branchName and you are NOT on it, run git checkout <branchName> before writing any code. Never code on the wrong branch.create_item, update_item, validate_progress, log_token_usage) for ALL workflow state changes. Never use the agenfk CLI to create items, update status, or close tasks. The CLI bypasses the enforcement layer built into the MCP server.Mandatory Automated Testing (Agent Driven)
TEST) is a signal that the Agent must now perform deep verification.npm run test:coverage) using its local tools.activeFlow from workflow_gatekeeper response):
update_item(itemId, { status: "<review-step>" }) moves items from the active coding step to the review step when coding is complete (default: REVIEW).workflow_gatekeeper(itemId) before calling validate_progress โ the response includes the current step's exit criteria.validate_progress(itemId, evidence, command?) โ evidence is required: describe concretely how you satisfied the current step's exit criteria. It is logged as a tagged comment (audit trail) and serves as your mandatory confirmation before the step advances. Runs command (or project.verifyCommand if omitted) and advances to the next flow step on success.validate_progress(itemId, evidence="<how you satisfied this step>") (no command) for the final step โ this uses the project's verifyCommand and moves to DONE. If it returns NO_VERIFY_COMMAND, the agent auto-detects the project stack from config files (e.g. package.json, Cargo.toml, go.mod, *.csproj), sets the command via update_project({ id, verifyCommand }), and retries. Do NOT use update_item({status: "DONE"}) โ the server blocks direct DONE transitions.validate_progress call validates the code for all siblings. After one passes, move remaining siblings to the same step via update_item, then call validate_progress on each to reach DONE.Final Verification (Validate Tool)
workflow_gatekeeper(itemId) to get the current step's exit criteria, then calls validate_progress(itemId, evidence, command?) to gate the transition to the next step.verifyCommand (set via update_project) is used automatically when no command is provided. Agents cannot override or bypass it.update_item.validate_progress(itemId, evidence="<concrete description of how exit criteria were met>", command?) โ logs evidence as a tagged comment, runs the command, and advances to the next flow step.Measurement & Tracking
log_token_usage(itemId, input, output, model) immediately after marking an item as DONE (e.g., following a successful validate_progress), or at the end of a significant session of work for an IN_PROGRESS item.add_comment(itemId, content) for EVERY significant step performed during implementation (e.g. "Modified core types", "Updated UI components", "Ran tests"). This ensures the human user can follow the agent's work in real-time on the Kanban board.activeFlow in workflow_gatekeeper response):
update_item, self-review, then call validate_progress(id, evidence="<evidence>") for each intermediate step until DONE.
validate_progress already advanced past a step, move remaining siblings to that step via update_item. Then call validate_progress(id, evidence="<evidence>") on each โ subsequent calls pass immediately via sibling propagation.update_item({status: "DONE"}) โ the server rejects direct DONE transitions. Always use validate_progress(id, evidence="<evidence>") to close an item.DONE, the Agent MUST ask the user what they would like to do next, providing exactly these three options:
/agenfk-release to create a new release./clear followed by /agenfk).IN_PROGRESS).Use this skill whenever you are performing software engineering tasks to ensure compliance with the AgenFK Engineering Framework.
list_projects: List all existing projects.create_project: Create a new project.create_item: Create a new workflow item (requires projectId).update_item: Update status or properties.list_items: Query the backlog (filter by projectId).get_item: Get full details.log_token_usage: Record resource consumption.add_context: Attach relevant file paths.analyze_request: Categorization strategy.workflow_gatekeeper: Pre-flight authorization and role verification.get_flow: Loads the full active flow with all steps and exit criteria โ call at session start to understand your complete workflow contract.validate_progress: Step-completion gate โ requires evidence (how you satisfied the exit criteria, logged as a tagged comment) and optional command. Advances to next step on success.get_server_info: Framework health check.pause_work: Save context snapshot and pause item.resume_work: Restore context and resume paused item.