workflow-library
List, read, add, edit, and retire workflow templates across project, PKB, and universal tiers, or preview composition without minting tasks. Exclude when tracking running jobs (use harness progress tools).
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 5
- Forks
- 3
01 前言 Front Matter
- name
- workflow-library
- description
- List, read, add, edit, and retire workflow templates across project, PKB, and universal tiers, or preview composition without minting tasks. Exclude when tracking running jobs (use harness progress tools).
02 资源文件 31
- 参考文档workflows/trace-decision.md1.8 KB
- 参考文档workflows/wf-code-task-base.md6.0 KB
- 参考文档workflows/wf-daily.md6.0 KB
- 参考文档workflows/wf-densify.md2.2 KB
- 参考文档workflows/wf-dialectical-design.md3.0 KB
- 参考文档workflows/wf-doc-base.md3.7 KB
- 参考文档workflows/wf-effectual-plan.md2.4 KB
- 参考文档workflows/wf-escalated-approval.md2.6 KB
- 参考文档workflows/wf-fact-check.md2.0 KB
- 参考文档workflows/wf-finish.md5.8 KB
- 参考文档workflows/wf-gate-compliance.md2.7 KB
- 参考文档workflows/wf-keep-analysis-data.md1.1 KB
- 参考文档workflows/wf-price-targets.md2.3 KB
- 参考文档workflows/wf-prompt-objectives.md2.8 KB
- 参考文档workflows/wf-qa-visual.md2.2 KB
- 参考文档workflows/wf-qa.md4.1 KB
- 参考文档workflows/wf-quick-fix.md3.8 KB
- 参考文档workflows/wf-rbg.md5.0 KB
- 参考文档workflows/wf-reconcile.md10.1 KB
- 参考文档workflows/wf-research-and-implement.md2.5 KB
- 参考文档workflows/wf-research-output.md4.1 KB
- 参考文档workflows/wf-research.md1.7 KB
- 参考文档workflows/wf-review.md5.2 KB
- 参考文档workflows/wf-signoff.md1.3 KB
- 参考文档workflows/wf-spec.md2.0 KB
- 参考文档workflows/wf-strategic-fit.md3.1 KB
- 参考文档workflows/wf-structural-map.md1.5 KB
- 参考文档workflows/wf-surface-probe.md2.5 KB
- 参考文档workflows/wf-task-base.md899 B
- 参考文档workflows/wf-tdd.md4.4 KB
- 参考文档workflows/wf-trace-sample-eval.md2.8 KB
03 SKILL.md 正文
Workflow Library
Manage composable workflow templates (type: template) across three resolution tiers. Every PKB call below runs through the services MCP server's code-mode interface (portal_codemode_execute calling codemode.<pkb_op>(...); in agy via call_mcp_tool with ServerName: "services", in Claude Code via mcp__services__portal_codemode_execute), always passing a concise 1-line toolSummary argument (e.g. toolSummary: "List workflow templates for tier resolution"), not a directly-invocable flat tool.
Tiers and Resolution
Resolution order is Project > PKB > Universal. Higher tiers shadow lower tiers completely; never merge text across tiers.
| Tier | Location | Enumeration |
|---|---|---|
| 1. Project | PKB templates whose project is the task's project |
codemode.pkb_list_tasks({ type: "template", project: "<project>", include_done: true }) |
| 2. PKB | PKB templates with no project |
codemode.pkb_list_tasks({ type: "template", include_done: true }), keep project: null |
| 3. Universal | ${CLAUDE_SKILL_DIR}/workflows/ |
Glob ${CLAUDE_SKILL_DIR}/workflows/*.md |
The project is the project field of the task being composed for, or the project the caller names. With neither, the project tier is empty for composition. Templates scoped to any other project are out of scope for composition, but visible in list mode.
A project template's id is <project>-<slug>, so the same slug can exist in several projects. Strip the <project>- prefix to get the slug that shadows lower tiers.
Both PKB tiers resolve from the graph alone, so a session needs no checkout of the project's repository. A repository's .agents/templates/ directory is not a tier.
Enumerate and read universal templates using file tools (Glob, Read) rather than Bash, so resolution succeeds under non-interactive and dontAsk permission modes.
Modes
list
Enumerate every template across all three tiers live. Return a unified table: slug | tier | coverage | status.
- Include every universal template file (
${CLAUDE_SKILL_DIR}/workflows/*.md) and every PKB template from the graph (codemode.pkb_list_tasks({ type: "template", include_done: true })). - For PKB templates with a
projectfield, indicate their project scope in the tier column (e.g.Project (brain)). Foreign-project templates are displayed with their project prefix or formatted asProject (<name>)in the tier column without altering composition scoping. - Extract coverage from
descriptionin frontmatter, or, if that is missing, from the first sentence of## What this step does. Read universal template files directly viaRead; do not runBashloops. - Filter out dated instances (
-*-\d{8}-*) andstatus: cancelled. Do not filter out foreign-project templates. - Flag shadowed slugs and templates missing coverage lines.
view
Resolve the template slug across tiers in precedence order. Output the winning content, identify winning and shadowed tiers, or list near-misses if missing.
new
- Check existing library to avoid duplicating covered workflows.
- Select destination tier:
- Project: Specific to one project. Write it to the PKB with
project: <project>and id<project>-<slug>. - PKB: Portable personal workflow. Write it to the PKB with no
project. - Universal: Core baseline standard across projects (
${CLAUDE_SKILL_DIR}/workflows/).
- Project: Specific to one project. Write it to the PKB with
- Author the template following
ida:craft(## Workflow Templates), which is the authoritative style, schema, and authoring standard across all tiers. Compliance with its contract separation, headless worker execution, approval boundary, and deliverable rules is mandatory.
edit
Update existing templates in place. Authoring changes must comply with ida:craft (## Workflow Templates).
- Universal: Edit the file directly.
- PKB: Pass only the markdown body below the closing
---tocodemode.pkb_update_bodyto prevent frontmatter duplication.
preview
Simulate composition for a stated objective at one of two depths. Never write tasks or mutate the graph; mark the output as a non-minted preview.
- stage depth (what
/decomposeasks for): return the composite that covers this class of work as its ordered stages, each with its input and output contract, unresolved. A stage whose filling is a choice among methods, frames or venues stays a named slot; do not pick for it or expand it into steps. - step depth (what
/reifyasks for): resolve each stage to the templates and skills that fill it across the tiers and combine their steps into one logical sequence (e.g. test-first where the change modifies code that executes, build, then QA). Show the assembled steps and the resulting task brief shape.
Do not ad lib extra requirements or guess at scope; pass any ambiguity in the prompt through to the preview.
retire
- Check for tasks governing retirement (
codemode.pkb_search). Halt if unfulfilled dependencies exist. - Delete the artifact (
rmfor universal files,codemode.pkb_deletefor PKB nodes). - Name the superseding workflow in the release message or commit.
Constraints
- Query tiers dynamically; do not rely on static indices or memory.
- In
portal_codemode_executecalls, always provide a concise 1-linetoolSummaryargument. In batch queries (pkb_list_tasks,pkb_search), use nativemetadata_only/max_bytesparameters and project batch results in JavaScript to{ id, title, status, parent, body }(omitting duplicatecontentfields and null frontmatter keys) to prevent harness spills, while allowing full untruncatedbodyreads for the primary target artifact under review or edit. - Keep templates focused on obligations and exit criteria; leave operational method to skills.
- Do not mint tasks or dispatch work during library management operations.
04 同仓库更多 Skills
refresh-questions
Sweep and refresh open questions in the Telegram Mini App by closing questions that are answered elsewhere, superseded, or asking for completed actions, and ensuring active open questions carry recommendations and context. Use when asked to refresh questions, sweep stale questions, or keep the Mini App decision queue current. Exclude for asking new questions or routine chat replies.
refresh-questions
Sweep and refresh open questions in the Telegram Mini App by closing questions that are answered elsewhere, superseded, or asking for completed actions, and ensuring active open questions carry recommendations and context. Use when asked to refresh questions, sweep stale questions, or keep the Mini App decision queue current. Exclude for asking new questions or routine chat replies.
refresh-questions
Sweep and refresh open questions in the Telegram Mini App by closing questions that are answered elsewhere, superseded, or asking for completed actions, and ensuring active open questions carry recommendations and context. Use when asked to refresh questions, sweep stale questions, or keep the Mini App decision queue current. Exclude for asking new questions or routine chat replies.
refresh-questions
Sweep and refresh open questions in the Telegram Mini App by closing questions that are answered elsewhere, superseded, or asking for completed actions, and ensuring active open questions carry recommendations and context. Use when asked to refresh questions, sweep stale questions, or keep the Mini App decision queue current. Exclude for asking new questions or routine chat replies.
dispatch-queue
Show the user the tasks ready to dispatch, ranked with a recommendation on each, and start workers on the ones the user approves -- redirects to universal workflow template wf-dispatch-queue. Use for "what's ready", "what should we dispatch", or "dispatch the queue". Exclude for starting workers on named tasks without the user's choice (use dispatch) or graph truth maintenance (use reconcile).
dispatch-queue
Show the user the tasks ready to dispatch, ranked with a recommendation on each, and start workers on the ones the user approves -- redirects to universal workflow template wf-dispatch-queue. Use for "what's ready", "what should we dispatch", or "dispatch the queue". Exclude for starting workers on named tasks without the user's choice (use dispatch) or graph truth maintenance (use reconcile).