cadence-skill-installer 0.2.34 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cadence-skill-installer",
3
- "version": "0.2.34",
3
+ "version": "0.2.36",
4
4
  "description": "Install the Cadence skill into supported AI tool skill directories.",
5
5
  "repository": "https://github.com/snowdamiz/cadence",
6
6
  "private": false,
@@ -8,6 +8,9 @@ import { fileURLToPath } from "node:url";
8
8
  import { stdin as input, stdout as output } from "node:process";
9
9
 
10
10
  const CADENCE_SKILL_NAME = "cadence";
11
+ const SCRIPT_PATH = fileURLToPath(import.meta.url);
12
+ const SCRIPT_DIR = path.dirname(SCRIPT_PATH);
13
+ const PACKAGE_JSON_PATH = path.resolve(SCRIPT_DIR, "..", "package.json");
11
14
 
12
15
  const TOOL_TARGETS = [
13
16
  { key: "codex", label: "Codex", relPath: [".codex", "skills", CADENCE_SKILL_NAME] },
@@ -87,10 +90,12 @@ function colorizeAsciiBanner() {
87
90
  });
88
91
  }
89
92
 
90
- function printHelp(binName) {
93
+ function printHelp(binName, installerVersion) {
91
94
  const validTools = TOOL_TARGETS.map((tool) => tool.key).join(",");
92
95
  output.write(
93
96
  [
97
+ `Cadence Skill Installer v${installerVersion}`,
98
+ "",
94
99
  `Usage: ${binName} [options]`,
95
100
  "",
96
101
  "Options:",
@@ -148,10 +153,21 @@ function parseArgs(argv) {
148
153
  return parsed;
149
154
  }
150
155
 
156
+ async function readInstallerVersion() {
157
+ try {
158
+ const raw = await fs.readFile(PACKAGE_JSON_PATH, "utf8");
159
+ const pkg = JSON.parse(raw);
160
+ if (typeof pkg.version === "string" && pkg.version.trim()) {
161
+ return pkg.version.trim();
162
+ }
163
+ } catch {
164
+ // Use fallback when package metadata is unavailable.
165
+ }
166
+ return "unknown";
167
+ }
168
+
151
169
  function resolveSourceDir() {
152
- const scriptPath = fileURLToPath(import.meta.url);
153
- const scriptDir = path.dirname(scriptPath);
154
- return path.resolve(scriptDir, "..", "skill");
170
+ return path.resolve(SCRIPT_DIR, "..", "skill");
155
171
  }
156
172
 
157
173
  async function ensureSourceDir(sourceDir) {
@@ -510,18 +526,19 @@ async function confirmInstall(parsed, selectedTargets) {
510
526
 
511
527
  async function main() {
512
528
  const binName = path.basename(process.argv[1] || "cadence-install");
529
+ const installerVersion = await readInstallerVersion();
513
530
  let parsed;
514
531
  try {
515
532
  parsed = parseArgs(process.argv.slice(2));
516
533
  } catch (error) {
517
534
  output.write(`Error: ${error.message}\n\n`);
518
- printHelp(binName);
535
+ printHelp(binName, installerVersion);
519
536
  process.exitCode = 1;
520
537
  return;
521
538
  }
522
539
 
523
540
  if (parsed.help) {
524
- printHelp(binName);
541
+ printHelp(binName, installerVersion);
525
542
  return;
526
543
  }
527
544
 
@@ -553,13 +570,19 @@ async function main() {
553
570
  return;
554
571
  }
555
572
 
573
+ output.write(
574
+ style(`\nInstalling Cadence skill version ${installerVersion}...\n`, ANSI.bold, ANSI.brightCyan)
575
+ );
576
+
556
577
  for (const target of selectedTargetsWithState) {
557
578
  await copySkillContents(sourceDir, target.targetDir);
558
579
  const action = target.installState?.exists ? "Updated" : "Installed";
559
580
  output.write(`${style(action, ANSI.bold, ANSI.brightGreen)} ${style(target.label, ANSI.bold, ANSI.white)}: ${style(target.targetDir, ANSI.periwinkle)}\n`);
560
581
  }
561
582
 
562
- output.write(style("\nCadence skill installation complete.\n", ANSI.bold, ANSI.brightGreen));
583
+ output.write(
584
+ style(`\nCadence skill installation complete (version ${installerVersion}).\n`, ANSI.bold, ANSI.brightGreen)
585
+ );
563
586
  }
564
587
 
565
588
  main().catch((error) => {
package/skill/SKILL.md CHANGED
@@ -94,13 +94,13 @@ description: Structured project operating system for end-to-end greenfield or br
94
94
  2. In subsequent conversations, if the workflow route is `ideator`, do not rerun prerequisite gate or project mode intake.
95
95
  3. If the user asks to define the project or provides a brief while route is `ideator`, invoke `skills/ideator/SKILL.md`.
96
96
  4. If route is `ideator` and the user has not provided ideation input yet, ask one kickoff ideation question in-thread and continue.
97
- 5. When route advances from `ideator` to `researcher`, force a handoff and end with this exact line: `Start a new chat with a new agent and say "plan my project".`
97
+ 5. When route advances from `ideator` to `researcher`, force a handoff and end with this exact line: `Start a new chat with a new agent and say "research my project".`
98
98
 
99
99
  ## Brownfield Flow
100
100
  1. When scaffold, prerequisite, and project mode intake complete in this same conversation for a brownfield project and route advances to `brownfield-documenter`, force a subskill handoff and end with this exact line: `Start a new chat and say "document my existing project".`
101
101
  2. In subsequent conversations, if workflow route is `brownfield-documenter`, invoke `skills/brownfield-documenter/SKILL.md`.
102
102
  3. Do not route brownfield projects to `skills/ideator/SKILL.md` unless the user explicitly asks to run net-new ideation discovery.
103
- 4. When route advances from `brownfield-documenter` to `researcher`, force a handoff and end with this exact line: `Start a new chat with a new agent and say "plan my project".`
103
+ 4. When route advances from `brownfield-documenter` to `researcher`, force a handoff and end with this exact line: `Start a new chat with a new agent and say "research my project".`
104
104
 
105
105
  ## Research Flow
106
106
  1. If the workflow route is `researcher`, invoke `skills/researcher/SKILL.md`.
@@ -55,7 +55,7 @@ description: Perform deep evidence-based analysis of an existing codebase and pe
55
55
  12. Mention that granular research queries are available via:
56
56
  - `python3 "$CADENCE_SCRIPTS_DIR/query-ideation-research.py" --project-root "$PROJECT_ROOT"`
57
57
  13. End successful completion replies with this exact line:
58
- - `Start a new chat with a new agent and say "plan my project".`
58
+ - `Start a new chat with a new agent and say "research my project".`
59
59
  14. At end of this successful skill conversation, run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/finalize-skill-checkpoint.py" --scope brownfield-documenter --checkpoint documentation-captured --paths .`.
60
60
  15. If `finalize-skill-checkpoint.py` returns `status=no_changes`, continue without failure.
61
61
  16. If `finalize-skill-checkpoint.py` reports an error, stop and surface it verbatim.
@@ -10,7 +10,7 @@ interface:
10
10
  analysis, then persist with scripts/run-brownfield-documentation.py --project-root "$PROJECT_ROOT" complete --stdin.
11
11
  Require a research_agenda with at least one topic, verify with scripts/get-ideation.py, and mention
12
12
  scripts/query-ideation-research.py for granular queries.
13
- End success with: Start a new chat with a new agent and say "plan my project".
13
+ End success with: Start a new chat with a new agent and say "research my project".
14
14
  Finalize from PROJECT_ROOT with scripts/finalize-skill-checkpoint.py --scope brownfield-documenter
15
15
  --checkpoint documentation-captured --paths . (allow status=no_changes; surface failures verbatim).
16
16
  Keep replies concise and hide internal traces unless asked.
@@ -81,7 +81,7 @@ description: Guide users from a rough concept to a fully defined project idea th
81
81
  17. Verify persistence by running `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/get-ideation.py"`.
82
82
  18. Mention that granular research queries are available via `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/query-ideation-research.py"`.
83
83
  19. Mention that research execution runs in a separate `researcher` phase.
84
- 20. End successful ideation completion replies with this exact line: `Start a new chat with a new agent and say "plan my project".`
84
+ 20. End successful ideation completion replies with this exact line: `Start a new chat with a new agent and say "research my project".`
85
85
  21. At end of this successful skill conversation, run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/finalize-skill-checkpoint.py" --scope ideator --checkpoint ideation-completed --paths .`.
86
86
  22. If `finalize-skill-checkpoint.py` returns `status=no_changes`, continue without failure.
87
87
  23. If `finalize-skill-checkpoint.py` reports an error, stop and surface it verbatim.
@@ -10,7 +10,7 @@ interface:
10
10
  Ask one question at a time, build an execution-ready ideation object and complete research_agenda,
11
11
  then from PROJECT_ROOT rerun route assertion, run scripts/prepare-ideation-research.py,
12
12
  and persist with scripts/inject-ideation.py.
13
- End successful completion with: Start a new chat with a new agent and say "plan my project".
13
+ End successful completion with: Start a new chat with a new agent and say "research my project".
14
14
  Finalize from PROJECT_ROOT with scripts/finalize-skill-checkpoint.py --scope ideator
15
15
  --checkpoint ideation-completed --paths . (allow status=no_changes; treat failures as blocking).
16
16
  Keep replies focused on ideation outcomes and hide internal traces unless asked.
@@ -5,7 +5,7 @@ description: Initialize Cadence project scaffolding for first-time setup. Use wh
5
5
 
6
6
  # Scaffold
7
7
 
8
- 1. Resolve project root by running `python3 ../../scripts/resolve-project-root.py` and store stdout in `PROJECT_ROOT`.
8
+ 1. Resolve project root by running `python3 ../../scripts/resolve-project-root.py --project-root "$PWD"` and store stdout in `PROJECT_ROOT`.
9
9
  - Never manually edit `.cadence/cadence.json`; all Cadence state writes must go through Cadence scripts.
10
10
  2. Run `python3 ../../scripts/run-scaffold-gate.py --project-root "$PROJECT_ROOT"` (resolve this relative path from this sub-skill directory) and parse the JSON response.
11
11
  3. `run-scaffold-gate.py` performs workflow route assertion internally; if it errors, stop and surface the exact error to the user.
@@ -25,12 +25,15 @@ description: Initialize Cadence project scaffolding for first-time setup. Use wh
25
25
  - Keep local-only mode (`state.repo-enabled=false`) and continue until the user configures a GitHub repo later.
26
26
  8. Ask the user: `Do you want .cadence tracked in git history? (yes/no)`.
27
27
  9. If the user answers yes:
28
- - Run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/configure-cadence-gitignore.py" --mode track`.
29
- - At end of this skill conversation, run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/finalize-skill-checkpoint.py" --scope scaffold --checkpoint cadence-tracked --paths .`.
28
+ - Run `python3 "$CADENCE_SCRIPTS_DIR/configure-cadence-gitignore.py" --mode track --gitignore-path "$PROJECT_ROOT/.gitignore"`.
29
+ - At end of this skill conversation, run `python3 "$CADENCE_SCRIPTS_DIR/finalize-skill-checkpoint.py" --scope scaffold --checkpoint cadence-tracked --paths . --project-root "$PROJECT_ROOT"`.
30
30
  10. If the user answers no:
31
- - Run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/configure-cadence-gitignore.py" --mode ignore`.
32
- - At end of this skill conversation, run `cd "$PROJECT_ROOT" && python3 "$CADENCE_SCRIPTS_DIR/finalize-skill-checkpoint.py" --scope scaffold --checkpoint cadence-ignored --paths .`.
33
- 11. If `finalize-skill-checkpoint.py` returns `status=no_changes`, continue without failure.
34
- 12. If `finalize-skill-checkpoint.py` reports an error, stop and surface it verbatim.
35
- 13. Execute scaffold actions serially. Do not run this flow in parallel with other setup gates.
36
- 14. In user-facing replies, summarize only the result. Do not expose internal command lines, skill chains, or execution traces unless explicitly requested.
31
+ - Run `python3 "$CADENCE_SCRIPTS_DIR/configure-cadence-gitignore.py" --mode ignore --gitignore-path "$PROJECT_ROOT/.gitignore"`.
32
+ - At end of this skill conversation, run `python3 "$CADENCE_SCRIPTS_DIR/finalize-skill-checkpoint.py" --scope scaffold --checkpoint cadence-ignored --paths . --project-root "$PROJECT_ROOT"`.
33
+ 11. Argument contract guardrail:
34
+ - `configure-cadence-gitignore.py` accepts `--mode` and optional `--gitignore-path`; do not pass `--project-root`.
35
+ - `finalize-skill-checkpoint.py` supports `--project-root`; always pass it explicitly.
36
+ 12. If `finalize-skill-checkpoint.py` returns `status=no_changes`, continue without failure.
37
+ 13. If `finalize-skill-checkpoint.py` reports an error, stop and surface it verbatim.
38
+ 14. Execute scaffold actions serially. Do not run this flow in parallel with other setup gates.
39
+ 15. In user-facing replies, summarize only the result. Do not expose internal command lines, skill chains, or execution traces unless explicitly requested.
@@ -3,14 +3,16 @@ interface:
3
3
  short_description: "Initialize Cadence project scaffolding for first-time setup"
4
4
  default_prompt: >-
5
5
  Follow skills/scaffold/SKILL.md for exact scaffold and policy behavior.
6
- Resolve PROJECT_ROOT with scripts/resolve-project-root.py, run
6
+ Resolve PROJECT_ROOT with scripts/resolve-project-root.py --project-root "$PWD", run
7
7
  scripts/run-scaffold-gate.py --project-root "$PROJECT_ROOT", then run
8
8
  scripts/run-skill-entry-gate.py --project-root "$PROJECT_ROOT" --require-cadence and use its JSON output for
9
9
  CADENCE_SCRIPTS_DIR (cadence_scripts_dir) and push/local-only mode (repo_enabled).
10
+ For .cadence policy updates, run scripts/configure-cadence-gitignore.py with --mode and
11
+ --gitignore-path "$PROJECT_ROOT/.gitignore" only (do not pass --project-root).
10
12
  Never edit .cadence/cadence.json manually.
11
13
  Only rerun repo-status after remote setup to confirm repo_enabled=true; do not run an extra write pass
12
14
  just to persist false in local-only mode.
13
- Finalize from PROJECT_ROOT with scripts/finalize-skill-checkpoint.py --paths . and the scope/checkpoint
15
+ Finalize with scripts/finalize-skill-checkpoint.py --paths . --project-root "$PROJECT_ROOT" and the scope/checkpoint
14
16
  that matches the selected policy (scaffold/cadence-tracked or scaffold/cadence-ignored), allowing
15
17
  status=no_changes and treating failures as blocking.
16
18
  Keep replies outcome-focused and hide internal traces unless asked.