/dvera:ct-init-projectfrom dvera
Use 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.
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 to start the whole flow from an end-to-end CT-apply request, or to run only the project-preparation stage.
Role:
ct-extract-macro -> ct-make-conf -> ct-setup-project and stop at project_created.Phase 0 canonical source: This skill is the canonical source for the Phase 0 initial setup procedure. ct-orchestrator reuses the same procedure on resume when bootstrap information is missing or invalid.
User stage labels:
Phase tracking rules:
Phase 0 initial setup, Phase 1 macro extraction, Phase 2 conf generation, Phase 3 project setup, Phase 4 analysis, and Phase 5 test/wrap-up task.Execution modes:
apply CT, start CT setup, analyze and test in CT, or run CT. If state already exists, continue from the current stage. If no state exists, start from Phase 0. After project preparation, orchestrate the full pipeline through ct-analysis-loop, ct-test-loop, and ct-kb-update.prepare project, set up CT project environment, or initialize CT. Stop after reaching project_created. If state.json already has a status, resume from the required phase.status falls inside the Phase 1/2/3 range (pending / extracting_macros / macros_extracted / generating_conf / conf_generated / setting_up_project). Follow the same procedure as project-preparation-only mode, resume from the required phase based on state.json, and stop at project_created. When routed through the orchestrator, assume Phase 0 initial setup is already prepared, but if bootstrap is missing or invalid, run the Phase 0 procedure in this skill again.| Internal phase | Called skill | Role |
|---|---|---|
| Phase 1 | ct-extract-macro | Shared environment analysis, toolchain_mode decision, macro extraction |
| Phase 2 | ct-make-conf | Create conf, ini, and info for the conversion path |
| Phase 3 | ct-setup-project | Create the CT toolchain and project for the host or conversion path |
Additional rules:
host mode is confirmed, skip Phase 2 and proceed directly to Phase 3.ct-analysis-loop, ct-test-loop, and ct-kb-update after project preparation.project_created.set-workspace with state.json.init_inputs.workspace and continue.ctHome in the order below:
bootstrap.ct_homectHome is still unresolved.ctHome, workspace, or IDE installation roots, do not present fixed option cards as the only input path; ask so the user can type the real path on one line.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]
C:\Program Files\Suresoft\CT 2026$HOME/Suresoft/CT 2026{ctHome}/python/python.exe exists. Linux/Mac: {ctHome}/python/python3 existsctTool candidate can be found with glob({ctHome}/plugins/*/scripts/ct_tool.py)ctHomectPython must always be {ctHome}/python/python.exe on Windows or {ctHome}/python/python3 on Linux/Mac.ctHome, ctPython, ctTool, skillResourceRoot, toolRoot, metaDir, and baseDir.bootstrap.ct_home from state.json.bootstrap.ct_home exists, if any condition below fails, treat it as invalid and fall back to the OS-specific default path check:
{ctHome}/python/python.exe exists. Linux/Mac: {ctHome}/python/python3 existsctTool candidate can be found with glob({ctHome}/plugins/*/scripts/ct_tool.py)bootstrap.ct_home is missing, or validation fails, check the OS-specific default path once.ctTool candidate using glob({ctHome}/plugins/*/scripts/ct_tool.py).ctPython.{ctPython} {ctTool} env
Read {baseDir}/workspaces.ctson from the returned baseDir and look up the current CWD entry.
Always confirm the workspace with the user. The user must always be able to type a new path — never present the candidate list as the only option.
Entry exists for CWD:
Build the candidate list as workspaces.ctson entries first, then append CT IDE history (ct_list_recent_workspaces) with exists=true after deduping by path.
"Select a workspace to use, or enter a new path:
- {path1} (projects: {projects1}) ← current default
- {path2} ... N. {recent_from_ct_ide} (CT IDE history) Or enter a new workspace path."
set-workspace call needed.{ctPython} {ctTool} set-workspace --workspace "<selected or entered path>"
No entry for CWD:
Call ct_list_recent_workspaces to surface candidates from the CT IDE history.
At least one entry with exists=true: Show the list with isLastUsed=true first, and always include an "enter a new path" option.
"No workspace is registered for this directory yet. Pick from your CT IDE history or enter a new path:
- {path1} ← most recently used in CT IDE
- {path2} ... Or enter a new workspace path."
No entries, all exists=false, or the call fails: ask directly with the standard prompt.
"Enter the Eclipse workspace path to use."
After the user picks or types a path:
{ctPython} {ctTool} set-workspace --workspace "<selected or entered path>"
Notes:
ct_list_recent_workspaces entries whose exists=false before showing.set-workspace automatically creates the CWD entry in workspaces.ctson for next time.ct_get_env{ctPython} {ctTool} call ct_get_env --json "{}"
{ctTool} exists{skillResourceRoot} is the installed resource path returned by ct_get_env; it is not this public plugin's directory{skillResourceRoot}/engine/conf_merger.py exists{skillResourceRoot}/engine/validate_state.py exists{sessionsBase} exists and is writableSession: {session_id}
Source: {source_dir} ({file_count} files, {language})
Compiler: {compiler_type} {version} ({target_arch})
Workspace: {workspace_path}
Toolchain mode: {host | conversion | undecided}
Current stage: {Project preparation | Analysis | Test | Complete}
| Current status | Action |
|---|---|
missing, pending, extracting_macros, macros_extracted, generating_conf, conf_generated, setting_up_project | Run or resume project preparation |
project_created, analyzing | Skip project preparation and continue with analysis |
analysis_success, testing | Continue with testing |
test_success | Report full-pipeline completion |
*_failed_* | Report the failure point and resume from the appropriate project-preparation, analysis, or test stage |
| Current status | Action |
|---|---|
missing, pending, extracting_macros | Start from Phase 1 |
macros_extracted, generating_conf | Resume from Phase 2 |
conf_generated, setting_up_project | Resume from Phase 3 |
project_created, analyzing, analysis_success, testing, test_success | Report that project preparation is already complete and stop |
*_failed_* | First check whether the failure happened inside project preparation. Only then propose retrying project preparation |
Additional rule:
analysis_failed_* or test_failed_*, are treated as project preparation already completed.SKILL.md of the skill needed at that moment.Loaded docs: [ct-{skill}/SKILL.md]
Entry condition: New session (no state.json). Resume sessions skip this section and follow the existing procedure.
Purpose: Collect user confirmations that would otherwise be scattered across phases at the start, all at once. The card answers are saved to state.json.init_inputs, and subsequent phases prefer these values to avoid re-asking.
ctHome / ctPython / ctTool).ct_list_host_toolchains ahead of time to discover host toolchain candidates. Parse the GCC version from cCompilerPath / cppCompilerPath and sort descending by version. The highest version becomes the default for card item 4.ct_list_recent_workspaces or workspaces.ctson.If the host coding agent supports an interactive multi-question card (for example Claude Code's AskUserQuestion), prefer the interactive input mode. Otherwise fall back to the text card.
Ask one item per tab. Each question has at most 4 option slots, so items with many candidates use top 3 + "enter your own" (Other is automatic).
Call 1 — one message with 4 questions (single AskUserQuestion call):
| Question | header | Options (label · description) | Default |
|---|---|---|---|
| Workspace (where analysis results are stored) | Workspace | Top 3 recent workspaces (paths). Leave slot 4 empty → user types via Other | Most recent (Recommended) |
| Source path (analysis target) | Source path | "Current directory" (absolute path shown) / Other (enter a different path) | Current directory (Recommended) |
| Toolchain mode | Toolchain mode | "Host toolchain · analyze with host PC compiler" / "Conversion toolchain · convert embedded target compiler" | Host (Recommended) |
| Source files to analyze | Target | "all · all source files" / "select · auto-discover and ask user" | all (Recommended) |
Append (Recommended) to the recommended option label and keep the description short.
Call 2 — only when Call 1's toolchain mode response is Host: 1 question.
| Question | header | Options | Default |
|---|---|---|---|
| Host toolchain | Host toolchain | Top 3 from ct_list_host_toolchains sorted descending by GCC version. Label format: "GCC 15 · mingw64 64bit". Description: compiler path snippet. Slot 4 empty → user enters a different toolchain id via Other | Highest GCC version (Recommended) |
Additional rules:
host/conversion, all/select when saving.set-workspace call.Agents that do not support interactive cards show the text card below and accept a single response.
Starting CT setup. Please answer the following items at once.
1. Workspace (where analysis results are stored)
Default: {recent_workspace_or_current}
2. Source code path (analysis target)
Default: current directory
3. Toolchain mode
- Host toolchain: analyze with host PC compiler
- Conversion toolchain: convert embedded target compiler
Default: host toolchain
4. Host toolchain (used when 3 = host)
{ct_list_host_toolchains result listed 1) 2) 3) by GCC version descending; the highest is the default}
5. Source files to analyze
- all: all source files
- select: auto-discover and ask user
Default: all
Example response: "3=conversion toolchain" / "4=2" / "1=D:/ws, 5=select"
Items left blank use the defaults.
When parsing, map "host toolchain" → host and "conversion toolchain" → conversion. If 0 host toolchain candidates, hide item 4 and append "(no host toolchain available)" next to the "host toolchain" option in item 3. If 1 candidate, render item 4 as "Auto-selected: {name} (id={id})".
Parse the response and save to state.json.init_inputs in the schema below.
{
"init_inputs": {
"workspace": "{abs_path}",
"source_path": "{abs_path}",
"toolchain_mode_preference": "host",
"host_toolchain_id": 12,
"source_files_preference": "all"
}
}
Rules:
toolchain_mode_preference=conversion, store host_toolchain_id as null.state.json exists, read status and start from the required stage.state.json does not exist, treat it as a new session, run the "Initial Input Card for New Sessions" procedure above, and then start from project preparation.If the current state is inside project preparation, proceed in the order below.
ct-extract-macro/SKILL.md and run Phase 1.ct-make-conf/SKILL.md and run Phase 2 only for the conversion path.ct-setup-project/SKILL.md and run Phase 3.After each phase, validate the state with the command below.
{ctPython} {skillResourceRoot}/engine/validate_state.py "{session_dir}" {phase_number}
Additional rules:
status=pending + toolchain_mode=host + toolchain_mode_user_confirmed=true) with phase_number=1.status must be project_created.If the current request is project-preparation-only mode, stop after reaching project_created and report with the format below.
Project preparation is complete.
You can continue with the analysis stage next.
When the user should run the next representative command directly, use ct-analysis-loop.
If the current request is end-to-end entry mode, ask for confirmation before proceeding to analysis after project preparation completes.
Project preparation is complete. Proceed to analysis next?
When the user confirms, read ct-analysis-loop/SKILL.md and run the analysis stage.
project_created or later, it may continue directly from analysis without reporting project preparation again.Analysis is complete. Proceed to testing next?
When the user confirms, read ct-test-loop/SKILL.md and run the test stage.
analysis_success, it may start directly from this stage.test_success is reached, call the wrap-up task below once.{ctPython} {ctTool} kb-update --session-id "{session_id}"
Rules:
ct-kb-update fails, leave it as a warning only and do not change status.If the test stage succeeds, report in the format below.
CT application is complete:
- Session: {session_id}
- Project preparation: complete
- Analysis: success ({N} functions)
- Test: {totalTests} executed, {passed} passed, {failed} failed
- Coverage: Statement {X}%, Branch {Y}%, MC/DC {Z}%
- Attempts: analysis {M}, test {K}
Use the user-facing stage labels below for failures.
Stopped during the project preparation stage.
Stopped during the analysis stage.
Stopped during the test stage.
ct-init-project. ct-orchestrator is not the end-to-end entry point.ct-init-project does not redefine the internal contracts of project preparation. Follow the detailed logic in the internal Phase 1, 2, and 3 skill documents.state.json immediately after writing it.Project preparation, Analysis, and Test instead of phase numbers.ct-kb-update wrap-up task. If the user later asks for a report and ct-report activates, the broad auto-progress momentum stops there — follow Step 1 of ct-report/SKILL.md (user confirmation of outputDir / formats) exactly.What 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-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./ct-orchestratorUse 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.