workflow-scan
Version History
v3.9: Added a false-positive guard for installed shared-document templates versus task-local runtime evidence files, such as
finish-work-checklist-template.mdvs generatedfinish-work-checklist.mdv3.8: Added explicit false-positive guards for Codex shared-vs-secondary skill carriers, uppercase
SKILL.mdskill-file convention, and intentionally removed disabled-command active surfaces such asparallelv3.7: Added positive scenario coverage for shared surfaces that are truly workflow-owned or workflow-patched, so ownership gating tests both the omit path and the actionable-finding path
v3.6: Clarified that a shared or external baseline skill/reference under an in-scope carrier is not a workflow defect unless temp-project evidence shows the current workflow explicitly owns or patched that surface
v3.4: Clarified that the complete-catalog rule excludes contradiction- free intentionally disabled retained carriers per rule 17, and restored design-debt / evidence-gap coverage in the shared output example
v3.3: Clarified that a retained carrier explicitly documented as temporarily unavailable or intentionally disabled is omitted from
WORKFLOW_QUESTIONS.mdunless another installed surface contradicts that disabled contractv3.1: Clarified that actionable defect judgment in this skill version is limited to Claude Code / OpenCode / Codex workflow surfaces; issues seen only in other CLI usage stay out of scope unless the managed surface later expands
v3.2: Clarified that valid
.backup-original/carrier trees paired with active patched/overlay assets are intentional restore surfaces, not residual workflow defectsv3.0: Upgraded the shared contract to
workflow-scan-repair-v4, requires concrete workflow version/schema fields, and aligns scan output with same-version stale-report blocking on the repair sidev2.8: Added mandatory repair-classification guardrails so scan findings must distinguish
confirmed-defect,design-debt, andevidence-gap, and upgraded the shared report contract toworkflow-scan-repair-v3v2.7: Refined the paired repair-side compatibility note to clarify that
workflow-repair --autostill stays outside the shared scan schema while now rejecting mixed-scope or misleading current-task commit confirmationsv2.6: Updated the paired repair-side compatibility note to clarify that
workflow-repair --automay now accept explicit current-task commit-plan/scope confirmations that enumerate proposed commits or task artifacts, while scan output and the shared report schema remain unchangedv2.5: Refined the paired repair-side compatibility note for
workflow-repair --auto, clarifying that scan output remains schema-stable while repair-side close-out may now loop through current-taskcontinue, fall back from command surfaces to same-session skill surfaces, and still stay outside the shared scan/report schemav2.4: Added paired repair-side compatibility note for
workflow-repair --auto, clarifying that scan output stays schema-stable while repair-side close-out behavior may optionally continue automatically in the source projectv2.3: Added explicit
--agentopt-in and capability criteria, kept inline scan as the default, clarified coordinator-owned report writing plus hard-block behavior when agent mode is unsupported, and added helper-failure / conflict-compensation rules, a reusable handoff template, and scenario tests for agent-assisted success/failure pathsv2.1: Added mandatory read-back validation for generated reports, count consistency checks, and explicit contract-drift guards before scan success
v2.0: Re-scoped the skill to analyze only the full workflow content currently present in the temp project; removed source-repo inputs, source-repo evidence layers, and source-location requirements from the scan contract
v1.3: Aligned frontmatter with the latest public skill spec by making the description explicitly cover both purpose and trigger, and by adding compatibility requirements
v1.2: Replaced misleading fixed example paths and version literals with runtime-sensitive placeholders
v1.1: Clarified temp-project provenance, no-agent execution, analysis-summary output, and evidence classification rules
v1.0: Initial release
Purpose
Scan the embedded workflow currently in use inside a Trellis temp project and
produce a structured WORKFLOW_QUESTIONS.md report.
This skill is the analyzer/producer half of the workflow-scan /
workflow-repair coupled pair.
Its target of judgment is the full workflow surface currently present inside the temp project. It does not compare against the current source repository. It does not edit workflow source files, installed artifacts, or task state.
When to Use
Use this skill when any of the following is true:
- you are working in a trellis temp project and need to analyze the workflow currently installed there
- you need to inspect the temp project's active workflow surfaces for problems, gaps, residual issues, or new issues
- the user asks to "scan the temp project workflow" or "check the embedded workflow for issues"
- the user asks to "produce workflow questions" or "generate a workflow scan report"
- the user asks to "run workflow-scan"
- a workflow analysis cycle starts and a structured report is needed before repair
When Not to Use
- you need to fix issues: use
workflow-repairin the source project - you need a comprehensive audit with version gates and runtime validation: use
workflow-audit - you need version-drift analysis: use
workflow-capability-audit - you are doing a normal implementation task without workflow analysis
Core Rules
- Scan only: this skill produces a question/evidence document; it never edits workflow source files or any code.
- Inline default: without
--agent, do not use agents, sub-agents, or task orchestration. Run the scan directly in the current CLI session. - Explicit agent opt-in only: use helper agents only when the input
explicitly includes
--agent. Do not switch to agent-assisted mode on your own. - Coordinator ownership is mandatory: when
--agentis present, the current CLI session remains the scan coordinator. Multiple helper agents may inspect bounded temp-project surfaces and return evidence, but only the coordinator may decide final findings, writeWORKFLOW_QUESTIONS.md, or report success. - No silent fallback for
--agent: if--agentis requested but the current platform/session cannot safely run helper agents, stop as Blocked / Agent Mode Unsupported instead of quietly reverting to inline mode. This rule applies to mode selection only. Once helper dispatch has already started, coordinator-side local compensation for helper failure is still allowed and is not considered a forbidden silent fallback. - Bounded agent mode only:
--agentis an evidence-gathering aid, not a general orchestration mode. Use only a small number of helper agents with non-overlapping scopes sized to reduce context pressure rather than maximize parallelism. - No task-state side effects:
--agentdoes not authorize task creation, task switching, or any file edits by helper agents. Their scope is read-only evidence gathering. Execution-mode changes also do not alter repair-side intake assumptions; the validated report contract remains the sole basis for repair-side processing. - Temp project only: this skill runs in or targets a Trellis temp project. The analysis target is the temp project's currently installed workflow, not the current source repository.
- Embedded-workflow truth target: judge whether issues exist from the full
workflow result under
/tmp/trellis-{VERSION}-2, not from any external source tree. - All active workflow surfaces count: scan the full workflow content that
the temp project is currently using, not only
.trellis/workflow-installed.json. - Evidence comes from the temp project only: every finding must use an
Evidence Layervalue grounded in the temp project's actual state. - Conservative severity: severity estimates are preliminary, set by the scan running in isolation before repair. Mark explicitly as estimates.
- Complete final finding set: every anomaly that belongs in the final finding set must be recorded. Do not filter that finding set by severity during the scan phase. Intentionally disabled retained carriers without contradictions may still be inspected during analysis, but rule 17 keeps them out of the final finding set.
- Origin classification is mandatory: every finding must classify as
either
trellis-native(produced bytrellis init) orworkflow-source(introduced by the embedded workflow's install/patch layer). - Repair classification is mandatory: every finding must additionally
classify as
confirmed-defect,design-debt, orevidence-gap. - No complexity-only inflation: if an observation is only about
complexity, maintainability, ergonomics, or possible over-design without a
concrete temp-project contradiction, it must be classified as
design-debt, notconfirmed-defect. - Intentional gated-carrier observations stay conservative: if a
carrier is present on disk but the temp project's installed workflow docs
or runtime rules explicitly say that the path is intentionally gated off
for now, kept only as a compatibility carrier, or reserved for possible
future re-enable after maturity improves, the scan must not emit that
situation as a finding unless another installed surface contradicts that
disabled contract.
This includes retained subagent/helper carriers that the temp project
explicitly marks as currently unavailable or temporarily disabled.
- If the installed workflow still behaves consistently with that stated
contract, omit the item from the final
WORKFLOW_QUESTIONS.mdfindings. At most, mention it as non-finding context while explaining why it was intentionally excluded. - Only emit a finding when the temp project shows a real contradiction, such as the docs claiming the path is disabled while some installed runtime surface still actively routes users into it.
- Other contradiction examples include installed workflow docs still teaching that carrier's usage, hook/config/runtime-control surfaces still invoking it, or another installed command/skill/agent surface still routing through it as an active entry path.
- If the installed workflow still behaves consistently with that stated
contract, omit the item from the final
- No evidence-gap inflation: if the temp-project evidence is still
insufficient to confirm a real defect or source-owned root cause, the item
must be classified as
evidence-gap, notconfirmed-defect. - Contract format: the output must use the
WORKFLOW_QUESTIONS.mdformat exactly as defined inreferences/scan-output-template.md. - Read-back validation is mandatory: after writing
WORKFLOW_QUESTIONS.md, the skill must read the file back and verify the required frontmatter keys, summary sections, and finding schema before it may report success. This validation also serves as the shared contract gate ensuring the emitted report satisfiesworkflow-repairintake assumptions. - Concrete workflow version fields are mandatory: successful scan output
must include real
workflow-versionandworkflow-schema-versionvalues from the embedded target. If either field is missing or unresolved, stop as Blocked / Invalid Embedded State instead of emitting a repair-usable report. - Supported CLI defect scope is fixed for this skill version: actionable findings may concern only the current workflow's Claude Code / OpenCode / Codex managed surfaces. If a symptom appears only when using some other CLI and does not break these three supported surfaces, record it at most as out-of-scope context and do not emit it as a workflow defect.
- Preserved restore surfaces are not residual defects by default:
.backup-original/trees under managed command/skill carriers must not be reported as workflow defects when temp-project evidence shows they are backup copies paired with active patched/overlay assets recorded in.trellis/workflow-installed.json(for examplepatched_baseline_commandsorpatched_codex_skills). - Shared-carrier location alone does not prove workflow ownership: when a
surface exists under a shared carrier such as
.agents/skills/, the scan must not emit it as a workflow defect unless temp-project evidence shows that the current workflow explicitly owns, patches, routes through, or otherwise changed that surface. Acceptable temp-project ownership evidence includes install-record fields, workflow patch markers/watermarks, active patched-carrier pairings, or installed docs/runtime rules that explicitly describe the surface as workflow-managed. A file living under.agents/skills/or another in-scope carrier must stay out of the actionable finding set unless the temp project also shows explicit workflow ownership of that surface. If the observation is a shared or external baseline carrier that the embedded workflow did not explicitly claim, patch, or route through, omit it from the actionable finding set rather than emitting it as a workflow defect. - Workflow-owned shared surfaces must stay actionable: when temp-project
ownership proof is present for a shared-carrier surface, the scan must
keep that observation in the actionable finding set rather than omitting
it merely because the file lives under
.agents/skills/or another shared carrier. - Codex shared-vs-secondary skill carriers must stay distinct: for the
supported Codex workflow surface,
.agents/skills/*/SKILL.mdis the shared workflow primary carrier, while.codex/skills/*/SKILL.mdis only a secondary carrier for Codex-specific or project-local extra skills. The scan must not emit a finding merely because.codex/skills/is empty or because shared workflow skills are absent there, unless another installed surface explicitly claims that a current workflow-owned skill should live under.codex/skills/. - Uppercase
SKILL.mdis a valid skill-file convention here: the scan must not emit a finding merely because installed skill files use uppercaseSKILL.mdinstead of lowercaseskill.mdwhen the temp project's supported workflow surfaces, installed docs, or other installed skill carriers consistently useSKILL.md. - Disabled-command removal may be satisfied by active absence: when the
temp project's installed workflow rules say a command/skill surface such
as
parallelis intentionally disabled and removed from the active embedded surface, the scan must not require a separate.disabledmarker, placeholder command file, or active skill stub unless another installed surface explicitly says such an artifact should exist. - Installed templates are not task-local runtime evidence files: when an
installed workflow surface references a task-local file that is generated
later during a workflow stage, the scan must not report the file as a
missing post-install artifact merely because it does not exist in a fresh
temp project. For example,
.trellis/workflow-docs/finish-work-checklist-template.mdis the installed shared template, whilefinish-work-checklist.mdis the task-local close-out evidence file created when a task reaches delivery/finish-work readiness. If the template exists and installed workflow surfaces explain that the runtime file is generated from it, the absence of the runtime file before that stage is not a finding. Emit a finding only when a task that should have generated the runtime file is already at the relevant gate, the template is missing, or an installed surface incorrectly claims the runtime file must exist immediately after install.
Inputs
| Input | Required | Default | Meaning |
|---|---|---|---|
temp_project_path |
No | auto-detect | Absolute path to temp project root |
candidate_focus |
No | empty | Supplementary focus areas to prioritize |
--agent |
No | off | Mode-switch flag. When present, the coordinator may use multiple helper agents for bounded read-only evidence gathering. Without it, the scan must stay inline in the current CLI session. |
Execution Mode Resolution
- Treat execution mode as
agent-assistedonly when the user explicitly asks for helper-agent use, either by:- including the literal
--agenttoken in the request, or - using equivalent natural language such as "use multiple agents", "scan this with helper agents", or "do the scan with multi-agent help"
- including the literal
- If the user does not explicitly request helper-agent use, execution mode is
inline. Requests such as "scan deeper", "scan faster", or "do a more thorough scan" do not by themselves enable helper-agent mode. - In
agent-assistedmode, the current CLI session remains the coordinator:- helper agents may take only concrete, non-overlapping evidence-gathering slices
- helper agents must not write files, answer overwrite prompts, or finalize findings/severity
- If
--agentis present but the current platform/session cannot safely run multiple helper agents with explicit ownership boundaries, stop as Blocked / Agent Mode Unsupported. - Treat the current platform/session as agent-capable only when all of the
following are true:
- helper agents can actually be invoked in this environment rather than only being theoretically supported by the product family
- the coordinator can pass explicit scope boundaries and receive a distinct handoff back from each helper
- helper execution does not violate a stronger repo-local or session-local rule such as Codex inline main-session constraints
- If any capability criterion above is uncertain, prefer the conservative result: stop as Blocked / Agent Mode Unsupported instead of guessing.
- Execution mode must not change the output file location, frontmatter, or
finding schema. Inline and
--agentruns emit the sameWORKFLOW_QUESTIONS.mdcontract. - This skill defines behavior only. The concrete helper-dispatch mechanism is platform-specific and may differ across executors; do not assume a single universal Agent tool or API binding from this contract alone.
- Repair-side
--autofollow-through is outside scan execution mode. If the user later runsworkflow-repair --autoin the source project, that changes only post-repair close-out behavior, including repair-side handling of explicit current-task commit-plan/scope confirmations. Those repair-side prompts may still be rejected when they mix non-task files into the commit scope or would misstate the actual repair result, and none of that may change scan output, overwrite handling, or the shared report schema.
Temp Project Path Resolution
- If
temp_project_pathis explicitly provided, use it. - Otherwise: run
trellis -vto get VERSION, construct path/tmp/trellis-{VERSION}-2/. - Validate: the directory must exist and contain
.trellis/. - If not found: stop as Blocked / Temp Project Not Found.
Output
Single file: WORKFLOW_QUESTIONS.md at the temp project root.
Format specification: see references/scan-output-template.md.
Workflow
Step 0: Environment and Mode Preflight
- Resolve the temp project path and execution mode (see the Inputs and Resolution sections above).
- Verify the temp project is a valid Trellis-initialized project:
.trellis/directory exists.trellis/.versionexists and is readable
- Verify the temp project also looks workflow-embedded:
.trellis/workflow-installed.jsonexists, or.trellis/scripts/workflow/exists, or.trellis/workflow.mdexists and clearly represents an embedded workflow, not only a baseline Trellis workflow
- Read runtime version/context fields from the temp project where available:
trellis -v→ live trellis version.trellis/.version→ temp project's trellis version.trellis/workflow-installed.json→workflow_version,workflow_schema_version,critical_runtime_patches,commands,scripts,cli_types, and other install-record fields if present
- Require both
workflow_versionandworkflow_schema_versionto be present in successful scan output:- if either field is absent, empty, or effectively
unknown, stop as Blocked / Invalid Embedded State
- if either field is absent, empty, or effectively
- If the temp project is not fully initialized (no
.trellis/or no.version): stop as Blocked / Invalid Temp Project. - If the temp project is not workflow-embedded: stop as Blocked / Workflow Not Embedded.
- If
WORKFLOW_QUESTIONS.mdalready exists at the temp project root: stop and ask whether to overwrite or append. - If execution mode is
agent-assisted, do not dispatch helper agents until Steps 0.1-0.7 have passed and any overwrite decision has been resolved.
Step 1: Workflow Surface Inventory
- Catalog the workflow surfaces currently present in the temp project.
- At minimum inspect these paths when they exist:
.trellis/workflow.md.trellis/workflow-installed.json.trellis/scripts/workflow/.trellis/workflow-docs/.agents/skills/.codex/.claude/commands/trellis/.opencode/commands/trellis/AGENTS.mdand other installed runtime control files whose current content affects workflow behavior
- For each observed artifact, classify the strongest supported evidence layer:
generated-target-baseline— observed in a Trellis baseline surface that exists in the temp projectgenerated-target-installed— observed in a workflow-installed or workflow-patched surface in the temp projectgenerated-target-runtime— observed in a temp-project runtime/control surface whose current behavior matters but is not well-explained by the install record alone
- If an origin or evidence-layer classification is inferred rather than directly obvious, state that inference explicitly inside the finding evidence.
- Build an artifact inventory that later steps reference.
Step 1A: Optional --agent Work Split
Use this step only when execution mode is agent-assisted.
- The coordinator defines concrete, non-overlapping helper scopes before any
delegation. Good examples:
- scripts and commands
- CLI adaptation carriers
- workflow documents and cross-references
- runtime-control surfaces
- recommended helper-count ceiling: 3 by default, 4 only when the workflow surface split is still clearly non-overlapping and the coordinator can justify the extra handoff cost
- Each helper agent must receive:
- explicit read-only scope boundaries
- the exact temp-project paths or artifact class it owns
- a required handoff format from
references/helper-handoff-template.md, containing confirmed facts, candidate issues, open questions, and relative paths
- Helper agents must not:
- write
WORKFLOW_QUESTIONS.md - edit any file
- invent evidence outside the temp project
- decide final severity or deduplicate findings across helpers
- write
- The coordinator must review every helper handoff. If a helper result is incomplete, ambiguous, malformed, timed out, or fails outright, the coordinator treats that helper as non-authoritative, fills the evidence gap locally, and may skip the slice rather than failing the whole scan. Partial helper output may still be used as a lead for local re-check, but it must not be promoted directly into final findings without coordinator confirmation from temp-project evidence.
- If two helper handoffs conflict, the coordinator must resolve the conflict in the main session using temp-project evidence before carrying either claim into final findings. Do not average, merge, or silently pick one helper's claim without local verification. If the conflict remains unresolved after local re-check, drop the disputed claim from final findings rather than guessing. The unresolved conflict itself is not a workflow finding unless separate temp-project evidence independently supports one.
- Keep helper-agent resource usage intentionally small:
- use only the minimum number of helper agents needed for concrete non-overlapping slices
- avoid delegating tiny or tightly coupled checks whose coordination cost exceeds their context-saving benefit
- if agent coordination stops being net-beneficial, continue inline instead of widening the agent fan-out
- Delegation is optional per step. Keep tightly coupled blocking decisions in the coordinator session instead of forcing them through helper agents.
Step 2: Script, Command, Skill, Hook, and Agent Verification
For every workflow-related executable or control surface found in the temp project:
- Existence: verify the file exists at the expected path implied by the temp project's own workflow surfaces.
- Executability / syntax shape: for shell/Python scripts, verify the file is executable or has a valid shebang; for config/markdown carriers, verify the file is structurally readable.
- Cross-surface consistency: compare what the file claims against the temp
project's own other workflow surfaces:
- install record vs actual scripts/commands/skills/hooks
- workflow docs vs actual installed helper paths
- AGENTS/hook/config guidance vs actual installed runtime surfaces
- Exit-code or gate contracts: where the temp project documents a command or validation contract, check whether the installed surface appears to match that contract.
- Note any missing files, wrong paths, broken references, contradictory install-record entries, or mismatched runtime surfaces.
Step 3: CLI Adaptation Surface Scan
For each CLI carrier in the temp project:
- Skills: catalog installed skills and check for:
- missing workflow skills referenced elsewhere in the temp project
- duplicate or contradictory skill carriers
- stale instructions that reference absent runtime surfaces
- Commands: catalog installed commands and check for:
- missing command surfaces referenced by docs, hooks, or installed routing
- stale references or broken paths
- Agents: catalog installed agents and check for:
- legacy names that conflict with the current installed workflow behavior
- missing routing or context-loading guidance where the temp project expects it
- Hooks / runtime controls: catalog hook configurations and check for:
- missing patch markers or strong-gate markers referenced by the temp project's own workflow files
- hook scripts that reference wrong or missing paths
- runtime-control drift between installed docs/config and actual patched files
- Codex carrier boundaries: for
.agents/skills/and.codex/skills/, verify carrier role before emitting a finding:- treat
.agents/skills/*/SKILL.mdas the shared workflow primary carrier when installed docs/runtime rules describe it that way - treat
.codex/skills/as a secondary carrier unless installed evidence shows a current workflow-owned Codex-specific skill should live there - do not classify an empty
.codex/skills/directory as a defect by itself - do not classify uppercase
SKILL.mdas a defect by itself when the temp project consistently uses that convention - do not classify removed
parallelactive surfaces as a defect by itself when the installed workflow explicitly disables that path
- treat
Step 4: Document and Reference Integrity
For every installed workflow document or installed runtime-control document:
- Check that internal cross-references resolve to existing temp-project files.
- Check that helper-script references use the installed temp-project paths actually present in the temp project.
- Check that execution-card references resolve when such cards are installed.
- Distinguish installed shared templates from task-local runtime artifacts. A reference to a later-generated task file is not broken solely because the file does not exist in a fresh temp project when installed docs explain the generation path and the corresponding template exists.
- Flag any broken, stale, contradictory, or misleading references.
Step 5: Residual and New Issue Detection
- Residual artifacts: flag any workflow-related file, directory, or reference that appears retired, stale, or contradictory within the temp project's own current workflow surfaces.
- Install/runtime drift: compare
.trellis/workflow-installed.jsonagainst the actual installed state when the record exists. Flag inconsistencies. - Missing surfaces: flag workflow surfaces referenced by temp-project docs, configs, or records that are absent from the actual temp project.
- New issues: flag anomalies not covered above — wrong permissions, encoding issues, broken assumptions, unexpected files, or contradictory routing/runtime behavior.
Step 6: Compile WORKFLOW_QUESTIONS.md
- Assign unique IDs to each finding:
WS-001,WS-002, etc. (sequential, zero-padded to 3 digits). - For each finding, include all required fields per the finding entry schema:
- Category (from the 6 allowed values)
- Severity Estimate (P0/P1/P2, preliminary)
- Repair Classification (
confirmed-defect,design-debt, orevidence-gap) - Origin (
trellis-nativeorworkflow-source) - Evidence Layer (
generated-target-baseline,generated-target-installed, orgenerated-target-runtime) - Evidence (list of observations)
- Temp Project Location (relative path within temp project, or a concise multi-path description when more than one surface is involved)
- Description (what is wrong and why)
- Suggested Investigation (what
workflow-repairshould verify in the temp project before deciding the source-side repair)
- Write the required
Analysis Summarysection so the report explicitly includes:- overall problem analysis
- gap / missing-surface analysis
- residual issue summary
- new issue summary
- confirmed-defect summary
- design-debt summary
- evidence-gap summary
- Write the document using the format from
references/scan-output-template.md. In particular, the frontmatter must contain these exact keys and spellings:document-type: workflow-questionsprotocol: workflow-scan-repair-v4trellis-versionworkflow-versionworkflow-schema-versionscan-timestamptemp-project-roottotal-findingsp0-countp1-countp2-count
- Only the coordinator writes to the temp project root as
WORKFLOW_QUESTIONS.md, even in--agentmode. - Immediately read the file back and verify all of the following before
declaring success:
- the frontmatter contains every required key above using the exact kebab-case spellings from the shared template
- the report contains
## Scan Summary - the report contains
## Analysis Summary - the report contains a
### WS-NNNheading for every finding - the
total-findings,p0-count,p1-count, andp2-countvalues match the actual finding count and per-severity counts in the document body - the analysis summary includes Confirmed Defects, Design-Debt Items, and Evidence-Gap Items
- each finding block includes Category, Severity Estimate, Repair Classification, Origin, Evidence Layer, Evidence, Temp Project Location, Description, and Suggested Investigation
- If any required key or section is missing, or if snake_case replacements
or alternate names such as
generated_at,trellis_version,temp_project_path, ortotal_findingsappear instead of the shared contract fields, treat the run as failed and correct the document before proceeding. - If
workflow-versionorworkflow-schema-versionresolves tounknown, empty, or any other placeholder rather than a concrete embedded value, stop as Blocked / Invalid Embedded State instead of reporting success.
Step 7: Echo and Stop
- Echo the output summary only after the read-back validation in Step 6
passes:
- temp project path
- output file path
- total findings, P0/P1/P2 counts
- Suggest the next step: run
workflow-repairin the source project to consume the report. - Do not attempt any fixes, aggregation, or workflow state changes.
Error Handling
| Case | Behavior |
|---|---|
| Temp project not found | Stop as Blocked / Temp Project Not Found. Suggest creating or locating the temp project first. |
| Temp project not fully initialized | Stop as Blocked / Invalid Temp Project. Verify .trellis/ and .version exist. |
| Temp project not workflow-embedded | Stop as Blocked / Workflow Not Embedded. Verify the temp project really contains an embedded workflow instead of only the Trellis baseline. |
--agent requested but unsupported |
Stop as Blocked / Agent Mode Unsupported. Explain that the current platform/session cannot safely run the required helper agents. Do not silently fall back to inline mode. |
| Helper handoffs all fail or time out for a delegated slice | Keep coordinator ownership. Re-check the slice locally when safe, or skip that slice conservatively instead of treating helper failure itself as a workflow finding. |
| Helper claims conflict and local re-check cannot resolve the dispute | Drop the disputed claim from final findings rather than guessing. Continue the scan if the remaining evidence still supports a valid report. |
WORKFLOW_QUESTIONS.md already exists |
Stop and ask whether to overwrite or append. |
| No findings | Write WORKFLOW_QUESTIONS.md with total-findings: 0 and all counts at 0, then still perform the Step 6 read-back validation before reporting success. |
Related Skills
workflow-repair: consumer/fixer pair — consumes theWORKFLOW_QUESTIONS.mdthis skill producesworkflow-audit: comprehensive audit with version gates, evidence mainline, and runtime validation (complementary, not replacement)workflow-capability-audit: version-drift audit
References
- paired repair-side compatibility note:
workflow-repair --autois allowed later in the source project, but it must not change scan output generation, overwrite handling, or the sharedWORKFLOW_QUESTIONS.mdschema- any scan-side change to shared protocol, field, role boundary, or repair-
relevant assumption must ship with the matching
workflow-repairadaptation in the same change
references/scan-output-template.mdreferences/helper-handoff-template.md
Tests
Required persisted scenario files:
tests/01-inline-default-no-agents.mdtests/02-agent-assisted-supported.mdtests/03-agent-mode-unsupported.mdtests/04-helper-failure-local-compensation.mdtests/05-unresolved-helper-conflict-dropped.mdtests/06-partial-helper-output-local-followup.mdtests/07-inline-when-speed-or-depth-only.mdtests/08-classifies-repair-eligibility-before-emitting-findings.mdtests/09-backup-original-preservation-is-not-defect.mdtests/10-retained-disabled-subagent-carrier-is-not-finding.mdtests/11-non-workflow-owned-shared-skill-surface-is-not-finding.mdtests/12-workflow-owned-shared-skill-surface-is-finding.mdtests/13-workflow-patched-shared-surface-enters-actionable-finding-set.mdtests/14-codex-secondary-skills-empty-is-not-finding.mdtests/15-uppercase-skill-md-convention-is-not-finding.mdtests/16-disabled-command-removal-without-marker-is-not-finding.mdtests/17-finish-work-checklist-template-is-not-missing-runtime-file.mdtests/18-finish-work-checklist-positive-cases-are-findings.md
Every test file must use the same structure:
PurposeInputExpected ModeExpected Key BehaviorsMust Not
Examples
Example 1: Standard Scan in Temp Project
User: /workflow-scan
AI:
1. Auto-detect temp project: run `trellis -v`, read the live version, then resolve `/tmp/trellis-{LIVE_VERSION}-2/`
2. Validate: `.trellis/` exists, `.version` matches, workflow embed markers exist
3. Inventory the workflow surfaces currently present in the temp project
4. Execute script/command/CLI/reference/residual checks using only temp-project evidence
5. Compile findings and analysis summary into `WORKFLOW_QUESTIONS.md`
6. Echo:
✅ Workflow scan complete
📁 Temp Project: /tmp/trellis-{LIVE_VERSION}-2
📄 Report: /tmp/trellis-{LIVE_VERSION}-2/WORKFLOW_QUESTIONS.md
📊 Findings: 5 total (P0: 1, P1: 2, P2: 2)
➡️ Next: run /workflow-repair in the source project
Optional: use `/workflow-repair --auto` only if you want the later
source-project repair run to continue into its normal close-out flow
Note: that auto close-out applies to the dedicated repair task that
`workflow-repair` creates or switches to, not to any unrelated
pre-existing task
Example 2: Agent-Assisted Scan
User: /workflow-scan --agent
AI:
1. Resolve the temp project path and confirm that the current session can use helper agents safely
2. Keep coordinator ownership in the current session for overwrite prompts, final finding judgment, report writing, and read-back validation
3. Split independent scan slices across multiple helper agents:
- helper A: scripts and commands
- helper B: CLI adaptation surfaces
- helper C: workflow documents and runtime-control references
4. Review each helper handoff, fill any evidence gaps locally, and compile one shared `WORKFLOW_QUESTIONS.md`
5. Read the report back and verify the required frontmatter keys, summary sections, and count consistency
6. Echo:
✅ Workflow scan complete
📁 Temp Project: /tmp/trellis-{LIVE_VERSION}-2
📄 Report: /tmp/trellis-{LIVE_VERSION}-2/WORKFLOW_QUESTIONS.md
📊 Findings: 4 total (P0: 1, P1: 1, P2: 2)
➡️ Next: run /workflow-repair in the source project
Optional: use `/workflow-repair --auto` only if you want the later
source-project repair run to continue into its normal close-out flow
Note: that auto close-out applies to the dedicated repair task that
`workflow-repair` creates or switches to, not to any unrelated
pre-existing task
Example 3: Agent Mode Unsupported
User: /workflow-scan --agent
AI:
❌ Blocked / Agent Mode Unsupported
The current platform/session cannot safely run helper agents with explicit ownership boundaries.
Reason: helper invocation is unavailable here, or a stronger session rule still requires inline execution.
Next: re-run `/workflow-scan` inline, or move to an agent-capable main session that allows bounded helper delegation.
Example 4: Temp Project Not Found
User: /workflow-scan
AI:
❌ Blocked / Temp Project Not Found
Expected: /tmp/trellis-{LIVE_VERSION}-2/
The directory does not exist or is not a valid trellis project.
Suggestion: create or locate the temp project first, then re-run /workflow-scan.
Example 5: Clean Install With No Issues
User: /work
…(truncated)