agentleFS
Ericcccccc777Ericcccccc777/CCC-MAGI/skills/workflow-template/SKILL.md

workflow-template

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

Pick, customize, and persist the project's WORKFLOW TEMPLATE. CCC-MAGI ships 6 modular templates (full-stack / frontend / mobile / library / data-ml / content) plus the trivial lane. This skill detects the project type from repo signals, RECOMMENDS the best-fit template (one-question confirm, never gates), lets the user skip/reorder/add stages, and persists the result to `.harness/state/workflow-template.json`. The CCC dashboard renders whatever is persisted.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 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.

  • 3

    Very specific

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

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

    Read .harness/workflows/index.json.

    line 34
  2. Distinctive:

    If the user picks "customize", go to Step 3.

    line 54
  3. Distinctive:

    If a requested edit hits a guardrail, explain plainly (e.g., "人工冒烟是不可去掉的底线,但 trivial 改动那条车道本来就会跳过它") and offer the nearest allowed …

    line 71
  4. Very specific:

    Write .harness/state/workflow-template.json (atomic: tmp + rename).

    line 75
  5. Very specific:

    If .harness/state/workflow-template.json is ABSENT, the project is on the full-stack template by default (the original 9 stages).

    line 97

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

/workflow-template

Choose the workflow shape that fits THIS project, instead of forcing the full-stack 9-stage pipeline on everything. Templates are data at .harness/workflows/ (registry index.json + one file per template under templates/). The active selection lives at .harness/state/workflow-template.json.

Constitutional basis: customization is bounded by constitution.md § Section 1. The cross-model audit (spec-audit + the audit gates) and the human smoke test (the HUMAN-REVIEW slot stage) are Universal Core — they CANNOT be removed or reordered after commit, by any template choice or customization.

Language Awareness

Instructions are English; talk to the user in their OS locale (see CLAUDE.md § Language Awareness). Template ids (frontend, full-stack) and stage ids are machine identifiers — never translate them; translate titles/descriptions when displaying.

Modes

ModeTriggerDoes
--recommend (default)/init onboarding; user has no template yetDetect type → recommend → one-question confirm → persist
--set <id>user names a templateSwitch to that template, persist
--customizeuser wants to tweakWalk skip/reorder/add against the active template, persist
--show"what's my workflow"Print the active template's stages (resolved)

Step 1 — Detect the project type (for --recommend)

Read .harness/workflows/index.json. For each template, score its detect signals against the repo:

  • Manifests: package.json deps/scripts/bin, pyproject.toml, Cargo.toml ([lib]), go.mod, pubspec.yaml, Package.swift, *.xcodeproj, android/
  • Layout: presence of src/ components vs server//api//supabase/, index.html, *.ipynb, dvc.yaml, mkdocs.yml/docusaurus.config, a docs/content-dominant tree
  • Deps that disambiguate: a DB driver/ORM → full-stack; react/vue/svelte + no server → frontend; torch/sklearn/mlflow → data-ml; expo/react-native/flutter → mobile

Pick the highest-scoring template as the recommendation; keep the runner-up for the menu. Reuse the auto-detected tech_stack slot if /init already computed it.

Step 2 — Recommend (one-question confirm, NEVER gate)

Show the recommendation + let the user override (use AskUserQuestion; per init's presentation rule, fixed options → AskUserQuestion). Display in the user's locale:

这个项目看起来是「前端 / SPA」。我建议用 Frontend 工作流:
  跳过 DB schema,加上视觉回归 + 无障碍 + 性能预算三道关,发布后看 Web Vitals。

用这个,还是换一个?
  [1] Frontend(推荐 ★)   [2] Full-stack   [3] 其它(我列全部 6 个)   [4] 我要自己调

If the user picks "customize", go to Step 3. Otherwise persist the chosen template (Step 4) and you're done.

Step 3 — Customize (skip / reorder / add)

Load the chosen template's stages. Let the user, in plain language:

  • Skip a stage → mark it removed
  • Reorder stages → change the order
  • Add a stage → insert another template's stage, or a free-form stage {id,title,desc} with no skill

Guardrails (HARD — enforce, explain if the user asks to violate):

  1. The stage bound to HUMAN-REVIEW (the human smoke test) can NOT be removed — Universal Core §1.4. (Trivial lane may still skip it for pure copy changes; that's the lane, not a template edit.)
  2. The spec-audit stage and the cross-model audit at implement can NOT be removed — Universal Core §1.1.
  3. commit can NOT run before the VERIFY-GATE stage or the HUMAN-REVIEW stage. Reorders that violate this are rejected.
  4. Stages tagged lanes:["full"] are already auto-skipped in stability-fix / trivial lanes — don't double-encode that as a customization.

If a requested edit hits a guardrail, explain plainly (e.g., "人工冒烟是不可去掉的底线,但 trivial 改动那条车道本来就会跳过它") and offer the nearest allowed alternative.

Step 4 — Persist

Write .harness/state/workflow-template.json (atomic: tmp + rename). Schema:

{
  "schema_version": 1,
  "template_id": "frontend",
  "recommended_id": "frontend",
  "chosen_at": "<ISO-8601>",
  "customized": false,
  "customizations": [],
  "stages": null
}
  • template_id — the chosen template; the dashboard/skills read templates/<template_id>.json for the canonical stages.
  • customized / customizations — set true + a list of {op:"skip|reorder|add", stage:"<id>", detail:"..."} if the user tweaked.
  • stages — when customized is true, the FULL resolved ordered stage list (same shape as a template's stages) so the dashboard renders the user's exact flow without re-deriving. When customized is false, leave null (dashboard falls back to the template file).

This file is committed to git (team-shared project workflow, like install.json / todolist.json).

Backward compatibility

  • If .harness/state/workflow-template.json is ABSENT, the project is on the full-stack template by default (the original 9 stages). Nothing breaks for projects that predate this feature; /workflow-template --recommend can be run anytime to switch.
  • Checkpoints keep using current_stage (a number) — it now indexes into the active template's stages (n), so a project on frontend at current_stage:7 is at "Accessibility gate". checkpoint-write.sh is unchanged; only the meaning of the number is template-relative.

Output / handoff

  • From /init: after persisting, tell the user their workflow in one line and continue the install.
  • Standalone: print the resolved stage list (--show format) and stop.

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.