@przeprogramowani/10x-cli 1.21.0 → 1.22.1

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/dist/index.mjs CHANGED
@@ -3183,7 +3183,7 @@ var cac = (name = "") => new CAC(name);
3183
3183
  // package.json
3184
3184
  var package_default = {
3185
3185
  name: "@przeprogramowani/10x-cli",
3186
- version: "1.21.0",
3186
+ version: "1.22.1",
3187
3187
  description: "Open-source CLI for 10xDevs course content",
3188
3188
  repository: {
3189
3189
  type: "git",
@@ -3210,7 +3210,8 @@ var package_default = {
3210
3210
  "generate-types": "bun run scripts/generate-types.ts",
3211
3211
  typecheck: "tsc --noEmit",
3212
3212
  test: "bun test",
3213
- lint: "bun run --bun node_modules/oxlint/bin/oxlint ."
3213
+ lint: "bun run --bun node_modules/oxlint/bin/oxlint .",
3214
+ "validate:cli-skills": "node scripts/validate-cli-skills.mjs"
3214
3215
  },
3215
3216
  dependencies: {
3216
3217
  "@clack/prompts": "0.9.1",
@@ -7438,6 +7439,1130 @@ function renderGetResult(ctx, bundle, writeResult, dryRun, profile, langMeta = {
7438
7439
  `), undefined);
7439
7440
  }
7440
7441
 
7442
+ // src/commands/helpers.ts
7443
+ import { existsSync as existsSync10, mkdirSync as mkdirSync6, readFileSync as readFileSync9, writeFileSync as writeFileSync6 } from "node:fs";
7444
+ import { dirname as dirname6, join as join11, resolve as resolve3 } from "node:path";
7445
+
7446
+ // skills/10x-cli-setup/SKILL.md
7447
+ var SKILL_default = `---
7448
+ name: 10x-cli-setup
7449
+ description: "Set up or troubleshoot @przeprogramowani/10x-cli for a 10xDevs learner: reuse or install a compatible CLI, check authentication and course access, choose the project and AI tool, and hand off to 10x-cli-guide. Use for installation, updates, npm permissions and onboarding. Excludes CLI source development and everyday download/use/sync guidance once setup is ready."
7450
+ ---
7451
+
7452
+ # 10x-cli Setup
7453
+
7454
+ Prepare the user's CLI and project, then pass the working context to guide. Read
7455
+ [the compatibility reference](references/compatibility.md) before choosing a
7456
+ version, installing a helper, or running a course command. Use the actual runner's
7457
+ help and its matching published source; a moving master README does not establish
7458
+ what the installed CLI supports.
7459
+
7460
+ The next CLI release also provides project-only bundled installation through
7461
+ \`10x helpers install --tool <chosen-profile>\`. This command is **unreleased** and
7462
+ absent from the 1.21.0/1.22.0 master baselines: check the actual runner's
7463
+ \`helpers --help\` first. Follow **Bundled public copies** in the local reference
7464
+ for complete files, explicit targets and conflict handling; keep the existing
7465
+ pinned public route when the runner does not support it.
7466
+
7467
+ ## 1. Establish the project and existing installation
7468
+
7469
+ Use the user's request and existing session context. Identify the intended project
7470
+ directory, shell and AI tool before writing files. For the guided 10xDevs4 exercise
7471
+ the context is macOS/zsh, \`10xdevs4\`, \`claude-code\`, \`pl\`; do not silently apply it
7472
+ to a v3 project or a user who selected another profile.
7473
+
7474
+ In a POSIX shell, inspect the runner without hiding failures:
7475
+
7476
+ \`\`\`bash
7477
+ pwd
7478
+ command -v 10x
7479
+ \`\`\`
7480
+
7481
+ If found, run \`10x --version\` and its \`--help\`, \`get --help\`, \`sync --help\` and
7482
+ \`auth --help\`. Record the executable path and installation method. An existing
7483
+ working installation needs no reinstall or fresh login. If an executable exists
7484
+ but fails, preserve the error and diagnose its runtime/PATH/permissions; this is
7485
+ different from a missing command. On other systems use their shell's executable
7486
+ lookup, not a POSIX detection snippet.
7487
+
7488
+ Inspect the project's \`.10x-cli.json\` and existing profile manifests as local
7489
+ metadata, without editing them. The course binding is shared across profiles;
7490
+ changing \`--tool\` cannot switch v3 to v4. For a v4 exercise with a bound v3 project,
7491
+ use a separate directory and retain the v3 project. Preserve corrupt, unknown or
7492
+ conflicting bindings/manifests for diagnosis; do not delete them to force access.
7493
+
7494
+ ## 2. Select a compatible runner, then install only if needed
7495
+
7496
+ Follow **Version and capability check** in the local reference. Record the actual
7497
+ package version, source revision and supported syntax. The released syntax is
7498
+ \`get m1l1 --type skills --name NAME\`; the positional argument is a lesson reference,
7499
+ not a skill name. Verify the corresponding lesson and skill in the content.
7500
+ Neither a local build nor a higher version number proves both. If skill-filter support
7501
+ is unavailable, continue preparing the project and public helpers, and report the
7502
+ specific pending capability before download. Do not substitute a full lesson or
7503
+ another course without the user's choice.
7504
+
7505
+ For npm/npx verify Node against that package's \`engines\` (the inspected baseline
7506
+ requires Node 20+). When there is no suitable global CLI, the pinned npx runner in
7507
+ the reference avoids a global install. Respect a user's requested global or
7508
+ standalone method; use its matching install/update procedure. Carry forward
7509
+ existing authorization for installation. A permissions error is not a reason for
7510
+ automatic \`sudo\`, a global config reset or deleting credentials.
7511
+
7512
+ Re-run version/help after an install or update. Keep one exact runner throughout
7513
+ setup and guide so an older \`10x\` on PATH cannot replace the verified npx version.
7514
+ With no network, inspect available local version/help and matching packaged
7515
+ documentation; leave publication, access and download checks unverified. Do not
7516
+ claim setup is complete from an offline version check.
7517
+
7518
+ ## 3. Check authentication separately from course availability
7519
+
7520
+ Run the selected runner's \`auth --status\`. It can contact the course API but does
7521
+ not request a login email. Inspect both session validity and live access status:
7522
+ a valid token or successful exit does not prove \`access_checked\` or v4 access.
7523
+ Keep the error when access could not be checked.
7524
+
7525
+ Only when login is required, have the user run the verified \`auth\` command in an
7526
+ interactive terminal and complete its displayed flow. The inspected version uses
7527
+ a magic link sent by email or a Circle message (\`--method email\` /
7528
+ \`--method circle\`); follow the selected release's help. Do not request email, open magic links or perform login
7529
+ on the user's behalf without their authorization. Never read out \`auth.json\`,
7530
+ tokens, magic-link URLs or email contents. Summarize only session/access state.
7531
+
7532
+ Then use the selected runner's \`list --course 10xdevs4\` (or the user's explicit
7533
+ course). Distinguish no membership, unpublished course, locked module and network
7534
+ failure. Reinstalling the CLI or selecting a different tool does not grant access.
7535
+ Keep \`--course\`, \`--tool\` and \`--lang\` explicit in subsequent download/sync commands.
7536
+
7537
+ ## 4. Diagnose readiness without manufacturing a tool directory
7538
+
7539
+ Run the selected runner's \`doctor --json\`; read all of \`data.checks\` and
7540
+ \`data.overall\`, plus the exit status. The outer \`status: "ok"\` is an output envelope,
7541
+ not a promise that every check passed. Doctor uses the configured profile (or its
7542
+ default), so compare the reported tool with the intended one; it has no \`--tool\`
7543
+ flag in the inspected baseline.
7544
+
7545
+ In a new project before the first download, a missing \`.claude/\` (or the reported
7546
+ profile directory) can be expected. If that is the only failure and this is the
7547
+ correct writable project, explain that the first successful download creates it.
7548
+ Do not create a dummy directory just to turn the check green. Preserve and address
7549
+ any auth, access, API, binding or write-permission failure separately. An update
7550
+ lookup skipped offline does not establish that the CLI is current.
7551
+
7552
+ ## 5. Hand off to the actual guide copy
7553
+
7554
+ Locate the project's installed \`10x-cli-guide/SKILL.md\` and its own
7555
+ \`references/compatibility.md\`. Check its installation channel/owner using the
7556
+ reference before adding or updating it. If absent, install guide through the
7557
+ chosen public on-demand or compatible CLI channel; verify the resulting files.
7558
+ Installing the npm CLI alone does not activate either helper in an agent. Do not
7559
+ claim that an absent guide is available or rely on unverified slash-command
7560
+ discovery. Tell the agent to read the exact materialized guide path and its local
7561
+ reference.
7562
+
7563
+ Pass this compact context in the conversation, without secrets:
7564
+
7565
+ \`\`\`text
7566
+ Project: absolute cwd; course binding or unbound
7567
+ Course / tool / requested language: 10xdevs4 / claude-code / pl (or user's choice)
7568
+ Runner: exact executable or pinned npx command; observed version and source ref
7569
+ CLI install/update method: npx pin / npm global / standalone asset
7570
+ Auth: valid / login required / unknown; live course access and module state
7571
+ Setup helper: actual path, public or CLI owner, observed source ref if known
7572
+ Guide helper: actual path, owner and source ref if known; full reference present
7573
+ Readiness: verified checks; remaining release/network/access issues, if any
7574
+ Next task: guide's lesson setup (idea-check/init/shape/prd) → use → sync journey, or the user's narrower request
7575
+ \`\`\`
7576
+
7577
+ For lesson 1 setup, carry forward all four skills in the handoff:
7578
+ \`10x-idea-check\`, \`10x-init\`, \`10x-shape\` and \`10x-prd\`, with their references.
7579
+ Idea assessment is optional to run, not a reason to omit its files during lesson
7580
+ setup. A request for one specific skill remains a narrower download. Verify
7581
+ materialized files separately from native slash-command discovery.
7582
+
7583
+ Once ready, continue in guide without rerunning installation or asking the user
7584
+ to repeat choices already supplied. Report remaining blockers precisely if the
7585
+ download cannot yet run; do not present preparation as a completed real journey.
7586
+ `;
7587
+
7588
+ // skills/10x-cli-setup/references/compatibility.md
7589
+ var compatibility_default = `# CLI compatibility, channels and command context
7590
+
7591
+ This reference is packaged inside each helper. Both copies must have identical
7592
+ bytes in the authoring repository. It defines the guided filtered-download contract;
7593
+ verify the selected published CLI and live content before executing that path.
7594
+
7595
+ ## Version and capability check
7596
+
7597
+ Record four independent identities: CLI runner/version, CLI package source,
7598
+ public helper source revision, and the course content release. Updating one does
7599
+ not automatically update the others.
7600
+
7601
+ | Evidence | What it establishes | What it does not establish |
7602
+ |---|---|---|
7603
+ | Actual executable \`--version\`, command help | The runner and syntax in use | Working API, entitlement or a published helper revision |
7604
+ | npm version, \`dist.integrity\`, \`gitHead\`, matching packaged README/source | Origin of that published package | Publication of changes on a development branch |
7605
+ | Full helper commit retained on public CLI master | Reproducible public helper source | Installation in this project or course publication |
7606
+ | Successful named download and complete local tree/manifest | Actual package/API/content behavior for this context | A successful agent task or another profile/language |
7607
+
7608
+ The earlier planning shorthand \`get SKILL_NAME\` was incorrect. Released CLI
7609
+ uses a lesson reference plus \`--type skills --name NAME\`; there is no standalone
7610
+ skill-name positional command or independent skill-owner sync contract. On 2026-09-14, CLI \`1.21.0\` was published with v4, filtered skill downloads
7611
+ and Circle login; production m1 EN/PL and sync were verified. Its npm \`gitHead\`
7612
+ is \`2cc510fe690ba820937602d702564985087ded46\`. These revised helpers have their
7613
+ own source/content identity and are not implied by installing CLI 1.21.0. A local
7614
+ source build can carry an old version label; do not identify features from that
7615
+ label alone.
7616
+
7617
+ For a known installed version, read its npm metadata (replace the shell variable
7618
+ with the observed version) and use the matching source revision for documentation:
7619
+
7620
+ \`\`\`bash
7621
+ : "\${CLI_VERSION:?Set the actual published CLI version}"
7622
+ npm view "@przeprogramowani/10x-cli@$CLI_VERSION" version engines gitHead dist.integrity dist.tarball --json
7623
+ \`\`\`
7624
+
7625
+ Use that exact package's README or
7626
+ \`https://raw.githubusercontent.com/przeprogramowani/10x-cli/<gitHead>/README.md\`,
7627
+ with the real \`gitHead\` substituted. For a standalone binary, use its actual
7628
+ release tag/asset, published verification information and matching source. Do not
7629
+ invent a source SHA if metadata is absent. The installed help wins for supported
7630
+ flags; a help/README mismatch must remain visible and be checked against matching
7631
+ source, not resolved by fetching arbitrary master instructions.
7632
+
7633
+ Before the filtered-download journey, verify \`get --help\` and matching source/release evidence
7634
+ for \`get m1l1 --type skills --name NAME\` and lesson-scoped sync. A successful \`--help\` exit alone does
7635
+ not prove skill-filter support. If support or release evidence is missing, prepare the
7636
+ public helpers and handoff, but pause filtered commands with a precise explanation.
7637
+ Once supported, a filtered dry-run verifies the actual API/content selection before
7638
+ writing. Report unsupported reference, missing skill/index, locked module, denied
7639
+ access and network errors separately; do not silently use a lesson or v3 instead.
7640
+
7641
+ ## Keep one runner and one project context
7642
+
7643
+ The examples below use a pinned npx runner in macOS/zsh or another POSIX shell.
7644
+ Set \`CLI_VERSION\` from verified release evidence, then use this function in that
7645
+ shell session. If the user's existing verified global/standalone \`10x\` works,
7646
+ substitute its exact executable for \`10x_cli\`; no reinstall is required.
7647
+
7648
+ \`\`\`bash
7649
+ : "\${CLI_VERSION:?Set the actual published CLI version}"
7650
+ 10x_cli() { npx --yes "@przeprogramowani/10x-cli@$CLI_VERSION" "$@"; }
7651
+ 10x_cli --version
7652
+ 10x_cli --help
7653
+ 10x_cli get --help
7654
+ 10x_cli sync --help
7655
+ 10x_cli auth --help
7656
+ 10x_cli auth --status
7657
+ 10x_cli list --course 10xdevs4
7658
+ \`\`\`
7659
+
7660
+ Run commands from the intended project root. The target guided context is
7661
+ \`--course 10xdevs4 --tool claude-code --lang pl\`; preserve it in downloads,
7662
+ previews, updates and recovery. \`list\` takes \`--course\`, not tool/lang flags.
7663
+ Use another context only when the user chose it. Record any language fallback
7664
+ reported by the CLI rather than calling English output Polish.
7665
+
7666
+ The project edition is stored in \`.10x-cli.json\` after a validated write and shared
7667
+ across profiles; existing supported manifests also carry edition information.
7668
+ Course selection is explicit flag → project edition → live API recommendation.
7669
+ An explicit course does not authorize changing a bound project's edition. Retain
7670
+ the v3 project and start a separate v4 directory for this journey. Preserve unknown,
7671
+ corrupt or conflicting manifests; never delete a binding to force migration.
7672
+
7673
+ Verified releases with the project-binding safeguards preserve project files and
7674
+ tool/language preferences during \`list\`, \`get --print\`, \`get --dry-run\`,
7675
+ \`sync --dry-run\` and \`doctor\`. Auth token refresh can still update the credential
7676
+ store. Verify the selected release's contract before describing a preview as
7677
+ read-only; do not generalize older source bugs to the target release.
7678
+
7679
+ ## Two helper channels, one owner per installed copy
7680
+
7681
+ The public authoring source is \`przeprogramowani/10x-cli\`, under
7682
+ \`skills/10x-cli-setup/\` and \`skills/10x-cli-guide/\`. Toolkit distributes controlled
7683
+ copies through course content. Each helper includes \`SKILL.md\` and its own
7684
+ \`references/compatibility.md\`; neither may rely on an installed sibling helper.
7685
+
7686
+ Before either installer writes, inspect the destination directory, its path
7687
+ components/symlink targets, the tool's \`.10x-cli-manifest.json\`, and the skills
7688
+ installer's project registration/lock. Do not infer ownership solely from a
7689
+ directory name. If ownership is mixed or unknown, preserve local files and
7690
+ resolve it before writing; use a separate project to try the other channel.
7691
+
7692
+ ### Bundled public copies (unreleased command)
7693
+
7694
+ The next CLI release adds \`10x helpers install --tool copilot\` (use the user's
7695
+ chosen profile). This command is absent from the 1.21.0 and 1.22.0 master
7696
+ baselines. Verify \`10x helpers --help\` on the actual runner; a source build may
7697
+ still report the baseline version. Do not claim npm availability from this text.
7698
+
7699
+ When supported, run from the intended project:
7700
+
7701
+ \`\`\`bash
7702
+ 10x helpers install --tool copilot --dry-run
7703
+ 10x helpers install --tool copilot
7704
+ \`\`\`
7705
+
7706
+ Both helpers and their own compatibility references are embedded in the same npm
7707
+ bundle/standalone executable. No auth, network, external skills installer or
7708
+ global installation is involved. \`--tool\` is required; Copilot writes to
7709
+ \`.github/skills/\`, Claude Code to \`.claude/skills/\`, and other profiles follow the
7710
+ CLI profile table. Do not carry \`--agent github-copilot\` from the external
7711
+ installer into this command.
7712
+
7713
+ Existing identical files are unchanged; missing files are created. Any differing
7714
+ helper file blocks the entire preflight with exit 1, preserving both helpers and
7715
+ local extras. Never remove a user's files merely to make a retry pass. Keep an
7716
+ existing copy, or let the user deliberately back it up outside managed trees
7717
+ before replacement. Course-owned copies stay with get/sync; this command writes
7718
+ no course manifest or binding. Filesystem errors also exit 1 and report that
7719
+ already created files remain; unsupported options/targets exit 2. Preview uses
7720
+ the same checks without writes. This is a public bundled snapshot, not an
7721
+ automatic updater; another CLI version may contain different helper bytes and
7722
+ will preserve differing installed files as conflicts. Neither npm installation
7723
+ alone nor running this command activates the helpers in the agent.
7724
+
7725
+ For older CLI releases use the pinned public installer below with an explicit
7726
+ agent and Project scope. For Copilot that is \`--agent github-copilot --copy\`,
7727
+ which \`skills@1.5.26\` places in project \`.agents/skills/\`. Do not add \`-g\` or
7728
+ \`--all\`. Confirm the complete tree and the actual source selected by Copilot.
7729
+
7730
+ ### Public on-demand channel
7731
+
7732
+ This channel can bootstrap before CLI installation or course authentication.
7733
+ Select a full, retained public CLI master commit containing these helper trees;
7734
+ record it as \`CLI_SKILLS_REF\`. Do not use an unmerged branch SHA as the permanent
7735
+ reference. The installer is separately pinned to the inspected \`skills@1.5.26\`.
7736
+
7737
+ \`\`\`bash
7738
+ : "\${CLI_SKILLS_REF:?Set the full public CLI master SHA containing the helpers}"
7739
+ npx --yes skills@1.5.26 add "https://github.com/przeprogramowani/10x-cli/tree/$CLI_SKILLS_REF/skills" --skill 10x-cli-setup --agent claude-code --copy
7740
+ npx --yes skills@1.5.26 add "https://github.com/przeprogramowani/10x-cli/tree/$CLI_SKILLS_REF/skills" --skill 10x-cli-guide --agent claude-code --copy
7741
+ \`\`\`
7742
+
7743
+ Run only the needed helper's command, from the project root. Project scope is the
7744
+ default; do not add \`--global\`/\`-g\`. \`--copy\` requests a project copy instead of a
7745
+ symlink. \`npx --yes\` accepts running the pinned npm tool; there is deliberately no
7746
+ \`--yes\` argument to \`skills add\`, so its own prompts are retained. Confirm the
7747
+ installer's actual paths and complete references after installation. A helper
7748
+ already managed by CLI should be used/updated through CLI, not overwritten here.
7749
+
7750
+ ### CLI channel
7751
+
7752
+ Use this channel after setup/auth and only with verified skill-filter support and
7753
+ available v4 content. These helpers and the lesson skills \`10x-idea-check\`, \`10x-init\`, \`10x-shape\`, \`10x-prd\` belong to m1l1
7754
+ and inherit course membership and module availability. Their source membership
7755
+ does not prove that the content has been published or unlocked.
7756
+
7757
+ In a separate project from the public copies, or after the explicit takeover
7758
+ below, use the same verified \`10x_cli\` runner:
7759
+
7760
+ \`\`\`bash
7761
+ 10x_cli get m1l1 --type skills --name 10x-cli-setup --course 10xdevs4 --tool claude-code --lang pl --dry-run
7762
+ 10x_cli get m1l1 --type skills --name 10x-cli-setup --course 10xdevs4 --tool claude-code --lang pl
7763
+ 10x_cli get m1l1 --type skills --name 10x-cli-guide --course 10xdevs4 --tool claude-code --lang pl --dry-run
7764
+ 10x_cli get m1l1 --type skills --name 10x-cli-guide --course 10xdevs4 --tool claude-code --lang pl
7765
+ \`\`\`
7766
+
7767
+ Each successful filtered skill download should materialize
7768
+ \`.claude/skills/<canonical-name>/SKILL.md\` and
7769
+ \`.claude/skills/<canonical-name>/references/compatibility.md\`, under lesson ownership
7770
+ \`lessons.m1l1.skills\` in \`.claude/.10x-cli-manifest.json\`, with hashes in
7771
+ \`files.skills\`. Confirm that complete tree and owner from actual output/files.
7772
+ This filter writes only the selected skill, not course rules or the whole lesson.
7773
+
7774
+ ### Changing the owner deliberately
7775
+
7776
+ To move a public copy to CLI, inventory and back up that entire helper outside the
7777
+ managed skill trees, including local changes and installer metadata needed for
7778
+ recovery. Use the original pinned installer's \`remove --help\` and \`remove\` flow to
7779
+ unregister only the selected helper at project scope for the selected agent.
7780
+ Verify that both its registration and destination path/symlink are gone. If
7781
+ anything remains or another owner is present, stop the takeover and preserve it.
7782
+ Then use a filtered skill download and inspect its complete tree and lesson ownership. Merge
7783
+ desired local edits consciously from the backup; do not automatically force them
7784
+ over the downloaded copy. Reopen/read the installed helper after replacement.
7785
+
7786
+ The reverse move has no verified CLI per-skill unregister command in this contract.
7787
+ Use a new isolated project for a public copy; do not hand-edit the CLI manifest or
7788
+ place two updaters over the same files. Normal use does not require any takeover.
7789
+
7790
+ ## Download, use, update
7791
+
7792
+ Prepare lesson 1's four skills, including \`10x-idea-check\` with its references.
7793
+ The launch example remains the existing 10xCards: init → shape → PRD.
7794
+ Idea assessment is optional to run before that chain; install its tree during
7795
+ lesson setup so the learner can use it. Retain a narrower scope when the user
7796
+ explicitly requested only a specific skill.
7797
+ \`10x-plan\` is not available for the launch demonstration. After capability and
7798
+ content checks for each name, inspect each preview before its corresponding write:
7799
+
7800
+ \`\`\`bash
7801
+ 10x_cli get m1l1 --type skills --name 10x-idea-check --course 10xdevs4 --tool claude-code --lang pl --dry-run
7802
+ 10x_cli get m1l1 --type skills --name 10x-idea-check --course 10xdevs4 --tool claude-code --lang pl
7803
+ 10x_cli get m1l1 --type skills --name 10x-init --course 10xdevs4 --tool claude-code --lang pl --dry-run
7804
+ 10x_cli get m1l1 --type skills --name 10x-init --course 10xdevs4 --tool claude-code --lang pl
7805
+ 10x_cli get m1l1 --type skills --name 10x-shape --course 10xdevs4 --tool claude-code --lang pl --dry-run
7806
+ 10x_cli get m1l1 --type skills --name 10x-shape --course 10xdevs4 --tool claude-code --lang pl
7807
+ 10x_cli get m1l1 --type skills --name 10x-prd --course 10xdevs4 --tool claude-code --lang pl --dry-run
7808
+ 10x_cli get m1l1 --type skills --name 10x-prd --course 10xdevs4 --tool claude-code --lang pl
7809
+ \`\`\`
7810
+
7811
+ Require the complete four trees and inspect each installed entrypoint/reference.
7812
+ All checks below must succeed before use; stop on any failure:
7813
+
7814
+ \`\`\`bash
7815
+ test -s .claude/skills/10x-idea-check/SKILL.md
7816
+ test -s .claude/skills/10x-idea-check/references/examples.md
7817
+ test -s .claude/skills/10x-idea-check/references/assessment-guide.md
7818
+ test -s .claude/skills/10x-idea-check/references/10xdevs-4-dates.md
7819
+ test -s .claude/skills/10x-idea-check/references/10xdevs-4-certification.md
7820
+ test -s .claude/skills/10x-init/SKILL.md
7821
+ test -s .claude/skills/10x-shape/SKILL.md
7822
+ test -s .claude/skills/10x-shape/references/prd-schema.md
7823
+ test -s .claude/skills/10x-prd/SKILL.md
7824
+ test -s .claude/skills/10x-prd/../10x-shape/references/prd-schema.md
7825
+ \`\`\`
7826
+
7827
+ PRD reads \`../10x-shape/references/prd-schema.md\` relative to its SKILL.md;
7828
+ isolated PRD download is insufficient. These are the source minimum: preserve
7829
+ additional supporting files in the selected release. Inspect all four names in
7830
+ \`lessons.m1l1.skills\`, their hashes in \`files.skills\`, and the project edition
7831
+ binding. Partial downloads do not establish complete lesson freshness/release identity.
7832
+ Membership in source is candidate evidence; actual filtered availability, full PL
7833
+ references and release identity still need verification for all four names.
7834
+
7835
+ \`CLAUDE-m1l1\` is a separate lesson rule and is not included in these filtered gets.
7836
+ The inspected three skill sources do not require it for the chain. This is not
7837
+ proof that the entire lesson needs no rule: if the learner's lesson instructions
7838
+ require it, inspect an existing rule's provenance, or report the missing
7839
+ prerequisite and ask the lesson/release owner for a supported route before that
7840
+ step. Never invent a command, overwrite a rule or fall back to full lesson get.
7841
+
7842
+ If the learner wants to assess their idea before shaping, have the agent read
7843
+ \`.claude/skills/10x-idea-check/SKILL.md\` and its references and follow that skill.
7844
+ A learner ready to shape can skip assessment. Then read the chain's entrypoints
7845
+ and references in order: init preserves/scaffolds context directories; shape conducts the actual
7846
+ 10xCards discovery with the learner and writes
7847
+ \`context/foundation/shape-notes.md\`; after the learner approves those notes, PRD
7848
+ uses them and the sibling schema to produce \`context/foundation/prd.md\`.
7849
+ Ask for missing lesson inputs; do not manufacture a task.md, product decisions or
7850
+ a finished plan. Respect existing-file collision choices and report actual output
7851
+ paths. Inspect the notes, schema compliance, open questions and preserved local
7852
+ work. Stop at PRD, without stack selection or implementation. Download alone is
7853
+ not use; native slash/$ discovery needs separate agent evidence. Keep private
7854
+ lesson text out of public fixtures. The guide supplies the detailed agent steps.
7855
+
7856
+ Sync below refreshes entire recorded lessons, not only the four skill filters.
7857
+ Preview may include other skills, prompts, configs and course rules; apply only
7858
+ when the user accepts that scope. For a narrow update, repeat the selected skill
7859
+ filter instead. Never use sync to silently bypass a missing lesson-rule prerequisite.
7860
+
7861
+ \`\`\`bash
7862
+ 10x_cli sync --course 10xdevs4 --tool claude-code --lang pl --dry-run
7863
+ 10x_cli sync --course 10xdevs4 --tool claude-code --lang pl
7864
+ \`\`\`
7865
+
7866
+ Normal sync refreshes downloaded owners, including the full lessons that own previously downloaded skills. Avoid \`--all\` for this small journey. Inspect updated,
7867
+ unchanged, conflict/preserved and error outcomes even when exit is 0. Preserve
7868
+ local edits; do not use automatic \`--force\`. Recovery commands must retain the
7869
+ same runner/course/tool/lang, even if an older report omits that context.
7870
+
7871
+ Filtered lesson get (\`m1l1 --type skills --name ...\`) is the supported command
7872
+ used throughout this guide. It preserves other previously downloaded artifacts
7873
+ through partial writes; normal sync later operates at lesson scope. \`--print\` is an
7874
+ inspection surface, not installation: human TTY output can show only SKILL.md,
7875
+ while non-TTY output is JSON. Never redirect it into SKILL.md as a full package.
7876
+
7877
+ | Item to update | Correct channel |
7878
+ |---|---|
7879
+ | npx CLI | Choose and verify a new published version, update the runner pin |
7880
+ | Global npm CLI | \`npm install -g "@przeprogramowani/10x-cli@$CLI_VERSION"\` after selecting/verifying the version |
7881
+ | Standalone CLI | Replace through its verified release asset procedure, then check the actual executable |
7882
+ | Public helper copy | Inspect local changes/ownership; rerun its selected \`skills add\` command with a deliberate new full source SHA |
7883
+ | CLI-owned helper or exercise skill | Repeat its filtered get for a narrow update; \`sync\` refreshes full recorded lessons after preview |
7884
+
7885
+ \`skills update\` is not a substitute for proving an exact selected helper revision;
7886
+ it may follow a different ref/latest. npm install includes helper source files in
7887
+ the package but does not install them into an agent. CLI sync cannot update the
7888
+ CLI executable or a public installer-owned helper.
7889
+
7890
+ ## Diagnostics and evidence boundaries
7891
+
7892
+ Doctor performs auth/access, API, config, version and configured-tool checks.
7893
+ It can return 78 with an outer JSON \`status: "ok"\`; inspect \`data.overall\` and all
7894
+ \`data.checks\`. A missing tool directory before first get can be expected. Explain
7895
+ only that failure as pre-download state; do not ignore auth/network/permissions.
7896
+ The inspected doctor has no \`--tool\` or \`--course\` flags and may report a different
7897
+ configured profile/course from this journey's explicit command context.
7898
+
7899
+ Configuration is under \`$XDG_CONFIG_HOME/10x-cli\` on macOS/Linux when nonempty,
7900
+ otherwise \`~/.config/10x-cli\`. Windows uses \`%APPDATA%/10x-cli\`, falling back to
7901
+ the user's \`AppData/Roaming/10x-cli\`. Inspect only needed nonsecret preferences;
7902
+ do not dump credentials or reset the entire config directory. Auth validity and
7903
+ live course access are distinct: inspect \`access_checked\`/access errors, not only
7904
+ the status exit. Login is user-operated and may send email.
7905
+
7906
+ Full acceptance needs real package/version/integrity/source and endpoint/content
7907
+ release evidence, both helper channels, complete support files, and an actual
7908
+ agent task transcript for macOS/zsh/Claude Code/PL. Local builds and fixtures can
7909
+ check structure/conflicts but cannot prove publication, course unlock or this
7910
+ user's entitlement. Other platforms/profiles and EN/PL transformed content need
7911
+ their own evidence; do not imply a Windows or translated-content walkthrough ran.
7912
+ `;
7913
+
7914
+ // skills/10x-cli-guide/SKILL.md
7915
+ var SKILL_default2 = `---
7916
+ name: 10x-cli-guide
7917
+ description: "Use when the user wants to download, use or update 10xDevs CLI skills, choose a helper installation channel, inspect course content, switch tool profiles or troubleshoot CLI/auth/content conflicts. Guides filtered get → an actual agent task → sync while preserving local work and course/tool/language context. For first installation or authentication preparation, use an available 10x-cli-setup copy. Does not implement CLI runtime or grant course access."
7918
+ ---
7919
+
7920
+ # 10x-cli: download, use, update
7921
+
7922
+ Read the bundled [compatibility and channel reference](references/compatibility.md)
7923
+ before issuing commands. It contains the pinned runner setup, version checks, both
7924
+ helper channels and ownership safeguards. Commands use the released lesson-scoped
7925
+ skill filter; verify the actual selected package and content before using it. A local
7926
+ build or source membership is not proof that a feature has shipped.
7927
+
7928
+ The next CLI release also provides project-only bundled installation through
7929
+ \`10x helpers install --tool <chosen-profile>\`. This command is **unreleased** and
7930
+ absent from the 1.21.0/1.22.0 master baselines: check the actual runner's
7931
+ \`helpers --help\` first. Follow **Bundled public copies** in the local reference
7932
+ for complete files, explicit targets and conflict handling; keep the existing
7933
+ pinned public route when the runner does not support it.
7934
+
7935
+ ## Environment
7936
+
7937
+ Reuse the setup handoff: project root, course, tool, language, runner/version,
7938
+ auth/access status, update method and helper channel/path. If anything is absent,
7939
+ inspect only that item. A working installed CLI needs no reinstall. If setup is
7940
+ needed, locate its actual SKILL.md and references or install that helper through
7941
+ the public channel; do not invoke a missing sibling by name.
7942
+
7943
+ The guided acceptance context is macOS/zsh, Claude Code, 10xdevs4 and Polish.
7944
+ Determine the actual OS and shell from the environment, not a POSIX command that
7945
+ labels every failure Windows. Select the intended project root before any write.
7946
+ For v4, retain an existing v3 project and use a separate directory; ordinary get,
7947
+ sync and profile changes do not migrate editions. Preserve \`.10x-cli.json\` and
7948
+ all manifests if their versions/courses conflict.
7949
+
7950
+ Use the verified \`10x_cli\` runner defined in the reference, or the user's exact
7951
+ verified global/standalone executable:
7952
+
7953
+ \`\`\`bash
7954
+ 10x_cli --version
7955
+ 10x_cli get --help
7956
+ 10x_cli sync --help
7957
+ 10x_cli auth --status
7958
+ 10x_cli list --course 10xdevs4
7959
+ \`\`\`
7960
+
7961
+ Check source/release evidence for lesson reference, skill filter and lesson-scoped sync, then use the
7962
+ filtered preview below to check the endpoint. Do not treat a successful help exit as
7963
+ capability proof. Keep unsupported CLI syntax, unpublished/missing content, locked
7964
+ module, membership denial and network failure distinct. Missing final release
7965
+ evidence need not block preparing the public helpers or the exercise files.
7966
+
7967
+ Read only needed nonsecret preferences from \`config.json\`. On macOS/Linux its
7968
+ base is nonempty \`$XDG_CONFIG_HOME\`, otherwise \`~/.config\`; on Windows it is
7969
+ \`%APPDATA%\`, otherwise the user's \`AppData/Roaming\`. Append \`10x-cli/config.json\`.
7970
+ Do not print \`auth.json\`, discard stderr, truncate doctor JSON or erase config to
7971
+ repair an unknown problem. An explicit course/tool/language in this journey takes
7972
+ precedence over saved defaults for that command.
7973
+
7974
+ ## Session management
7975
+
7976
+ When login is needed, let the user choose the delivery channel and complete it:
7977
+
7978
+ \`\`\`bash
7979
+ 10x_cli auth # Interactive: choose email or Circle
7980
+ 10x_cli auth --method email # Email magic link; default for piped/JSON output
7981
+ 10x_cli auth --method circle # One-time approval link delivered in Circle
7982
+ 10x_cli auth --status
7983
+ 10x_cli auth --logout
7984
+ \`\`\`
7985
+
7986
+ Circle is useful when the email does not arrive. The approval link expires after
7987
+ 15 minutes; the CLI does not resend it automatically. In non-interactive mode,
7988
+ provide the user's email with \`--email\` and choose \`--method circle\` explicitly.
7989
+ Do not send a login message until the user requests authentication. Sessions
7990
+ refresh transparently; re-login is needed only when refresh cannot recover them.
7991
+
7992
+ ## Download
7993
+
7994
+ The launch exercise follows lesson 1, “Od pomysłu do PRD”, using its existing
7995
+ 10xCards example. \`10x-plan\` is not part of this launch demonstration.
7996
+ Prepare all four lesson skills: \`10x-idea-check\`, \`10x-init\`, \`10x-shape\` and
7997
+ \`10x-prd\`. Idea assessment is optional to run; its files should still be available
7998
+ when preparing lesson 1. If the user requested only a specific skill, retain that
7999
+ narrower scope. After checking each name's capability and availability, download
8000
+ four separate complete selected skill trees. Inspect each dry-run before its corresponding write:
8001
+
8002
+ \`\`\`bash
8003
+ 10x_cli get m1l1 --type skills --name 10x-idea-check --course 10xdevs4 --tool claude-code --lang pl --dry-run
8004
+ 10x_cli get m1l1 --type skills --name 10x-idea-check --course 10xdevs4 --tool claude-code --lang pl
8005
+ 10x_cli get m1l1 --type skills --name 10x-init --course 10xdevs4 --tool claude-code --lang pl --dry-run
8006
+ 10x_cli get m1l1 --type skills --name 10x-init --course 10xdevs4 --tool claude-code --lang pl
8007
+ 10x_cli get m1l1 --type skills --name 10x-shape --course 10xdevs4 --tool claude-code --lang pl --dry-run
8008
+ 10x_cli get m1l1 --type skills --name 10x-shape --course 10xdevs4 --tool claude-code --lang pl
8009
+ 10x_cli get m1l1 --type skills --name 10x-prd --course 10xdevs4 --tool claude-code --lang pl --dry-run
8010
+ 10x_cli get m1l1 --type skills --name 10x-prd --course 10xdevs4 --tool claude-code --lang pl
8011
+ \`\`\`
8012
+
8013
+ Inspect each report and the complete supporting tree, not just SKILL.md. In the
8014
+ chosen macOS/zsh exercise directory, each of these checks must succeed before use
8015
+ (stop on any failure; do not infer success from the last check alone):
8016
+
8017
+ \`\`\`bash
8018
+ test -s .claude/skills/10x-idea-check/SKILL.md
8019
+ test -s .claude/skills/10x-idea-check/references/examples.md
8020
+ test -s .claude/skills/10x-idea-check/references/assessment-guide.md
8021
+ test -s .claude/skills/10x-idea-check/references/10xdevs-4-dates.md
8022
+ test -s .claude/skills/10x-idea-check/references/10xdevs-4-certification.md
8023
+ test -s .claude/skills/10x-init/SKILL.md
8024
+ test -s .claude/skills/10x-shape/SKILL.md
8025
+ test -s .claude/skills/10x-shape/references/prd-schema.md
8026
+ test -s .claude/skills/10x-prd/SKILL.md
8027
+ test -s .claude/skills/10x-prd/../10x-shape/references/prd-schema.md
8028
+ \`\`\`
8029
+
8030
+ The PRD entrypoint resolves \`../10x-shape/references/prd-schema.md\` relative to its
8031
+ own directory. A standalone PRD tree is insufficient. Read all installed
8032
+ entrypoints and every reference they require; the paths above are the known
8033
+ source minimum, not permission to discard extra files from a published bundle.
8034
+ Also inspect \`.claude/.10x-cli-manifest.json\`: \`lessons.m1l1.skills\` must include
8035
+ all four names, with file hashes in \`files.skills\`. These are lesson-owned
8036
+ partial downloads, not independent owners. Inspect \`.10x-cli.json\` for the course
8037
+ binding; partial downloads do not establish a complete lesson release identity.
8038
+
8039
+ CLI 1.21.0 is published with v4 and filtered skill downloads; production m1l1 EN/PL
8040
+ contains idea-check/init/shape/prd and their references. These revised helpers are a separate
8041
+ source change, not proof that their course copies have been published.
8042
+ Verify all four names against the actual selected release. If any name, schema,
8043
+ owner or release is missing/mismatched, preserve the precise error and stop the
8044
+ exercise; never silently substitute a whole lesson, another course or filtered get.
8045
+
8046
+ \`CLAUDE-m1l1\` is a separate lesson rule, not delivered by these filtered skill gets.
8047
+ The inspected init/shape/prd sources do not require that rule to run this chain.
8048
+ This does not establish that every step of the full lesson works without it.
8049
+ Use the learner's existing lesson 1 inputs and instructions: if they require the
8050
+ rule, inspect the existing project rule and its provenance. If absent, report the
8051
+ missing prerequisite and obtain the supported route from the lesson/release owner
8052
+ before that step. Do not invent a rule command or download a full lesson to bypass
8053
+ it. Do not overwrite an existing project rule.
8054
+
8055
+ For browsing use \`10x_cli list m1 --course 10xdevs4\`. The commands above filter
8056
+ one lesson by skill name; \`get 10x-init\` is not supported. \`--print\` is inspection:
8057
+ TTY Markdown can contain only SKILL.md; non-TTY output is a JSON envelope. Never
8058
+ redirect print output into SKILL.md as a package installation.
8059
+
8060
+ ## Use: 10xCards, from idea to PRD
8061
+
8062
+ Downloading the trees is only preparation. Use the existing 10xCards example and
8063
+ the learner's actual answers from lesson 1. If those inputs are absent, ask for
8064
+ them; do not invent product requirements, a replacement task.md or a ready-made
8065
+ plan. Keep private lesson text out of public fixtures and transcripts.
8066
+ Do not assume native slash/$ discovery or automatic activation from npm install.
8067
+ Give the agent explicit local paths. If the learner wants to assess whether an
8068
+ idea fits their experience, time and course goals, first read
8069
+ \`.claude/skills/10x-idea-check/SKILL.md\` and its references and follow that skill.
8070
+ Do not make assessment a prerequisite when the learner is ready to shape.
8071
+ Then work through these steps separately:
8072
+
8073
+ 1. Read \`.claude/skills/10x-init/SKILL.md\` and follow it in the chosen project.
8074
+ Inspect the create-if-absent context/changes, context/archive and
8075
+ context/foundation directories and their READMEs. Preserve existing files.
8076
+ 2. Read \`.claude/skills/10x-shape/SKILL.md\` and
8077
+ \`.claude/skills/10x-shape/references/prd-schema.md\`. Follow the skill's discovery
8078
+ with the learner's 10xCards inputs. Let the learner answer and approve the
8079
+ checkpoint; do not answer for them. Inspect
8080
+ \`context/foundation/shape-notes.md\` against those answers before proceeding.
8081
+ 3. Read \`.claude/skills/10x-prd/SKILL.md\` and its sibling schema, then generate the
8082
+ draft from the actual \`context/foundation/shape-notes.md\`. Inspect
8083
+ \`context/foundation/prd.md\` against that input and the installed schema;
8084
+ unresolved domain choices stay open. Respect the skill's existing-file
8085
+ collision choice (a versioned file may be the appropriate result).
8086
+
8087
+ Success requires the learner's notes and a schema-conformant PRD, with gaps
8088
+ explicit and original project work preserved. A transcript of downloads alone
8089
+ is insufficient. Stop after reviewing the PRD; do not chain into stack selection,
8090
+ bootstrap or implementation. If a different global/local skill copy was read,
8091
+ correct the path before accepting the result. Record the actual agent, profile,
8092
+ language, output paths and checks; use a fresh isolated exercise directory for the
8093
+ two canonical output filenames instead of forcing an overwrite.
8094
+
8095
+ ## Update
8096
+
8097
+ Use the same runner, directory, course, tool and language. Sync updates entire
8098
+ downloaded lessons, including m1l1 after these filtered gets. Its preview may
8099
+ include other skills, prompts, configs and course rules. Inspect that expanded
8100
+ scope and apply only when the user accepts it; to update only one skill, repeat
8101
+ its filtered preview/get instead. Do not use sync as a hidden rule prerequisite
8102
+ workaround:
8103
+
8104
+ \`\`\`bash
8105
+ 10x_cli sync --course 10xdevs4 --tool claude-code --lang pl --dry-run
8106
+ 10x_cli sync --course 10xdevs4 --tool claude-code --lang pl
8107
+ \`\`\`
8108
+
8109
+ Normal sync refreshes the full lessons recorded in the manifest, not just the
8110
+ four selected skills. \`--all\` broadens scope to unlocked lessons and is not needed
8111
+ for this exercise. Missing managed files should be repaired; local edits should
8112
+ remain visible as conflicts or preserved files. Read all report outcomes and
8113
+ resource counts even if exit is 0: skipped conflicts alone are not process errors.
8114
+ Do not equate an unchanged remote digest with intact local files.
8115
+
8116
+ For one conflicting skill, inspect the diff and back up local work before retrying
8117
+ its filtered get in an interactive terminal with the same course/tool/lang. Preserve
8118
+ the user's resolution choice. If a CLI hint omits context, restore these flags in
8119
+ your proposed command. Never run automatic \`--force\`; it can overwrite local
8120
+ skill/prompt edits and does not bypass protected rules or safe removal. Config
8121
+ templates remain create-only. Cleanup preserves modified/untracked files and
8122
+ files owned elsewhere; do not manually sweep a skill directory after sync.
8123
+
8124
+ Three updates are independent: changing the npm/binary version updates the CLI;
8125
+ repeating pinned public \`skills add\` with a deliberately chosen new retained SHA
8126
+ updates a public helper; CLI sync updates CLI-owned course skills. It does not
8127
+ update the executable or public installer-owned helper copies.
8128
+
8129
+ ## Channels: both helpers are available through two routes
8130
+
8131
+ The public on-demand route works before CLI/auth and installs one project helper
8132
+ at a selected source SHA. The CLI route uses authenticated filtered get once helper
8133
+ content is published and m1l1 is accessible. Follow the exact commands and guards
8134
+ in the reference for \`10x-cli-setup\` and \`10x-cli-guide\`; install only what is needed.
8135
+ Both routes deliver each helper's own \`references/compatibility.md\`.
8136
+
8137
+ Use one owner per installed copy. Inspect destination paths/symlinks, CLI manifest
8138
+ and the public installer's project registration before writing. If a helper is
8139
+ already CLI-owned, use that copy and sync. For a public→CLI takeover, back up the
8140
+ whole helper and metadata outside managed trees, unregister only that helper using
8141
+ the original pinned installer's project/agent remove flow, verify registration and
8142
+ destination are absent, then filtered get. Merge local edits consciously from backup.
8143
+ If either owner remains, stop the takeover. CLI→public has no verified per-skill
8144
+ unregister contract: use a new isolated project instead of hand-editing manifests.
8145
+
8146
+ ## Profiles and troubleshooting
8147
+
8148
+ Full skill trees land under the selected profile's \`skills/<canonical-name>/\`:
8149
+
8150
+ | Profile | Tool directory | Rules file for full lesson delivery |
8151
+ |---|---|---|
8152
+ | claude-code | \`.claude/\` | \`CLAUDE.md\` |
8153
+ | cursor | \`.cursor/\` | \`.cursor/rules/10x-course.mdc\` |
8154
+ | copilot | \`.github/\` | \`.github/copilot-instructions.md\` |
8155
+ | codex | \`.agents/\` | \`AGENTS.md\` |
8156
+ | devin-desktop | \`.devin/\` | \`AGENTS.md\` |
8157
+ | gemini | \`.gemini/\` | \`GEMINI.md\` |
8158
+ | generic | \`.ai/\` | \`AGENTS.md\` |
8159
+
8160
+ Profile changes may offer migrate, delete eligible managed files, or keep both;
8161
+ none means deleting arbitrary user content or switching the course edition.
8162
+ Legacy windsurf aliases and orphan handling should follow the selected version's
8163
+ help/output. These path mappings are not evidence of a completed Windows or
8164
+ other-agent walkthrough. Translate shell syntax to the user's actual shell.
8165
+
8166
+ Run \`10x_cli doctor --json\` when diagnosis is useful; inspect its complete
8167
+ \`data.overall\` and \`data.checks\` as well as exit status. It checks the configured
8168
+ profile, not a \`--tool\` or \`--course\` argument. Before first get, a missing tool
8169
+ directory can be expected; explain only that failure and keep other failures
8170
+ visible. Doctor exit 78 can coexist with outer JSON \`status: "ok"\`.
8171
+
8172
+ | Symptom | Next step |
8173
+ |---|---|
8174
+ | Missing/expired auth | Inspect auth status and live-access result; let the user complete login through setup. Login may send email. |
8175
+ | No email received | Offer \`10x_cli auth --method circle\`; let the user request the message. |
8176
+ | \`circle_login_disabled\` | Circle is unavailable; use \`10x_cli auth --method email\`. |
8177
+ | \`dm_rejected\` | Enable Circle direct messages or use email login. |
8178
+ | \`circle_login_expired\` | Ask for a fresh Circle login or use email; never auto-resend. |
8179
+ | Denied course access | Confirm selected course and membership; changing tool/reinstalling does not grant access. |
8180
+ | Locked or unpublished v4 | Inspect module availability/release evidence; do not bypass the gate or fall back to v3. |
8181
+ | Unsupported name/missing index | Verify exact CLI package and content release; preserve the error for the release owner. |
8182
+ | Network/API failure | Keep diagnostics, retry the same context when service returns; no config reset. |
8183
+ | Missing \`10x-idea-check\` after setup | Older helper journeys selected only init/shape/prd. Check the actual commands, selected profile path and manifest; use the idea-check preview/get above to add its complete tree. If the files already exist, read that exact SKILL.md and check the agent's discovery/reload behavior before reinstalling. An absent slash command alone does not prove missing files. |
8184
+ | Wrong directory/profile | Recheck cwd and explicit flags; a fresh project may legitimately have no tool directory. |
8185
+ | Signature/release mismatch | Preserve failure and source identity; do not disable verification or reuse unrelated bytes. |
8186
+ | Edition/manifest conflict | Preserve binding and manifests for repair; use a separate v4 project rather than deleting them. |
8187
+ | File conflict or permission failure | Inspect affected paths and local edits, retain backup and resolve the specific issue. No broad chmod/reset/force. |
8188
+
8189
+ Use \`--verbose\` only when needed, and redact credentials before sharing diagnostics.
8190
+ For unrelated day-to-day commands such as \`bench\`, inspect this runner's matching
8191
+ help; do not fetch arbitrary master README as an authority for an older binary.
8192
+ `;
8193
+
8194
+ // skills/10x-cli-guide/references/compatibility.md
8195
+ var compatibility_default2 = `# CLI compatibility, channels and command context
8196
+
8197
+ This reference is packaged inside each helper. Both copies must have identical
8198
+ bytes in the authoring repository. It defines the guided filtered-download contract;
8199
+ verify the selected published CLI and live content before executing that path.
8200
+
8201
+ ## Version and capability check
8202
+
8203
+ Record four independent identities: CLI runner/version, CLI package source,
8204
+ public helper source revision, and the course content release. Updating one does
8205
+ not automatically update the others.
8206
+
8207
+ | Evidence | What it establishes | What it does not establish |
8208
+ |---|---|---|
8209
+ | Actual executable \`--version\`, command help | The runner and syntax in use | Working API, entitlement or a published helper revision |
8210
+ | npm version, \`dist.integrity\`, \`gitHead\`, matching packaged README/source | Origin of that published package | Publication of changes on a development branch |
8211
+ | Full helper commit retained on public CLI master | Reproducible public helper source | Installation in this project or course publication |
8212
+ | Successful named download and complete local tree/manifest | Actual package/API/content behavior for this context | A successful agent task or another profile/language |
8213
+
8214
+ The earlier planning shorthand \`get SKILL_NAME\` was incorrect. Released CLI
8215
+ uses a lesson reference plus \`--type skills --name NAME\`; there is no standalone
8216
+ skill-name positional command or independent skill-owner sync contract. On 2026-09-14, CLI \`1.21.0\` was published with v4, filtered skill downloads
8217
+ and Circle login; production m1 EN/PL and sync were verified. Its npm \`gitHead\`
8218
+ is \`2cc510fe690ba820937602d702564985087ded46\`. These revised helpers have their
8219
+ own source/content identity and are not implied by installing CLI 1.21.0. A local
8220
+ source build can carry an old version label; do not identify features from that
8221
+ label alone.
8222
+
8223
+ For a known installed version, read its npm metadata (replace the shell variable
8224
+ with the observed version) and use the matching source revision for documentation:
8225
+
8226
+ \`\`\`bash
8227
+ : "\${CLI_VERSION:?Set the actual published CLI version}"
8228
+ npm view "@przeprogramowani/10x-cli@$CLI_VERSION" version engines gitHead dist.integrity dist.tarball --json
8229
+ \`\`\`
8230
+
8231
+ Use that exact package's README or
8232
+ \`https://raw.githubusercontent.com/przeprogramowani/10x-cli/<gitHead>/README.md\`,
8233
+ with the real \`gitHead\` substituted. For a standalone binary, use its actual
8234
+ release tag/asset, published verification information and matching source. Do not
8235
+ invent a source SHA if metadata is absent. The installed help wins for supported
8236
+ flags; a help/README mismatch must remain visible and be checked against matching
8237
+ source, not resolved by fetching arbitrary master instructions.
8238
+
8239
+ Before the filtered-download journey, verify \`get --help\` and matching source/release evidence
8240
+ for \`get m1l1 --type skills --name NAME\` and lesson-scoped sync. A successful \`--help\` exit alone does
8241
+ not prove skill-filter support. If support or release evidence is missing, prepare the
8242
+ public helpers and handoff, but pause filtered commands with a precise explanation.
8243
+ Once supported, a filtered dry-run verifies the actual API/content selection before
8244
+ writing. Report unsupported reference, missing skill/index, locked module, denied
8245
+ access and network errors separately; do not silently use a lesson or v3 instead.
8246
+
8247
+ ## Keep one runner and one project context
8248
+
8249
+ The examples below use a pinned npx runner in macOS/zsh or another POSIX shell.
8250
+ Set \`CLI_VERSION\` from verified release evidence, then use this function in that
8251
+ shell session. If the user's existing verified global/standalone \`10x\` works,
8252
+ substitute its exact executable for \`10x_cli\`; no reinstall is required.
8253
+
8254
+ \`\`\`bash
8255
+ : "\${CLI_VERSION:?Set the actual published CLI version}"
8256
+ 10x_cli() { npx --yes "@przeprogramowani/10x-cli@$CLI_VERSION" "$@"; }
8257
+ 10x_cli --version
8258
+ 10x_cli --help
8259
+ 10x_cli get --help
8260
+ 10x_cli sync --help
8261
+ 10x_cli auth --help
8262
+ 10x_cli auth --status
8263
+ 10x_cli list --course 10xdevs4
8264
+ \`\`\`
8265
+
8266
+ Run commands from the intended project root. The target guided context is
8267
+ \`--course 10xdevs4 --tool claude-code --lang pl\`; preserve it in downloads,
8268
+ previews, updates and recovery. \`list\` takes \`--course\`, not tool/lang flags.
8269
+ Use another context only when the user chose it. Record any language fallback
8270
+ reported by the CLI rather than calling English output Polish.
8271
+
8272
+ The project edition is stored in \`.10x-cli.json\` after a validated write and shared
8273
+ across profiles; existing supported manifests also carry edition information.
8274
+ Course selection is explicit flag → project edition → live API recommendation.
8275
+ An explicit course does not authorize changing a bound project's edition. Retain
8276
+ the v3 project and start a separate v4 directory for this journey. Preserve unknown,
8277
+ corrupt or conflicting manifests; never delete a binding to force migration.
8278
+
8279
+ Verified releases with the project-binding safeguards preserve project files and
8280
+ tool/language preferences during \`list\`, \`get --print\`, \`get --dry-run\`,
8281
+ \`sync --dry-run\` and \`doctor\`. Auth token refresh can still update the credential
8282
+ store. Verify the selected release's contract before describing a preview as
8283
+ read-only; do not generalize older source bugs to the target release.
8284
+
8285
+ ## Two helper channels, one owner per installed copy
8286
+
8287
+ The public authoring source is \`przeprogramowani/10x-cli\`, under
8288
+ \`skills/10x-cli-setup/\` and \`skills/10x-cli-guide/\`. Toolkit distributes controlled
8289
+ copies through course content. Each helper includes \`SKILL.md\` and its own
8290
+ \`references/compatibility.md\`; neither may rely on an installed sibling helper.
8291
+
8292
+ Before either installer writes, inspect the destination directory, its path
8293
+ components/symlink targets, the tool's \`.10x-cli-manifest.json\`, and the skills
8294
+ installer's project registration/lock. Do not infer ownership solely from a
8295
+ directory name. If ownership is mixed or unknown, preserve local files and
8296
+ resolve it before writing; use a separate project to try the other channel.
8297
+
8298
+ ### Bundled public copies (unreleased command)
8299
+
8300
+ The next CLI release adds \`10x helpers install --tool copilot\` (use the user's
8301
+ chosen profile). This command is absent from the 1.21.0 and 1.22.0 master
8302
+ baselines. Verify \`10x helpers --help\` on the actual runner; a source build may
8303
+ still report the baseline version. Do not claim npm availability from this text.
8304
+
8305
+ When supported, run from the intended project:
8306
+
8307
+ \`\`\`bash
8308
+ 10x helpers install --tool copilot --dry-run
8309
+ 10x helpers install --tool copilot
8310
+ \`\`\`
8311
+
8312
+ Both helpers and their own compatibility references are embedded in the same npm
8313
+ bundle/standalone executable. No auth, network, external skills installer or
8314
+ global installation is involved. \`--tool\` is required; Copilot writes to
8315
+ \`.github/skills/\`, Claude Code to \`.claude/skills/\`, and other profiles follow the
8316
+ CLI profile table. Do not carry \`--agent github-copilot\` from the external
8317
+ installer into this command.
8318
+
8319
+ Existing identical files are unchanged; missing files are created. Any differing
8320
+ helper file blocks the entire preflight with exit 1, preserving both helpers and
8321
+ local extras. Never remove a user's files merely to make a retry pass. Keep an
8322
+ existing copy, or let the user deliberately back it up outside managed trees
8323
+ before replacement. Course-owned copies stay with get/sync; this command writes
8324
+ no course manifest or binding. Filesystem errors also exit 1 and report that
8325
+ already created files remain; unsupported options/targets exit 2. Preview uses
8326
+ the same checks without writes. This is a public bundled snapshot, not an
8327
+ automatic updater; another CLI version may contain different helper bytes and
8328
+ will preserve differing installed files as conflicts. Neither npm installation
8329
+ alone nor running this command activates the helpers in the agent.
8330
+
8331
+ For older CLI releases use the pinned public installer below with an explicit
8332
+ agent and Project scope. For Copilot that is \`--agent github-copilot --copy\`,
8333
+ which \`skills@1.5.26\` places in project \`.agents/skills/\`. Do not add \`-g\` or
8334
+ \`--all\`. Confirm the complete tree and the actual source selected by Copilot.
8335
+
8336
+ ### Public on-demand channel
8337
+
8338
+ This channel can bootstrap before CLI installation or course authentication.
8339
+ Select a full, retained public CLI master commit containing these helper trees;
8340
+ record it as \`CLI_SKILLS_REF\`. Do not use an unmerged branch SHA as the permanent
8341
+ reference. The installer is separately pinned to the inspected \`skills@1.5.26\`.
8342
+
8343
+ \`\`\`bash
8344
+ : "\${CLI_SKILLS_REF:?Set the full public CLI master SHA containing the helpers}"
8345
+ npx --yes skills@1.5.26 add "https://github.com/przeprogramowani/10x-cli/tree/$CLI_SKILLS_REF/skills" --skill 10x-cli-setup --agent claude-code --copy
8346
+ npx --yes skills@1.5.26 add "https://github.com/przeprogramowani/10x-cli/tree/$CLI_SKILLS_REF/skills" --skill 10x-cli-guide --agent claude-code --copy
8347
+ \`\`\`
8348
+
8349
+ Run only the needed helper's command, from the project root. Project scope is the
8350
+ default; do not add \`--global\`/\`-g\`. \`--copy\` requests a project copy instead of a
8351
+ symlink. \`npx --yes\` accepts running the pinned npm tool; there is deliberately no
8352
+ \`--yes\` argument to \`skills add\`, so its own prompts are retained. Confirm the
8353
+ installer's actual paths and complete references after installation. A helper
8354
+ already managed by CLI should be used/updated through CLI, not overwritten here.
8355
+
8356
+ ### CLI channel
8357
+
8358
+ Use this channel after setup/auth and only with verified skill-filter support and
8359
+ available v4 content. These helpers and the lesson skills \`10x-idea-check\`, \`10x-init\`, \`10x-shape\`, \`10x-prd\` belong to m1l1
8360
+ and inherit course membership and module availability. Their source membership
8361
+ does not prove that the content has been published or unlocked.
8362
+
8363
+ In a separate project from the public copies, or after the explicit takeover
8364
+ below, use the same verified \`10x_cli\` runner:
8365
+
8366
+ \`\`\`bash
8367
+ 10x_cli get m1l1 --type skills --name 10x-cli-setup --course 10xdevs4 --tool claude-code --lang pl --dry-run
8368
+ 10x_cli get m1l1 --type skills --name 10x-cli-setup --course 10xdevs4 --tool claude-code --lang pl
8369
+ 10x_cli get m1l1 --type skills --name 10x-cli-guide --course 10xdevs4 --tool claude-code --lang pl --dry-run
8370
+ 10x_cli get m1l1 --type skills --name 10x-cli-guide --course 10xdevs4 --tool claude-code --lang pl
8371
+ \`\`\`
8372
+
8373
+ Each successful filtered skill download should materialize
8374
+ \`.claude/skills/<canonical-name>/SKILL.md\` and
8375
+ \`.claude/skills/<canonical-name>/references/compatibility.md\`, under lesson ownership
8376
+ \`lessons.m1l1.skills\` in \`.claude/.10x-cli-manifest.json\`, with hashes in
8377
+ \`files.skills\`. Confirm that complete tree and owner from actual output/files.
8378
+ This filter writes only the selected skill, not course rules or the whole lesson.
8379
+
8380
+ ### Changing the owner deliberately
8381
+
8382
+ To move a public copy to CLI, inventory and back up that entire helper outside the
8383
+ managed skill trees, including local changes and installer metadata needed for
8384
+ recovery. Use the original pinned installer's \`remove --help\` and \`remove\` flow to
8385
+ unregister only the selected helper at project scope for the selected agent.
8386
+ Verify that both its registration and destination path/symlink are gone. If
8387
+ anything remains or another owner is present, stop the takeover and preserve it.
8388
+ Then use a filtered skill download and inspect its complete tree and lesson ownership. Merge
8389
+ desired local edits consciously from the backup; do not automatically force them
8390
+ over the downloaded copy. Reopen/read the installed helper after replacement.
8391
+
8392
+ The reverse move has no verified CLI per-skill unregister command in this contract.
8393
+ Use a new isolated project for a public copy; do not hand-edit the CLI manifest or
8394
+ place two updaters over the same files. Normal use does not require any takeover.
8395
+
8396
+ ## Download, use, update
8397
+
8398
+ Prepare lesson 1's four skills, including \`10x-idea-check\` with its references.
8399
+ The launch example remains the existing 10xCards: init → shape → PRD.
8400
+ Idea assessment is optional to run before that chain; install its tree during
8401
+ lesson setup so the learner can use it. Retain a narrower scope when the user
8402
+ explicitly requested only a specific skill.
8403
+ \`10x-plan\` is not available for the launch demonstration. After capability and
8404
+ content checks for each name, inspect each preview before its corresponding write:
8405
+
8406
+ \`\`\`bash
8407
+ 10x_cli get m1l1 --type skills --name 10x-idea-check --course 10xdevs4 --tool claude-code --lang pl --dry-run
8408
+ 10x_cli get m1l1 --type skills --name 10x-idea-check --course 10xdevs4 --tool claude-code --lang pl
8409
+ 10x_cli get m1l1 --type skills --name 10x-init --course 10xdevs4 --tool claude-code --lang pl --dry-run
8410
+ 10x_cli get m1l1 --type skills --name 10x-init --course 10xdevs4 --tool claude-code --lang pl
8411
+ 10x_cli get m1l1 --type skills --name 10x-shape --course 10xdevs4 --tool claude-code --lang pl --dry-run
8412
+ 10x_cli get m1l1 --type skills --name 10x-shape --course 10xdevs4 --tool claude-code --lang pl
8413
+ 10x_cli get m1l1 --type skills --name 10x-prd --course 10xdevs4 --tool claude-code --lang pl --dry-run
8414
+ 10x_cli get m1l1 --type skills --name 10x-prd --course 10xdevs4 --tool claude-code --lang pl
8415
+ \`\`\`
8416
+
8417
+ Require the complete four trees and inspect each installed entrypoint/reference.
8418
+ All checks below must succeed before use; stop on any failure:
8419
+
8420
+ \`\`\`bash
8421
+ test -s .claude/skills/10x-idea-check/SKILL.md
8422
+ test -s .claude/skills/10x-idea-check/references/examples.md
8423
+ test -s .claude/skills/10x-idea-check/references/assessment-guide.md
8424
+ test -s .claude/skills/10x-idea-check/references/10xdevs-4-dates.md
8425
+ test -s .claude/skills/10x-idea-check/references/10xdevs-4-certification.md
8426
+ test -s .claude/skills/10x-init/SKILL.md
8427
+ test -s .claude/skills/10x-shape/SKILL.md
8428
+ test -s .claude/skills/10x-shape/references/prd-schema.md
8429
+ test -s .claude/skills/10x-prd/SKILL.md
8430
+ test -s .claude/skills/10x-prd/../10x-shape/references/prd-schema.md
8431
+ \`\`\`
8432
+
8433
+ PRD reads \`../10x-shape/references/prd-schema.md\` relative to its SKILL.md;
8434
+ isolated PRD download is insufficient. These are the source minimum: preserve
8435
+ additional supporting files in the selected release. Inspect all four names in
8436
+ \`lessons.m1l1.skills\`, their hashes in \`files.skills\`, and the project edition
8437
+ binding. Partial downloads do not establish complete lesson freshness/release identity.
8438
+ Membership in source is candidate evidence; actual filtered availability, full PL
8439
+ references and release identity still need verification for all four names.
8440
+
8441
+ \`CLAUDE-m1l1\` is a separate lesson rule and is not included in these filtered gets.
8442
+ The inspected three skill sources do not require it for the chain. This is not
8443
+ proof that the entire lesson needs no rule: if the learner's lesson instructions
8444
+ require it, inspect an existing rule's provenance, or report the missing
8445
+ prerequisite and ask the lesson/release owner for a supported route before that
8446
+ step. Never invent a command, overwrite a rule or fall back to full lesson get.
8447
+
8448
+ If the learner wants to assess their idea before shaping, have the agent read
8449
+ \`.claude/skills/10x-idea-check/SKILL.md\` and its references and follow that skill.
8450
+ A learner ready to shape can skip assessment. Then read the chain's entrypoints
8451
+ and references in order: init preserves/scaffolds context directories; shape conducts the actual
8452
+ 10xCards discovery with the learner and writes
8453
+ \`context/foundation/shape-notes.md\`; after the learner approves those notes, PRD
8454
+ uses them and the sibling schema to produce \`context/foundation/prd.md\`.
8455
+ Ask for missing lesson inputs; do not manufacture a task.md, product decisions or
8456
+ a finished plan. Respect existing-file collision choices and report actual output
8457
+ paths. Inspect the notes, schema compliance, open questions and preserved local
8458
+ work. Stop at PRD, without stack selection or implementation. Download alone is
8459
+ not use; native slash/$ discovery needs separate agent evidence. Keep private
8460
+ lesson text out of public fixtures. The guide supplies the detailed agent steps.
8461
+
8462
+ Sync below refreshes entire recorded lessons, not only the four skill filters.
8463
+ Preview may include other skills, prompts, configs and course rules; apply only
8464
+ when the user accepts that scope. For a narrow update, repeat the selected skill
8465
+ filter instead. Never use sync to silently bypass a missing lesson-rule prerequisite.
8466
+
8467
+ \`\`\`bash
8468
+ 10x_cli sync --course 10xdevs4 --tool claude-code --lang pl --dry-run
8469
+ 10x_cli sync --course 10xdevs4 --tool claude-code --lang pl
8470
+ \`\`\`
8471
+
8472
+ Normal sync refreshes downloaded owners, including the full lessons that own previously downloaded skills. Avoid \`--all\` for this small journey. Inspect updated,
8473
+ unchanged, conflict/preserved and error outcomes even when exit is 0. Preserve
8474
+ local edits; do not use automatic \`--force\`. Recovery commands must retain the
8475
+ same runner/course/tool/lang, even if an older report omits that context.
8476
+
8477
+ Filtered lesson get (\`m1l1 --type skills --name ...\`) is the supported command
8478
+ used throughout this guide. It preserves other previously downloaded artifacts
8479
+ through partial writes; normal sync later operates at lesson scope. \`--print\` is an
8480
+ inspection surface, not installation: human TTY output can show only SKILL.md,
8481
+ while non-TTY output is JSON. Never redirect it into SKILL.md as a full package.
8482
+
8483
+ | Item to update | Correct channel |
8484
+ |---|---|
8485
+ | npx CLI | Choose and verify a new published version, update the runner pin |
8486
+ | Global npm CLI | \`npm install -g "@przeprogramowani/10x-cli@$CLI_VERSION"\` after selecting/verifying the version |
8487
+ | Standalone CLI | Replace through its verified release asset procedure, then check the actual executable |
8488
+ | Public helper copy | Inspect local changes/ownership; rerun its selected \`skills add\` command with a deliberate new full source SHA |
8489
+ | CLI-owned helper or exercise skill | Repeat its filtered get for a narrow update; \`sync\` refreshes full recorded lessons after preview |
8490
+
8491
+ \`skills update\` is not a substitute for proving an exact selected helper revision;
8492
+ it may follow a different ref/latest. npm install includes helper source files in
8493
+ the package but does not install them into an agent. CLI sync cannot update the
8494
+ CLI executable or a public installer-owned helper.
8495
+
8496
+ ## Diagnostics and evidence boundaries
8497
+
8498
+ Doctor performs auth/access, API, config, version and configured-tool checks.
8499
+ It can return 78 with an outer JSON \`status: "ok"\`; inspect \`data.overall\` and all
8500
+ \`data.checks\`. A missing tool directory before first get can be expected. Explain
8501
+ only that failure as pre-download state; do not ignore auth/network/permissions.
8502
+ The inspected doctor has no \`--tool\` or \`--course\` flags and may report a different
8503
+ configured profile/course from this journey's explicit command context.
8504
+
8505
+ Configuration is under \`$XDG_CONFIG_HOME/10x-cli\` on macOS/Linux when nonempty,
8506
+ otherwise \`~/.config/10x-cli\`. Windows uses \`%APPDATA%/10x-cli\`, falling back to
8507
+ the user's \`AppData/Roaming/10x-cli\`. Inspect only needed nonsecret preferences;
8508
+ do not dump credentials or reset the entire config directory. Auth validity and
8509
+ live course access are distinct: inspect \`access_checked\`/access errors, not only
8510
+ the status exit. Login is user-operated and may send email.
8511
+
8512
+ Full acceptance needs real package/version/integrity/source and endpoint/content
8513
+ release evidence, both helper channels, complete support files, and an actual
8514
+ agent task transcript for macOS/zsh/Claude Code/PL. Local builds and fixtures can
8515
+ check structure/conflicts but cannot prove publication, course unlock or this
8516
+ user's entitlement. Other platforms/profiles and EN/PL transformed content need
8517
+ their own evidence; do not imply a Windows or translated-content walkthrough ran.
8518
+ `;
8519
+
8520
+ // src/lib/bundled-helpers.ts
8521
+ var BUNDLED_HELPERS = {
8522
+ "10x-cli-setup": { "SKILL.md": SKILL_default, "references/compatibility.md": compatibility_default },
8523
+ "10x-cli-guide": { "SKILL.md": SKILL_default2, "references/compatibility.md": compatibility_default2 }
8524
+ };
8525
+
8526
+ // src/commands/helpers.ts
8527
+ function registerHelpersCommand(cli) {
8528
+ cli.command("helpers <action>", "Install both bundled public CLI helpers into this project (action: install)").option("--tool <tool>", `Choose the target explicitly: ${Object.keys(PROFILES).join(", ")}`).option("--dry-run", "Check paths and conflicts without writing files").action((action, flags) => {
8529
+ const ctx = resolveContext(flags);
8530
+ const profile = typeof flags.tool === "string" ? getToolProfile(flags.tool) : undefined;
8531
+ if (action !== "install" || !profile || typeof profile.toolId !== "string") {
8532
+ outputError(ctx, "usage", "Choose install and a supported target tool explicitly.", ExitCodes.USAGE, "Run '10x helpers install --tool copilot' from your project, or choose another tool from '10x helpers --help'.");
8533
+ }
8534
+ const root = process.cwd();
8535
+ try {
8536
+ const files = Object.entries(BUNDLED_HELPERS).flatMap(([name, tree]) => Object.entries(tree).map(([file, content]) => {
8537
+ const path = join11(profile.skillDir(name), file);
8538
+ const absolute = resolve3(root, path);
8539
+ assertProjectFilePath(root, absolute);
8540
+ const state = !existsSync10(absolute) ? "missing" : readFileSync9(absolute).equals(Buffer.from(content)) ? "unchanged" : "conflict";
8541
+ return { path, absolute, content, state };
8542
+ }));
8543
+ const conflicts = files.filter((file) => file.state === "conflict");
8544
+ if (conflicts.length) {
8545
+ outputError(ctx, "helper_conflict", `Existing helper files differ: ${conflicts.map((f2) => f2.path).join(", ")}. No files were written.`, ExitCodes.ERROR, "Keep your existing helpers, or back them up outside the skill directories before retrying '10x helpers install --tool " + profile.toolId + "'.");
8546
+ }
8547
+ const results = [];
8548
+ for (const file of files) {
8549
+ if (file.state === "missing" && !flags.dryRun) {
8550
+ assertProjectFilePath(root, file.absolute);
8551
+ mkdirSync6(dirname6(file.absolute), { recursive: true });
8552
+ assertProjectFilePath(root, file.absolute);
8553
+ writeFileSync6(file.absolute, file.content, { flag: "wx" });
8554
+ }
8555
+ results.push({ path: file.path, action: file.state === "unchanged" ? "unchanged" : flags.dryRun ? "would_create" : "created" });
8556
+ }
8557
+ output(ctx, `${flags.dryRun ? "Helper preview" : "Helpers ready"} for ${profile.displayName} in this project.
8558
+ ${results.map((f2) => `${f2.action}: ${f2.path}`).join(`
8559
+ `)}`, { version: package_default.version, scope: "project", tool: profile.toolId, dryRun: !!flags.dryRun, files: results });
8560
+ } catch (error) {
8561
+ outputError(ctx, "helper_install_failed", `Could not complete helper installation: ${error instanceof Error ? error.message : String(error)}.`, ExitCodes.ERROR, "Inspect the reported path and preserve existing files; any files already created remain available when you retry '10x helpers install --tool " + profile.toolId + "'.");
8562
+ }
8563
+ });
8564
+ }
8565
+
7441
8566
  // src/commands/list.ts
7442
8567
  function registerListCommand(cli) {
7443
8568
  cli.command("list [module]", "Browse available modules and lessons").option("--course <course>", "Select course ID or slug (default: project edition or API recommendation)").action(async (moduleArg, options) => {
@@ -7588,11 +8713,11 @@ function renderModuleDetail(ctx, module, course, reason) {
7588
8713
  }
7589
8714
 
7590
8715
  // src/commands/sync.ts
7591
- import { join as join12 } from "node:path";
8716
+ import { join as join13 } from "node:path";
7592
8717
 
7593
8718
  // src/lib/sync-freshness.ts
7594
- import { existsSync as existsSync10, readFileSync as readFileSync9 } from "node:fs";
7595
- import { join as join11 } from "node:path";
8719
+ import { existsSync as existsSync11, readFileSync as readFileSync10 } from "node:fs";
8720
+ import { join as join12 } from "node:path";
7596
8721
  function isLessonFresh(root, manifest, id, profile, lang, courseRules) {
7597
8722
  const lesson = manifest?.lessons?.[id];
7598
8723
  const representation = lesson?.representation;
@@ -7600,25 +8725,25 @@ function isLessonFresh(root, manifest, id, profile, lang, courseRules) {
7600
8725
  return false;
7601
8726
  const matches = (path, hash) => {
7602
8727
  assertProjectFilePath(root, path);
7603
- return !!hash && existsSync10(path) && contentHash(readFileSync9(path)) === hash;
8728
+ return !!hash && existsSync11(path) && contentHash(readFileSync10(path)) === hash;
7604
8729
  };
7605
8730
  try {
7606
8731
  for (const [name, skill] of Object.entries(lesson.skills)) {
7607
8732
  if (!isSafeName(name))
7608
8733
  return false;
7609
8734
  for (const file of skill.files)
7610
- if (!isSafeSkillFilePath(file) || !matches(join11(root, profile.skillDir(name), file), manifest.files.skills[name]?.contentHashes?.[file]))
8735
+ if (!isSafeSkillFilePath(file) || !matches(join12(root, profile.skillDir(name), file), manifest.files.skills[name]?.contentHashes?.[file]))
7611
8736
  return false;
7612
8737
  }
7613
8738
  for (const name of lesson.prompts)
7614
- if (!isSafeName(name) || !matches(join11(root, profile.promptPath(name.replace(/\.md$/, ""))), manifest.files.promptHashes?.[name]))
8739
+ if (!isSafeName(name) || !matches(join12(root, profile.promptPath(name.replace(/\.md$/, ""))), manifest.files.promptHashes?.[name]))
7615
8740
  return false;
7616
8741
  for (const name of lesson.configs)
7617
- if (!isSafeName(name) || !matches(join11(root, profile.configPath(name)), manifest.files.configHashes?.[name]))
8742
+ if (!isSafeName(name) || !matches(join12(root, profile.configPath(name)), manifest.files.configHashes?.[name]))
7618
8743
  return false;
7619
- const rulesPath = join11(root, profile.rulesFile);
8744
+ const rulesPath = join12(root, profile.rulesFile);
7620
8745
  assertProjectFilePath(root, rulesPath);
7621
- const existing = existsSync10(rulesPath) ? readFileSync9(rulesPath, "utf8") : "";
8746
+ const existing = existsSync11(rulesPath) ? readFileSync10(rulesPath, "utf8") : "";
7622
8747
  const block = inspectRulesBlock(existing, profile.sentinelBegin, profile.sentinelEnd);
7623
8748
  if (representation.rules) {
7624
8749
  const rules = manifest.managedRules;
@@ -7677,7 +8802,7 @@ async function runSync(ctx, options) {
7677
8802
  }
7678
8803
  return true;
7679
8804
  });
7680
- const manifest = readManifest(join12(process.cwd(), profile.manifestDir));
8805
+ const manifest = readManifest(join13(process.cwd(), profile.manifestDir));
7681
8806
  const manifestLessonIds = new Set(manifest?.lessons ? Object.keys(manifest.lessons) : manifest ? [manifest.lessonId] : []);
7682
8807
  let targets = unlocked;
7683
8808
  if (moduleFilter !== undefined)
@@ -7735,7 +8860,7 @@ async function runSync(ctx, options) {
7735
8860
  }
7736
8861
  }
7737
8862
  async function syncLesson(ctx, lesson, opts) {
7738
- const currentManifest = readManifest(join12(process.cwd(), opts.profile.manifestDir));
8863
+ const currentManifest = readManifest(join13(process.cwd(), opts.profile.manifestDir));
7739
8864
  const stored = currentManifest?.lessons?.[lesson.lessonId]?.catalogContentHash;
7740
8865
  if (!opts.force && lesson.contentHash !== undefined && stored !== undefined && lesson.contentHash === stored && isLessonFresh(process.cwd(), currentManifest, lesson.lessonId, opts.profile, opts.lang, opts.applyCourseRules)) {
7741
8866
  verbose(ctx, `${lesson.lessonId}: upstream unchanged (digest match) — skipping fetch`);
@@ -8080,6 +9205,7 @@ cli.option("--json", "Output as JSON (auto-detected when piped)");
8080
9205
  cli.option("--verbose", "Show detailed output on stderr");
8081
9206
  registerAuthCommand(cli);
8082
9207
  registerGetCommand(cli);
9208
+ registerHelpersCommand(cli);
8083
9209
  registerListCommand(cli);
8084
9210
  registerSyncCommand(cli);
8085
9211
  registerDoctorCommand(cli);