/dvera:ct-orchestratorfrom dvera
Use this skill to continue an existing `state.json` session and decide whether to resume `ct-init-project`, `ct-analysis-loop`, or `ct-test-loop` from the current status.
Ships in dvera. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Primary request: Use this skill when continuing an interrupted CT flow from the next stage.
If the CT installation path is missing or validation fails, do not continue. Show the notice below.
The CT installation could not be verified.
Provide the installation path to continue.
[Installation check]
• Checked CT installation path: {ctHome or "not configured"}
• Requirement: CT 2026.06 or later
• Note: A valid CT license is required to run CT.
[If CT is already installed]
• Please provide the full path to the CT installation folder.
Example: C:\Program Files\Suresoft\CT 2026
[If CT is not installed]
• Product and installation support: [email protected]
Role: In a resume session, confirm the execution environment, read state.json, determine the current phase range from status, choose the representative skill among ct-init-project, ct-analysis-loop, and ct-test-loop, run state.json validation (step 4.5), and then ask the user before crossing the next representative stage boundary.
status <-> phase mapping: pending enters Phase 1 by default. However, if toolchain_mode=host is already confirmed and toolchain_mode_user_confirmed=true, it enters Phase 3 directly. macros_extracted means Phase 2, conf_generated means Phase 3, project_created means Phase 4, analysis_success means Phase 5, and test_success means the whole pipeline is complete. *_ing states rerun the same phase. *_failed_* states are failure-reporting states.
User stage labels: explain Phases 1, 2, and 3 as Project preparation, Phase 4 as Analysis, and Phase 5 as Test. In user-facing progress, completion, and failure messages, use those three stage labels instead of phase numbers.
Broad entry boundary: new CT-apply requests and full CT-apply requests are handled by ct-init-project. ct-orchestrator handles only resume, continue, and state-based entry.
Fingerprint validation: On session resume, fingerprint validation runs only in conversion mode. If the conf or ini hash is different, ask the user whether they edited it directly. If the answer is y, recalculate the fingerprint. If the answer is n, roll back to the phase that produced that artifact.
Document loading: When entering a phase, read that phase skill's SKILL.md. Use canonical product documentation from the installed CT/DVERA environment only when product-specific execution or recovery is required. Always record loaded documents in the format Loaded docs: [...].
Phase transition: Do not automatically advance to the next phase after one phase completes. Always ask the user.
Regression: Do not regress for the same reason more than twice. Escalate to the user if it repeats.
This skill resumes an interrupted CT application flow.
It reads state.json, determines the current phase range, and routes to the representative skill flow that should continue next.
Even if the session was interrupted, calling /ct-orchestrator again resumes the flow.
[Conversion toolchain]
Phase 1: extract-macro Shared environment analysis + mode confirmation + macro extraction
Phase 2: make-conf Generate conf/ini
Phase 3: setup-project Create toolchain + CT project
Phase 4: analysis-loop PA analysis + error feedback loop
Phase 5: test-loop Test generation/execution + build feedback loop
Post-hook: ct-kb-update Collect observation records (best-effort, not a regular phase)
[Host toolchain]
Phase 1: extract-macro Shared environment analysis + host toolchain candidate decision/confirmation
Phase 3: setup-project Select an existing host toolchain + create CT project
Phase 4: analysis-loop PA analysis + error feedback loop
Phase 5: test-loop Test generation/execution + build feedback loop
Post-hook: ct-kb-update Collect observation records (best-effort, not a regular phase)
SKILL.md, for example ct-{skill}/SKILL.mdLoaded docs: [ct-{skill}/SKILL.md]Loaded docsWriteread-once at phase entry, write-once at phase exit, and re-read only after external mutationstate.json only when resuming a sessionstate.json, compiler_info.json, observations.jsonl, .conf, .ini, and .infojson.dump or json.dumpsstdout, stderr, pipes, or redirects, handle everything as UTF-8python -c. When paths, JSON, and Python code are nested in one string, encoding and escaping failures become much more likelystate.json, JSON payloads, and logs or metadata as absolute paths, and normalize to / when it is safe to do so/ normalization for paths passed to external process argv. Use argv lists by default, and only use / normalization when the target tool is known to accept it safelyLF as the default line ending for newly created internal management files such as state.json, compiler_info.json, and observations.jsonl. Preserve existing line endings when editing an existing filejson.dump(..., ensure_ascii=False) with tempfile.NamedTemporaryFile(delete=False, encoding="utf-8") or tempfile.gettempdir(), then pass it as ct_tool.py call ... --json "@{path}".
@- stdin only as a secondary input channel.ConvertTo-Json is a Windows-only auxiliary option; Bash heredoc/cat examples must not be the default payload path.argv lists over one-line string payloads.state.json. If a relative path appears, convert it to an absolute path immediately{session_id}_{HHmmss}_tc{session_id}_{HHmmss}_projecttoolchain_mode, fingerprint resolution state, and user confirmation state first--json '@-' or --json @filetoolchain_mode without Phase 1 evidence and user confirmationconversion fingerprint mismatch by guessworkct-orchestrator breaks the input contract for every later phase and creates the highest regression costtoolchain_mode is unresolved or toolchain_mode_user_confirmed is missing, stop and confirm.conversion, if the conf or ini fingerprint mismatch is not resolved, stop and confirm.$jsonArgs = @'
{"toolchainName":"demo_tc","confFilePath":"C:/ws/demo.conf"}
'@
$jsonArgs | & {ctPython} {ctTool} 'call' 'ct_create_toolchain' '--json' '@-'
toolchain_mode and user confirmation state match the phase transition ruleconversion, confirm that a fingerprint mismatch has already been resolved by user confirmation or recalculationct-init-project.bootstrap data is missing or fails validation, follow the ## Phase 0 Initial Setup Rules and ## Step 0: Phase 0 Initial Setup procedures in ct-init-project/SKILL.md exactly.bootstrap data and Phase 0 output paths are valid, do not rerun Phase 0; continue with the next-stage decision.Determine whether Phase 0 is needed only for resume sessions.
bootstrap data and Phase 0 output paths in state.json.## Phase 0 Initial Setup Rules and ## Step 0: Phase 0 Initial Setup procedures in ct-init-project/SKILL.md to restore Phase 0.toolchain_mode in Phase 0. Decide it from the Phase 1 shared-environment analysis and user confirmation.If there is no session ID, create one.
{YYYYMMDD}_{project_directory_name}20260311_ccsblink{sessionsBase}/{session_id}/state.json{
"bootstrap": {
"ct_home": "{ctHome}",
"ct_python": "{ctPython}",
"ct_tool": "{ctTool}",
"skill_resource_root": "{skillResourceRoot}",
"tool_root": "{toolRoot}",
"meta_dir": "{metaDir}",
"sessions_base": "{sessionsBase}"
}
}
Read {sessionsBase}/{session_id}/state.json.
If the file does not exist: report that there is no resumable session state yet and tell the user to start with ct-init-project.
If the file exists: decide the entry phase from status.
| status | Meaning | Entry phase |
|---|---|---|
pending or missing | before start | Phase 1 by default. However, enter Phase 3 if toolchain_mode=host and toolchain_mode_user_confirmed=true |
extracting_macros | interrupted during Phase 1 | rerun Phase 1 |
macros_extracted | Phase 1 complete | Phase 2 |
generating_conf | interrupted during Phase 2 | rerun Phase 2 |
conf_generated | Phase 2 complete | Phase 3 |
setting_up_project | interrupted during Phase 3 | rerun Phase 3 |
project_created | Phase 3 complete | Phase 4 |
analyzing | interrupted during Phase 4 | rerun Phase 4 |
analysis_success | Phase 4 complete | Phase 5 |
testing | interrupted during Phase 5 | rerun Phase 5 |
test_success | full completion | report completion |
regression_done | regression check finished on a completed pipeline | report the regression object, then treat the pipeline as complete. Re-enter Phase 5 only if the user wants to act on new_failures |
*_failed_* | failure state | report failure and ask about retry |
| anything else | status written by a skill this table does not cover | do not guess a phase. Show the status and the artifacts present, and ask the user which phase to resume from |
When resuming from Phase 2 or later, confirm artifact validity. Fingerprint validation applies only to conversion mode.
Standard prompt:
The analysis configuration file (conf) has changed since it was last recorded. Did you modify it directly? (y/n)
The toolchain metadata file (ini) has changed since it was last recorded. Did you modify it directly? (y/n)
Sequential validation rules:
| Current status | Validation target | If mismatched |
|---|---|---|
conversion + conf_generated or later | fingerprints.conf_hash vs actual conf file hash | Ask the user. If y, recalculate conf_hash. If n, rerun from Phase 2 |
conversion + project_created or later | fingerprints.ini_hash vs actual ini file hash | Ask the user. If y, recalculate ini_hash. If n, rerun from Phase 3 |
Additional rules:
host mode does not enforce conf or ini fingerprintsconversion, the conf fingerprint source must satisfy both the top-level conf_path canonical field and the artifacts.conf_path mirror contract. If either is missing or they point to different paths, treat it as a Phase 2 regression target without askingconversion, use artifacts.meta_ini_path as the ini fingerprint sourceconf_generated, validate only conf_hash and do not check ini_hashproject_created or later, check conf_hash first and check ini_hash only if conf_hash passesfingerprints.conf_hash immediately inside the same phasetoolchain_mode is missing in a legacy state.json, confirm the mode with the user before fingerprint validationRead the representative skill document for the current phase range and follow that logic. For the Phase 1/2/3 range, the orchestrator must route through ct-init-project instead of reading the internal phase skills directly.
| Phase range | Status range | Representative skill | Routed mode | SKILL.md |
|---|---|---|---|---|
| Phase 1/2/3 (Project preparation) | pending, extracting_macros, macros_extracted, generating_conf, conf_generated, setting_up_project | ct-init-project | ct-orchestrator-routed project-preparation mode (internally follows the project-preparation-only procedure) | ct-init-project/SKILL.md |
| Phase 4 (Analysis) | project_created, analyzing | ct-analysis-loop | ct-orchestrator-routed analysis mode | ct-analysis-loop/SKILL.md |
| Phase 5 (Test) | analysis_success, testing | ct-test-loop | ct-orchestrator-routed test mode | ct-test-loop/SKILL.md |
Rules:
ct-init-project/SKILL.md and follows that skill. ct-init-project internally reads ct-extract-macro/SKILL.md, ct-make-conf/SKILL.md, and ct-setup-project/SKILL.md as needed. The orchestrator does not read those internal phase skills directly.Project preparation.ct-init-project project-preparation mode resumes from the required internal phase (1/2/3) based on the current status. The orchestrator passes the state and delegates internal phase selection to ct-init-project.After each phase completes and before moving to the next phase, validate the state.
{ctPython} {skillResourceRoot}/engine/validate_state.py "{session_dir}" {phase_number}
status=pending, toolchain_mode=host, toolchain_mode_user_confirmed=true) with phase_number=1phase_number=3 only after host_toolchain and ct_resources.* exist in the completed host project-created stateOK: valid, move to the next phaseCORRECTED: ...: auto-correction completed. Review the correction and continuestate.json output, and validate againAfter validation, do not re-read state. Assume corrections are already reflected in the in-memory state.
After Phase 5, call ct-kb-update once as a wrap-up task, not as a regular phase.
{ctPython} {ctTool} kb-update --session-id "{session_id}"
Rules:
kb-update is a subcommand of ct_tool.pytest_successct-test-loop pathct-kb-update fails, do not change statusobservations.jsonl append failure as a warning onlysession_id + loop_kind + attempt + loop_epochInput:
state.jsonsession_idbootstrap.sessions_baseanalysis_loop.attempts[], test_loop.attempts[]analysis_loop.loop_epoch, test_loop.loop_epochIn this section, {stage label} means only the representative user stage (Project preparation, Analysis, Test). It does not mean the internal phase number. Phases 1, 2, and 3 belong to Project preparation, Phase 4 belongs to Analysis, and Phase 5 belongs to Test.
Auto-advance ranges - continue without asking the user:
User-confirmation ranges - ask only at representative stage boundaries:
When confirmation is required at a representative stage boundary, use the format below.
{Current stage label} is complete. Proceed to {Next stage label} next?
(If the context is too heavy, you can run /clear and continue again with /ct-orchestrator.)
Project preparation, Analysis, or Test into the labels above. Do not print the phase number.Project preparation.When regression is required in Phase 4 or 5:
regression object in state.jsonstatus to the entry state of the regression target phaseRegression summary
| Error type | Where it happens | Regression target |
|---|---|---|
| setting application failure | Phase 4 | Phase 3 |
| fundamental conf issue | Phase 4 | Phase 2 |
| polluted macro dump | Phase 4 | Phase 1 |
| system header build error | Phase 5 | Phase 3 |
| memory structure or uninterpretable issue | Phase 4/5 | escalate to the user |
| assertion failure | Phase 5 | escalate to the user |
Do not regress more than twice for the same reason.
If status is *_failed_*:
status and required counters according to the user's choice and continueUse the label below in user-facing failure reports.
{Project preparation | Analysis | Test} stopped.
If Phase 5 succeeds, report in the format below.
CT pipeline completed:
- Session: {session_id}
- Project preparation: complete
- Analysis: success ({N} functions)
- Test: ran {totalTests} tests, {passed} passed, {failed} failed
- Coverage: Statement {X}%, Branch {Y}%, MC/DC {Z}%
- Attempt counts: analysis {M}, test {K}
ct-orchestrator decides the state and representative-skill transitions. Detailed per-phase logic belongs to each skill's SKILL.md*_ing state, rerun that phase from the beginning/clear and then call /ct-orchestrator again. The state remains in state.jsonstatus/artifacts cause larger failures laterstate.json immediately after writing itct_tool.py call <tool>Loaded docs: [...] so the reference set is explicitWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub suresofttechnologies/dvera-plugin --plugin dvera14 skills in this plugin
/ct-analysis-loopUse this skill during the CT project analysis phase to classify errors, repeat conf or toolchain fixes, and continue until analysis succeeds./ct-extract-macroUse this skill to extract the target compiler's compiler-default macros and build the shared environment analysis fields used during CT project preparation./ct-init-projectUse this skill to run the CT full pipeline from Phase 0 initial setup through macro extraction, conf and toolchain creation, analysis, testing, and observation-record collection, or to perform only the project-preparation stage./ct-kb-updateUse this skill to append single-change attempt results to `observations.jsonl`. It is called by `ct-init-project` or `ct-orchestrator` immediately after the CT-apply full pipeline completes./ct-make-confUse this skill to generate the conversion analysis `.conf` and toolchain metadata (`.ini`, `.info`) from extracted target macros and `compiler_info`, and to record fingerprints./ct-openLaunch CT with the current workspace. Use when you need to inspect the project visually in CT IDE during agent work.