fss-link 1.9.2 → 1.9.4
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/bundle/edit-link-skill/SKILL.md +121 -0
- package/bundle/fss-link-main.js +934 -900
- package/bundle/worktrees/SKILL.md +109 -0
- package/docs/TOOLS.md +4 -1
- package/package.json +4 -3
- package/scripts/copy_bundle_assets.js +18 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worktrees
|
|
3
|
+
description: >
|
|
4
|
+
Git worktrees for isolated parallel development across agents.
|
|
5
|
+
Use when starting feature work that needs isolation, before executing
|
|
6
|
+
plans that risk breaking the main branch, or when another agent is
|
|
7
|
+
already working in the project.
|
|
8
|
+
category: workflow
|
|
9
|
+
triggers: [worktree, isolated, parallel, branch workspace]
|
|
10
|
+
version: 1
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Git Worktrees — Isolated Parallel Development
|
|
14
|
+
|
|
15
|
+
**Use when:** Multiple agents need to work on different features simultaneously without interfering with each other.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- Starting feature work that needs isolation from the current workspace
|
|
20
|
+
- Before executing implementation plans that risk breaking the main branch
|
|
21
|
+
- When another agent is already working in the project
|
|
22
|
+
|
|
23
|
+
## When NOT to Use
|
|
24
|
+
|
|
25
|
+
- The user simply asks to fix a bug or implement a feature — those belong to the regular working directory
|
|
26
|
+
- You are already inside a worktree
|
|
27
|
+
- The project is not a git repository
|
|
28
|
+
|
|
29
|
+
## Creating a Worktree
|
|
30
|
+
|
|
31
|
+
Use the `enter_worktree` tool:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
enter_worktree({ name: "fix-auth-bug" })
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
- `worktreePath` — absolute path (e.g., `/path/to/project/.fss-link/worktrees/fix-auth-bug`)
|
|
39
|
+
- `branch` — git branch name (e.g., `fss-link-fix-auth-bug`)
|
|
40
|
+
|
|
41
|
+
**CRITICAL:** Every tool call must use the full absolute `worktreePath`. Never use relative paths.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# ✅ CORRECT — absolute path
|
|
45
|
+
write_file({ path: "/path/to/project/.fss-link/worktrees/fix-auth-bug/src/auth.ts", ... })
|
|
46
|
+
|
|
47
|
+
# ❌ WRONG — relative path modifies the MAIN checkout
|
|
48
|
+
write_file({ path: "src/auth.ts", ... })
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Verifying You Are in the Worktree
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pwd # Should show .../.fss-link/worktrees/<slug>/
|
|
55
|
+
git branch --show-current # Should show fss-link-<slug>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Project Setup
|
|
59
|
+
|
|
60
|
+
Auto-detect and run appropriate setup:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cd /path/to/project/.fss-link/worktrees/fix-auth-bug && npm install
|
|
64
|
+
cd /path/to/project/.fss-link/worktrees/fix-auth-bug && cargo build
|
|
65
|
+
cd /path/to/project/.fss-link/worktrees/fix-auth-bug && pip install -r requirements.txt
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Exiting a Worktree
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
exit_worktree({ name: "fix-auth-bug", action: "keep" }) # Work in progress
|
|
72
|
+
exit_worktree({ name: "fix-auth-bug", action: "remove" }) # Work committed
|
|
73
|
+
exit_worktree({ name: "fix-auth-bug", action: "remove", discard_changes: true }) # Discard system metadata
|
|
74
|
+
exit_worktree({ name: "fix-auth-bug", action: "remove", discard_changes: true, confirm_destruction: true }) # Discard everything
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
⚠️ **WARNING:** `discard_changes: true` is a destructive action. It will permanently delete all untracked content in the worktree.
|
|
78
|
+
|
|
79
|
+
- Without `confirm_destruction`: the tool cleans up its own artifacts (.fss-link/) and lists any remaining user files. You must decide whether to delete them manually or confirm destruction.
|
|
80
|
+
- With `confirm_destruction: true`: ALL untracked content is destroyed, including user files. Use only when you are certain no valuable untracked content exists.
|
|
81
|
+
|
|
82
|
+
## Quick Reference
|
|
83
|
+
|
|
84
|
+
| Situation | Action |
|
|
85
|
+
|-----------|--------|
|
|
86
|
+
| Need isolated workspace | `enter_worktree({ name: "feature-name" })` |
|
|
87
|
+
| Already in a worktree | Do NOT call enter_worktree again |
|
|
88
|
+
| Done, work in progress | `exit_worktree({ name, action: "keep" })` |
|
|
89
|
+
| Done, work committed | `exit_worktree({ name, action: "remove" })` |
|
|
90
|
+
| Done, discard system metadata only | `exit_worktree({ name, action: "remove", discard_changes: true })` |
|
|
91
|
+
| Done, discard everything | `exit_worktree({ name, action: "remove", discard_changes: true, confirm_destruction: true })` |
|
|
92
|
+
|
|
93
|
+
## Common Mistakes
|
|
94
|
+
|
|
95
|
+
1. **Using relative paths** — Always use full `worktreePath` for every tool call
|
|
96
|
+
2. **Creating nested worktrees** — Check path first; if it contains `.fss-link/worktrees/`, you're already in one
|
|
97
|
+
3. **Running `git worktree add` manually** — Always use the `enter_worktree` tool
|
|
98
|
+
4. **Removing with uncommitted changes** — Commit or stash first, or use `discard_changes: true` (system metadata only) or `confirm_destruction: true` (everything)
|
|
99
|
+
|
|
100
|
+
## Global Flags
|
|
101
|
+
|
|
102
|
+
N/A — this is a workflow skill, not a CLI tool.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
*This skill is part of the FSS Parsers collection.*
|
|
107
|
+
|
|
108
|
+
**References:**
|
|
109
|
+
- Full procedural guide → `references/capabilities.md`
|
package/docs/TOOLS.md
CHANGED
|
@@ -408,10 +408,13 @@ Exits a worktree previously created by `enter_worktree`.
|
|
|
408
408
|
|-----------|------|-------------|
|
|
409
409
|
| `name` | string | Slug of the worktree to exit (must match the name used in `enter_worktree`). |
|
|
410
410
|
| `action` | string | `"keep"` preserves the worktree on disk; `"remove"` deletes it and its branch. |
|
|
411
|
-
| `discard_changes` | boolean | When `action="remove"`,
|
|
411
|
+
| `discard_changes` | boolean | When `action="remove"`, bypasses the dirty-worktree check. Automatically cleans up system metadata (.fss-link/). Lists remaining user files. |
|
|
412
|
+
| `confirm_destruction` | boolean | When `action="remove"` and `discard_changes=true`, destroys ALL untracked content including user files. Requires `discard_changes=true`. |
|
|
412
413
|
|
|
413
414
|
- `action='keep'` — preserves the worktree directory and branch on disk so it can be revisited later
|
|
414
415
|
- `action='remove'` — deletes the worktree directory and branch. Refuses to run if the worktree contains uncommitted changes unless `discard_changes: true` is set
|
|
416
|
+
- `discard_changes: true` — cleans up system metadata (.fss-link/). If other untracked files remain, lists them and refuses to proceed unless `confirm_destruction: true`
|
|
417
|
+
- `confirm_destruction: true` — destroys ALL untracked content. Requires `discard_changes: true`. Use with caution.
|
|
415
418
|
- Only invoke when the user explicitly asks to leave or clean up a worktree
|
|
416
419
|
|
|
417
420
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fss-link",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.0.0"
|
|
6
6
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "git+https://github.com/FSSCoding/fss-link.git"
|
|
14
14
|
},
|
|
15
15
|
"config": {
|
|
16
|
-
"sandboxImageUri": "ghcr.io/fsscoding/fss-link:1.9.
|
|
16
|
+
"sandboxImageUri": "ghcr.io/fsscoding/fss-link:1.9.4"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"start": "node scripts/start.js",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"eslint-plugin-react": "^7.37.5",
|
|
96
96
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
97
97
|
"eslint-plugin-vitest": "^0.5.4",
|
|
98
|
+
"fast-check": "^4.9.0",
|
|
98
99
|
"globals": "^16.0.0",
|
|
99
100
|
"ink": "^6.8.0",
|
|
100
101
|
"ink-testing-library": "^4.0.0",
|
|
@@ -189,7 +190,7 @@
|
|
|
189
190
|
"turndown": "^7.2.0",
|
|
190
191
|
"turndown-plugin-gfm": "^1.0.2",
|
|
191
192
|
"undici": "^7.10.0",
|
|
192
|
-
"vite": "^
|
|
193
|
+
"vite": "^6.3.5",
|
|
193
194
|
"vitest": "^4.1.7",
|
|
194
195
|
"xml2js": "^0.6.0",
|
|
195
196
|
"yargs": "^17.7.2",
|
|
@@ -46,4 +46,22 @@ for (const file of sbFiles) {
|
|
|
46
46
|
copyFileSync(join(root, file), join(bundleDir, basename(file)));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
// Copy bundled default skills (SKILL.md files) alongside the bundled JS.
|
|
50
|
+
// bundledSkills.ts reads these via `path.join(__dirname, './<dir>/SKILL.md')`
|
|
51
|
+
// relative to the running bundle/fss-link-main.js, so the source tree layout
|
|
52
|
+
// (packages/core/src/bundled-skills/<dir>/SKILL.md) must be mirrored here as
|
|
53
|
+
// bundle/<dir>/SKILL.md — esbuild only bundles JS, it never copies these.
|
|
54
|
+
const skillFiles = glob.sync('packages/core/src/bundled-skills/**/SKILL.md', {
|
|
55
|
+
cwd: root,
|
|
56
|
+
});
|
|
57
|
+
for (const file of skillFiles) {
|
|
58
|
+
const rel = file.replace('packages/core/src/bundled-skills/', '');
|
|
59
|
+
const dest = join(bundleDir, rel);
|
|
60
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
61
|
+
copyFileSync(join(root, file), dest);
|
|
62
|
+
}
|
|
63
|
+
if (skillFiles.length > 0) {
|
|
64
|
+
console.log(`Bundled skills copied to bundle/ (${skillFiles.length} file(s))`);
|
|
65
|
+
}
|
|
66
|
+
|
|
49
67
|
console.log('Assets copied to bundle/');
|