@tackup/cli 0.0.0 → 0.1.0

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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -1
  3. package/dist/builtins/extensions/docs/guides/day-two.md +3 -0
  4. package/dist/builtins/extensions/docs/guides/onboarding-2.md +3 -0
  5. package/dist/builtins/extensions/docs/guides/onboarding-3.md +3 -0
  6. package/dist/builtins/extensions/docs/skills/use-tack-docs/SKILL.md +67 -0
  7. package/dist/builtins/extensions/docs/skills/use-tack-docs/references/declare-docs.md +71 -0
  8. package/dist/builtins/extensions/docs/skills/use-tack-docs/references/docs-in-profiles.md +25 -0
  9. package/dist/builtins/extensions/docs/skills/use-tack-docs/references/docs-maintenance.md +35 -0
  10. package/dist/builtins/extensions/docs/skills/use-tack-docs/references/review.md +34 -0
  11. package/dist/builtins/extensions/docs/skills/write-reader-figures/SKILL.md +66 -0
  12. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figure-components.md +20 -0
  13. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/architecture-map.md +86 -0
  14. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/chart.md +52 -0
  15. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/figure.md +79 -0
  16. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/file-tree.md +74 -0
  17. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/schema.md +116 -0
  18. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/system.md +81 -0
  19. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/figures/walkthrough.md +45 -0
  20. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/page-components.md +82 -0
  21. package/dist/builtins/extensions/docs/skills/write-reader-figures/references/rules.md +27 -0
  22. package/dist/builtins/extensions/docs/tack.yaml +10 -0
  23. package/dist/builtins/extensions/scripts/guides/day-two.md +3 -0
  24. package/dist/builtins/extensions/scripts/guides/onboarding-2.md +3 -0
  25. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/SKILL.md +48 -0
  26. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/run-scripts.md +23 -0
  27. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/script-api.md +76 -0
  28. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/scripts-in-profiles.md +35 -0
  29. package/dist/builtins/extensions/scripts/skills/author-tack-scripts/references/scripts-in-sources.md +56 -0
  30. package/dist/builtins/extensions/scripts/tack.yaml +10 -0
  31. package/dist/builtins/skills/author-tack-profiles/SKILL.md +68 -0
  32. package/dist/builtins/skills/author-tack-profiles/references/apply.md +33 -0
  33. package/dist/builtins/skills/author-tack-profiles/references/bundles.md +59 -0
  34. package/dist/builtins/skills/author-tack-profiles/references/copy-workflows.md +46 -0
  35. package/dist/builtins/skills/manage-tack-sources/SKILL.md +75 -0
  36. package/dist/builtins/skills/manage-tack-sources/references/catalog-issues.md +38 -0
  37. package/dist/builtins/skills/manage-tack-sources/references/metadata.md +35 -0
  38. package/dist/builtins/skills/manage-tack-sources/references/tack-yaml.md +114 -0
  39. package/dist/builtins/skills/manage-tack-sources/references/worked-source.md +126 -0
  40. package/dist/builtins/skills/prepare-tack-checkout/SKILL.md +52 -0
  41. package/dist/builtins/skills/use-tack/SKILL.md +65 -0
  42. package/dist/builtins/skills/use-tack/references/agent-instructions.md +38 -0
  43. package/dist/builtins/skills/use-tack/references/day-two.md +35 -0
  44. package/dist/builtins/skills/use-tack/references/explore.md +13 -0
  45. package/dist/builtins/skills/use-tack/references/imports.md +30 -0
  46. package/dist/builtins/skills/use-tack/references/maintenance.md +51 -0
  47. package/dist/builtins/skills/use-tack/references/onboarding-2.md +41 -0
  48. package/dist/builtins/skills/use-tack/references/onboarding-3.md +29 -0
  49. package/dist/builtins/skills/use-tack/references/onboarding.md +54 -0
  50. package/dist/builtins/skills/use-tack/references/output.md +15 -0
  51. package/dist/builtins/skills/use-tack/references/selection.md +61 -0
  52. package/dist/builtins/skills/use-tack/references/setup.md +69 -0
  53. package/dist/builtins/tack.yaml +10 -0
  54. package/dist/bundle-support-ZGTM5CTZ.js +16 -0
  55. package/dist/chunk-CFUDY2NO.js +1791 -0
  56. package/dist/chunk-CRQMJGMU.js +225 -0
  57. package/dist/chunk-DCX5T7CG.js +281 -0
  58. package/dist/chunk-EZ5C7B2M.js +28 -0
  59. package/dist/chunk-H4AG4WIV.js +52 -0
  60. package/dist/chunk-I5RMMV2Y.js +18013 -0
  61. package/dist/chunk-JL3E32X5.js +92 -0
  62. package/dist/chunk-MR5PTCYF.js +26 -0
  63. package/dist/chunk-PHQL7OBB.js +162 -0
  64. package/dist/chunk-QQBCYPJZ.js +5733 -0
  65. package/dist/chunk-T6JAU547.js +12401 -0
  66. package/dist/chunk-W7GHLGII.js +16 -0
  67. package/dist/chunk-XARHV5M4.js +56 -0
  68. package/dist/chunk-XZH2XPII.js +1017 -0
  69. package/dist/chunk-ZT6BO7LG.js +36671 -0
  70. package/dist/corpus-effects-YWG5VVHJ.js +12069 -0
  71. package/dist/elk.bundled-EVXDSFFG.js +94125 -0
  72. package/dist/main-JHULX3QY.js +65517 -0
  73. package/dist/main.js +17 -0
  74. package/dist/reader/visuals.tsx +368 -0
  75. package/dist/script.d.ts +133 -0
  76. package/dist/script.js +90 -0
  77. package/dist/server-XF7NSYRQ.js +308 -0
  78. package/dist/src-DZKPD6VY.js +1871 -0
  79. package/dist/src-TC3RTKIS.js +1126 -0
  80. package/dist/tack-env.d.ts +137 -0
  81. package/dist/third-party-licenses.txt +2467 -0
  82. package/dist/worker-ZFY6P7X5.js +24246 -0
  83. package/package.json +29 -3
