@sassywares/skills 0.11.3 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -35,6 +35,8 @@ A check run never edits the config and never rewrites the tree: it prints what `
|
|
|
35
35
|
|
|
36
36
|
1. **Resolve the start and the mode.** The path argument, else the working directory; the mode per above. On `check`, run steps 7 → 8 → 9 and stop.
|
|
37
37
|
2. **Detect.** Run `scripts/detect.sh --root <path>`. It prints a proposed config: topology (`repo`, `workspace`, `none`), the remote name, a probed base branch, and nested repos with their bases.
|
|
38
|
+
|
|
39
|
+
**A config that already exists is the proposal.** When `.sassywares/config.yaml` is found — an explicit `init` on a project that is already wired — the detector's output is only the starting point: take every value it **probes** (`git.repo`, `base_map`'s `"*"`, `repos`), and take every value it **emits as a default** from the existing file instead — the other `base_map` rungs, `hooks.*`, `worktrees.*`, `dogfood.*`, `pr.*`, `commit.branch`, `knowledge.*`, `artifacts.*`. A default is not an answer: writing the blank slate here would retarget `"*"` away from the integration branch the project actually uses and delete its hooks. Present the result as a **diff against the file, key by key**, and ask before writing.
|
|
38
40
|
3. **Ask only what detection cannot answer.** Never re-ask what the tree already said.
|
|
39
41
|
- **`workspace`** — the snapshot mirror: create a **private** GitHub repo, or connect an existing one? Creating it needs explicit approval and a named slug first.
|
|
40
42
|
- **`none`** — confirm the intent: this folder is deliberately outside git, so commit, PR, and babysit refuse here.
|
|
@@ -118,6 +120,7 @@ A check run never edits the config and never rewrites the tree: it prints what `
|
|
|
118
120
|
| Never edit the manifest | No dependencies, no `postinstall`, no `skills:*` scripts. The one exception is step 6's `worktree:*` and `workspace:*` aliases: appended or corrected, never removed, and nothing else in the file touched. Setup installs the suite; the user or project decides how it updates. |
|
|
119
121
|
| Write boundary | Only `.sassywares/` (the config, the setup README, the dogfood scaffold, and the worktree tooling), the skills and agent files step 5 installed in the scope the user chose, `skills-lock.json` (project scope), and one `.gitignore` line — and the project-scope part of that list is step 8's commit. Never `package.json` outside step 6's `worktree:*` and `workspace:*` aliases, never a root `.gitignore` in a workspace. Workspace git helpers land in `.sassywares/workspace/`, never in a project's `bin/`. |
|
|
120
122
|
| Detect, don't guess | An unknown base branch stays unknown and gets asked about. A probed value is reported as probed. |
|
|
123
|
+
| A re-apply is a diff | On a project that already has a config, every key the detector only *defaults* keeps its value from that file. Changing one needs the user to say so — never a detector default, and never a silent deletion. |
|
|
121
124
|
| Comments are part of the file | Every key keeps its description and allowed values. A stripped config is an incomplete config. |
|
|
122
125
|
| Hooks are named, not written | Setup records hook skill names. Creating those skills is the project's work. |
|
|
123
126
|
| Dogfood is a pointer | The block names a recipe, a reports path, a timeout, and whether Auto rows are allowed — four keys. Never a command and never a tool: a copied command duplicates the manifest and cannot express step order. |
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
# 3. Everything resolves against the MAIN checkout, so running any of these
|
|
11
11
|
# from inside a worktree behaves identically.
|
|
12
12
|
#
|
|
13
|
-
# worktree-version:
|
|
13
|
+
# worktree-version: 2
|
|
14
14
|
|
|
15
15
|
set -euo pipefail
|
|
16
16
|
|
|
17
|
-
WT_VERSION="
|
|
17
|
+
WT_VERSION="2"
|
|
18
18
|
WT_LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
19
19
|
|
|
20
20
|
log() { printf '%s\n' "$*"; }
|
|
@@ -101,6 +101,12 @@ checkout is addressed by the recipe's `**Preview:**` line instead. That covers a
|
|
|
101
101
|
mobile app (a simulator named `$WT_NAMESPACE`), a desktop app (a window), and a
|
|
102
102
|
CLI or library (nothing to look at).
|
|
103
103
|
|
|
104
|
+
**One port models a single service.** A stack that serves a web app, a docs site,
|
|
105
|
+
and a backend at once has more than one address per checkout; the claim covers the
|
|
106
|
+
one a human opens, and the recipe's steps carry the rest (distinct ports per
|
|
107
|
+
service, derived from `$WT_PORT` or fixed by the project). Do not add a port list
|
|
108
|
+
to the config for this — it is procedure, not identity.
|
|
109
|
+
|
|
104
110
|
When a range *is* configured: the slug hashes into it, the claim is taken with an
|
|
105
111
|
atomic `mkdir`, and a collision probes forward one port at a time. A claim
|
|
106
112
|
belongs to a slug, so a restarted app returns to the same port and two slugs that
|
|
@@ -504,6 +504,10 @@ if (( CHECK )); then
|
|
|
504
504
|
if [[ -f "$installed_lib" ]]; then
|
|
505
505
|
lib_v="$(sed -n 's/^# workspace-git-version: //p' "$installed_lib" | head -n 1)"
|
|
506
506
|
asset_lib_v="$(sed -n 's/^# workspace-git-version: //p' "$ASSET_WORKSPACE/_lib.sh" | head -n 1)"
|
|
507
|
+
lib_var="$(sed -n 's/^WORKSPACE_GIT_VERSION="\(.*\)"/\1/p' "$installed_lib" | head -n 1)"
|
|
508
|
+
if [[ -n "$lib_var" && -n "$lib_v" && "$lib_var" != "$lib_v" ]]; then
|
|
509
|
+
bad ".sassywares/workspace/_lib.sh header says v${lib_v} but the script reports v${lib_var} — the file was half-bumped"
|
|
510
|
+
fi
|
|
507
511
|
if [[ -z "$lib_v" ]]; then
|
|
508
512
|
bad "installed .sassywares/workspace/_lib.sh has no workspace-git-version line"
|
|
509
513
|
elif [[ -n "$asset_lib_v" && "$lib_v" != "$asset_lib_v" ]]; then
|
|
@@ -743,6 +747,10 @@ if (( CHECK )); then
|
|
|
743
747
|
if [[ -f "$wt_lib" ]]; then
|
|
744
748
|
installed_wt="$(sed -n 's/^# worktree-version: //p' "$wt_lib" | head -n 1)"
|
|
745
749
|
asset_wt="$(sed -n 's/^# worktree-version: //p' "$ASSET_WORKTREE/_lib.sh" | head -n 1)"
|
|
750
|
+
installed_wt_var="$(sed -n 's/^WT_VERSION="\(.*\)"/\1/p' "$wt_lib" | head -n 1)"
|
|
751
|
+
if [[ -n "$installed_wt_var" && -n "$installed_wt" && "$installed_wt_var" != "$installed_wt" ]]; then
|
|
752
|
+
bad ".sassywares/worktree/_lib.sh header says v${installed_wt} but the script reports v${installed_wt_var} — the file was half-bumped"
|
|
753
|
+
fi
|
|
746
754
|
if [[ -z "$installed_wt" ]]; then
|
|
747
755
|
bad "installed .sassywares/worktree/_lib.sh has no worktree-version line"
|
|
748
756
|
elif [[ -n "$asset_wt" && "$installed_wt" != "$asset_wt" ]]; then
|
|
@@ -790,6 +798,13 @@ if (( CHECK )); then
|
|
|
790
798
|
done < <(git -C "$ROOT" worktree list --porcelain 2>/dev/null \
|
|
791
799
|
| awk '/^worktree /{p=$2} /^branch /{b=$2; sub(/^refs\/heads\//,"",b); print p "\t" b; p=""} /^detached/{print p "\t(detached)"; p=""}')
|
|
792
800
|
|
|
801
|
+
# A registration whose folder is gone is a ghost `list` still believes in.
|
|
802
|
+
while IFS= read -r ghost; do
|
|
803
|
+
[[ -n "$ghost" ]] || continue
|
|
804
|
+
bad "worktree '$ghost' is prunable — the folder is gone; run: git worktree prune"
|
|
805
|
+
done < <(git -C "$ROOT" worktree list --porcelain 2>/dev/null \
|
|
806
|
+
| awk '/^worktree /{p=$2} /^prunable /{print p; p=""}')
|
|
807
|
+
|
|
793
808
|
# Orphan port claims: the worktree is gone but its port is still taken, so
|
|
794
809
|
# a later checkout is pushed off it for no reason.
|
|
795
810
|
wt_homef=""
|