@erclx/aitk 0.104.1 → 0.106.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/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/claude-address-review/SKILL.md +4 -3
- package/claude/skills/claude-design-extract/SKILL.md +3 -3
- package/claude/skills/claude-docs/SKILL.md +1 -1
- package/claude/skills/claude-groundwork/SKILL.md +3 -2
- package/claude/skills/claude-memory-capture/SKILL.md +2 -2
- package/claude/skills/claude-pr-review/SKILL.md +1 -1
- package/claude/skills/claude-standards-audit/SKILL.md +8 -6
- package/claude/skills/claude-worktree/SKILL.md +6 -1
- package/claude/skills/create-skill/SKILL.md +2 -2
- package/claude/skills/create-snippet/SKILL.md +2 -2
- package/claude/skills/create-snippet/references/snippets.md +2 -2
- package/claude/skills/create-standard/SKILL.md +2 -2
- package/claude/skills/docs-sync/SKILL.md +2 -2
- package/claude/skills/git-issue/SKILL.md +2 -2
- package/claude/skills/git-issue/references/issue.md +2 -2
- package/claude/skills/git-pr/SKILL.md +2 -2
- package/claude/skills/git-pr/references/pr.md +2 -2
- package/claude/skills/git-split/references/pr.md +2 -2
- package/claude/skills/git-stage/SKILL.md +2 -2
- package/claude/skills/migration-standards/SKILL.md +1 -1
- package/claude/skills/setup-indexes/SKILL.md +1 -1
- package/claude/skills/write-human/REQUIREMENT.md +46 -0
- package/claude/skills/write-human/SKILL.md +68 -0
- package/claude/skills/write-human/references/density.md +38 -0
- package/claude/skills/write-human/references/machine-tells.md +107 -0
- package/claude/skills/write-human/references/source-material.md +37 -0
- package/docs/agents/commands.md +2 -1
- package/docs/agents/index.md +1 -0
- package/docs/agents/markdown-audit.md +7 -7
- package/docs/agents/test-order.md +56 -0
- package/docs/ai-workflow.md +3 -0
- package/docs/target-projects.md +1 -1
- package/governance/rules/claude/500-prose.md +7 -5
- package/governance/rules/claude/501-markdown.md +5 -4
- package/governance/rules/core/070-planning.md +1 -0
- package/package.json +1 -1
- package/scripts/core/install-check.sh +1 -1
- package/src/commands/gov.ts +135 -0
- package/src/commands/markdown.ts +2 -2
- package/src/comments/vocabulary.ts +1 -1
- package/src/gov/test-order.ts +383 -0
- package/src/markdown/bans.ts +2 -2
- package/src/standards/closure.ts +1 -1
- package/standards/bundled/issue.md +2 -2
- package/standards/bundled/pr.md +2 -2
- package/standards/bundled/snippets.md +2 -2
- package/standards/diagrams.md +5 -5
- package/standards/glossary.md +2 -2
- package/standards/groundwork.md +6 -2
- package/standards/index.md +1 -2
- package/standards/intake.md +2 -2
- package/standards/markdown.md +55 -6
- package/standards/memory.md +2 -2
- package/standards/plan.md +2 -2
- package/standards/publish.md +2 -2
- package/standards/readme.md +4 -4
- package/standards/skill.md +2 -2
- package/standards/standard.md +2 -2
- package/standards/teach.md +2 -2
- package/standards/versioning.md +2 -2
- package/standards/wireframes.md +3 -3
- package/tooling/astro/manifest.toml +5 -5
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +2 -2
- package/tooling/vite-react/manifest.toml +4 -4
- package/tooling/web/configs/scripts/worktree-port.sh +44 -6
- package/tooling/web/manifest.toml +3 -3
- package/tooling/web/reference.md +4 -1
- package/standards/prose.md +0 -89
package/standards/publish.md
CHANGED
|
@@ -12,7 +12,7 @@ Governs the scan an author runs against finished text on its way out, the form a
|
|
|
12
12
|
Does not govern:
|
|
13
13
|
|
|
14
14
|
- Which characters are banned, and the formatting the text carries: `markdown.md`
|
|
15
|
-
- The voice and
|
|
15
|
+
- The voice and rhythm the text is written in: the `write-human` skill
|
|
16
16
|
- The phase-label rule and the table of surfaces each namespace may appear on: `versioning.md`
|
|
17
17
|
- Which gap a given surface has, and what it publishes through, which that surface names for itself
|
|
18
18
|
|
|
@@ -24,7 +24,7 @@ Run the scan as an explicit step against the finished text. Having read the unde
|
|
|
24
24
|
|
|
25
25
|
## Banned characters
|
|
26
26
|
|
|
27
|
-
`markdown.md` holds the character bans and
|
|
27
|
+
`markdown.md` holds the character bans and the banned words alike. Read it at scan time rather than working the sets from memory, then scan the drafted text and rewrite each occurrence.
|
|
28
28
|
|
|
29
29
|
Restructure the sentence rather than substituting the character. A semicolon swapped for a period leaves both clauses in the order the semicolon chose, which is the shape the ban exists to remove.
|
|
30
30
|
|
package/standards/readme.md
CHANGED
|
@@ -5,7 +5,7 @@ description: Readme voice, structure, and content conventions
|
|
|
5
5
|
|
|
6
6
|
# Readme reference
|
|
7
7
|
|
|
8
|
-
Applies to every `README.md`. The `## Voice` section states the voice for a repository's root README, so `
|
|
8
|
+
Applies to every `README.md`. The `## Voice` section states the voice for a repository's root README, so the `write-human` skill yields to it there. The yield covers voice alone. The rhythm and density rules that skill carries stay in force, as do the spelling rules, banned words, punctuation, and formatting in `markdown.md`, so the warmer register ships with the same hygiene: no em dashes, no semicolons, no buzzwords.
|
|
9
9
|
|
|
10
10
|
The reader is what changes. Reference prose serves someone who already committed to the project and is scanning for a fact. A root README meets someone deciding whether to commit at all, and it is often the only file they read.
|
|
11
11
|
|
|
@@ -15,13 +15,13 @@ Governs every `README.md`: voice, heading structure, required and optional secti
|
|
|
15
15
|
|
|
16
16
|
Does not govern:
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
18
|
+
- Rhythm and sentence construction in README prose: the `write-human` skill, which yields the voice and keeps the rest
|
|
19
|
+
- Spelling, banned words, punctuation, and formatting in README prose: `markdown.md`, which yields nothing
|
|
20
20
|
- Product scope and goals: `requirements.md`
|
|
21
21
|
|
|
22
22
|
## Voice
|
|
23
23
|
|
|
24
|
-
Scoped to the README at a repository root. A nested README documenting a folder, a harness, or an internal tool keeps the reference voice
|
|
24
|
+
Scoped to the README at a repository root. A nested README documenting a folder, a harness, or an internal tool keeps the reference voice the `write-human` skill carries, since its reader has already committed and arrived looking for a fact.
|
|
25
25
|
|
|
26
26
|
- Address the reader in second person. First-person plural needs an authoring organization as its antecedent, so a single-maintainer project has none to use.
|
|
27
27
|
- Use contractions wherever the sentence reads better for one. Do not force them in.
|
package/standards/skill.md
CHANGED
|
@@ -17,8 +17,8 @@ Does not govern:
|
|
|
17
17
|
|
|
18
18
|
- Path-scoped coding rules, which load on a file match rather than on a request match: `rule.md`
|
|
19
19
|
- Single-purpose chat prompts carrying no frontmatter, references, or scripts: `snippets.md`
|
|
20
|
-
- Voice and
|
|
21
|
-
- Punctuation and
|
|
20
|
+
- Voice, rhythm, and sentence construction in a skill body: the `write-human` skill
|
|
21
|
+
- Punctuation, formatting, and word choice in a skill body: `markdown.md`
|
|
22
22
|
- The transform from a branch name to a slug a skill carries in a filename: `slug.md`
|
|
23
23
|
- The domain conventions a skill cites, each of which belongs to the standard that owns it
|
|
24
24
|
|
package/standards/standard.md
CHANGED
|
@@ -17,8 +17,8 @@ Governs each authored standard under `standards/`: its stated jurisdiction, succ
|
|
|
17
17
|
|
|
18
18
|
Does not govern:
|
|
19
19
|
|
|
20
|
-
- The voice and
|
|
21
|
-
- The punctuation and
|
|
20
|
+
- The voice, rhythm, and sentence construction a standard is written in: the `write-human` skill
|
|
21
|
+
- The punctuation, formatting, and word choice a standard is written in: `markdown.md`
|
|
22
22
|
- The shape of any artifact a standard governs, which is that standard's own subject
|
|
23
23
|
|
|
24
24
|
## What a working standard looks like
|
package/standards/teach.md
CHANGED
|
@@ -20,8 +20,8 @@ Does not govern:
|
|
|
20
20
|
- Where a durable page goes once it leaves the workspace, which belongs to the routing test the destination surface states
|
|
21
21
|
- One question measured in depth before anyone can plan against it: `groundwork.md`
|
|
22
22
|
- A dump of many findings filed by domain, each carrying its own verdict: `intake.md`
|
|
23
|
-
- Voice and
|
|
24
|
-
- Headings, punctuation, and file references: `markdown.md`
|
|
23
|
+
- Voice, rhythm, and sentence construction: the `write-human` skill
|
|
24
|
+
- Headings, punctuation, word choice, and file references: `markdown.md`
|
|
25
25
|
- When a workspace opens at all, and the procedure that runs one, which belong to the surface driving it
|
|
26
26
|
|
|
27
27
|
## What a working workspace looks like
|
package/standards/versioning.md
CHANGED
|
@@ -16,8 +16,8 @@ Does not govern:
|
|
|
16
16
|
- The format of a phase label, which is project-specific by the rule below
|
|
17
17
|
- Task filenames and board layout: `tasks.md`
|
|
18
18
|
- Commit subject, branch name, and pull request title format: `commit.md`, `branch.md`, and `pr.md`
|
|
19
|
-
- Voice and
|
|
20
|
-
- Punctuation and
|
|
19
|
+
- Voice, rhythm, and sentence construction in any text carrying a label: the `write-human` skill
|
|
20
|
+
- Punctuation, formatting, and word choice in any text carrying a label: `markdown.md`
|
|
21
21
|
|
|
22
22
|
## Phase labels
|
|
23
23
|
|
package/standards/wireframes.md
CHANGED
|
@@ -17,8 +17,8 @@ Does not govern:
|
|
|
17
17
|
|
|
18
18
|
- Tokens, typography, spacing, and the rest of the visual system: `design.md`
|
|
19
19
|
- The mechanism behind a surface: `context.md`
|
|
20
|
-
- Voice and
|
|
21
|
-
- Punctuation and
|
|
20
|
+
- Voice, rhythm, and sentence construction in wireframe prose: the `write-human` skill
|
|
21
|
+
- Punctuation, formatting, and word choice in wireframe prose: `markdown.md`
|
|
22
22
|
|
|
23
23
|
## What a working wireframe looks like
|
|
24
24
|
|
|
@@ -75,7 +75,7 @@ Reference the context entry from the wireframe by path when a reader needs the m
|
|
|
75
75
|
## Maintenance
|
|
76
76
|
|
|
77
77
|
- When a surface's layout or interaction changes, update its wireframe file in the same PR. A wireframe showing a defunct layout is worse than none.
|
|
78
|
-
- The Behavior and Copy prose around an ASCII block is prose and follows `
|
|
78
|
+
- The Behavior and Copy prose around an ASCII block is prose and follows `markdown.md` and the `write-human` skill. The fenced block itself is not, so a check scoped to prose is the wrong thing to rely on for what sits inside it.
|
|
79
79
|
|
|
80
80
|
## Template
|
|
81
81
|
|
|
@@ -15,17 +15,17 @@ packages = [
|
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
[scripts]
|
|
18
|
-
"dev" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) astro dev"
|
|
18
|
+
"dev" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && astro dev"
|
|
19
19
|
"build" = "astro check && astro build"
|
|
20
|
-
"preview" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) astro preview"
|
|
20
|
+
"preview" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && astro preview"
|
|
21
21
|
"astro" = "astro"
|
|
22
22
|
"typecheck" = "astro check"
|
|
23
23
|
"setup" = "./scripts/setup.sh"
|
|
24
24
|
|
|
25
25
|
[scripts.override]
|
|
26
|
-
"screenshot" = "PREVIEW_PORT=$(bash scripts/worktree-port.sh 4321) bash scripts/screenshot.sh"
|
|
27
|
-
"dev" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) astro dev"
|
|
28
|
-
"preview" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) astro preview"
|
|
26
|
+
"screenshot" = "PREVIEW_PORT=$(bash scripts/worktree-port.sh 4321) && export PREVIEW_PORT && bash scripts/screenshot.sh"
|
|
27
|
+
"dev" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && astro dev"
|
|
28
|
+
"preview" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && astro preview"
|
|
29
29
|
|
|
30
30
|
[gitignore]
|
|
31
31
|
"# Astro" = [".astro/"]
|
|
@@ -25,7 +25,7 @@ esac
|
|
|
25
25
|
[ -f "$file" ] || exit 0
|
|
26
26
|
|
|
27
27
|
# The audit verb owns the ban sets, so this hook carries no copy of them. The
|
|
28
|
-
# awk this replaces parsed the word bans out of the project's own
|
|
28
|
+
# awk this replaces parsed the word bans out of the project's own standards,
|
|
29
29
|
# hardcoded the em-dash and semicolon, and reached none of the spellings, so a
|
|
30
30
|
# British spelling passed at edit time and a corpus check caught it later with
|
|
31
31
|
# nothing in between explaining the difference. A ban class added to the verb
|
|
@@ -79,7 +79,7 @@ elif [ -n "$empty" ]; then
|
|
|
79
79
|
fi
|
|
80
80
|
|
|
81
81
|
if [ -n "$hits" ]; then
|
|
82
|
-
found=$(printf 'Standards-audit:
|
|
82
|
+
found=$(printf 'Standards-audit: markdown.md violations in %s. Rewrite the sentence (do not lazy-swap). A code span is the answer only where the token is genuinely an identifier under discussion.\n%s' "$file" "$hits")
|
|
83
83
|
msg="${msg:+$msg$nl}$found"
|
|
84
84
|
fi
|
|
85
85
|
|
|
@@ -11,13 +11,13 @@ packages = [
|
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
[scripts]
|
|
14
|
-
"dev" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) vite"
|
|
14
|
+
"dev" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && vite"
|
|
15
15
|
"build" = "tsc --noEmit && vite build"
|
|
16
|
-
"preview" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) vite preview"
|
|
16
|
+
"preview" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && vite preview"
|
|
17
17
|
"typecheck" = "tsc --noEmit"
|
|
18
18
|
"setup" = "./scripts/setup.sh"
|
|
19
19
|
|
|
20
20
|
[scripts.override]
|
|
21
21
|
"build" = "tsc --noEmit && vite build"
|
|
22
|
-
"dev" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) vite"
|
|
23
|
-
"preview" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) vite preview"
|
|
22
|
+
"dev" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && vite"
|
|
23
|
+
"preview" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && vite preview"
|
|
@@ -3,10 +3,18 @@ set -euo pipefail
|
|
|
3
3
|
|
|
4
4
|
# Prints a port for this working directory: the base itself in a normal
|
|
5
5
|
# checkout, and the base plus a per-worktree offset in a linked git worktree,
|
|
6
|
-
# so two worktrees of one repository never serve on one port.
|
|
6
|
+
# so two worktrees of one repository never serve on one port. A folder left
|
|
7
|
+
# behind after its worktree was removed is refused rather than served, since
|
|
8
|
+
# every port it derives lands on the one the main checkout wanted.
|
|
7
9
|
|
|
8
10
|
base="${1:-0}"
|
|
9
11
|
band=50
|
|
12
|
+
worktrees_dir=".claude/worktrees"
|
|
13
|
+
|
|
14
|
+
refuse() {
|
|
15
|
+
echo "worktree-port: $1 is a leftover worktree folder, because $2." >&2
|
|
16
|
+
echo "worktree-port: a port derived here collides with the main checkout, so remove the folder, or set WORKTREE_PORT_OFFSET to serve from it anyway." >&2
|
|
17
|
+
}
|
|
10
18
|
|
|
11
19
|
offset() {
|
|
12
20
|
if [[ -n "${WORKTREE_PORT_OFFSET:-}" ]]; then
|
|
@@ -14,23 +22,53 @@ offset() {
|
|
|
14
22
|
return
|
|
15
23
|
fi
|
|
16
24
|
|
|
17
|
-
local git_dir common_dir name
|
|
18
|
-
|
|
25
|
+
local here git_dir common_dir toplevel dir name
|
|
26
|
+
here=$(pwd -P)
|
|
27
|
+
|
|
28
|
+
if ! git_dir=$(git rev-parse --git-dir 2>/dev/null); then
|
|
29
|
+
# Git refuses outright when a `.git` file names an administrative directory
|
|
30
|
+
# that is gone, which is what removing a worktree by hand leaves behind.
|
|
31
|
+
# Outside a repository there is no pointer at all and the base is correct.
|
|
32
|
+
dir=$here
|
|
33
|
+
while [[ "$dir" != / ]]; do
|
|
34
|
+
if [[ -f "$dir/.git" ]]; then
|
|
35
|
+
refuse "$dir" "its .git file names an administrative directory that is gone"
|
|
36
|
+
return 1
|
|
37
|
+
fi
|
|
38
|
+
[[ -d "$dir/.git" ]] && break
|
|
39
|
+
dir=$(dirname "$dir")
|
|
40
|
+
done
|
|
19
41
|
echo 0
|
|
20
42
|
return
|
|
21
|
-
|
|
43
|
+
fi
|
|
44
|
+
|
|
22
45
|
common_dir=$(git rev-parse --git-common-dir 2>/dev/null) || {
|
|
23
46
|
echo 0
|
|
24
47
|
return
|
|
25
48
|
}
|
|
49
|
+
toplevel=$(git rev-parse --show-toplevel 2>/dev/null) || {
|
|
50
|
+
echo 0
|
|
51
|
+
return
|
|
52
|
+
}
|
|
53
|
+
toplevel=$(cd "$toplevel" && pwd -P)
|
|
26
54
|
|
|
27
55
|
if [[ "$(cd "$git_dir" && pwd -P)" == "$(cd "$common_dir" && pwd -P)" ]]; then
|
|
56
|
+
# The main checkout answers here, and so does every directory under it,
|
|
57
|
+
# including a folder whose `.git` was deleted along with its worktree,
|
|
58
|
+
# since git then walks upward and reports the parent repository. Location
|
|
59
|
+
# is the only signal separating the two, so a directory sitting under the
|
|
60
|
+
# worktrees folder is refused rather than handed the base port.
|
|
61
|
+
if [[ "$here/" == "$toplevel/$worktrees_dir/"?* ]]; then
|
|
62
|
+
refuse "$here" "no worktree is registered for it"
|
|
63
|
+
return 1
|
|
64
|
+
fi
|
|
28
65
|
echo 0
|
|
29
66
|
return
|
|
30
67
|
fi
|
|
31
68
|
|
|
32
|
-
name=$(basename "$
|
|
69
|
+
name=$(basename "$toplevel")
|
|
33
70
|
echo $(($(printf '%s' "$name" | cksum | cut -d' ' -f1) % band + 1))
|
|
34
71
|
}
|
|
35
72
|
|
|
36
|
-
|
|
73
|
+
value=$(offset) || exit 1
|
|
74
|
+
echo $((base + value))
|
|
@@ -42,13 +42,13 @@ packages = [
|
|
|
42
42
|
"test:run" = "vitest run --reporter=verbose"
|
|
43
43
|
"test:ui" = "vitest --ui"
|
|
44
44
|
"test:coverage" = "vitest run --coverage"
|
|
45
|
-
"test:e2e" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) playwright test"
|
|
46
|
-
"test:e2e:ui" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) playwright test --ui"
|
|
45
|
+
"test:e2e" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && playwright test"
|
|
46
|
+
"test:e2e:ui" = "WORKTREE_PORT_OFFSET=$(bash scripts/worktree-port.sh) && export WORKTREE_PORT_OFFSET && playwright test --ui"
|
|
47
47
|
"test:e2e:report" = "playwright show-report"
|
|
48
48
|
"check:full" = "./scripts/verify.sh && bun run test:e2e"
|
|
49
49
|
|
|
50
50
|
[scripts.override]
|
|
51
|
-
"screenshot" = "PREVIEW_PORT=$(bash scripts/worktree-port.sh 4173) bash scripts/screenshot.sh"
|
|
51
|
+
"screenshot" = "PREVIEW_PORT=$(bash scripts/worktree-port.sh 4173) && export PREVIEW_PORT && bash scripts/screenshot.sh"
|
|
52
52
|
|
|
53
53
|
[gitignore]
|
|
54
54
|
"# Build" = ["dist/"]
|
package/tooling/web/reference.md
CHANGED
|
@@ -16,7 +16,7 @@ Golden config files live in `tooling/web/configs/` and are copied into the targe
|
|
|
16
16
|
- `.vscode/extensions.json` and `.vscode/settings.json`: editor wiring for ESLint, Tailwind, Playwright, Vitest.
|
|
17
17
|
- `.github/workflows/verify.yml`: `static-checks`, `unit-tests`, `build-verify`, and `e2e-tests` jobs.
|
|
18
18
|
- `scripts/verify.sh`: extends base verify with typecheck, lint, unit tests, and build in the full order.
|
|
19
|
-
- `scripts/worktree-port.sh`: prints a base port plus this working directory's offset. Called with no argument it prints the offset alone.
|
|
19
|
+
- `scripts/worktree-port.sh`: prints a base port plus this working directory's offset. Called with no argument it prints the offset alone. It refuses a folder left under the worktrees directory after its worktree was removed, rather than printing a port for it.
|
|
20
20
|
|
|
21
21
|
## What stays in per-stack adapters
|
|
22
22
|
|
|
@@ -40,6 +40,9 @@ Two worktrees of one repository run the same stack, so a fixed port makes the se
|
|
|
40
40
|
- Derive every served port from `scripts/worktree-port.sh`. Never write a port literal into a script string.
|
|
41
41
|
- Read `WORKTREE_PORT_OFFSET` in a config and add it to the stack's default port. Unset yields the default, so a plain clone keeps the port it has always served on.
|
|
42
42
|
- Draw the offset from a band of 50, hashed from the worktree folder name. Two worktrees can hash to one offset, so set `WORKTREE_PORT_OFFSET` by hand to break a tie.
|
|
43
|
+
- Expect a non-zero exit and no port from a folder left under `.claude/worktrees/` once its worktree is gone. Git reports the parent repository from inside one, so the helper cannot read it as a worktree and every base it serves would land on the main checkout's port. Both shapes refuse, and they reach differently. A folder whose own `.git` was deleted refuses only under that directory, since location is the only thing separating it from an ordinary subdirectory the base port is correct for. A folder whose `.git` names a pruned administrative directory refuses wherever it sits, because a pointer to nothing is broken regardless of where the folder is.
|
|
44
|
+
- Call it as `VAR=$(bash scripts/worktree-port.sh) && export VAR && <server>`, never as the shorter `VAR=$(bash scripts/worktree-port.sh) <server>`. An assignment prefix discards the exit status of its own substitution, so the shorter form starts the server with `VAR` set to the empty string, every config reads that back as an offset of zero, and the refusal lands on the port it was raised to protect. The assignment alone carries the status, which is what the `&&` reads.
|
|
45
|
+
- Set `WORKTREE_PORT_OFFSET` by hand to serve from such a folder anyway. That is the one override, and it is checked before any directory test.
|
|
43
46
|
- Force-replace `dev` and `preview` through `[scripts.override]`. Both stacks' scaffolds define those keys, and a plain `[scripts]` entry never replaces a key the scaffold already wrote.
|
|
44
47
|
- Set `strictPort` on every dev and preview server. A server that walks to the next free port serves where nothing is looking for it.
|
|
45
48
|
- Set Playwright `reuseExistingServer: false`. Reuse attaches to whatever answers on the port, which reports a pass against another branch's code and prints nothing to say so.
|
package/standards/prose.md
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Prose reference
|
|
3
|
-
description: Voice, language, what prose may claim, and frontmatter wording for reference markdown
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Prose reference
|
|
7
|
-
|
|
8
|
-
Applies to markdown reference docs, READMEs, and inline documentation in repos. It is the default voice for `.md` files and yields to any surface with its own voice, such as blogs, emails, changelogs, or commit messages. It also yields wherever another standard states the voice for the surface it governs, which is how a surface claims the exemption without this file having to name it.
|
|
9
|
-
|
|
10
|
-
The yield covers voice alone. The language rules below stay in force on every surface, including the surfaces no automated check reaches, as do the mechanics in `markdown.md`.
|
|
11
|
-
|
|
12
|
-
## Scope
|
|
13
|
-
|
|
14
|
-
Governs voice, word choice, what prose may claim about its subject and its sources, and frontmatter wording wherever prose is written. It is an attribute standard rather than a document-type one, so it applies over documents whose shape another standard sets, yields on voice alone where that standard states one, and carries no template because voice is written across every document and has none of its own to shape.
|
|
15
|
-
|
|
16
|
-
Does not govern:
|
|
17
|
-
|
|
18
|
-
- Headings, list and paragraph structure, code spans, the form a date takes, punctuation, emphasis, and file references: `markdown.md`
|
|
19
|
-
- What sections a document has, or what belongs in each: the standard for that document type
|
|
20
|
-
- Which frontmatter fields a document carries, which is that standard's own subject. This file governs the wording of a `title` and a `description` and nothing else about them.
|
|
21
|
-
- Phase-label and semver discipline: `versioning.md`
|
|
22
|
-
- The scan that applies these bans to finished text on its way out: `publish.md`
|
|
23
|
-
- Code style and language conventions, which are governance rules rather than a standard
|
|
24
|
-
|
|
25
|
-
## Voice
|
|
26
|
-
|
|
27
|
-
- Write for a developer who is scanning, not studying. Every sentence should be understandable on first read.
|
|
28
|
-
- Use active voice. Default to present tense unless past or future tense is factually correct.
|
|
29
|
-
- Prioritize direct verbs and plain words, using the minimum necessary. Write `use` not `utilize`, `help` not `facilitate`, `is` not `serves as`.
|
|
30
|
-
- Vary sentence length and opening structure to break uniform cadence. Do not start consecutive sentences the same way.
|
|
31
|
-
- Use substantive connectives where flow matters, but never add words solely for rhythm. Terse reference prose needs no padding.
|
|
32
|
-
- Be direct on established facts. Hedge on genuinely uncertain claims.
|
|
33
|
-
- Assume developer-level technical knowledge. Skip hand-holding explanations.
|
|
34
|
-
- Front-load key information in each paragraph. Keep paragraphs concise and scannable.
|
|
35
|
-
- Every sentence must provide new information. Cut redundant context.
|
|
36
|
-
|
|
37
|
-
## Language
|
|
38
|
-
|
|
39
|
-
- Use American English spelling. Prefer `-ize` over `-ise`, `-or` over `-our`, `-er` over `-re` (`organize`, `analyze`, `summarize`, `recognize`, `behavior`, `color`, `center`)
|
|
40
|
-
- Do not use marketing buzzwords (`seamless`, `robust`, `powerful`, `revolutionary`, `enhanced`, `allows`, `leverage`)
|
|
41
|
-
- Do not use vague qualifiers (`simply`, `just`, `easily`, `quickly`, `very`, `really`)
|
|
42
|
-
- Open a sentence with its subject and action, not filler (`Note that`, `Basically`), a hollow connective (`That being said`, `It's worth noting`), or a gerund windup (`Leveraging the API...`). Substantive transitions that carry a real relationship are fine.
|
|
43
|
-
- Do not use the negative parallelism pattern (`It's not X, it's Y`, `not because X, but because Y`)
|
|
44
|
-
- Do not pad verb phrases or delay the action. Write the shortest form (`in order to` → `to`, `ensure that X is set` → `set X`, `By doing X, you can Y` → state Y directly).
|
|
45
|
-
- Do not address the reader as a participant (`Let's`, `Here's`, `Here are`). State the content directly.
|
|
46
|
-
- Commit to a position. Do not hedge in clusters (`It might be worth considering`) or use false balance (`While X is true, Y is also important`). Recommend, or state the tradeoff.
|
|
47
|
-
- Do not inflate significance. State what a thing does rather than calling it `a major milestone` or `a turning point for the field`.
|
|
48
|
-
- Do not name a person, company, or product to borrow its authority. Name a source only where the claim turns on who made it.
|
|
49
|
-
- Do not attribute a claim to an unnamed authority (`experts say`, `studies show`, `it is widely believed`). Name the source or cut the claim.
|
|
50
|
-
- Do not introduce a fact, name, date, or citation the source does not carry when rewriting existing text. A rewrite changes wording and never claims.
|
|
51
|
-
|
|
52
|
-
The character bans sit in `markdown.md` under `## Punctuation` rather than here, because an em dash and a semicolon are typography and the bans here reach the words a sentence chooses and the claims it makes. A surface applying both reads both files.
|
|
53
|
-
|
|
54
|
-
## Frontmatter descriptions
|
|
55
|
-
|
|
56
|
-
When frontmatter carries a short `title` or `description` used for catalog display:
|
|
57
|
-
|
|
58
|
-
- `title`: sentence case, identifies the file uniquely against its siblings in the same catalog. Proper nouns retain their casing. No trailing period.
|
|
59
|
-
- `description`: sentence case, names the specific topics covered so a reader can decide whether to open the file. Lead with concrete subjects, strip filler like "guide to", "overview of", or "documentation about". No trailing period, no leading article (`the`, `a`).
|
|
60
|
-
- Do not mechanically reuse the H1 as the description.
|
|
61
|
-
|
|
62
|
-
## Examples
|
|
63
|
-
|
|
64
|
-
Each pair shows a banned pattern and its fix.
|
|
65
|
-
|
|
66
|
-
```markdown
|
|
67
|
-
Bad: The configuration file serves as the central hub for all build settings.
|
|
68
|
-
Good: Configuration lives in `vite.config.ts`.
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
```markdown
|
|
72
|
-
Bad: In order to configure the server, you'll need to ensure that the port is set.
|
|
73
|
-
Good: Set `port` in the server config.
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
```markdown
|
|
77
|
-
Bad: It's not just a cache. It's a system for intelligent memory management.
|
|
78
|
-
Good: The cache is an LRU store. It evicts the least-recently-used entry when full.
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
```markdown
|
|
82
|
-
Bad: Leveraging the retry mechanism, developers can build more resilient integrations.
|
|
83
|
-
Good: Use the `retry` option for failed webhooks. Set `maxRetries` to 3.
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
```markdown
|
|
87
|
-
Bad: It might be worth considering whether to enable caching.
|
|
88
|
-
Good: Enable caching for read-heavy endpoints. Skip it for writes.
|
|
89
|
-
```
|