@@ -0,0 +1,126 @@
1
+ # Worked source: quality tools
2
+
3
+ This example uses three separately registered directories: `quality-tools`, `base-skills` and `audit-tools`. Source labels describe the content. Register all three before checking dependencies.
4
+
5
+ ## Declare several resource paths
6
+
7
+ Create this layout in `quality-tools`:
8
+
9
+ ```text
10
+ quality-tools/
11
+ tack.yaml
12
+ skills/
13
+ delivery/review/SKILL.md
14
+ delivery/review/references/checklist.md
15
+ delivery/_drafts/experiment/SKILL.md
16
+ git/SKILL.md
17
+ vendor/skills/format/SKILL.md
18
+ labs/one-off/SKILL.md
19
+ commands/release.md
20
+ prompts/review.md
21
+ context/architecture.md
22
+ context/generated/snapshot.md
23
+ ```
24
+
25
+ Write `quality-tools/tack.yaml`:
26
+
27
+ ```yaml
28
+ version: 1
29
+ name: quality-tools
30
+ maintainers: [platform-team]
31
+ depends-on: [base-skills, audit-tools]
32
+ skills:
33
+ - path: skills
34
+ include: ["delivery/**", "git"]
35
+ exclude: ["**/_*/**"]
36
+ - path: vendor/skills
37
+ - path: labs/one-off
38
+ commands:
39
+ - path: commands
40
+ include: ["**/*.md"]
41
+ - path: prompts/review.md
42
+ context:
43
+ - path: context
44
+ include: ["**/*.md"]
45
+ exclude: ["generated/**"]
46
+ ```
47
+
48
+ The skill names are `review`, `git`, `format` and `one-off`. `delivery` is a group folder; it never prefixes `review`. Every skill's frontmatter name must match its folder. `references/checklist.md` is content delivered with `review`. A skill is a leaf: another `SKILL.md` inside `review` would remain content, not become a second skill.
49
+
50
+ Patterns match paths relative to each declared folder. Under `skills`, `delivery/review` matches `delivery/**`; `delivery/_drafts/` matches the exclude and is not entered. `git` is included explicitly. Under `context`, `architecture.md` loads and `generated/snapshot.md` does not. The single-skill entry `labs/one-off` takes no patterns. The three skills paths are disjoint: do not also declare `skills/delivery`, because it overlaps `skills`, whose walk enters `delivery`. Only an `exclude` that prunes `delivery` on the `skills` entry would end that overlap; an `include` does not.
51
+
52
+ The command `review` and skill `review` coexist because they have different kinds.
53
+
54
+ ## Pair source dependencies with skill metadata
55
+
56
+ The separate `base-skills` directory holds its skills at its top, such as `lint/SKILL.md`, and nothing else, so its skills entry is the source folder itself, `.` (`tack source add PATH --config -` writes it from the same declaration as JSON):
57
+
58
+ ```yaml
59
+ version: 1
60
+ name: base-skills
61
+ skills:
62
+ - path: .
63
+ ```
64
+
65
+ In `audit-tools`, provide `skills/lint/SKILL.md`:
66
+
67
+ ```yaml
68
+ version: 1
69
+ name: audit-tools
70
+ skills:
71
+ - path: skills
72
+ ```
73
+
74
+ Each `lint/SKILL.md` needs `name: lint` and a non-empty description. In `quality-tools/skills/delivery/review/SKILL.md`, write:
75
+
76
+ ```markdown
77
+ ---
78
+ name: review
79
+ description: Review a change using the repository checks and lint guidance.
80
+ metadata:
81
+ tack: |
82
+ version: 1
83
+ activation: opt-in
84
+ user-activation: opt-in
85
+ dependencies:
86
+ - kind: skill
87
+ name: git
88
+ - kind: skill
89
+ name: lint
90
+ source: base-skills
91
+ - kind: command
92
+ name: release
93
+ optional: true
94
+ ---
95
+
96
+ Read references/checklist.md before reviewing the change.
97
+ ```
98
+
99
+ `git` resolves in the requester's own source, `quality-tools`. `lint` resolves in `base-skills`, which `depends-on` allows. The optional edge to the local `release` command is followed only when optional dependencies are requested. `depends-on` alone selects nothing: the per-resource edges say which resources are needed. Required edges can select opt-in dependencies; an explicit exclusion blocks the requester. See [metadata rules](metadata.md) for activation defaults.
100
+
101
+ ## Resolve name clashes
102
+
103
+ Both dependency sources provide a skill called `lint`. They are healthy resources with distinct identities. If the `review` dependency omitted `source: base-skills`, both declared sources would match and block `review`. Keep the explicit `source` on that edge. For an operator choice, use a qualified reference such as `tack pick include base-skills:lint --project PROJECT`. Qualification chooses a candidate; including both skills still causes a delivery collision. If both are selected by default, explicitly include the desired candidate or exclude the other.
104
+
105
+ Within `quality-tools`, adding `vendor/skills/review/SKILL.md` would instead duplicate the same kind and name in one source. Both skills would be quarantined, and `quality-tools:review` would not resolve the duplicate. Rename the new folder to `vendor-review` and its frontmatter to `name: vendor-review`, or exclude `review` from the `vendor/skills` declaration. No source label can distinguish two same-kind resources inside one source. Two sources with the same label also need distinct `name` values before that label can qualify references.
106
+
107
+ ## Check the authored source
108
+
109
+ Create the files before registration. Write each `tack.yaml` by hand, or give its declaration as JSON to `tack source add PATH --config '<json>'`, which previews the `tack.yaml` it writes and checks it as `tack check` does. `source add` previews each existing `tack.yaml` as it is, with the links its `--apply` makes; `--apply` registers it and links its default resources in every registered project and for the user. Check each source before registration, repair local findings, then initialize state if absent. Use absolute paths for the three source directories:
110
+
111
+ ```sh
112
+ tack check /absolute/path/base-skills
113
+ tack check /absolute/path/audit-tools
114
+ tack check /absolute/path/quality-tools
115
+ # Fix local findings and repeat the checks until clean.
116
+ tack init # if Tack is not set up; it writes at once
117
+ tack source add /absolute/path/base-skills # preview; read it, then add --apply
118
+ tack source add /absolute/path/base-skills --apply
119
+ tack source add /absolute/path/audit-tools --apply
120
+ tack source add /absolute/path/quality-tools --apply
121
+ tack source
122
+ tack catalog --details
123
+ tack doctor
124
+ ```
125
+
126
+ Read every declaration's count and problems. An empty declaration is valid, so an exit code alone does not prove that a pattern found the intended resources. Fix every catalog issue, then check again. The qualified choices above change state immediately; register a test project before trying them. Preview `tack sync --project PROJECT` before applying delivery.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: prepare-tack-checkout
3
+ description: Link a repository's Tack skills before you work in it. Use at the start of work in a repository whose AGENTS.md or CLAUDE.md has a Tack section, or whose root has a tack.yaml, and in every new clone or worktree of one. Use use-tack for any other Tack command.
4
+ metadata:
5
+ tack: |
6
+ version: 1
7
+ activation: opt-in
8
+ user-activation: default
9
+ ---
10
+
11
+ # Prepare a Tack checkout
12
+
13
+ Run this once at the start of work in a repository. When nothing is missing it takes two commands. Run every command from the repository root. Follow the `use-tack` output rules: read the text view, follow its `Next`.
14
+
15
+ Guided or worker mode follows the onboarding guide (`tack guide onboarding`): worker mode only when your instructions say no person will answer, or `CI` is set. In guided mode, say in one sentence what a step changes before a command that writes, and close with what is now linked.
16
+
17
+ ## 1. Does this repository use Tack?
18
+
19
+ Look in AGENTS.md, CLAUDE.md and the files they import for a section between the comments `tack-block` and `/tack-block`, and at the root for `tack.yaml`. With neither, stop: this skill does not apply. Do not add the section yourself; `use-tack` offers it during setup.
20
+
21
+ ## 2. Is Tack installed?
22
+
23
+ Run `command -v tack`. If it finds nothing, stop and report: "Tack is not installed: no tack on PATH. Install it with npm install --global @tackup/cli." Install it only when your instructions say so.
24
+
25
+ ## 3. Is this checkout registered?
26
+
27
+ Run `tack status`.
28
+
29
+ - The first line names a project: it is registered. Go to step 5.
30
+ - `bare-target-requires-registered-root`: go to step 4. Its message says whether this is a worktree of a registered project or a repository no project registers.
31
+ - `state-not-initialized` or another `state-*` code: stop and report it. Setting up the machine is the onboarding guide's work (`tack guide onboarding`), not this skill's.
32
+
33
+ ## 4. Register it
34
+
35
+ - A worktree of a registered project: run `tack project refresh --apply`.
36
+ - A new clone, or a repository Tack does not know: preview `tack project add PROJECT` with the project name the Tack section gives, then run it with `--apply`, which also links: go to step 6. A clone is a separate project: picks do not carry over from the original. If the name is taken (`project-registration-conflict`), another clone on this machine holds it. Guided: ask for a name. Worker: use `PROJECT-FOLDER`, with this folder's name, and report it. Without a Tack section, use the name the status `Next` suggests.
37
+
38
+ ## 5. Link
39
+
40
+ Run `tack sync`, read its targets, then `tack sync --apply`. It reconciles every worktree of the project, not only this one. Report a `! partial` line and continue.
41
+
42
+ ## 6. Confirm
43
+
44
+ Run `tack status`. The first line must read `✓ success`; report anything else.
45
+
46
+ Skills linked during this session may not load until the next session. Read one by path in your agent's folder, such as `.claude/skills/NAME/SKILL.md`, when needed now.
47
+
48
+ ## Approval
49
+
50
+ The Tack section is the user's standing approval for steps 4 and 5 for this project only. Without the section, a `tack.yaml` alone approves nothing: ask before step 4 in guided mode, and report it in worker mode. Anything else (a pick, `source add`, an adapter, `init`, editing the section) needs the user, or your instructions in worker mode.
51
+
52
+ The section opens with its version, `tack-block v1`. When it carries an older version, offer the current text from the `use-tack` agent instructions reference for every file that holds the section in guided mode, and report it in worker mode.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: use-tack
3
+ description: Operate Tack, which manages cross-agent skills, commands and context. Use for any `tack` command - discover resources, pick and sync them into Claude Code, Codex, Cursor, GitHub Copilot CLI, Gemini CLI, Cline, OpenCode or Pi, check health and upgrades. To create or edit a source, use the `manage-tack-sources` skill.
4
+ metadata:
5
+ tack: |
6
+ version: 1
7
+ activation: opt-in
8
+ user-activation: default
9
+ ---
10
+
11
+ # Use Tack
12
+
13
+ Tack links skills and commands from registered sources into supported agents. Source files stay where they are. Extensions add tools; `tack extension` lists them, and each one that is on brings its own skill.
14
+
15
+ - First-time setup, or a request to set up Tack: run `tack guide onboarding` and follow it, through the part each part names last.
16
+ - A new project, worktree, clone, source or skill after setup, or an agent or a profile turned on or off: `tack guide day-two`.
17
+ - Start of work in a repository that uses Tack: the `prepare-tack-checkout` skill.
18
+ - Creating or changing a source: `manage-tack-sources`. Profiles and bundles: `author-tack-profiles`.
19
+
20
+ Read the reference for the topic of the task:
21
+
22
+ - [setup](references/setup.md): `init`, built-in skills, sources and projects, upgrade, state.
23
+ - [selection](references/selection.md): defaults, picks, `sync`, adapters and delivery paths.
24
+ - [imports](references/imports.md): copy skills from GitHub into a source.
25
+ - [maintenance](references/maintenance.md): refresh, cleanup, removals, links in the way, checks.
26
+ - [output](references/output.md): the JSON envelope and exit codes.
27
+ - [explore](references/explore.md): `tack explore`, the operator's terminal editor. Under an agent it fails with `terminal-required`: use `tack catalog`, `tack status` and `tack pick`.
28
+
29
+ ## Output
30
+
31
+ Tack prints a compact text view. The first line names the command and its status (`✓ success`, `! partial` or `✗` with the failure class), diagnostics carry a code, and a `Next` section lists the exact commands to run next. Follow `Next` before guessing a command. `! partial` exits `1`: the command ran and something needs attention. Text views change in any build: read them, never parse them.
32
+
33
+ Add `--json` after `tack` only for exact state fields or a structured answer. Only `status`, `sync`, `init`, `doctor`, `upgrade` (with `upgrade status`) and `--version` carry a stable payload, and so does a docs command its own skill names; every other command's JSON has no schema ([JSON output](references/output.md#json-output)).
34
+
35
+ ## Stay in scope
36
+
37
+ Do only what was asked: do not pick or sync beyond the request, and preview before any change. Use `--help` only for the command the task needs, and skip broad inventory sweeps of `catalog`, `source`, `project`, `adapter` and `doctor`, except during onboarding.
38
+
39
+ ## Executable, state and selectors
40
+
41
+ Find the executable once per session: `tack` if `command -v tack` finds it. If there is none, report exactly: "Tack is not installed: no tack on PATH. Install it with npm install --global @tackup/cli." Installing and upgrading Tack is the operator's decision: `tack upgrade` names the command, and `tack init` then relinks the built-in skills. `tack init` writes at once, with no preview, and is safe to repeat.
42
+
43
+ State defaults to `~/.tack`; `TACK_STATE_DIR` or a root `--state-dir PATH` selects another. Keep one state directory throughout a workflow. Run a Tack checkout as `bun run --cwd <checkout> tack ...` with its own `--state-dir`.
44
+
45
+ Pass an explicit selector: `--project PROJECT` for a registered project (its name, never a path; `tack project` lists them), `--user` for the user target. Never combine selectors, or pair one with `--cwd`. A request to add a skill "for me", "everywhere" or "globally" means `--user`: user-level links reach every project's agent sessions.
46
+
47
+ Without a selector, `sync`, `status`, `state clean` and `project refresh` select the project containing the current directory or `--cwd PATH`. Outside a project a bare request fails: do not add `--all` in response; follow its Next (`project refresh --apply` in a new worktree, `project add NAME` in an unregistered repository), pass `--project PROJECT`, or report the failure. `--all` selects every project and the user target; use it only when the operator asks for every project by name or number, such as "every project and my user links".
48
+
49
+ An adapter is machine-wide: `adapter enable` and `adapter disable` change the user target and every project. No setting covers one project; `sync --adapter`, `state clean` and `pick exclude` cannot emulate one. State that scope before you apply, and ask first when the request names one project.
50
+
51
+ Built-in skills ship with Tack and are always delivered; `pick` refuses them with `builtin-skill-locked`.
52
+
53
+ ## Find and deliver
54
+
55
+ Read-only commands, each for the fact the task needs: `tack catalog`, `tack doctor`, `tack source`, `tack project`, `tack adapter`, `tack profile` and `tack status --project PROJECT` or `--user`.
56
+
57
+ To deliver a registered skill: `tack pick include SOURCE:NAME --project PROJECT`, then preview `tack sync --project PROJECT` and apply it with `--apply`. A preview that plans nothing usually means the skill is not picked yet. Read the first line and the unit headings of a `sync` preview, and state its selector and targets in your reply before you apply.
58
+
59
+ ## Preview, apply and verify
60
+
61
+ `sync`, `project add`, `project refresh`, `project remove`, `source remove`, `adapter enable`, `adapter disable`, `state clean`, `state reset`, `import add`, `import remove` and `source add` preview by default: inspect the plan, then add `--apply` within the requested task. `source add --apply` also runs `sync --all --source` for it, and `project add --apply` runs `sync --project` for the new project. `source relocate`, choices, `profile enable` and `disable`, `extension enable` and `disable`, and `tack init` persist immediately.
62
+
63
+ Read the reason beside each planned removal before applying. `source-unhealthy`, `quarantined` and the diagnostic `profile-layer-unresolved` mean a broken file, not a choice: fix it with `tack check <source-path>` instead of applying the removal. After applying, run `status` for the same scope and fix what it reports. Leave foreign files and drifted links in place: Tack's ownership evidence decides what it may remove ([links in the way](references/maintenance.md#removal-reasons-and-links-in-the-way)). `tack state reset --apply` answers only an explicit request to remove all Tack-managed links and state.
64
+
65
+ For authoring, loop: write files, run `tack check PATH...`, repeat until clean. Errors exit 1, warnings exit 0.
@@ -0,0 +1,38 @@
1
+ # The Tack section in a project's agent instructions
2
+
3
+ The section tells agents in a new clone or worktree of the repository to link its Tack skills before they work. Agents load the instructions file at the start of every session, so the section names the `prepare-tack-checkout` skill, which holds the steps.
4
+
5
+ ## When and how to offer it
6
+
7
+ Offer it once per project, after its first sync. It is the user's file: show the exact text, say what a yes means, and write it only on yes. Show the change after you write it. Never commit it. Worker mode: write it only when your instructions say so; otherwise list it in your report.
8
+
9
+ A yes is the user's standing approval for the section's commands (`tack project refresh --apply`, `tack project add --apply` for a new clone, `tack sync --apply`) for this project only. Agents in a new checkout then run them without asking. Everything else still needs the user.
10
+
11
+ ## Which file
12
+
13
+ - Only `AGENTS.md` exists: write it there.
14
+ - Both exist and `CLAUDE.md` imports `AGENTS.md` (a line `@AGENTS.md`): write it to `AGENTS.md` only. Claude Code reads it through the import; a second copy would load twice.
15
+ - Both exist otherwise: write it to both. Claude Code reads `AGENTS.md` only when there is no `CLAUDE.md`, or when `CLAUDE.md` imports it, so the other agents read `AGENTS.md` and Claude Code reads `CLAUDE.md`.
16
+ - Only `CLAUDE.md` exists: ask whether to add it to `CLAUDE.md`, or to create `AGENTS.md` with the section and add the line `@AGENTS.md` to `CLAUDE.md`.
17
+ - Neither exists: create `AGENTS.md`, after asking; Claude Code reads it while there is no `CLAUDE.md`. Never create `CLAUDE.md`.
18
+
19
+ Do not touch `.cursor/rules`. Replace an existing section between the same comments; never add a second one to a file.
20
+
21
+ ## The section
22
+
23
+ Write exactly this, with `PROJECT` replaced by the project name:
24
+
25
+ ```md
26
+ <!-- tack-block v1 -->
27
+
28
+ ## Tack
29
+
30
+ This repository's agent skills come from Tack (project `PROJECT`). Before you work in a
31
+ new clone or worktree, load the `prepare-tack-checkout` skill. Without it, run from the
32
+ repository root: `tack project refresh --apply`, then `tack sync` and `tack sync --apply`. In a
33
+ clone Tack does not know, run `tack project add PROJECT --apply` instead: it registers and links
34
+ the clone. If `tack` is missing, tell the user: it installs with `npm install --global @tackup/cli`.
35
+ <!-- /tack-block -->
36
+ ```
37
+
38
+ The section names no path of this machine, so it is safe to commit. A new release may change the version in its first comment; `prepare-tack-checkout` then offers the new text.
@@ -0,0 +1,35 @@
1
+ # After setup: projects, sources and agents
2
+
3
+ Show the previews of a change together and wait for the person's yes before `--apply` (worker mode: your instructions are the approval). Name every command that writes at once before you run it.
4
+
5
+ ## A new project
6
+
7
+ From inside the repository: `tack project add NAME` previews the registration and the links its `--apply` makes; after the yes, `tack project add NAME --apply` registers the project and links it. Report the hand-made entries `project add` lists; they stay in place. Then offer the Tack section for the project's `AGENTS.md`: run `tack guide agent-instructions` and follow it. Ask whether the links are committed or ignored; Tack never edits `.gitignore`. `tack status --project NAME --details` prints the ignore lines under "For .gitignore in project NAME".
8
+
9
+ ## A new worktree or clone
10
+
11
+ Follow the `prepare-tack-checkout` skill. Without it, from the new worktree: `tack project refresh --apply`, then `tack sync` and `tack sync --apply`. A clone is a separate repository: register and link it with `tack project add NAME` and `--apply`, under a new name, instead.
12
+
13
+ ## A new source
14
+
15
+ Declare it with the `manage-tack-sources` skill. `tack source add PATH` previews the registration and what it links: the source's default skills in every project and for the user, and no other source's pending change. After the yes, the same command with `--apply` registers and links them.
16
+
17
+ ## A new skill in a registered source
18
+
19
+ Write it inside a declared skills folder, run `tack check PATH` (no path checks the current folder), then `tack sync --all --source SOURCE`, which plans that source's links only. An edit to an existing skill needs no sync: the links point at the source. A project that ignores its links needs a line for each new link: show the new lines from `tack status --project NAME --details`.
20
+
21
+ ## A skill everywhere
22
+
23
+ `tack pick include SOURCE:NAME --user` (writes at once), then `tack sync --user` and `--apply`. A project that also selects the skill keeps no link of its own: its sync preview shows the skill as `skip … linked for the user`, and removes a link the project already had.
24
+
25
+ ## Turn a profile on or off
26
+
27
+ `tack profile` lists what can be turned on. `tack profile enable SOURCE:PROFILE --project PROJECT` (or `--user`) and `tack profile disable` write at once and change no pick, so name the command and get the yes before you run it. Then `tack sync --project PROJECT` previews the links; after the yes, `--apply`. Report the members that join or leave, the ones the person's excludes keep out, and the way back: the other command and a sync, which returns to exactly their own picks and defaults. Never copy members into picks to emulate it, and never use `tack profile apply` for it: apply is one-way and erases the project's own selection.
28
+
29
+ ## Turn an agent on or off
30
+
31
+ An adapter is machine-wide: `tack adapter enable ID` and `tack adapter disable ID` change the user target and every project. No setting turns an agent on or off for one project.
32
+
33
+ - Off for every project: `tack adapter disable ID` previews. Its Scope line, one count per target and the actions are what you report before the yes: the change is machine-wide, it reaches the user target too (the built-in skills in that agent's user folder), and it removes only links Tack made, never hand-made files. When only the user target has removals, say that no project had links. When it removes commands, name the enabled agents that still get commands: `claude`, `codex`, `copilot` and `gemini` get none, so a fixed profile's command can reach no agent afterwards. After the yes, `--apply`, then `tack status --all` as its Next says. Reply with the counts and the way back: `tack adapter enable ID`, then `--apply`.
34
+ - On for every project: `tack adapter enable ID` previews the setting and the links it creates on every target, with one count per target; report them, and `--apply` after the yes enables the adapter, then links. A hand-made entry in the agent's folder is kept as a `foreign-destination` conflict and the rest links. `tack status --all` then names a `tack pick exclude` for it: offer it with its cost, since it unlinks that resource for every agent in the project, or offer to move the hand-made entry and sync again. Run neither without a yes.
35
+ - On or off for one project only: write nothing. Say that Tack turns an agent on or off for the whole machine, that the user target's links still reach this project, and that removing this project's links another way does not last: the next sync links them again. Then ask: change it for every project, or keep it? Stop for that answer even when you could run the machine-wide command: the request named one project. Never emulate the scope with `tack state clean` (it removes every agent's links in the project), `tack sync --adapter` (it narrows a sync to enabled adapters, removes nothing, and refuses a disabled one with `adapter-not-enabled`), `tack pick exclude` (it unlinks the resource for every agent) or by deleting links by hand.
@@ -0,0 +1,13 @@
1
+ # The terminal explorer (for the operator)
2
+
3
+ `tack explore` is the operator's interactive editor. Agents cannot run it: this page is for explaining it to the operator.
4
+
5
+ Replace uppercase arguments with values obtained from inspection. Examples use the installed `tack`; a source run swaps in the form `use-tack` gives. Read the text view; add `--json` only when a program parses a stable payload.
6
+
7
+ ## Open the explorer
8
+
9
+ `tack explore` is the operator's interactive editor and fails with `terminal-required` without a terminal or under an agent. Inspect resources and health with `tack catalog` and `tack status`, and change picks with `tack pick`; `tack catalog` only reports. In `tack explore`, `d` chooses browse only, user selection, project selection or profile editing inside the window.
10
+
11
+ ## Keys and rows
12
+
13
+ `tack explore` opens the project that contains the current directory, or else the destination chooser; `--user` or `--project PROJECT` opens that selection. In a selection, each row shows whether that destination gets the resource and why (`● default`, `● included`, `● dependency`, `● team/dev` for an enabled profile, `○ excluded`, `○ opt-in`, `✗ blocked`, `locked`), and a staged change follows it, such as `● default → include`. `● team/dev +1` means two enabled profiles bring it, and `○ excluded · team/dev` that your pick keeps it out of one. A project row ends with `· via user` when the user scope delivers it; agents in every project load user resources. A project that a fixed profile owns is read-only: rows show `● member`, `● required` or `○ not a member`, and staging keys point to the profile. The detail pane groups the state as `user`, `projects` and `profiles`, marks the edited one with `›`, and says where each state comes from; a profile line says `on for PROJECT` or `applied to PROJECT`. `i` includes a choice and `x` excludes it. Each key toggles: the key that staged a change unstages it, and the detail pane and footer name what each key does next. `u` unstages a row and `r` stages the removal of its saved pick, so an enabled profile or the source default decides again. In a user or project selection, `p` lists the declared profiles whose file reads as `● on` or `○ off`, and any other one that is on; Enter or space stages the other state, and `c` reviews it with the staged picks, then saves what `tack profile enable` or `tack profile disable` would. Review and apply read the state and the files again: a change that is refused stays staged. Source and folder rows stage every descendant: the key stages the descendants that lack its value, and once all have it the same key unstages them. On a group already saved that way, `i` or `x` resets choices to declarations. Folded and filtered-out descendants are included; built-ins and resources that cannot take the action are skipped. Counts show all/some/none using staged values. `c` previews each child's change before confirmation writes. In a profile or save-selection destination, `i` includes members and `x` excludes them with the same toggles; built-ins stay locked out of membership.
@@ -0,0 +1,30 @@
1
+ # Import skills from GitHub
2
+
3
+ Copying skills from a GitHub location into a source the operator owns.
4
+
5
+ Replace uppercase arguments with values obtained from inspection. Examples use the installed `tack`; a source run swaps in the form `use-tack` gives. Read the text view; add `--json` only when a program parses a stable payload.
6
+
7
+ ## Import skills from GitHub
8
+
9
+ An import copies chosen skills from a GitHub location into a source the operator owns. The copy is an ordinary skill of that source from then on: the operator edits it, and Tack delivers it like any skill there. `import add` and `import remove` preview by default; `--apply` writes. Nothing is delivered and no state changes until `sync`.
10
+
11
+ ```sh
12
+ tack import add github:ORG/REPO
13
+ tack import add github:ORG/REPO --skill pdf --into SOURCE
14
+ tack import add github:ORG/REPO --skill pdf --into SOURCE --apply
15
+ tack import add github:ORG/REPO --all --into SOURCE:vendor/skills --apply
16
+ tack import
17
+ tack import remove SOURCE:pdf
18
+ tack import remove SOURCE:pdf --apply
19
+ tack sync --all
20
+ ```
21
+
22
+ A location names its provider: `github:org/repo`, `github:org/repo/folder` or `github:org/repo#REF` (branch, tag or a full 40-character commit). A URL names its host and is accepted too: an `https://github.com/...` URL (`/tree/REF/folder`, or `/blob/REF/.../SKILL.md`) or `git@github.com:org/repo.git`. `github` is the only provider. Bare `org/repo` is refused with the reason `location-provider-missing`: retype `details.suggestion`, which is the same location with the `github:` prefix, and never guess a provider. An unknown prefix is `location-provider-unknown`, a URL on another host is `location-other-provider`, and `@` is refused everywhere (`location-at-form`; pin with `#REF`). These reasons are in `details.reason` of the `import-location-invalid` diagnostic. Abbreviated commit IDs, local paths and URLs with credentials are refused. The preview shows the canonical `github:` location even for a URL, and that is the form to reuse. Private repositories use the operator's own git credentials; Tack never reads or stores a token. Folders whose name starts with `_` in the location are not candidates, and `--full-depth` searches every folder to five levels.
23
+
24
+ - **Choose skills.** One candidate needs no flag. Otherwise pass `--skill NAME` (repeat for several) or `--all`; unknown names fail and list what exists. A candidate that cannot be imported shows the catalog's own reason; `--all` skips those and lists them.
25
+ - **Choose the destination.** `--apply` requires `--into SOURCE`, a registered, healthy source that is not the built-in one (label or registration ID). `SOURCE` uses the source's only declared skills folder; with several, or none, the command is refused and names the choices or the `skills` entry to add. `SOURCE:FOLDER` names one declared folder, or a group folder inside one, which import creates. Tack never adds or edits a declaration: if the folder is outside every declaration, excluded by its patterns, not selected by its include patterns, or inside a skill, tell the operator which entry to change by hand. A skill name that the source already has, in any declared skills folder, is refused.
26
+ - **Read the preview.** `plan` holds the candidates and verdicts, the resolved `revision`, the `destination`, the `writes` (folder and file counts) and the `reach`: which projects and whether the user namespace will receive the skill at the next `sync`, name collisions with another source, old picks that would select nothing, and dependencies on sources the destination does not declare in `depends-on`. The copy follows the destination's normal activation, so a skill without Tack metadata reaches every project at the next `sync`. A project a fixed profile holds is listed apart as not delivered, with its profile: the skill reaches it only after the operator adds it to that profile and re-applies the profile with the command the preview names. Report the reach to the operator before applying.
27
+ - **Apply.** It re-resolves the ref, fetches, validates against the live destination and writes only `FOLDER/NAME/` and one record in the `imports` section of the destination's `tack.yaml`, byte for byte, through a staging folder. An interrupted write is finished or rolled back by the next `import add --apply` or `import remove --apply` for that source. The result lists the paths written; run `tack sync --all` to preview delivery. A same-name skill in another source is allowed and surfaces at `sync` as a `collision`, as when registering a second source with it; `pick include SOURCE:NAME` for the one to keep, or `pick exclude SOURCE:NAME`, resolves it.
28
+ - **List and remove.** `tack import` lists every imported skill with its location, ref, revision and local state: unchanged, locally changed, or folder missing. A location reads `<provider>:<text>`; a record whose provider this release does not know still lists and removes. Local edits are allowed. `import remove SOURCE:NAME --apply` deletes the folder and its record; a locally changed folder is refused until `--force`, which deletes the edits too, and Tack keeps no copy. The next `sync` removes the links. `import`, `import remove`, `source`, `catalog`, `status` and `doctor` work offline; only `import add` fetches.
29
+
30
+ `status` and `doctor` report an imported skill whose folder is gone (`import-folder-missing`), one no `skills` entry covers (`import-folder-not-cataloged`), an `imports` section Tack cannot read (`imports-invalid`) and a leftover staging folder (`import-staging-left-over`); local edits are only counted. Import failures are `invalid-configuration` for a request the operator can repair, and `domain` for a fetch that failed (network, authentication, a ref or revision the remote does not serve) or a write that changed nothing. Never edit the `imports` section by hand.
@@ -0,0 +1,51 @@
1
+ # Maintain, check and remove
2
+
3
+ Refreshing worktrees, cleaning and removing managed links, reading removal reasons and the links in the way, and checking authored files and fixed profiles.
4
+
5
+ Replace uppercase arguments with values obtained from inspection. Examples use the installed `tack`; a source run swaps in the form `use-tack` gives. Read the text view; add `--json` only when a program parses a stable payload.
6
+
7
+ ## Maintain and remove managed links
8
+
9
+ ```sh
10
+ tack project refresh --project PROJECT
11
+ tack project refresh --project PROJECT --apply
12
+ tack project refresh --all
13
+ tack state clean --project PROJECT
14
+ tack state clean --project PROJECT --apply
15
+ tack state clean --pending --user
16
+ tack state clean --pending --user --apply
17
+ tack adapter disable cursor
18
+ tack adapter disable cursor --apply
19
+ tack source remove SOURCE
20
+ tack source remove SOURCE --apply
21
+ tack project remove PROJECT
22
+ tack project remove PROJECT --apply
23
+ tack state reset
24
+ tack state reset --apply
25
+ ```
26
+
27
+ Refresh updates registered worktrees and their managed resources. A new worktree has no links: from it, `tack project refresh --apply` adds its root, then `tack sync` previews its links. Until then, `status --project PROJECT` there warns with `worktree-not-registered`. `state clean` removes managed links for the selected scope while retaining configuration. `state clean --pending` retries pending removals, which a link owes when its removal could not be made safely. Adapter disablement previews cleanup before changing the enabled adapter list: its scope is every project and the user target, and after `--apply` run `tack status --all`. Every cleanup view counts its actions per adapter and target, such as `cursor → app (3 roots) · 36 to remove`, then lists the first 10 actions; `--details` lists them all. `source remove` and `project remove` preview the cleanup and the intent they delete before unregistering; a project whose link stays blocked keeps `removal requested` until a second `--apply` or `state clean --pending` settles it. `state reset` previews removal of all managed links and state; `reset --apply` finalizes only after cleanup settles. Use it only when explicitly asked.
28
+
29
+ ## Removal reasons and links in the way
30
+
31
+ The printed view is the result: check the status on its first line, the diagnostics and the `Next` commands. A partial operation can change healthy targets while another target fails. Each partial diagnostic has a specific `code`, such as `no-adapters-enabled` or `root-missing`.
32
+
33
+ Read the reason beside each planned removal before applying. `deselected` follows the operator's choices or an enabled profile that dropped the member, and `linked-for-user` removes a project's link to a resource the user's folder already has. `source-unhealthy` (the registered source cannot be read) and `quarantined` (the resource's own file no longer validates) mean a broken file, not a choice: fix it with `tack check <source-path>` instead of applying the removal. So does a `deselected` beside the diagnostic `profile-layer-unresolved`: an enabled profile's file or member is broken, and the diagnostic names the check to run. A docs mount whose source or folder cannot be read is kept meanwhile.
34
+
35
+ A link whose removal could not be made safely stays on disk as a pending removal. Retry with `state clean --pending` for the same scope once the cause is fixed.
36
+
37
+ After applying, run `status` for the same scope. Fix the reported cause and retry the affected scope. Leave foreign files and drifted links in place: Tack's ownership evidence decides which paths it may remove. A recorded link changed outside Tack whose resource is no longer selected (`status` tag `evidence-changed`) is released by `sync --apply`: Tack forgets the record and keeps the link. A link Tack has no record of that is exactly the link Tack would write, such as one a clone checks out from the repository, is `unrecorded`: `sync --apply` adopts it as Tack's own and leaves it in place. Any other entry in the way is a `foreign-destination` conflict that names the link Tack would write: `git rm` it when the repository commits it, or move it away, and ignore Tack's links in `.gitignore`. A file or folder that was at a destination before Tack linked there is `hand-made`: Tack keeps it, links everything else, and `doctor` only warns. `project add` lists the hand-made entries in a new project's agent folders in its preview, before anything is linked. Ask the operator whether to keep theirs with the `tack pick exclude` that `doctor` names, which unlinks Tack's resource for every agent of that project, or to move theirs away and sync. `tack state reset --apply` answers only an explicit request to remove all Tack-managed links and state.
38
+
39
+ ## Check authored files
40
+
41
+ For authoring, use one loop: write files, run `tack check PATH...`, and repeat until clean. It detects source folders, profile files and content bundles. A source check includes its resource declarations and profile definitions. Pass companion source folders in the same invocation for cross-source profile linkage; no state or registration is read. Findings use file:line locations; errors exit 1 and warnings exit 0. The JSON report is not stable. `profile inspect-bundle` reads contents; `tack check` performs full validation. Doctor also reports broken declared profiles that have never been applied.
42
+
43
+ ## Check a fixed profile
44
+
45
+ `tack check PROFILE_FILE [COMPANION_SOURCE...]` reports a source-declared manifest and its required closure without writes or execution. Use `author-tack-profiles` to create or repair it.
46
+
47
+ For fixed target deployment, `tack profile` lists the declared profiles by the SOURCE:PROFILE that enable and apply take. Preview `tack profile apply SOURCE:PROFILE --project PROJECT --target-root /absolute/project`, then add `--apply` after review. Use `author-tack-profiles` for complete roots, isolated user contexts, replacement guards and retained inventory.
48
+
49
+ A profile can be saved from a daily selection without changing it. Preview `tack profile save /path/to/source NAME --project PROJECT` (user + one project by default), or use `--input user` / `--input project --project PROJECT`. `--apply` saves only the profile; `--edit` explicitly updates an existing one. Browse offers origin review and individual adjustment before source/name choice and final file/declaration review. To use a profile day to day, `tack profile enable SOURCE:PROFILE --project PROJECT` (or `--user`) turns it on and `tack profile disable` off. See `author-tack-profiles` for copy walkthroughs and the distinct exact-application contract.
50
+
51
+ Preview `tack profile export SOURCE:PROFILE /artifacts/profile.tar.gz`; `--apply` writes a new content artifact after file/support/prerequisite review. `tack profile inspect-bundle FILE` reads the inventory; `tack check FILE` validates offline without state or original sources. Preview `tack profile apply-bundle FILE --project PROJECT --target-root /repo`, then add `--apply` after review. It retains verified source projections and registers fresh local identities before fixed delivery; no original sources or prior ordinary sync are required on a fresh dedicated target. Complete-root/user isolation, existing-selection force and foreign protection match source apply. No supplied code, package hook, installer or network fetch runs. Use `author-tack-profiles` for support declarations, pristine setup, artifact bounds and immutable retained-content repair.
@@ -0,0 +1,41 @@
1
+ # Onboard a machine to Tack, part 2: sources, scope and projects
2
+
3
+ Part 2 of 3 of the onboarding guide, after `tack guide onboarding`: its mode, approvals and rules hold here. Keep the hand-made entries step 1 listed.
4
+
5
+ ## 3. Sources
6
+
7
+ Why: Tack links skills only from folders you register, so it needs to know where yours are.
8
+
9
+ Quick: use the folders the person named. Full: ask which folders hold their skills and whether a team repository of skills exists. Offer what you found:
10
+
11
+ - the folders the person names;
12
+ - the hand-made entries from step 1. They stay where they are and keep working. To manage one with Tack, the person moves it into a source folder later, themselves;
13
+ - a team Git repository. `source add` takes a local path, so it must be cloned first: name the clone command and folder, and include it in this step's yes.
14
+
15
+ For each folder:
16
+
17
+ 1. Look inside it, such as with `find PATH -maxdepth 3 -name SKILL.md`, and say what its folders seem to hold: skills (a folder per skill with `SKILL.md`), commands, context. Full: ask the person to confirm what each folder is and which ones Tack should serve. Quick: take it from the layout, ask only about a folder it does not explain, and let the preview show the rest. Worker: use only what your instructions name.
18
+ 2. With `tack.yaml`, `tack source add PATH` previews the registration: the name, counts and problems. Without one, write its declaration as JSON and preview it with `tack source add PATH --config '<json>'`, or pipe it to `--config -`. The preview checks it as `tack check` would, then shows the `tack.yaml` it would write and what each entry finds: names, counts, problems. A bare `tack source add PATH` suggests one from the layout, and `tack guide tack-yaml` lists every key. Rerun the same command with `--apply` to register either, piping the same JSON again for `-`: it also links the source's default skills for the agents and projects already set up, as its preview shows.
19
+ - `PATH/SKILL.md`: PATH is one skill. Offer its parent folder as a folder of skills, or `tack import add` for a remote repository. Ask.
20
+ - Folders with `SKILL.md` at the top of PATH: PATH itself is the skills folder, `{"version": 1, "name": "skills", "skills": [{"path": "."}]}`. Each other folder there that holds commands is its own source, such as `{"version": 1, "name": "prompts", "commands": [{"path": "."}]}` for `PATH/prompts`.
21
+ - Folders that group skills or commands, such as `skills/`, and nothing at the top: one entry per folder, each relative to PATH, such as `{"version": 1, "name": "team", "skills": [{"path": "skills"}]}`.
22
+ 3. Compare each skills entry's count with `find FOLDER -name SKILL.md`. `include` or `exclude` patterns go into the same JSON, with the `manage-tack-sources` skill. To keep folders whose name starts with `_`, such as `_archive`, out of a skills entry, add `"exclude": ["**/_*/**"]` to it.
23
+ 4. When others use the folder through Git, say that `tack.yaml` is written into it and must be committed for them to see it.
24
+
25
+ Show the folders together ("2 folders: ~/skills with 2 skills, ~/team with 5 skills and 1 command"), then ask once. On yes, run each previewed `tack source add` again with `--apply`, then `tack check PATH`. Fix every error the same way, showing each fix. The preview and the apply name each source, such as skills for `~/skills`: step 4's `SOURCE:NAME` picks use that name.
26
+
27
+ ## 4. Scope (full only)
28
+
29
+ Why: decide which skills reach every project, and which stay out of one.
30
+
31
+ Run `tack catalog`. Explain: each project gets the default skills of every source; user scope gets only Tack's own skills unless you pick more. Commands reach Cline, Cursor, OpenCode and Pi only, and no agent receives context yet. Ask: which skills do you want everywhere, and which should stay out of a project? List the picks: `tack pick include SOURCE:NAME --user` for everywhere, and `tack pick exclude SOURCE:NAME --project PROJECT` to keep one out of a project (register the project in step 5 first). They save at once: run them after the yes.
32
+
33
+ ## 5. Projects
34
+
35
+ Why: a project is the repository whose agents get the links; registering it covers every worktree.
36
+
37
+ Quick: the repository you are in. Full: propose it and ask for others. The name is the folder's name unless the person picks another. Run `tack project add NAME` from inside each repository, or with `--repository-cwd PATH`: it writes nothing and previews the registration, the hand-made entries in the project's agent folders, and under Delivery the links its `--apply` makes. Show the previews together: per project, the agents, the link count and any conflict line. A skill picked for the user shows as `skip … linked for the user`: it reaches that project through the user's folder. On yes, run each again with `--apply`: it registers the project and links it. "Except project X" skips its `--apply`.
38
+
39
+ Report the hand-made entries it lists in the project's agent folders. One named like a source skill keeps its place: Tack links that skill to every other agent folder and reports the one path. Explain the trade-off: to keep theirs on purpose, `tack pick exclude SOURCE:NAME --project NAME` removes Tack's link for every agent in that project, not only the agent whose folder holds theirs. Run it only on a yes.
40
+
41
+ Next: run `tack guide onboarding-3` and follow it.
@@ -0,0 +1,29 @@
1
+ # Onboard a machine to Tack, part 3: link and hand over
2
+
3
+ Part 3 of 3 of the onboarding guide, after `tack guide onboarding-2`: the mode, approvals and rules of `tack guide onboarding` hold here.
4
+
5
+ ## 6. Link
6
+
7
+ Why: every pick then reaches each agent's folder as links back to the source files, and Git knows what to do with them.
8
+
9
+ Step 5's `--apply` linked each project. Run `tack sync --user` when step 4 added user picks, and `tack sync --project NAME` for a project whose picks changed after its `--apply`, such as a `pick exclude` from step 5. Show them together: per target, the agents, the link count and any conflict line. On yes, run each with `--apply`. "Except skill X" is a pick: show it and the new preview first.
10
+
11
+ Ask about Git: the links are relative, so a committed link to a source outside the repository breaks for teammates. A committed link to a source inside the repository works in every clone, and Tack adopts it there when it is exactly the link Tack would write. Ignore them in this repository, or commit them? Tack never edits `.gitignore`. To ignore them, run `tack status --project NAME --details` and show the lines under "For .gitignore in project NAME", as printed: one per link, from the repository root. A link is a file to Git, so its line never ends with `/`. Say that each skill linked later needs its own line. The person adds them, or asks you to; create `.gitignore` if the repository has none. Worker mode: do not touch `.gitignore`; list the question in your report.
12
+
13
+ ## 6b. Agent instructions
14
+
15
+ Why: agents in a new clone or worktree of this repository then link these skills before they work.
16
+
17
+ For each project, offer the Tack section of its `AGENTS.md`, and of its `CLAUDE.md` too when it has both and `CLAUDE.md` does not import `@AGENTS.md`: run `tack guide agent-instructions` for the exact text and which file gets it. Say that it is their file, show the text, and say what a yes means: agents may then run the section's commands (`tack project refresh --apply`, `tack project add --apply` for a new clone, `tack sync --apply`) for this project only, without asking again. Write it only on yes, show the change and never commit it. Worker mode: write it only when your instructions say so; otherwise list it in your report.
18
+
19
+ ## 7. Check and hand over
20
+
21
+ Run `tack doctor`, then `tack status --project NAME` for each project and `tack status --user`. Close with a summary:
22
+
23
+ - What is linked where, counts first: per project and for the user, the skills and the agents.
24
+ - What was left untouched and why: hand-made entries, folders not registered.
25
+ - What is still open: skipped steps, questions without answers, and in quick mode what full setup would add (scope picks, more projects, team repositories).
26
+ - New clones and worktrees get their links when an agent follows `prepare-tack-checkout`, or runs `tack project refresh --apply` then `tack sync --apply` from the new checkout.
27
+ - Agent sessions open before linking may need a restart to see the new skills.
28
+ - To undo, each with a preview first: `tack project remove NAME`, `tack source remove SOURCE`, or `tack state reset` for everything. They remove only links Tack made and never touch the person's files.
29
+ - After upgrading Tack, run `tack init` again.
@@ -0,0 +1,54 @@
1
+ # Onboard a machine to Tack
2
+
3
+ Follow this when Tack was just installed or someone asks you to set it up. Do the steps in order. Skip a step whose outcome already holds: `tack init` and `tack status` show what holds. The guide has three parts, and each ends with the command for the next: steps 1 and 2 here.
4
+
5
+ ## Mode
6
+
7
+ Who reads your replies:
8
+
9
+ - Guided (default): a person reads them. Ask the questions marked Ask.
10
+ - Worker: only when your instructions say no person will answer (unattended, non-interactive, a worker or CI run), or the environment variable `CI` is set. Do not explain or ask. Take answers from your instructions. When a step needs an answer they do not give, skip that step and list it in your final report. Never guess a source folder or a project.
11
+
12
+ Depth, chosen after step 1:
13
+
14
+ - Quick: steps 1, 3, 5, 6, 6b and 7, for the folders and the project the person named.
15
+ - Full: every step, including the model, scope picks, more projects and team repositories.
16
+ - Start quick when the request already names the folders and the project, and say full is available. Otherwise offer both in one line, such as: "Quick setup links ~/skills into this project in a few commands. Full setup also covers which skills go everywhere, more projects, team repositories and Git. Which one?" Worker mode is always quick.
17
+
18
+ ## Talking to a person (guided)
19
+
20
+ - Before each step, say in one plain sentence why it matters to them, then what it changes on their machine. Each step below gives the why.
21
+ - Use plain words: "a folder of skills", "links back to your files", "your agents". Name a Tack term (source, project, user scope) only with its meaning beside it.
22
+ - Report a preview with its counts first ("8 links for Claude Code and Codex, 1 folder of yours left alone"), then the detail that needs a decision: conflicts, hand-made entries, missing skills. Give the full list when asked.
23
+ - End with step 7's summary.
24
+
25
+ ## Approvals
26
+
27
+ - One yes per step that changes something: Machine, Sources, Scope, Projects, Link, and the agent instructions of step 6b.
28
+ - Before asking, show every preview of the step together, and name every command of the step that writes at once (`init`, `pick`).
29
+ - The person may answer "yes except X". Drop X and apply the rest. When dropping X changes another command (an adapter flag, a pick), show that command and its new preview, and ask again.
30
+ - Never apply or run anything that was not shown in that step.
31
+ - Worker mode: your instructions are the approval. Apply only what they ask for, and stop at anything beyond it.
32
+
33
+ ## Always
34
+
35
+ - Never move, copy, rename or delete a skill, a source file or a hand-made entry. During setup, never run `tack state reset`, `--force`, `rm` or `mv` on the person's folders. Never edit `.gitignore` unless the person asks you to in step 6.
36
+ - A hand-made entry (a file or folder in an agent's folder that Tack did not make) never stops setup. Report it, leave it, and continue with everything else.
37
+ - A `! partial` result means the command ran and one item needs attention. Report the item and go on.
38
+
39
+ ## 1. Machine
40
+
41
+ Why: Tack keeps a record of what it links, and gives each of your agents the skills to run Tack.
42
+
43
+ `tack init` writes at once and has no preview. Say what it does: it creates Tack's record in `~/.tack`, enables the agents whose folders it finds, links Tack's own skills into them, and lists the hand-made entries it leaves alone. It touches nothing else, and a rerun writes nothing. On yes, run it, and report what it did: the agents, the links and the hand-made entries. When the person's request already says to run `tack init`, that is step 1's yes: run it, then report what it did. To set up only some agents, run `tack init --adapter ID` instead, one `--adapter` per agent (claude, cline, codex, copilot, cursor, gemini, opencode, pi); `tack adapter disable ID` previews dropping one later. Then ask quick or full (see Mode). Keep the hand-made list for steps 3 and 7.
44
+
45
+ ## 2. The model (full only)
46
+
47
+ Why: these few terms explain every later question.
48
+
49
+ - A source is a folder you keep that holds skills, commands or context. Its `tack.yaml` says what it holds.
50
+ - A project is a Git repository whose agents get links, in every worktree.
51
+ - User scope means every project on this machine. Project scope means one repository.
52
+ - Tack writes links that point back to your files, shows each change before making it, and removes only links it made.
53
+
54
+ Next: run `tack guide onboarding-2` and follow it.
@@ -0,0 +1,15 @@
1
+ # JSON output and exit codes
2
+
3
+ The JSON envelope, which payloads are stable, the exit codes and how to report an internal error.
4
+
5
+ Replace uppercase arguments with values obtained from inspection. Examples use the installed `tack`; a source run swaps in the form `use-tack` gives. Read the text view; add `--json` only when a program parses a stable payload.
6
+
7
+ ## JSON output
8
+
9
+ Use the text view by default. Add `--json` after `tack` when you need exact state fields (selection, link state, plan actions) or the task asks for a structured answer. It prints the version 1 envelope: `status`, `classification`, `diagnostics`, `next` (the commands the text view lists), `plan`, `applied` and `result`. Only `status`, `sync`, `init`, `doctor`, `upgrade` (with `upgrade status`) and `--version` carry a stable payload (`--version` is the fixed `kind: "version"` object), and so does a docs command its own skill names. Every other command, including `import`, prints JSON with no schema: never script against its shape. In `status --json`, a healthy link has `_tag: "matching"`; every other `_tag` needs attention, and `expected-absent` means a link is expected and missing. `--format` is gone and `TACK_FORMAT` has no effect.
10
+
11
+ ## Exit codes and internal errors
12
+
13
+ Exit codes are `0` for success, `1` for partial or domain failure, `2` for invalid invocation or configuration, `3` for persistence or internal failure, and `130` for interruption. Do not treat a nonzero exit as evidence that no changes occurred.
14
+
15
+ An `internal-error` hides its cause. Its next step reruns the same command with `TACK_DEBUG=1` before it, which writes the full cause and the failing use case to standard error. Put that text in the bug report; the command's output does not change.