@openagt/skill-branches 0.1.3 → 0.1.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/SKILL.md +71 -0
- package/package.json +2 -2
package/SKILL.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: branches
|
|
3
|
+
description: Where your work goes (a branch named agent-<name>), how to name it, what must be true before you finish, and how to push it when you are asked to.
|
|
4
|
+
package: "@openagt/skill-branches@0.1"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Branch management
|
|
8
|
+
|
|
9
|
+
Your work goes on a branch named `agent-<name>`, unless whoever started you continued you on another. It stays on this machine until you are asked to push it.
|
|
10
|
+
|
|
11
|
+
## The command
|
|
12
|
+
|
|
13
|
+
Run the `branches` command inside your checkout, always by its full name: `npx @openagt/skill-branches@0.1`. `status`, `name` and `push` (with no flag) are yours; the rest are the caller's.
|
|
14
|
+
|
|
15
|
+
## Where you are
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
npx @openagt/skill-branches@0.1 status
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
It prints JSON; `branch` is the branch you are on.
|
|
22
|
+
|
|
23
|
+
**A branch starting with `agent-`.** Its checkout is your whole workspace: read and write only there. Dependency files and skill folders are links to the user's copies: never edit them. If something you need is outside your checkout, say so and stop.
|
|
24
|
+
|
|
25
|
+
Before your first change, name the session with `[a-z0-9-]+`, starting with a letter or digit, saying what the work is, unless your branch already differs from `path`'s last segment: then it is named, keep it.
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
npx @openagt/skill-branches@0.1 name <name>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
It renames your branch to `agent-<name>` and prints it in `branch`: `agent-<name>-2`, `-3`, … when `<name>` was taken; a name outside `[a-z0-9-]+` is refused as `invalid-name`.
|
|
32
|
+
|
|
33
|
+
**Any other branch.** If the checkout sits under `.branches/`, you were put on this branch on purpose: stay on it, do not name it. Otherwise you are in a plain clone on someone else's branch. Before your first change, create your own and switch to it, `<name>` as above (another if it exists, locally or on origin):
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
git switch -c agent-<name>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
From then on, work as on an `agent-` branch; nothing in a plain clone is a link.
|
|
40
|
+
|
|
41
|
+
## Commit as you go
|
|
42
|
+
|
|
43
|
+
Nothing is committed for you.
|
|
44
|
+
|
|
45
|
+
## Before you finish
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
npx @openagt/skill-branches@0.1 status
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
It must report `"clean": true`. `clean` is false while anything is uncommitted or untracked: commit or delete what you added; if what remains is not yours, say so and finish.
|
|
52
|
+
|
|
53
|
+
## Push
|
|
54
|
+
|
|
55
|
+
Only when your task or the person asks you to push or publish your work, and once clean:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
npx @openagt/skill-branches@0.1 push
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
It pushes your branch to origin and prints it in `branch`. `clean` false is refused as `dirty`: commit or delete first.
|
|
62
|
+
|
|
63
|
+
## Merge
|
|
64
|
+
|
|
65
|
+
Only when the person asks you to merge your work into the project's main branch, and once clean:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
npx @openagt/skill-branches@0.1 merge <your branch>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
It merges your branch into the main branch, in the project's own folder. A conflict changes nothing and names the files in `files`: say so and stop. Your checkout and your branch stay.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagt/skill-branches",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Branch management for coding agents: one git checkout per agent under .branches/, named as its branch, reclaimed once its work is on the remote.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@openagt/agent-data": "0.0.
|
|
42
|
+
"@openagt/agent-data": "0.0.9"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^20.0.0",
|