@skitterbyte/skitterspec-azure-boards 3.0.0 → 3.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.
- package/assets/claude-md-section.md +23 -123
- package/assets/project-conventions.md +17 -0
- package/assets/rules/commit-trailers.md +37 -93
- package/assets/rules/negative-checks.md +21 -48
- package/assets/rules/offered-unblocks.md +39 -74
- package/assets/rules/spec-format.md +117 -0
- package/assets/rules/spec-planning.md +128 -1016
- package/assets/rules/spec-reports.md +70 -607
- package/assets/skills/no-spec/SKILL.md +4 -4
- package/assets/skills/spec/SKILL.md +7 -7
- package/assets/skills/spec/kind-routing.md +35 -0
- package/assets/skills/spec-bug/SKILL.md +6 -6
- package/assets/skills/spec-cancel/SKILL.md +1 -1
- package/assets/skills/spec-complete/SKILL.md +1 -1
- package/assets/skills/spec-diff/SKILL.md +6 -2
- package/assets/skills/spec-diff/review-page.md +89 -0
- package/assets/skills/spec-diff/review-wait.md +133 -0
- package/assets/skills/spec-epic-next/SKILL.md +2 -1
- package/assets/skills/spec-epic-next/epics.md +44 -0
- package/assets/skills/spec-hotfix/SKILL.md +5 -5
- package/assets/skills/spec-incident/SKILL.md +1 -1
- package/assets/skills/spec-next/SKILL.md +5 -5
- package/assets/skills/spec-resume/SKILL.md +1 -1
- package/assets/skills/spec-review/SKILL.md +1 -1
- package/assets/skills/spec-start/isolation.md +90 -0
- package/package.json +1 -1
- package/src/conventions.js +43 -0
- package/src/init.js +133 -9
- package/src/spec-planning-history.json +103 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Isolation, worktrees and the live overlay
|
|
2
|
+
|
|
3
|
+
Applies only when `specs/.core/env.config.json` exists. Without it, every skill
|
|
4
|
+
works in the checkout it is standing in.
|
|
5
|
+
|
|
6
|
+
## Workspace modes (`mode` in `env.config.json`)
|
|
7
|
+
|
|
8
|
+
- **`worktree`** (the default): each spec gets its own checkout, so several can
|
|
9
|
+
be in flight and `main` stays free. `/spec-start` builds the branch there,
|
|
10
|
+
moves the session in with a plain `cd`, and asks whether to build phase 1. The
|
|
11
|
+
primary checkout stays on the base branch, so the base branch still shows an
|
|
12
|
+
in-flight spec under `backlog`. `skitterspec status` reads each worktree's own
|
|
13
|
+
copy.
|
|
14
|
+
- **`checkout`**: the branch is built in the primary checkout, one spec at a
|
|
15
|
+
time, and the build carries straight on. `/spec-connect` and `/spec-live` do
|
|
16
|
+
not apply and say so.
|
|
17
|
+
|
|
18
|
+
**Omit the spec name anywhere** and the engine uses the worktree you are
|
|
19
|
+
standing in, or else the only provisioned spec.
|
|
20
|
+
|
|
21
|
+
## Per-spec isolation
|
|
22
|
+
|
|
23
|
+
`/spec-start` gives every in-progress spec its own worktree. Docker is a
|
|
24
|
+
per-spec escalation: `> **Stack:** worktree` (the default) or
|
|
25
|
+
`worktree + docker` when the spec touches the database or stateful services.
|
|
26
|
+
`/spec-start` brings up a namespaced stack only for the latter, and starts the
|
|
27
|
+
host **dev servers** (`dev` in `env.config.json`) on the spec's ports.
|
|
28
|
+
`/spec-connect <name>` maps that spec onto your normal `localhost` ports, and
|
|
29
|
+
`/spec-connect main` hands them back. Teardown is part of `/spec-complete` and
|
|
30
|
+
`/spec-cancel`, which drop the spec's test-DB volume and offer to prune orphans
|
|
31
|
+
first.
|
|
32
|
+
|
|
33
|
+
The engine is `skitterspec spec-env
|
|
34
|
+
<up|bootstrap|nospec|main|project|down|prune|dev|connect|integrate|disposition|handoff|hotfix|live|review|stage|checks|status|resolve|resume|base>`.
|
|
35
|
+
`up` plans the fork, and **`bootstrap` runs the worktree's own steps**: seeding
|
|
36
|
+
the gitignored files, the env file, `setup` and the stack. Never reconstruct
|
|
37
|
+
those steps as shell commands.
|
|
38
|
+
|
|
39
|
+
A **hotfix** is the one spec that does not fork from `main`. `/spec-hotfix` forks
|
|
40
|
+
from a release tag, and `/spec-complete` lands it through `spec-env hotfix land`
|
|
41
|
+
(release, push on consent, carry to `main` without the version commit). Its
|
|
42
|
+
worktree stays until the deploy is out and a second `/spec-complete` runs
|
|
43
|
+
`spec-env hotfix finish`.
|
|
44
|
+
|
|
45
|
+
## The live overlay (`/spec-live`)
|
|
46
|
+
|
|
47
|
+
`/spec-connect` runs a spec's own dev stack. The live overlay instead reuses the
|
|
48
|
+
dev server you already have running. `/spec-live <spec>`, or a bare
|
|
49
|
+
`/spec-live`, rebases the branch onto the base (the fetched remote base under PR
|
|
50
|
+
landing), frees it from its worktree, and checks it out
|
|
51
|
+
**in the primary checkout**, so the running server hot-reloads it. The checked-out branch is the
|
|
52
|
+
lock, so only one spec is live at a time. `/spec-live main` hands the checkout
|
|
53
|
+
back. Fixes made while live commit straight onto the branch, and
|
|
54
|
+
`/spec-complete` knows about live specs and lands them.
|
|
55
|
+
|
|
56
|
+
- It is for **testing** a code-only spec, not for starting work, and no
|
|
57
|
+
lifecycle skill invokes it.
|
|
58
|
+
- It **refuses** stateful specs (`Stack: worktree + docker`, or a branch that
|
|
59
|
+
touches migrations). Use `/spec-connect` and a Docker stack for those.
|
|
60
|
+
- `live.afterSwitch` entries (`{ run, when }`) run in the primary checkout after
|
|
61
|
+
taking and after releasing. The engine runs them itself.
|
|
62
|
+
- The engine is `skitterspec spec-env live <take|release|abort|status>`.
|
|
63
|
+
|
|
64
|
+
## Authoring a spec off the base branch
|
|
65
|
+
|
|
66
|
+
With isolation, `/spec` grills first, then runs `spec-env up <name> --docs`,
|
|
67
|
+
moves into that worktree and writes the spec there. `--docs` skips `setup` and
|
|
68
|
+
Docker, so the tree costs one `git worktree add`. `/spec-start` later re-runs
|
|
69
|
+
`up` without the flag, and the install happens then.
|
|
70
|
+
|
|
71
|
+
Both committing verdicts on the authoring page (`Commit & Start`, `Commit`)
|
|
72
|
+
commit on the branch, then `spec-env integrate` rebases and fast-forwards, so
|
|
73
|
+
the base gains the spec as one commit. `Commit & Start` keeps the worktree and
|
|
74
|
+
carries into `/spec-start`. `Commit` tears it down. The authoring page arms
|
|
75
|
+
nothing, because a backlog spec owes no phase.
|
|
76
|
+
|
|
77
|
+
**`land.specDocs: "branch"`** (the default once a ticketing provider is
|
|
78
|
+
configured and the key is unset) keeps the spec on its feature branch, to land
|
|
79
|
+
with the work. Both verdicts commit and skip the integrate, plain `Commit` keeps
|
|
80
|
+
the branch and worktree, and the backlog is found through the tracker. Setting
|
|
81
|
+
the key, to either value, always wins.
|
|
82
|
+
|
|
83
|
+
## Staging one spec and not another
|
|
84
|
+
|
|
85
|
+
`skitterspec spec-env stage [<spec>] [--json]` splits the uncommitted tree you
|
|
86
|
+
are standing in into what belongs to this spec and what does not. **Owned** is
|
|
87
|
+
the spec's folder in any bucket plus each `spec.companionPaths` entry. Code is
|
|
88
|
+
always **foreign**, because the commits this bounds are the lifecycle ones.
|
|
89
|
+
Nothing here refuses. Commit with the pathspec on both `git add` and
|
|
90
|
+
`git commit`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec-azure-boards",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Spec-driven development for Claude Code, with one-way Azure Boards sync — a superset of @skitterbyte/skitterspec: the base filesystem workflow plus /spec-status · /spec-push · /spec-claim and the spec-sync CLI, mirroring specs to Azure DevOps work items with parent/child hierarchy, assignment and a release work item per tag. The repo is canonical; Boards is a generated mirror. Install this OR the base OR one other superset — exactly one.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
// Moving a project's conventions out of the old `spec-planning.md`
|
|
4
|
+
// (feat-rules-budget). Before that spec, the typecheck and test commands lived
|
|
5
|
+
// in a "Project conventions (fill this in)" section inside the managed rule.
|
|
6
|
+
// Filling it in made the whole 66k file "customized", so `update` kept it and
|
|
7
|
+
// the host went on loading all of it every session.
|
|
8
|
+
//
|
|
9
|
+
// `split` cuts that section out. `KNOWN` holds the hash of every shipped
|
|
10
|
+
// version with the section cut out, so a file whose ONLY edits were in that
|
|
11
|
+
// section hashes to a known value, and its edits can be carried over to
|
|
12
|
+
// `project-conventions.md` safely. Any other edit is cannot-tell, and the file
|
|
13
|
+
// is kept (`.claude/rules/negative-checks.md` rule 4).
|
|
14
|
+
|
|
15
|
+
const crypto = require('crypto')
|
|
16
|
+
|
|
17
|
+
const HEADING = /^## Project conventions \(fill this in\)[^\n]*\n/m
|
|
18
|
+
|
|
19
|
+
// `{ rest, body }`: `rest` is the file without the section, `body` the
|
|
20
|
+
// section's text below its heading. `null` when the section is not there.
|
|
21
|
+
function split(text) {
|
|
22
|
+
const t = text.replace(/\r\n/g, '\n')
|
|
23
|
+
const m = HEADING.exec(t)
|
|
24
|
+
if (!m) return null
|
|
25
|
+
const from = m.index
|
|
26
|
+
const after = from + m[0].length
|
|
27
|
+
const next = t.slice(after).search(/^## /m)
|
|
28
|
+
const end = next === -1 ? t.length : after + next
|
|
29
|
+
return { rest: t.slice(0, from) + t.slice(end), body: t.slice(after, end).trim() }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function strippedHash(text) {
|
|
33
|
+
const parts = split(text)
|
|
34
|
+
return parts && crypto.createHash('sha1').update(parts.rest).digest('hex')
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let known = null
|
|
38
|
+
function KNOWN() {
|
|
39
|
+
if (!known) known = new Set(require('./spec-planning-history.json').stripped)
|
|
40
|
+
return known
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
module.exports = { split, strippedHash, KNOWN }
|
package/src/init.js
CHANGED
|
@@ -10,6 +10,7 @@ const { ensureHooks, removeHooks, HOOKS: GATE_HOOKS } = require('./env/hooks.js'
|
|
|
10
10
|
const { repoInfo, expandTokens, describeBaseBranch, baseRemote } = require('./env/resolve.js')
|
|
11
11
|
const { primaryAnchor } = require('./env/project.js')
|
|
12
12
|
const { setProjectKeys } = require('./env/projectedit.js')
|
|
13
|
+
const { split, strippedHash, KNOWN } = require('./conventions.js')
|
|
13
14
|
|
|
14
15
|
const ASSETS = path.join(__dirname, '..', 'assets')
|
|
15
16
|
|
|
@@ -27,6 +28,25 @@ function listSkills() {
|
|
|
27
28
|
.sort()
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
// Every file a skill ships, relative to its folder, `SKILL.md` first. A skill's
|
|
32
|
+
// supporting files (`<topic>.md` beside `SKILL.md`) load only when the skill
|
|
33
|
+
// reads them, which is what lets content one skill needs leave the
|
|
34
|
+
// always-loaded rules (feat-rules-budget). Dotfiles are not shipped.
|
|
35
|
+
function listSkillFiles(name) {
|
|
36
|
+
const root = path.join(ASSETS, 'skills', name)
|
|
37
|
+
const out = []
|
|
38
|
+
const walk = (d) => {
|
|
39
|
+
for (const e of fs.readdirSync(d, { withFileTypes: true })) {
|
|
40
|
+
if (e.name.startsWith('.')) continue
|
|
41
|
+
const p = path.join(d, e.name)
|
|
42
|
+
if (e.isDirectory()) walk(p)
|
|
43
|
+
else out.push(path.relative(root, p))
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
walk(root)
|
|
47
|
+
return out.sort((a, b) => (a === 'SKILL.md' ? -1 : b === 'SKILL.md' ? 1 : a.localeCompare(b)))
|
|
48
|
+
}
|
|
49
|
+
|
|
30
50
|
// Slash commands shipped as `assets/commands/*.md`, installed to
|
|
31
51
|
// `.claude/commands/`. Discovered from the bundled tree exactly like skills, so
|
|
32
52
|
// each distribution installs precisely what it ships.
|
|
@@ -478,7 +498,9 @@ function managedTargets(dir) {
|
|
|
478
498
|
abs: targetAbs,
|
|
479
499
|
bundled: render(fs.readFileSync(path.join(ASSETS, assetRel), 'utf8'), dir),
|
|
480
500
|
})
|
|
481
|
-
for (const name of SKILLS)
|
|
501
|
+
for (const name of SKILLS) {
|
|
502
|
+
for (const file of listSkillFiles(name)) add(path.join('skills', name, file), path.join(dir, '.claude', 'skills', name, file))
|
|
503
|
+
}
|
|
482
504
|
for (const name of COMMANDS)
|
|
483
505
|
add(path.join('commands', name), path.join(dir, '.claude', 'commands', name), renderCommand)
|
|
484
506
|
for (const name of RULES) add(path.join('rules', name), path.join(dir, '.claude', 'rules', name))
|
|
@@ -686,12 +708,9 @@ function copyAsset(dir, assetRelPath, targetAbs, opts) {
|
|
|
686
708
|
|
|
687
709
|
function installSkills(dir, opts) {
|
|
688
710
|
for (const name of SKILLS) {
|
|
689
|
-
|
|
690
|
-
dir,
|
|
691
|
-
|
|
692
|
-
path.join(dir, '.claude', 'skills', name, 'SKILL.md'),
|
|
693
|
-
opts,
|
|
694
|
-
)
|
|
711
|
+
for (const file of listSkillFiles(name)) {
|
|
712
|
+
copyAsset(dir, path.join('skills', name, file), path.join(dir, '.claude', 'skills', name, file), opts)
|
|
713
|
+
}
|
|
695
714
|
}
|
|
696
715
|
}
|
|
697
716
|
|
|
@@ -732,6 +751,99 @@ function installRule(dir, opts) {
|
|
|
732
751
|
}
|
|
733
752
|
}
|
|
734
753
|
|
|
754
|
+
// The project's own conventions — its typecheck and test commands — written
|
|
755
|
+
// once from a template and then the project's to edit. It is deliberately NOT
|
|
756
|
+
// a managed file: no manifest entry, never overwritten (not even by
|
|
757
|
+
// `--force`), never pruned, so filling it in trips no hash guard. That is the
|
|
758
|
+
// point of it: the conventions used to live inside the managed
|
|
759
|
+
// `spec-planning.md`, where tailoring them made the whole file "customized".
|
|
760
|
+
const CONVENTIONS_FILE = path.join('.claude', 'rules', 'project-conventions.md')
|
|
761
|
+
|
|
762
|
+
function installConventions(dir) {
|
|
763
|
+
const target = path.join(dir, CONVENTIONS_FILE)
|
|
764
|
+
if (fs.existsSync(target)) return // the project's, whatever it holds
|
|
765
|
+
ensureDir(path.dirname(target))
|
|
766
|
+
fs.writeFileSync(target, fs.readFileSync(path.join(ASSETS, 'project-conventions.md'), 'utf8'))
|
|
767
|
+
report.created.push(rel(dir, target))
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
// A customized `spec-planning.md` from before feat-rules-budget, whose only
|
|
771
|
+
// edits are in its old "Project conventions" section: carry the section into
|
|
772
|
+
// `project-conventions.md` and take the new rule, so the host stops loading
|
|
773
|
+
// 66k of the old one. Runs before the managed loop, which then finds the rule
|
|
774
|
+
// pristine and records it. Under `--force` it still runs first, so a
|
|
775
|
+
// forced update keeps the conventions the force would otherwise overwrite.
|
|
776
|
+
//
|
|
777
|
+
// WHAT WOULD FOOL THIS: an edit that exactly restores some other shipped
|
|
778
|
+
// version's text outside the section. That is still unedited text we shipped,
|
|
779
|
+
// so replacing it loses nothing. Everything else is cannot-tell: the file is
|
|
780
|
+
// kept and a warning says how to finish by hand (negative-checks.md rule 4).
|
|
781
|
+
function migrateConventions(dir, manifest, force) {
|
|
782
|
+
const relPath = '.claude/rules/spec-planning.md'
|
|
783
|
+
const target = managedTargets(dir).find((t) => t.relPath === relPath)
|
|
784
|
+
if (!target) return
|
|
785
|
+
const state = managedState(dir, relPath, manifest, target.bundled)
|
|
786
|
+
if (state !== 'customized' && state !== 'adopted') return
|
|
787
|
+
const onDisk = fs.readFileSync(target.abs, 'utf8')
|
|
788
|
+
const conventions = path.join(dir, CONVENTIONS_FILE)
|
|
789
|
+
const template = fs.readFileSync(path.join(ASSETS, 'project-conventions.md'), 'utf8')
|
|
790
|
+
const parts = split(onDisk)
|
|
791
|
+
const known = parts && KNOWN().has(strippedHash(onDisk))
|
|
792
|
+
const free = !fs.existsSync(conventions) || sameContent(fs.readFileSync(conventions, 'utf8'), template)
|
|
793
|
+
if (!known || !free) {
|
|
794
|
+
if (force) return // --force replaces the file anyway; nothing to advise
|
|
795
|
+
report.warnings.push(
|
|
796
|
+
`${relPath} kept (${Math.round(onDisk.length / 1000)}k chars, edited) — it loads in every session. ` +
|
|
797
|
+
`Move your edits into ${CONVENTIONS_FILE.split(path.sep).join('/')}, then run \`skitterspec update --force\``,
|
|
798
|
+
)
|
|
799
|
+
return
|
|
800
|
+
}
|
|
801
|
+
ensureDir(path.dirname(conventions))
|
|
802
|
+
fs.writeFileSync(conventions, `# Project conventions\n\n${parts.body}\n`)
|
|
803
|
+
report.created.push(`${CONVENTIONS_FILE.split(path.sep).join('/')} (moved from ${relPath})`)
|
|
804
|
+
fs.writeFileSync(target.abs, target.bundled)
|
|
805
|
+
writtenHashes[relPath] = sha1(target.bundled)
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
// What Claude Code loads into EVERY session from this install: each rule under
|
|
809
|
+
// `.claude/rules/` that skitterspec wrote (managed, or the conventions file)
|
|
810
|
+
// and that carries no `paths:` front-matter, plus the managed CLAUDE.md block.
|
|
811
|
+
// The budget test hangs on this (feat-rules-budget).
|
|
812
|
+
//
|
|
813
|
+
// WHAT WOULD FOOL THIS: front-matter it cannot parse. Anything other than a
|
|
814
|
+
// leading `---` block holding a `paths:` key counts as always-loaded, so a
|
|
815
|
+
// cannot-tell over-counts — the direction that fails the budget loudly rather
|
|
816
|
+
// than passing it quietly.
|
|
817
|
+
function hasPathsFrontMatter(text) {
|
|
818
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---\r?\n/.exec(text)
|
|
819
|
+
return Boolean(m && /^paths:/m.test(m[1]))
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
function alwaysLoaded(dir) {
|
|
823
|
+
const rows = []
|
|
824
|
+
const rules = [
|
|
825
|
+
...managedTargets(dir)
|
|
826
|
+
.filter((t) => t.relPath.startsWith('.claude/rules/'))
|
|
827
|
+
.map((t) => t.abs),
|
|
828
|
+
path.join(dir, CONVENTIONS_FILE),
|
|
829
|
+
]
|
|
830
|
+
for (const abs of [...new Set(rules)]) {
|
|
831
|
+
if (!fs.existsSync(abs)) continue
|
|
832
|
+
const text = fs.readFileSync(abs, 'utf8')
|
|
833
|
+
if (!hasPathsFrontMatter(text)) rows.push({ path: rel(dir, abs), chars: text.length })
|
|
834
|
+
}
|
|
835
|
+
for (const name of ['CLAUDE.md', 'CLAUDE.local.md']) {
|
|
836
|
+
const file = path.join(dir, name)
|
|
837
|
+
if (!fs.existsSync(file)) continue
|
|
838
|
+
const text = fs.readFileSync(file, 'utf8')
|
|
839
|
+
const start = text.indexOf(SPEC_MARKER_START)
|
|
840
|
+
const end = text.indexOf(SPEC_MARKER_END, start)
|
|
841
|
+
if (start === -1 || end === -1) continue
|
|
842
|
+
rows.push({ path: `${name} (skitterspec section)`, chars: end + SPEC_MARKER_END.length - start })
|
|
843
|
+
}
|
|
844
|
+
return { rows, total: rows.reduce((n, r) => n + r.chars, 0) }
|
|
845
|
+
}
|
|
846
|
+
|
|
735
847
|
// Register the review-gate hook in the project's committed settings, so a
|
|
736
848
|
// phase that owes a verdict is enforced one level below the skills. Best-effort
|
|
737
849
|
// in exactly the way `trustWorktreeRoot` is: a settings file we cannot parse is
|
|
@@ -1108,7 +1220,9 @@ function resync(dir, { force = false, claudeMd = true, diff = false, local = fal
|
|
|
1108
1220
|
resolveScope(dir, local)
|
|
1109
1221
|
if (scope === 'local') convertCommitted(dir)
|
|
1110
1222
|
const manifest = readManifest(dir)
|
|
1223
|
+
migrateConventions(dir, manifest, force)
|
|
1111
1224
|
for (const t of managedTargets(dir)) resyncManagedFile(dir, t, manifest, force)
|
|
1225
|
+
installConventions(dir)
|
|
1112
1226
|
installFolders(dir)
|
|
1113
1227
|
removeRetiredFiles(dir)
|
|
1114
1228
|
pruneRetiredManaged(dir, manifest)
|
|
@@ -1359,6 +1473,7 @@ function localManagedPaths(dir) {
|
|
|
1359
1473
|
function localExcludes(dir) {
|
|
1360
1474
|
return [
|
|
1361
1475
|
...localManagedPaths(dir),
|
|
1476
|
+
CONVENTIONS_FILE.replace(/\\/g, '/'),
|
|
1362
1477
|
'CLAUDE.local.md',
|
|
1363
1478
|
'.claude/settings.local.json',
|
|
1364
1479
|
MANIFEST_FILE.replace(/\\/g, '/'),
|
|
@@ -1376,7 +1491,7 @@ function localExcludes(dir) {
|
|
|
1376
1491
|
// and the hooks into a new .claude/settings.json (bug-local-scope-worktree).
|
|
1377
1492
|
function localSeedFiles(dir) {
|
|
1378
1493
|
if (readManifest(dir).scope !== 'local') return []
|
|
1379
|
-
return [...localManagedPaths(dir), '.claude/settings.local.json', 'CLAUDE.local.md', MANIFEST_FILE.replace(/\\/g, '/')]
|
|
1494
|
+
return [...localManagedPaths(dir), CONVENTIONS_FILE.replace(/\\/g, '/'), '.claude/settings.local.json', 'CLAUDE.local.md', MANIFEST_FILE.replace(/\\/g, '/')]
|
|
1380
1495
|
}
|
|
1381
1496
|
|
|
1382
1497
|
const EXCLUDE_START = '# >>> skitterspec (local install)'
|
|
@@ -1639,8 +1754,10 @@ function switchNames() {
|
|
|
1639
1754
|
return [...SKILLS, ...COMMANDS.map((c) => c.replace(/\.md$/, ''))]
|
|
1640
1755
|
}
|
|
1641
1756
|
|
|
1757
|
+
// The conventions file is switched with the rules: it is not managed, but a
|
|
1758
|
+
// disabled install should not go on loading half of itself.
|
|
1642
1759
|
function ruleExcludes() {
|
|
1643
|
-
return RULES.map((r) => `**/.claude/rules/${r}`)
|
|
1760
|
+
return [...RULES, path.basename(CONVENTIONS_FILE)].map((r) => `**/.claude/rules/${r}`)
|
|
1644
1761
|
}
|
|
1645
1762
|
|
|
1646
1763
|
// The local settings, parsed — `{}` when absent, null when not valid JSON.
|
|
@@ -1827,6 +1944,9 @@ function uninstall(dir, { yes = false, inFlight = [], cannotTell = null, log = (
|
|
|
1827
1944
|
const targets = new Map()
|
|
1828
1945
|
for (const t of managedTargets(dir)) targets.set(t.relPath.split(path.sep).join('/'), t.bundled)
|
|
1829
1946
|
for (const k of Object.keys(manifest.files)) if (!targets.has(k)) targets.set(k, undefined)
|
|
1947
|
+
// The conventions file is not managed, but a local install wrote it: the
|
|
1948
|
+
// untouched template goes, and a filled-in one is parked like an edit.
|
|
1949
|
+
targets.set(CONVENTIONS_FILE.split(path.sep).join('/'), fs.readFileSync(path.join(ASSETS, 'project-conventions.md'), 'utf8'))
|
|
1830
1950
|
const remove = []
|
|
1831
1951
|
const keep = []
|
|
1832
1952
|
const exclude = localExcludeFile(dir)
|
|
@@ -1981,6 +2101,7 @@ async function init({ dir, force, claudeMd, mode, isolation, workspaceMode, gati
|
|
|
1981
2101
|
installSkills(dir, { force })
|
|
1982
2102
|
installCommands(dir, { force })
|
|
1983
2103
|
installRule(dir, { force })
|
|
2104
|
+
installConventions(dir)
|
|
1984
2105
|
installHooks(dir, { force })
|
|
1985
2106
|
installFolders(dir)
|
|
1986
2107
|
removeRetiredFiles(dir)
|
|
@@ -2015,6 +2136,9 @@ module.exports = {
|
|
|
2015
2136
|
writeManifest,
|
|
2016
2137
|
managedTargets,
|
|
2017
2138
|
managedState,
|
|
2139
|
+
alwaysLoaded,
|
|
2140
|
+
CONVENTIONS_FILE,
|
|
2141
|
+
listSkillFiles,
|
|
2018
2142
|
claudeMdSectionState,
|
|
2019
2143
|
checkSync,
|
|
2020
2144
|
isExistingSetup,
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"stripped": [
|
|
3
|
+
"00d614bcd77d303496dcfa8c083bca7dd4be5e5e",
|
|
4
|
+
"0da16a55e2684023b5d000399705d05118450a6e",
|
|
5
|
+
"101d415dd33d3441d9dd6a0ce3369a346af6e674",
|
|
6
|
+
"142443be77691c80752b9db2b79e9c7844699900",
|
|
7
|
+
"1646238461f08f6e124b69c5695bbf837d05509e",
|
|
8
|
+
"16625ecd12f2532f8d831570571dfe30718811f2",
|
|
9
|
+
"16a8f86d094345c64c8aebf2a0b6f73398edbdff",
|
|
10
|
+
"177c47b3f43231ef71799f97ca69f8ce87655b1b",
|
|
11
|
+
"1bc0427c4d346b6807fa5c716ce05dfaacac807a",
|
|
12
|
+
"1d4bc86bf7591eec3a261484a26103556e824714",
|
|
13
|
+
"27aedcedab1faf84111f9bc3ae6a2009e34b3c94",
|
|
14
|
+
"27d3704fd73e20c844f9a11ea105db22dd9f9dcf",
|
|
15
|
+
"29fdd3f629ae3b20657ce46030d9f20e281e59ce",
|
|
16
|
+
"2a138f3c8e230f082f1d96a98fe313a089bab29a",
|
|
17
|
+
"2ce42303ad4cb04dc07f453f01581106f4ab30e8",
|
|
18
|
+
"30ad650da2613a3456e82c8004c237ba5e6c6e4e",
|
|
19
|
+
"30fcb8f84f591aeda48c512145d143edb7b82b13",
|
|
20
|
+
"319330c5f62e761070707b3c4e3830bfedf0de0d",
|
|
21
|
+
"34a6062629a263593647d4f8d362cfe61c86b39f",
|
|
22
|
+
"35065251debe5a3ba3a61bf7dc6cff490c682a97",
|
|
23
|
+
"37830372d0d71daefb003216fce0c5bf5032ebd1",
|
|
24
|
+
"38e35aefa0f75d7d552465393366c223a2869d75",
|
|
25
|
+
"3d8f0082c299baaef3107cfbb0769c0d47fc3686",
|
|
26
|
+
"3dc35cdbecd966d58865543e4d9938fe051d6215",
|
|
27
|
+
"474c1dcbc23317d9533fc29308ed63fc706ebb4e",
|
|
28
|
+
"4adbda577ea0211a0bd01558b88a79f14bf8bf70",
|
|
29
|
+
"4af24b4e280d53677d65221bed641915b9180697",
|
|
30
|
+
"4e475b5d32dfb0ffddd096a96c93995a52818b8b",
|
|
31
|
+
"525bfb71c1f299ab88aa44205169ed1153102fd0",
|
|
32
|
+
"531d18961bb86aeb10574b11c7ffcb4c68a58f1d",
|
|
33
|
+
"5362a0d7327152e67116eca2dec0f38276141132",
|
|
34
|
+
"5589d4c145cf3d23c3c455ad4352fd731eeeaa76",
|
|
35
|
+
"63d5082fd8d39670709199e0f174e5c4fde73683",
|
|
36
|
+
"66d4b40832bff74063794e82675481af3349ac98",
|
|
37
|
+
"67565db2c18d8fc05e6eeac7b630b4b8bfb58562",
|
|
38
|
+
"6b2c80d5a19d5ef53c216ff65eeaadd6693529ee",
|
|
39
|
+
"72c2ce1ce1956c41b04eb421ff8ea4903a28b461",
|
|
40
|
+
"77d5f7b34ea3d98722aee7b95f794b3288e6b7a8",
|
|
41
|
+
"7873adab80f7bfb13d27aa198eaf392af834866c",
|
|
42
|
+
"7f8ada09afb3eaeb4a950ba2875a26e7fbd28185",
|
|
43
|
+
"82813bbc39d04097f42c3c048fb68814e92b5c80",
|
|
44
|
+
"83cd30d39fa097c1acd3b6caca9b42ec98f221fa",
|
|
45
|
+
"84570f1aeaf2aa25ace79be83d20e2827a9a89e8",
|
|
46
|
+
"866b3bad618e8350c5e9600bdf73d4d6c9ca76c2",
|
|
47
|
+
"87c6382e7d804f28955c2db3d1b5b1213a5518c0",
|
|
48
|
+
"89c8893a89b4fcaff9de38f840695f9b4588ce75",
|
|
49
|
+
"8abebcdb1c8663252946c2d0a598159df57f7660",
|
|
50
|
+
"8b0cd5f98215d0e0e10f633b5cc7734496e546d8",
|
|
51
|
+
"8ec324adae5463e81dab04f2f44a08d3bbb6718a",
|
|
52
|
+
"8fb29110fa777932c34e68fe3c3c12a2bab2c303",
|
|
53
|
+
"8fba597927c698170543572e0d41b77b6e007e8a",
|
|
54
|
+
"94989e916fbf809d022b0eb5a29b4bfa175f19e4",
|
|
55
|
+
"94b5a4b049fb70b9becba4e8adb31ae17d24343e",
|
|
56
|
+
"974d823ad1f2e227d92ff686816fddc8b8702ae8",
|
|
57
|
+
"9f4bd04e3560ce997e95e522a8980e004e59dc1d",
|
|
58
|
+
"a22f4c3a4809593d4442b77c54e02621d6c490b1",
|
|
59
|
+
"a4b002345a4f04aaa944bb7c0d0e2a6fc4687c9b",
|
|
60
|
+
"a5b1e0a0b780e2d9c795b9ec9b1b3bb050999234",
|
|
61
|
+
"a749acd6f2b32cbb8b0916fad79e158936bcf8b8",
|
|
62
|
+
"aca552e82c3e13ee64de3297afba383fa11110ce",
|
|
63
|
+
"acb03230bf1b2e95f548f2587940e67c9a0f1481",
|
|
64
|
+
"acb9fb97b0f7698cf03a75778608674fe782c492",
|
|
65
|
+
"adb102579698445342345a803c140116d7e17212",
|
|
66
|
+
"b166726bca06618ffa7be874b1153d622e156acf",
|
|
67
|
+
"b4624d975b2a73749ffbeefc51c5a7b1ace39916",
|
|
68
|
+
"b49e2c0d724a5c3ef38d29151b5d8e3abe373462",
|
|
69
|
+
"ba2cdbe612ade3b0d1c146921d704da4370873c3",
|
|
70
|
+
"bc7676c1af761ac98fb0d7e430c369639dfb5891",
|
|
71
|
+
"c2b9fbc8df5b7f1e5b7a0228415b529ae952a930",
|
|
72
|
+
"c306804166c56e055727f450d467978a894397ca",
|
|
73
|
+
"c64f9cba2ad04bddfb8c48a15837579be1cd1e40",
|
|
74
|
+
"c80dbed0bde66469fc0ffbbeece9e2037aa28351",
|
|
75
|
+
"caaa3b1c717b1331d87b08953ed212d2f7c4f366",
|
|
76
|
+
"cd3d6b1c5c674f617d29b26f0e79a8d8f11cffc3",
|
|
77
|
+
"d0c3bd01b81d3ced60a29e35abd3125a052a8b4b",
|
|
78
|
+
"d1ff0e181c50833681f3d3827daab9746aee5bc8",
|
|
79
|
+
"d256d8bed251b7ee9f3bc4bd8dc03fa2e8d2f60a",
|
|
80
|
+
"d3290f9c881e9429bce180594d5015fbadbf752c",
|
|
81
|
+
"d4ab31cd6e813b3eee1981f58a2eaa106a543775",
|
|
82
|
+
"d4e89396b13de35687e9977c419cc1691beac50a",
|
|
83
|
+
"d58ce635f3cabac629c9efddd5015faf7d93bc99",
|
|
84
|
+
"d5a12cfe6070fc4f5148cc1bb366c63ff7474138",
|
|
85
|
+
"d886fc1e7416f28d4085e61814528ede767e71ac",
|
|
86
|
+
"da0ee5d1b3fcc1f0230c4404177eb9f4ac687f2b",
|
|
87
|
+
"dbb4d500bff7e609feac9c945891f35891195587",
|
|
88
|
+
"defe012b01373a133226e24a984b161ae66709e1",
|
|
89
|
+
"e018e3e4e8b040250fa6c06e3fa1ca783b12ecd7",
|
|
90
|
+
"e1d2db14ddc1b4ec0f17ea5e1bbf7fc8115d83ef",
|
|
91
|
+
"e89f0d25a3aefe8d9b1807a00cb946458d79bae3",
|
|
92
|
+
"e9afec7f0c9949373b617b8a5593d22be6219204",
|
|
93
|
+
"ea6914674684c6a0cf910abf3afa43053080c9be",
|
|
94
|
+
"eb8de3293bcd6ebe4e79bcbc9a3e8e70093d0cf3",
|
|
95
|
+
"ebaaf560a079abfccf7ba62edde7624168f7d37a",
|
|
96
|
+
"f2d5dba128a50f4c7ddef3f8ceae761f5f62dfb0",
|
|
97
|
+
"f2e648c8bdbbb6134d4cd7e056e8a036a8976ce4",
|
|
98
|
+
"f54a2aa39cd714d694e264067c65a439e6c94ecf",
|
|
99
|
+
"f7995e59839ec4a3bc3fe09d57d0e27db7d1755d",
|
|
100
|
+
"f9223c0d65ff12c6e3d8675cde03c9bcac65ffa4",
|
|
101
|
+
"fdefc8484cbf56d6a9869c291725171a0b45d443"
|
|
102
|
+
]
|
|
103
|
+
}
|