@izkac/forgekit 0.3.12 → 0.3.13
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/bin/forge.mjs +107 -107
- package/bin/forgekit.mjs +83 -83
- package/bin/review.mjs +81 -81
- package/package.json +1 -1
- package/scripts/prepack.mjs +78 -78
- package/scripts/run-tests.mjs +50 -50
- package/src/adr.mjs +236 -236
- package/src/adr.test.mjs +170 -170
- package/src/change.mjs +327 -234
- package/src/change.test.mjs +145 -83
- package/src/cleanup-sessions.mjs +84 -84
- package/src/config.mjs +103 -103
- package/src/defer.mjs +75 -75
- package/src/doctor.mjs +350 -341
- package/src/doctor.test.mjs +114 -114
- package/src/init.mjs +680 -621
- package/src/install.mjs +815 -815
- package/src/install.test.mjs +180 -180
- package/src/integrity-check.mjs +60 -60
- package/src/integrity.mjs +682 -682
- package/src/integrity.test.mjs +566 -566
- package/src/lib.mjs +143 -143
- package/src/models.defaults.json +41 -41
- package/src/new-session.mjs +99 -99
- package/src/openspec-overlays/README.md +19 -19
- package/src/openspec-overlays/openspec-apply-change-footer.md +14 -14
- package/src/openspec-overlays/opsx-apply-completion-step.md +1 -1
- package/src/openspec-overlays/opsx-apply-implement-step.md +11 -11
- package/src/paths.mjs +92 -92
- package/src/plan-engine.mjs +321 -278
- package/src/plan-engine.test.mjs +447 -283
- package/src/preferences.defaults.json +78 -78
- package/src/preferences.mjs +438 -438
- package/src/preferences.test.mjs +174 -174
- package/src/record-evidence.mjs +204 -204
- package/src/resolve-model.mjs +312 -312
- package/src/resolve-model.test.mjs +194 -194
- package/src/review/cli.test.mjs +117 -117
- package/src/review/export.mjs +172 -172
- package/src/review/export.test.mjs +197 -197
- package/src/review/fixtures/valid-review.json +42 -42
- package/src/review/lib.mjs +894 -894
- package/src/review/lib.test.mjs +266 -266
- package/src/review/schema.json +196 -196
- package/src/review/signals.test.mjs +62 -62
- package/src/score-cli.mjs +68 -68
- package/src/score.mjs +568 -568
- package/src/score.test.mjs +366 -366
- package/src/session-reminder.mjs +207 -207
- package/src/session-status.mjs +70 -70
- package/src/set-models.mjs +186 -186
- package/src/set-phase.mjs +205 -205
- package/src/set-prefs.mjs +294 -294
- package/src/specs-sync.mjs +234 -0
- package/src/specs-sync.test.mjs +114 -0
- package/src/spine.mjs +93 -93
- package/src/triage-prompt.mjs +175 -175
- package/src/triage-prompt.test.mjs +50 -50
- package/src/vendor-openspec-overlays.mjs +176 -176
- package/src/vendor-openspec-overlays.test.mjs +62 -62
- package/vendor/skills/archive-to-adr/SKILL.md +149 -149
- package/vendor/skills/forge/SKILL.md +136 -136
- package/vendor/skills/forge/docs/forge.md +650 -647
- package/vendor/skills/forge/phases/brainstorm.md +23 -23
- package/vendor/skills/forge/phases/finish.md +90 -87
- package/vendor/skills/forge/phases/implement.md +77 -77
- package/vendor/skills/forge/phases/plan-openspec.md +60 -60
- package/vendor/skills/forge/phases/plan-specs.md +163 -117
- package/vendor/skills/forge/phases/review.md +25 -25
- package/vendor/skills/forge/phases/verify.md +124 -124
- package/vendor/skills/forge/references/forge-layout.md +85 -85
- package/vendor/skills/forge/references/pace.md +115 -115
- package/vendor/skills/forge/references/plan-routing.md +52 -51
- package/vendor/skills/forge/references/runtime-integrity.md +232 -232
- package/vendor/skills/forge/references/substantial-work.md +37 -37
- package/vendor/skills/forge/references/test-evidence.md +30 -30
- package/vendor/skills/forge/references/test-strategy.md +68 -68
- package/vendor/skills/forge/skills/subagent-driven-development/SKILL.md +87 -87
- package/vendor/skills/forge/subagents/final-reviewer-prompt.md +56 -56
- package/vendor/skills/forge/subagents/implementer-prompt.md +38 -38
- package/vendor/skills/git-resolve-adr-conflict/SKILL.md +132 -132
- package/vendor/skills/thorough-code-review/SKILL.md +290 -290
- package/vendor/skills/thorough-code-review/examples.md +133 -133
- package/vendor/skills/thorough-code-review/reference/accepted-risks.md +26 -26
- package/vendor/skills/thorough-code-review/reference/lenses.md +96 -96
- package/vendor/skills/thorough-code-review/reference/phase1-scout.md +62 -62
- package/vendor/skills/thorough-code-review/reference/phase2-skeptic.md +105 -105
- package/vendor/skills/thorough-code-review/reference/report-schema.json +222 -222
- package/vendor/skills/thorough-code-review/reference/report-template.md +115 -115
- package/vendor/skills/thorough-code-review/reference/severity-rubric.md +49 -49
- package/vendor/skills/thorough-code-review/reference/signals-preflight.md +55 -55
- package/vendor/templates/adr/README.md +7 -7
- package/vendor/templates/adr/decisions.md +141 -141
- package/vendor/templates/adr/hooks/check-pending-adrs.mjs +74 -74
- package/vendor/templates/adr/hooks/check-pending-adrs.sh +3 -3
- package/vendor/templates/adr/hooks/openspec-archive-agent-message.mjs +52 -52
- package/vendor/templates/adr/hooks/openspec-archive-agent-message.sh +3 -3
- package/vendor/templates/project/claude/commands/forge-apply.md +75 -75
- package/vendor/templates/project/claude/commands/forge-brainstorm.md +7 -7
- package/vendor/templates/project/claude/commands/forge-build.md +17 -17
- package/vendor/templates/project/claude/commands/forge-plan.md +12 -12
- package/vendor/templates/project/claude/commands/forge-skip.md +14 -14
- package/vendor/templates/project/claude/commands/forge-status.md +16 -16
- package/vendor/templates/project/claude/commands/forge.md +16 -16
- package/vendor/templates/project/claude/hooks/forge-prompt-hook.mjs +73 -73
- package/vendor/templates/project/claude/hooks/forge-session-start.mjs +19 -19
- package/vendor/templates/project/claude/hooks/forge-triage-hook.mjs +77 -77
- package/vendor/templates/project/cursor/commands/forge-apply.md +75 -75
- package/vendor/templates/project/cursor/commands/forge-brainstorm.md +10 -10
- package/vendor/templates/project/cursor/commands/forge-build.md +17 -17
- package/vendor/templates/project/cursor/commands/forge-plan.md +15 -15
- package/vendor/templates/project/cursor/commands/forge-skip.md +14 -14
- package/vendor/templates/project/cursor/commands/forge-status.md +16 -16
- package/vendor/templates/project/cursor/commands/forge.md +16 -16
- package/vendor/templates/project/cursor/hooks/forge-session-start.mjs +30 -30
- package/vendor/templates/project/cursor/hooks/forge-session-start.sh +3 -3
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: git-resolve-adr-conflict
|
|
3
|
-
description: >-
|
|
4
|
-
Git-scoped resolution of duplicate ADR number collisions after a coworker
|
|
5
|
-
commits the same sequential number first. Renames the local ADR file to the
|
|
6
|
-
next free number, updates its internal ADR-NNNN references, merges the ADR
|
|
7
|
-
README by keeping all HEAD table rows, renumbering only the local row from the
|
|
8
|
-
======= side, and deleting every conflict marker, patches
|
|
9
|
-
openspec/changes/archive/**/proposal.md backlinks that still point at the old
|
|
10
|
-
ADR path, then git add to mark conflicts resolved. Git commands allowed are
|
|
11
|
-
git mv and git add (ADR dir and touched archive proposal.md only). Use when
|
|
12
|
-
the ADR README has merge conflict markers, two NNNN-*.md files share the same
|
|
13
|
-
prefix, or the user says git resolve ADR conflict / duplicate ADR number.
|
|
14
|
-
disable-model-invocation: true
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# Git: resolve ADR number conflict
|
|
18
|
-
|
|
19
|
-
When two authors pick the same ADR number almost simultaneously, the remote
|
|
20
|
-
commit wins the number. **Renumber yours** — never recycle or overwrite a
|
|
21
|
-
committed ADR.
|
|
22
|
-
|
|
23
|
-
## Project config
|
|
24
|
-
|
|
25
|
-
Read **`.forge/config.json`**:
|
|
26
|
-
|
|
27
|
-
```json
|
|
28
|
-
{ "adr": { "enabled": true, "dir": "docs/adr", "decisionsDoc": "docs/decisions.md" } }
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Use **`{adrDir}`** = `adr.dir` (default `docs/adr`). If `adr.enabled` is `false`,
|
|
32
|
-
stop — this skill does not apply.
|
|
33
|
-
|
|
34
|
-
## Scope (strict)
|
|
35
|
-
|
|
36
|
-
| In scope | Out of scope |
|
|
37
|
-
| -------- | ------------ |
|
|
38
|
-
| Files under `{adrDir}/` | Implementation code, other docs |
|
|
39
|
-
| `openspec/changes/archive/**/proposal.md` — ADR backlink only | Other files under `openspec/` |
|
|
40
|
-
| `git mv` to rename the local ADR file | `git commit`, `git merge`, `git pull`, `git push` |
|
|
41
|
-
| `git add` on touched `{adrDir}/` and archive `proposal.md` paths | `git add` on any other path |
|
|
42
|
-
| Fix conflict markers in `{adrDir}/README.md` | Editing archive `design.md`, `tasks.md`, specs |
|
|
43
|
-
|
|
44
|
-
## When to run
|
|
45
|
-
|
|
46
|
-
- `{adrDir}/README.md` contains `<<<<<<<` / `=======` / `>>>>>>>` around table rows
|
|
47
|
-
- Two `{adrDir}/NNNN-*.md` files share the same four-digit prefix (different slugs)
|
|
48
|
-
- User reports "my ADR number was taken" after pulling or rebasing
|
|
49
|
-
|
|
50
|
-
## Workflow
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
Task progress:
|
|
54
|
-
- [ ] Detect collision and identify the local ADR
|
|
55
|
-
- [ ] Compute next free ADR number
|
|
56
|
-
- [ ] git mv rename local ADR file
|
|
57
|
-
- [ ] Update ADR body (title + ADR-NNNN references)
|
|
58
|
-
- [ ] Resolve {adrDir}/README.md — HEAD rows + your row renumbered; no markers left
|
|
59
|
-
- [ ] git add — mark README conflict resolved
|
|
60
|
-
- [ ] Patch archive proposal.md backlinks (old ADR number / path)
|
|
61
|
-
- [ ] git add — stage updated proposal.md files
|
|
62
|
-
- [ ] Verify
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 1. Detect collision and identify the local ADR
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
git status --porcelain {adrDir}/
|
|
69
|
-
git ls-files {adrDir}/
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**Local ADR (yours)** — untracked (`??`) / added (`A`), or the `>>>>>>>` side of a
|
|
73
|
-
README conflict. **Committed ADR (coworker's)** — tracked and HEAD side.
|
|
74
|
-
|
|
75
|
-
Record **`old_padded`** (four-digit prefix) and **`slug`** (filename after `NNNN-`).
|
|
76
|
-
|
|
77
|
-
### 2. Compute next free ADR number
|
|
78
|
-
|
|
79
|
-
Use the **higher** of HEAD README table max and on-disk `NNNN-*.md` max, then +1.
|
|
80
|
-
Zero-pad to 4 digits. Never reuse a number that already exists.
|
|
81
|
-
|
|
82
|
-
### 3. Rename with git mv
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
git mv {adrDir}/<old_padded>-<slug>.md {adrDir}/<next_padded>-<slug>.md
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### 4. Update the ADR file body
|
|
89
|
-
|
|
90
|
-
1. H1 `# NNNN.` → `# <next_padded>.`
|
|
91
|
-
2. Replace every `ADR-<old>` with `ADR-<next_padded>`
|
|
92
|
-
3. Do not change decision text unless it embeds the wrong number
|
|
93
|
-
|
|
94
|
-
### 5. Resolve `{adrDir}/README.md`
|
|
95
|
-
|
|
96
|
-
For each conflict block:
|
|
97
|
-
|
|
98
|
-
1. Keep every table row from the `<<<<<<< HEAD` side verbatim
|
|
99
|
-
2. Keep your row from the `=======` … `>>>>>>>` side, changing **only** the `#`
|
|
100
|
-
column to `<next_padded>`
|
|
101
|
-
3. Delete every conflict marker
|
|
102
|
-
4. Order: HEAD rows first, then your renumbered row(s)
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
rg '<<<<<<<|=======|>>>>>>>' {adrDir}/README.md
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Must print **no matches**.
|
|
109
|
-
|
|
110
|
-
### 6–8. Stage and patch backlinks
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
git add {adrDir}/README.md {adrDir}/<next_padded>-<slug>.md
|
|
114
|
-
rg -l "ADR-<old_padded>\\b|<old_padded>-<slug>\\.md" openspec/changes/archive/
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
In matching `proposal.md` files: update `ADR-NNNN` and filename segments only;
|
|
118
|
-
preserve the relative path prefix to `{adrDir}`. Then `git add` those proposals.
|
|
119
|
-
|
|
120
|
-
### 9. Verify
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
git status {adrDir}/ openspec/changes/archive/
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Expect no unmerged README, no duplicate `NNNN-` prefixes, no stale
|
|
127
|
-
`ADR-<old_padded>` for your slug.
|
|
128
|
-
|
|
129
|
-
## Output
|
|
130
|
-
|
|
131
|
-
Report old → new path, new number, README merge summary, patched proposals.
|
|
132
|
-
Do **not** commit unless the user explicitly asks.
|
|
1
|
+
---
|
|
2
|
+
name: git-resolve-adr-conflict
|
|
3
|
+
description: >-
|
|
4
|
+
Git-scoped resolution of duplicate ADR number collisions after a coworker
|
|
5
|
+
commits the same sequential number first. Renames the local ADR file to the
|
|
6
|
+
next free number, updates its internal ADR-NNNN references, merges the ADR
|
|
7
|
+
README by keeping all HEAD table rows, renumbering only the local row from the
|
|
8
|
+
======= side, and deleting every conflict marker, patches
|
|
9
|
+
openspec/changes/archive/**/proposal.md backlinks that still point at the old
|
|
10
|
+
ADR path, then git add to mark conflicts resolved. Git commands allowed are
|
|
11
|
+
git mv and git add (ADR dir and touched archive proposal.md only). Use when
|
|
12
|
+
the ADR README has merge conflict markers, two NNNN-*.md files share the same
|
|
13
|
+
prefix, or the user says git resolve ADR conflict / duplicate ADR number.
|
|
14
|
+
disable-model-invocation: true
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Git: resolve ADR number conflict
|
|
18
|
+
|
|
19
|
+
When two authors pick the same ADR number almost simultaneously, the remote
|
|
20
|
+
commit wins the number. **Renumber yours** — never recycle or overwrite a
|
|
21
|
+
committed ADR.
|
|
22
|
+
|
|
23
|
+
## Project config
|
|
24
|
+
|
|
25
|
+
Read **`.forge/config.json`**:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{ "adr": { "enabled": true, "dir": "docs/adr", "decisionsDoc": "docs/decisions.md" } }
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use **`{adrDir}`** = `adr.dir` (default `docs/adr`). If `adr.enabled` is `false`,
|
|
32
|
+
stop — this skill does not apply.
|
|
33
|
+
|
|
34
|
+
## Scope (strict)
|
|
35
|
+
|
|
36
|
+
| In scope | Out of scope |
|
|
37
|
+
| -------- | ------------ |
|
|
38
|
+
| Files under `{adrDir}/` | Implementation code, other docs |
|
|
39
|
+
| `openspec/changes/archive/**/proposal.md` — ADR backlink only | Other files under `openspec/` |
|
|
40
|
+
| `git mv` to rename the local ADR file | `git commit`, `git merge`, `git pull`, `git push` |
|
|
41
|
+
| `git add` on touched `{adrDir}/` and archive `proposal.md` paths | `git add` on any other path |
|
|
42
|
+
| Fix conflict markers in `{adrDir}/README.md` | Editing archive `design.md`, `tasks.md`, specs |
|
|
43
|
+
|
|
44
|
+
## When to run
|
|
45
|
+
|
|
46
|
+
- `{adrDir}/README.md` contains `<<<<<<<` / `=======` / `>>>>>>>` around table rows
|
|
47
|
+
- Two `{adrDir}/NNNN-*.md` files share the same four-digit prefix (different slugs)
|
|
48
|
+
- User reports "my ADR number was taken" after pulling or rebasing
|
|
49
|
+
|
|
50
|
+
## Workflow
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Task progress:
|
|
54
|
+
- [ ] Detect collision and identify the local ADR
|
|
55
|
+
- [ ] Compute next free ADR number
|
|
56
|
+
- [ ] git mv rename local ADR file
|
|
57
|
+
- [ ] Update ADR body (title + ADR-NNNN references)
|
|
58
|
+
- [ ] Resolve {adrDir}/README.md — HEAD rows + your row renumbered; no markers left
|
|
59
|
+
- [ ] git add — mark README conflict resolved
|
|
60
|
+
- [ ] Patch archive proposal.md backlinks (old ADR number / path)
|
|
61
|
+
- [ ] git add — stage updated proposal.md files
|
|
62
|
+
- [ ] Verify
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 1. Detect collision and identify the local ADR
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
git status --porcelain {adrDir}/
|
|
69
|
+
git ls-files {adrDir}/
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Local ADR (yours)** — untracked (`??`) / added (`A`), or the `>>>>>>>` side of a
|
|
73
|
+
README conflict. **Committed ADR (coworker's)** — tracked and HEAD side.
|
|
74
|
+
|
|
75
|
+
Record **`old_padded`** (four-digit prefix) and **`slug`** (filename after `NNNN-`).
|
|
76
|
+
|
|
77
|
+
### 2. Compute next free ADR number
|
|
78
|
+
|
|
79
|
+
Use the **higher** of HEAD README table max and on-disk `NNNN-*.md` max, then +1.
|
|
80
|
+
Zero-pad to 4 digits. Never reuse a number that already exists.
|
|
81
|
+
|
|
82
|
+
### 3. Rename with git mv
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
git mv {adrDir}/<old_padded>-<slug>.md {adrDir}/<next_padded>-<slug>.md
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 4. Update the ADR file body
|
|
89
|
+
|
|
90
|
+
1. H1 `# NNNN.` → `# <next_padded>.`
|
|
91
|
+
2. Replace every `ADR-<old>` with `ADR-<next_padded>`
|
|
92
|
+
3. Do not change decision text unless it embeds the wrong number
|
|
93
|
+
|
|
94
|
+
### 5. Resolve `{adrDir}/README.md`
|
|
95
|
+
|
|
96
|
+
For each conflict block:
|
|
97
|
+
|
|
98
|
+
1. Keep every table row from the `<<<<<<< HEAD` side verbatim
|
|
99
|
+
2. Keep your row from the `=======` … `>>>>>>>` side, changing **only** the `#`
|
|
100
|
+
column to `<next_padded>`
|
|
101
|
+
3. Delete every conflict marker
|
|
102
|
+
4. Order: HEAD rows first, then your renumbered row(s)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
rg '<<<<<<<|=======|>>>>>>>' {adrDir}/README.md
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Must print **no matches**.
|
|
109
|
+
|
|
110
|
+
### 6–8. Stage and patch backlinks
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
git add {adrDir}/README.md {adrDir}/<next_padded>-<slug>.md
|
|
114
|
+
rg -l "ADR-<old_padded>\\b|<old_padded>-<slug>\\.md" openspec/changes/archive/
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
In matching `proposal.md` files: update `ADR-NNNN` and filename segments only;
|
|
118
|
+
preserve the relative path prefix to `{adrDir}`. Then `git add` those proposals.
|
|
119
|
+
|
|
120
|
+
### 9. Verify
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
git status {adrDir}/ openspec/changes/archive/
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Expect no unmerged README, no duplicate `NNNN-` prefixes, no stale
|
|
127
|
+
`ADR-<old_padded>` for your slug.
|
|
128
|
+
|
|
129
|
+
## Output
|
|
130
|
+
|
|
131
|
+
Report old → new path, new number, README merge summary, patched proposals.
|
|
132
|
+
Do **not** commit unless the user explicitly asks.
|