repo-build-skill 0.1.4 → 0.1.6

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.
@@ -4,18 +4,18 @@
4
4
  "name": "Auny LLC"
5
5
  },
6
6
  "metadata": {
7
- "version": "0.1.4",
7
+ "version": "0.1.6",
8
8
  "description": "Skill pack that teaches your AI to build, release and launch a GitHub repo: stack pick, README, AGENTS.md, llms.txt, repo SEO and AEO, trusted publishing."
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "repo-build-skill",
13
- "version": "0.1.4",
13
+ "version": "0.1.6",
14
14
  "description": "Skill pack that teaches your AI to build, release and launch a GitHub repo: stack pick, README, AGENTS.md, llms.txt, repo SEO and AEO, trusted publishing.",
15
15
  "author": {
16
16
  "name": "Auny LLC"
17
17
  },
18
- "homepage": "https://www.npmjs.com/package/repo-build-skill",
18
+ "homepage": "https://repo-build-skill.aunysillyme.dev/",
19
19
  "repository": "https://github.com/aunysillyme/repo-build-skill",
20
20
  "license": "MIT",
21
21
  "skills": [
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "repo-build-skill",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Skill pack that teaches your AI to build, release and launch a GitHub repo: stack pick, README, AGENTS.md, llms.txt, repo SEO and AEO, trusted publishing.",
5
5
  "author": {
6
6
  "name": "Auny LLC"
7
7
  },
8
- "homepage": "https://www.npmjs.com/package/repo-build-skill",
8
+ "homepage": "https://repo-build-skill.aunysillyme.dev/",
9
9
  "repository": "https://github.com/aunysillyme/repo-build-skill",
10
10
  "license": "MIT",
11
11
  "skills": [
package/CHANGELOG.md CHANGED
@@ -6,6 +6,35 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.6] - 2026-11-29
10
+
11
+ ### Added
12
+
13
+ - Subcommand `--help` and `-h` support across `install`, `uninstall`, `check`, `explain` and `set`.
14
+ - `CONFIRMED` GitHub default search scope and answer-engine search crawler guidance in `references/discoverability.md`, plus explicit AI search crawler rules in `website/build.mjs`.
15
+ - Expanded npm discovery keywords for supported AI hosts, workflows and provenance surfaces.
16
+
17
+ ### Changed
18
+
19
+ - Upgraded 20 GitHub discovery topic slots across `.repo-build/facts.json` and `REPO_SETTINGS.md` (#9).
20
+ - Faster repository and history checking via `Set`-backed file/directory lookups, cached directory symlink verification, precompiled privacy regexes, binary history blob skipping, batched tag reads and shared scan preparation.
21
+ - Synchronized `homepage` metadata to `https://repo-build-skill.aunysillyme.dev/`, updated the 9-row sibling set, placed `Part of a set` ahead of `Optional` in `llms.txt` and refreshed package proof and self-application receipts.
22
+
23
+ ### Fixed
24
+
25
+ - Single-pass HTML attribute decoding in `website/check.mjs` (CodeQL `js/double-escaping`), `notify-dev-site.yml` workflow test coverage and job timeout, headless `uninstall` prompt wording and the moved OpenSSF Scorecard workflow reference URL.
26
+
27
+ ## [0.1.5] - 2026-11-10
28
+
29
+ ### Added
30
+
31
+ - Weekly dependency updates for GitHub Actions and npm.
32
+
33
+ ### Changed
34
+
35
+ - Hardened Markdown gate escaping and heading sanitization.
36
+ - Documented security reporting targets and the repository security settings read-back.
37
+
9
38
  ## [0.1.4] - 2026-10-28
10
39
 
11
40
  ### Changed
@@ -52,7 +81,9 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
52
81
  - Public synthetic outcome fixtures and dated package measurements make claims reproducible.
53
82
  - Release, proof refresh and repository health workflows document the maintenance loop.
54
83
 
55
- [Unreleased]: https://github.com/aunysillyme/repo-build-skill/compare/v0.1.4...HEAD
84
+ [Unreleased]: https://github.com/aunysillyme/repo-build-skill/compare/v0.1.6...HEAD
85
+ [0.1.6]: https://github.com/aunysillyme/repo-build-skill/compare/v0.1.5...v0.1.6
86
+ [0.1.5]: https://github.com/aunysillyme/repo-build-skill/compare/v0.1.4...v0.1.5
56
87
  [0.1.4]: https://github.com/aunysillyme/repo-build-skill/compare/v0.1.3...v0.1.4
57
88
  [0.1.3]: https://github.com/aunysillyme/repo-build-skill/compare/v0.1.2...v0.1.3
58
89
  [0.1.2]: https://github.com/aunysillyme/repo-build-skill/compare/v0.1.1...v0.1.2
package/README.md CHANGED
@@ -69,6 +69,11 @@ The [compatibility page](docs/COMPATIBILITY.md) links each host's loading check.
69
69
  | [model-orchestrator](https://github.com/aunysillyme/model-orchestrator) | Model router for AI coding agents: routes routine work to cheaper models with routing rules, 8 subagents, hooks and a CLI runner |
70
70
  | **repo-build-skill** | Skill pack that teaches your AI to build, release and launch a GitHub repo: stack pick, README, AGENTS.md, llms.txt, repo SEO and AEO, trusted publishing. |
71
71
  | [website-build-skill](https://github.com/aunysillyme/website-build-skill) | A skill pack that turns your AI into an expert website builder: current research, design, code, accessibility, speed, SEO and security, alone or as a team. |
72
+ | [lean-browser-use](https://github.com/aunysillyme/lean-browser-use) | Cut Claude Code browser use cost 3% to 25% (about 14% in 2 runs): fresh runner subagent, bulk reads, 3 guards and a token meter. One npx command. |
73
+ | [lean-computer-use](https://github.com/aunysillyme/lean-computer-use) | Background Mac computer control for AI agents: desk tools, a fresh runner subagent, retry guards and a transcript token meter, installed with one command |
74
+ | [decompose](https://github.com/aunysillyme-dev/aunx-decompose) | Task planner and wave checker for AI coding agents: splits prompts into checkable units and parallel waves, rejecting cycles and overlapping writes |
75
+ | [aunx-skills](https://github.com/aunysillyme-dev/aunx-skills) | Ten standalone agent skills for Claude Code, Codex, Cursor and Gemini CLI: full output keeper, number guard, docs fetch ladder, rename sweep and more |
76
+ | [stack](https://github.com/aunysillyme-dev/stack) | AI tools list for everything you build with AI: curated stacks of tools, models and workflows as open JSON. Video and design live, more coming. |
72
77
  <!-- set:end -->
73
78
 
74
79
  ## Check any repo
@@ -129,10 +134,10 @@ Each row carries its command, measurement date, expiry and package version.
129
134
 
130
135
  | Measurement | Value | Measured | Expires |
131
136
  |---|---|---|---|
132
- | packed-size | 143352 bytes | 2026-10-28 | 2027-01-26 |
133
- | unpacked-size | 455893 bytes | 2026-10-28 | 2027-01-26 |
134
- | help-time | 30.9 ms | 2026-10-28 | 2027-01-26 |
135
- | checker-time | 28 ms | 2026-10-28 | 2027-01-26 |
137
+ | packed-size | 147104 bytes | 2026-11-30 | 2027-02-28 |
138
+ | unpacked-size | 466248 bytes | 2026-11-30 | 2027-02-28 |
139
+ | help-time | 37.6 ms | 2026-11-30 | 2027-02-28 |
140
+ | checker-time | 12.2 ms | 2026-11-30 | 2027-02-28 |
136
141
 
137
142
  Run `npm run proof` to refresh deterministic package measurements.
138
143
  Show current rows here; expired rows warn while work and releases continue.
@@ -158,15 +163,15 @@ The owner completes the first publish and trust setup; CI publishes the tested a
158
163
 
159
164
  ### Which language should my CLI use?
160
165
 
161
- Start with the runtime your users already have and the install command they expect, then record budgets in the stack card.
166
+ Start with the runtime your users already have and the install command they expect, then record budgets in the repo-build-skill stack card.
162
167
  Run `npx repo-build-skill check .` after your AI prepares that card and the repo files.
163
168
 
164
169
  ### Where do I launch an open-source developer tool?
165
170
 
166
- Ask your AI to use Launch venues, check each venue's current rules and give every submission a follow-up date.
171
+ Ask your AI to use the repo-build-skill Launch venues stage, check each venue's current rules and give every submission a follow-up date.
167
172
  Run `npx repo-build-skill check .` before the owner submits the finished listing, and add `--strict` once a private list is in place.
168
173
 
169
- ### How is it different from website-build-skill?
174
+ ### What is the difference between repo-build-skill and website-build-skill?
170
175
 
171
176
  repo-build-skill teaches repository structure, metadata, publishing and launch; website-build-skill teaches website work.
172
177
  Use `npx repo-build-skill` for this pack and hand the Product site brief to website-build-skill when your repo needs a site.
package/RELEASING.md CHANGED
@@ -108,12 +108,13 @@ The owner approves trailer keyframes before a trailer is rendered.
108
108
  ## proof.yml
109
109
 
110
110
  **Trigger:** the schedule in `.github/workflows/proof.yml`, or manual dispatch.
111
- **Invocation chain:** checkout, setup Node, run `node scripts/proof.mjs --deterministic`, run the proof test and propose one refresh pull request.
111
+ **Invocation chain:** check out the default branch, setup Node, run `node scripts/proof.mjs --deterministic`, run the proof test and call `scripts/refresh-proof-branch.mjs` to propose one refresh pull request.
112
112
  **Dependencies:** npm packing, local checker code and the Actions token's contents and pull-request permissions.
113
113
  **Reads:** published allowlist, local source, the tiny-tool fixture and existing proof rows.
114
114
  **Writes:** deterministic rows in `proof/results.json`, an automation branch and one pull request.
115
115
  The workflow preserves model evaluation rows and holds no model key.
116
116
  It updates the proof data only; after review the maintainer refreshes the README table from unexpired rows, including measured and expires dates.
117
+ The branch commit uses the measured default branch as its tree base and keeps the previous automation head and current default branch as parents. It refuses a moved default branch, unexpected branch commits or files, and non-fast-forward updates. A pull request permission refusal leaves the branch and logs a comparison link.
117
118
 
118
119
  **Closed loop:** a maintainer reviews the proposed data and runs required checks before merging.
119
120
  A pull request opened by the Actions token does not start another Actions run automatically.
@@ -123,6 +124,7 @@ Expired proof warns and is omitted from displayed claims; expiry never blocks a
123
124
  **Hand verification:** run `node scripts/proof.mjs --deterministic`, inspect the changed rows and run `node --test test/proof.test.mjs`.
124
125
  Each row must name its command, package version, measured date and expiry.
125
126
  Runtime results belong to the measured machine; package size changes when the contents change.
127
+ After changing the automation, run it in an authorized test repository and inspect the workflow log, branch and Vercel preview. Live behavior is UNVERIFIED until an actual run succeeds. The workflow run is the watcher; notification delivery remains UNVERIFIED.
126
128
 
127
129
  ## repo-health.yml
128
130
 
package/REPO_SETTINGS.md CHANGED
@@ -1,37 +1,41 @@
1
1
  # Repository settings
2
2
 
3
- These values were set and read back with `gh api` in the public flip pass on 2026-10-19.
4
- The npm row was read back after 0.1.2 published from GitHub Actions on 2026-10-19.
3
+ The security, Actions, branch protection and metadata settings below were verified via `gh api` on 2026-11-28.
4
+ The npm row reflects the published `0.1.5` release from GitHub Actions with OIDC provenance.
5
5
 
6
6
  ## Metadata
7
7
 
8
8
  Description: Skill pack that teaches your AI to build, release and launch a GitHub repo: stack pick, README, AGENTS.md, llms.txt, repo SEO and AEO, trusted publishing.
9
9
 
10
- Homepage: https://www.npmjs.com/package/repo-build-skill
10
+ Homepage: https://repo-build-skill.aunysillyme.dev/
11
11
 
12
12
  Repository: https://github.com/aunysillyme/repo-build-skill
13
13
 
14
- Topics: agent-skills, skill-pack, claude-skills, claude-code, codex, agents-md, llms-txt, readme, github, open-source, repository, github-seo, seo, aeo, npm, pypi, trusted-publishing, provenance, release-automation, developer-tools
14
+ Topics: aeo, agent-skills, agents-md, ai-agents, claude-code, claude-skills, cli, codex, cursor, developer-tools, github-actions, github-seo, llms-txt, npm, provenance, readme, release-automation, seo, skill-pack, trusted-publishing
15
15
 
16
16
  Source of truth: [.repo-build/facts.json](.repo-build/facts.json) and [package.json](package.json).
17
17
  Use GitHub's default repository link preview.
18
18
 
19
- ## Settings at the public flip
19
+ ## Repository settings read-back
20
20
 
21
- | Setting | Target | Read-back (2026-10-19) |
21
+ | Setting | Target | Read-back |
22
22
  |---|---|---|
23
23
  | Visibility | Public, after owner authorization and privacy checks | `public` |
24
24
  | Private vulnerability reporting | Enabled | `{"enabled": true}` |
25
25
  | Secret scanning | Enabled | `enabled` |
26
26
  | Secret scanning push protection | Enabled | `enabled` |
27
- | Dependabot alerts and security updates | Enabled | alerts `204`, security updates `enabled` |
28
- | CodeQL default setup | Enabled for the supported language | `configured`; languages fill in after the first analysis run |
27
+ | Dependabot alerts and security updates | Enabled | alerts enabled, security updates `enabled` |
28
+ | CodeQL default setup | Enabled for the supported language | `configured` (`actions`, `javascript-typescript`) |
29
+ | Actions pinning | Require full commit SHAs | `sha_pinning_required: true` |
30
+ | Actions pull request approvals | Disabled | `can_approve_pull_request_reviews: false` |
31
+ | Default workflow token permissions | Read-only | `default_workflow_permissions: "read"` |
32
+ | Release tag ruleset | Protect release tags | active on `refs/tags/v*`; tag updates and deletions blocked |
29
33
  | Main branch protection | Force pushes and branch deletion disabled | force pushes `false`, deletions `false` |
30
34
  | Required check | Repository checks | `["Repository checks"]` |
31
35
  | Administrator enforcement | Disabled for maintainer-reviewed automation PRs | `false` |
32
36
  | Sponsorships | Enabled with account-default funding links | `hasSponsorshipsEnabled: true` |
33
- | Description and topics | Match package.json and facts.json | description equal, 20 topics |
34
- | npm listing | Version, description, README, bin, funding and homepage match the tag | `0.1.2` equals tag `v0.1.2` (`scripts/verify-registry.sh` PASS), provenance and publish attestations present |
37
+ | Description, homepage and topics | Match package.json and facts.json | description equal, homepage `https://repo-build-skill.aunysillyme.dev/`, 20 topics |
38
+ | npm listing | Version, description, README, bin, funding and homepage match the tag | `0.1.5` equals tag `v0.1.5` with SLSA provenance and publish attestations; `homepage` updated for next release |
35
39
 
36
40
  The [Scaffold settings instructions](skills/repo-build-skill/references/stages/03-scaffold.md#settings-at-the-public-flip) provide the exact API commands.
37
41
  Run `npx repo-build-skill check . --online` after setting the public values.
package/SECURITY.md CHANGED
@@ -3,8 +3,7 @@
3
3
  ## Report a vulnerability
4
4
 
5
5
  Use the repository's [Security tab](https://github.com/aunysillyme/repo-build-skill/security) and select **Report a vulnerability** for a private report.
6
- The owner enables private vulnerability reporting when the repository becomes public.
7
- Its live enabled state is UNVERIFIED until the public settings read-back in [REPO_SETTINGS.md](REPO_SETTINGS.md).
6
+ The enabled state is recorded in [REPO_SETTINGS.md](REPO_SETTINGS.md).
8
7
 
9
8
  Include the affected version, host, command, expected behavior, actual behavior and a minimal reproduction.
10
9
  Keep credentials and personal data out of attachments.
@@ -13,9 +12,11 @@ Please keep vulnerability details private while maintainers investigate.
13
12
 
14
13
  ## Supported releases
15
14
 
15
+ The latest published minor line, 0.1.x, is supported.
16
16
  Report against the current published release and include whether the latest checkout reproduces it.
17
- Maintainers triage reports on a best-effort basis and coordinate a fix and disclosure with the reporter.
18
- Release notes identify the corrected version.
17
+ Maintainers aim to acknowledge reports within 7 days and provide a fix or status update within 30 days.
18
+ Maintainers investigate privately, agree on a disclosure timeline with the reporter and prepare a fix.
19
+ After a fix is available, maintainers coordinate disclosure with the reporter and identify the corrected version in release notes.
19
20
 
20
21
  ## Scope
21
22
 
package/docs/RULES.md CHANGED
@@ -8,7 +8,7 @@ Why: The first screen gives the reader a definition.
8
8
 
9
9
  Pass: A bold lead in the first ten lines equals facts.lead.
10
10
 
11
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/01-frame.md#gate)
11
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/01-frame.md#gate)
12
12
 
13
13
  ## H_INSTALL: Install on the first screen
14
14
 
@@ -18,7 +18,7 @@ Why: A reader can try the project immediately.
18
18
 
19
19
  Pass: The install command occurs in the first forty lines.
20
20
 
21
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
21
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
22
22
 
23
23
  ## H_FENCE: Short front-page examples
24
24
 
@@ -28,7 +28,7 @@ Why: Short examples leave room for what the tool gives.
28
28
 
29
29
  Pass: Fenced README blocks have at most eight lines or a reasoned allow marker.
30
30
 
31
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
31
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
32
32
 
33
33
  ## H_FAQ: Common questions answer searches
34
34
 
@@ -38,7 +38,7 @@ Why: Question headings make answers easy to find.
38
38
 
39
39
  Pass: Common questions contains four to six H3 headings.
40
40
 
41
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
41
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
42
42
 
43
43
  ## H_UNINSTALL: Explain removal
44
44
 
@@ -48,7 +48,7 @@ Why: People can reverse an install.
48
48
 
49
49
  Pass: An installer has an uninstall command in README.
50
50
 
51
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/02-stack.md#gate)
51
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/02-stack.md#gate)
52
52
 
53
53
  ## H_FLOOR: Professional repository files
54
54
 
@@ -58,7 +58,7 @@ Why: Community files explain use, contribution and maintenance.
58
58
 
59
59
  Pass: Every floor file, issue form and check workflow is present and non-empty.
60
60
 
61
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
61
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
62
62
 
63
63
  ## H_LINK: Local links resolve
64
64
 
@@ -68,7 +68,7 @@ Why: Readers can follow the promised next step.
68
68
 
69
69
  Pass: Relative Markdown links and heading anchors exist.
70
70
 
71
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
71
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
72
72
 
73
73
  ## H_ABSENCE: Headings name useful content
74
74
 
@@ -78,7 +78,7 @@ Why: Positive headings say what the reader gets.
78
78
 
79
79
  Pass: Headings describe the content they give.
80
80
 
81
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
81
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
82
82
 
83
83
  ## A_AGENTS: Agent instructions cover use and contribution
84
84
 
@@ -88,7 +88,7 @@ Why: Agents need commands and project context.
88
88
 
89
89
  Pass: AGENTS.md has use and contribute headings and fewer than 200 lines.
90
90
 
91
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
91
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
92
92
 
93
93
  ## A_IMPORT: One agent instruction source
94
94
 
@@ -98,7 +98,7 @@ Why: An import keeps host instructions in sync.
98
98
 
99
99
  Pass: CLAUDE.md includes the exact line @AGENTS.md.
100
100
 
101
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
101
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
102
102
 
103
103
  ## A_CMD: Documented script commands exist
104
104
 
@@ -108,7 +108,7 @@ Why: A command should work when copied.
108
108
 
109
109
  Pass: Every npm run command named in AGENTS.md exists in package scripts.
110
110
 
111
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
111
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
112
112
 
113
113
  ## A_SKILL_SPEC: Skills follow the portable format
114
114
 
@@ -118,7 +118,7 @@ Why: A host can identify a skill from its metadata.
118
118
 
119
119
  Pass: Each SKILL.md has a valid name, description and size.
120
120
 
121
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
121
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
122
122
 
123
123
  ## M_LLMS_SHAPE: A readable llms.txt index
124
124
 
@@ -128,7 +128,7 @@ Why: Agents and search readers get a labelled map.
128
128
 
129
129
  Pass: An H1, blockquote and sections with labelled absolute links exist.
130
130
 
131
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
131
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
132
132
 
133
133
  ## M_LLMS_LEAD: One lead across readers
134
134
 
@@ -138,7 +138,7 @@ Why: A shared definition keeps summaries accurate.
138
138
 
139
139
  Pass: The llms.txt blockquote equals facts.lead.
140
140
 
141
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md#gate)
141
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md#gate)
142
142
 
143
143
  ## M_ENTITY: One product name
144
144
 
@@ -148,7 +148,7 @@ Why: One entity name keeps registry and repository answers aligned.
148
148
 
149
149
  Pass: README and llms.txt H1 headings equal the manifest product name.
150
150
 
151
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/05-discover.md#gate)
151
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/05-discover.md#gate)
152
152
 
153
153
  ## R_DESC: One compact description
154
154
 
@@ -158,7 +158,7 @@ Why: Search cards use the same definition as the package.
158
158
 
159
159
  Pass: Description has at most 160 characters and all declared copies agree.
160
160
 
161
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/05-discover.md#gate)
161
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/05-discover.md#gate)
162
162
 
163
163
  ## R_TOPICS: Search topics use registry keywords
164
164
 
@@ -168,7 +168,7 @@ Why: Topics describe the same package across surfaces.
168
168
 
169
169
  Pass: At most twenty slug topics, each also a keyword.
170
170
 
171
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/05-discover.md#gate)
171
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/05-discover.md#gate)
172
172
 
173
173
  ## R_META: Package metadata connects its surfaces
174
174
 
@@ -178,7 +178,7 @@ Why: People can find the project, license and support route.
178
178
 
179
179
  Pass: Homepage, repository, bugs and license fields are present.
180
180
 
181
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
181
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
182
182
 
183
183
  ## R_VERSION: Version sites agree
184
184
 
@@ -188,7 +188,7 @@ Why: The same release is named on every package surface.
188
188
 
189
189
  Pass: Manifest, lock and plugin versions equal package version.
190
190
 
191
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/06-release.md#gate)
191
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/06-release.md#gate)
192
192
 
193
193
  ## R_FILES: Publish only the reviewed files
194
194
 
@@ -198,7 +198,7 @@ Why: An allowlist defines what a user receives.
198
198
 
199
199
  Pass: A files allowlist covers binary targets and lifecycle install scripts are absent.
200
200
 
201
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/06-release.md#gate)
201
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/06-release.md#gate)
202
202
 
203
203
  ## W_PERMS: Declare least privilege
204
204
 
@@ -208,7 +208,7 @@ Why: A default read token limits a compromised step.
208
208
 
209
209
  Pass: Every workflow declares read-only or empty default permissions.
210
210
 
211
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
211
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
212
212
 
213
213
  ## W_OIDC: Scope publish identity to publishing jobs
214
214
 
@@ -218,7 +218,7 @@ Why: Identity permission belongs to the publishing step that needs it.
218
218
 
219
219
  Pass: Only publish or a job using only Scorecard-allowed actions with ossf/scorecard-action publish_results: true declares id-token: write; these jobs run no install, build or package script.
220
220
 
221
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/06-release.md#gate)
221
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/06-release.md#gate)
222
222
 
223
223
  ## W_PIN: Actions use full SHA pins and version comments
224
224
 
@@ -228,7 +228,7 @@ Why: A commit pin identifies the exact action code.
228
228
 
229
229
  Pass: Every remote action uses forty hex characters and a version comment.
230
230
 
231
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
231
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
232
232
 
233
233
  ## W_CREDS: Keep credentials and caches out of release runs
234
234
 
@@ -238,7 +238,7 @@ Why: Later commands need only their explicit permissions, and a tag release must
238
238
 
239
239
  Pass: Each checkout step sets persist-credentials: false, and a tag-triggered workflow turns package-manager caching off.
240
240
 
241
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
241
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
242
242
 
243
243
  ## W_INJECT: Treat event values as data
244
244
 
@@ -248,7 +248,7 @@ Why: Untrusted event text must not become shell code.
248
248
 
249
249
  Pass: No event, head_ref or input interpolation appears in run values or github-script bodies.
250
250
 
251
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
251
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
252
252
 
253
253
  ## W_TAG: Check the release tag before publishing
254
254
 
@@ -258,7 +258,7 @@ Why: A tag must identify the artifact version being published.
258
258
 
259
259
  Pass: A version comparison precedes the publish job or publish command.
260
260
 
261
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/06-release.md#gate)
261
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/06-release.md#gate)
262
262
 
263
263
  ## P_PATH: Keep home paths private
264
264
 
@@ -268,7 +268,7 @@ Why: Local usernames are private environment details.
268
268
 
269
269
  Pass: Home paths use placeholder usernames in contents and filenames.
270
270
 
271
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
271
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
272
272
 
273
273
  ## P_EMAIL: Publish only approved contact addresses
274
274
 
@@ -278,7 +278,7 @@ Why: A contact address should be an explicit public choice.
278
278
 
279
279
  Pass: Email addresses are in the allowlist or a standard example or noreply domain.
280
280
 
281
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
281
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
282
282
 
283
283
  ## P_TOKEN: Keep token-shaped values private
284
284
 
@@ -288,7 +288,7 @@ Why: A public artifact must not carry access credentials.
288
288
 
289
289
  Pass: Token-shaped strings and private key headers are absent.
290
290
 
291
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
291
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
292
292
 
293
293
  ## P_LIST: Apply the maintainer privacy lists
294
294
 
@@ -298,7 +298,7 @@ Why: Private names are supplied locally by the maintainer.
298
298
 
299
299
  Pass: Untracked list files contain no matches in the public tree or history.
300
300
 
301
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
301
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
302
302
 
303
303
  ## F_PROOF: Dated package measurements
304
304
 
@@ -308,7 +308,7 @@ Why: A dated command lets a reader reproduce a number.
308
308
 
309
309
  Pass: Each row records value, unit, command, measured, expires, package_version and subject package.
310
310
 
311
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/09-maintain.md#gate)
311
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/09-maintain.md#gate)
312
312
 
313
313
  ## C_CREDITS: Credit upstream work
314
314
 
@@ -318,7 +318,7 @@ Why: A licence and source link preserve the origin of a technique.
318
318
 
319
319
  Pass: Credits rows contain project, link, licence and use, and README links CREDITS.md.
320
320
 
321
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/09-maintain.md#gate)
321
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/09-maintain.md#gate)
322
322
 
323
323
  ## S_DRIFT: Rendered set blocks match the vendor files
324
324
 
@@ -328,7 +328,7 @@ Why: One renderer keeps related repository descriptions aligned.
328
328
 
329
329
  Pass: README, llms.txt, renderer and check wrapper hashes equal the vendored contract.
330
330
 
331
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/09-maintain.md#gate)
331
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/09-maintain.md#gate)
332
332
 
333
333
  ## S_STALE: The set lock matches its source
334
334
 
@@ -338,7 +338,7 @@ Why: A maintainer can refresh an adopted set when its source changes.
338
338
 
339
339
  Pass: The fetched source hash equals the lock hash.
340
340
 
341
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/09-maintain.md#gate)
341
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/09-maintain.md#gate)
342
342
 
343
343
  ## O_ABOUT: GitHub About matches facts
344
344
 
@@ -348,7 +348,7 @@ Why: Search readers see the same identity on GitHub.
348
348
 
349
349
  Pass: Description, homepage and topics match the facts source.
350
350
 
351
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/05-discover.md#gate)
351
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/05-discover.md#gate)
352
352
 
353
353
  ## O_REGISTRY: Registry listing matches its tag
354
354
 
@@ -358,7 +358,7 @@ Why: A registry receipt proves the published artifact.
358
358
 
359
359
  Pass: Version, description, tagged README and attestation agree.
360
360
 
361
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/06-release.md#gate)
361
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/06-release.md#gate)
362
362
 
363
363
  ## O_PVR: Private vulnerability reports are enabled
364
364
 
@@ -368,4 +368,4 @@ Why: Security reports have a private route.
368
368
 
369
369
  Pass: Public GitHub repositories enable private vulnerability reporting.
370
370
 
371
- Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
371
+ Learn: [Stage reference](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md#gate)
@@ -10,7 +10,7 @@ description: "Teaches you to frame, pick a stack for, scaffold, write, release a
10
10
  license: MIT
11
11
  compatibility: "Web access for each stage's live re-check; without it the work proceeds and marks those facts UNVERIFIED."
12
12
  metadata:
13
- version: "0.1.4"
13
+ version: "0.1.6"
14
14
  ---
15
15
 
16
16
  # Repository build skill
@@ -706,15 +706,17 @@ Improve the files each reader sees, then find the places those readers already u
706
706
 
707
707
  | Grade | Tactic | Source and action |
708
708
  |---|---|---|
709
+ | CONFIRMED | Put primary category and host terms in `name`, `description` and `topics`: default GitHub repository search queries `in:name,description,topics` and omits `README.md` unless `in:readme` is added. | [Searching for repositories](https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories); check default search scope on the ask date. |
709
710
  | CONFIRMED | Use relevant GitHub topics, at most 20 and at most 50 characters each. | [GitHub topics](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics); re-check limits before setting them. |
710
711
  | CONFIRMED | Keep the social preview image under 1 MB. | [Social preview](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview); inspect the rendered preview. |
711
712
  | CONFIRMED | Keep the useful README first; GitHub truncates content beyond 500 KiB. | [About READMEs](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes); link long guides from the index. |
713
+ | CONFIRMED | Allow answer-engine search crawlers (`OAI-SearchBot`, `Claude-SearchBot`, `PerplexityBot`) in product-site `robots.txt` separately from model-training crawlers (`GPTBot`, `ClaudeBot`). | Re-check [OpenAI crawlers](https://developers.openai.com/api/docs/bots), [Anthropic crawlers](https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler) and [Perplexity crawlers](https://docs.perplexity.ai/docs/resources/perplexity-crawlers) on the ask date. |
712
714
  | PRACTICE | Keep About, package description, lead and canonical URLs in one facts source. | Run the checker and compare published metadata to the tag after each release. This reduces conflicting descriptions. |
713
715
  | PRACTICE | Put search terms in descriptive headings and brand on the command. | Capture a dated cold read and search baseline; assess whether readers can find the right task. |
714
716
  | PRACTICE | Use question headings, concise answers and sourced comparisons. | Check comprehension separately from rank. Publish a comparison when it helps the reader choose. |
715
717
  | PRACTICE | Generate llms.txt with labelled absolute links. | Follow the [proposal](https://llmstxt.org/); test agent retrieval and link resolution. |
716
718
  | REPORTED | Question and comparison pages can be cited more often by answer engines. | Read the repo-GEO synthesis in [github-morestar-skill](https://github.com/everest-an/github-morestar-skill) and the evidence-labelled findings in [legends-github](https://github.com/avalonreset/legends-github) on the ask date. Follow their cited studies and record each corpus and method before making a causal claim. |
717
- | REPORTED | Bing results can feed ChatGPT search. | Re-check the provider's [search documentation](https://help.openai.com/en/articles/9237897-chatgpt-search); include Bing Webmaster verification in the site handoff when applicable. |
719
+ | REPORTED | Bing results can feed ChatGPT search. | Re-check [ChatGPT search documentation](https://help.openai.com/en/articles/9237897-searching-the-web-with-chatgpt); include Bing Webmaster verification in the site handoff when applicable. |
718
720
  | REPORTED | llms.txt may receive little direct crawler traffic. | Treat the observations in [legends-github](https://github.com/avalonreset/legends-github) as reported; follow their original sources on the ask date. Measure actual request logs and keep agent-index usefulness separate from traffic. |
719
721
 
720
722
  Read official limits within the Discover stage's window. When web access is unavailable, keep the research rows UNVERIFIED while preparing metadata and copy.
@@ -1327,4 +1329,4 @@ Add this README badge, replacing `{owner}` and `{repo}`:
1327
1329
  Publishing requires read-only workflow permissions, an Ubuntu runner and `id-token: write` only in the Scorecard job. Keep top-level `env` and `defaults`, job-level `env` and containers absent. Every action in that job must be one of `actions/checkout`, `actions/upload-artifact`, `github/codeql-action/upload-sarif`, `ossf/scorecard-action` or `step-security/harden-runner`. Set `publish_results: true` on the Scorecard step. The API supports only the default branch; adapt `main` to that branch when needed.
1328
1330
 
1329
1331
  Private repositories need GitHub Advanced Security for the code-scanning upload; otherwise run the `scorecard` CLI.
1330
- Re-check the [upstream reference workflow](https://github.com/ossf/scorecard/blob/main/.github/workflows/scorecard.yml) and [Scorecard action publishing restrictions](https://github.com/ossf/scorecard-action#publishing-results) before adapting the pins or permissions. The supplied reference and restrictions are dated 2026-10-27; live verification remains UNVERIFIED in this offline change.
1332
+ Re-check the [upstream reference workflow](https://github.com/ossf/scorecard-action/blob/main/examples/scorecard.yml) and [Scorecard action publishing restrictions](https://github.com/ossf/scorecard-action#publishing-results) before adapting the pins or permissions. The supplied reference and restrictions are dated 2026-10-27; live verification remains UNVERIFIED in this offline change.
package/llms.txt CHANGED
@@ -6,49 +6,42 @@ Install: `npx repo-build-skill`
6
6
 
7
7
  ## Docs
8
8
 
9
- - [repo-build-skill](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/README.md): repo-build-skill
10
- - [Documentation](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/docs/README.md): Documentation
11
- - [Installer contract](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/docs/INSTALLER.md): Installer contract
12
- - [Repository checker](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/docs/CHECKER.md): Repository checker
13
- - [Evaluation and package proof](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/docs/EVALUATION.md): Evaluation and package proof
14
- - [Repository checks](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/docs/RULES.md): Repository checks
15
- - [Stack card](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/docs/STACK.md): Stack card
9
+ - [repo-build-skill](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/README.md): repo-build-skill
10
+ - [Documentation](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/docs/README.md): Documentation
11
+ - [Installer contract](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/docs/INSTALLER.md): Installer contract
12
+ - [Repository checker](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/docs/CHECKER.md): Repository checker
13
+ - [Evaluation and package proof](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/docs/EVALUATION.md): Evaluation and package proof
14
+ - [Repository checks](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/docs/RULES.md): Repository checks
15
+ - [Stack card](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/docs/STACK.md): Stack card
16
16
 
17
17
  ## Reference
18
18
 
19
- - [Repository build skill](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/SKILL.md): Repository build skill
20
- - [Acceptance checks](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/acceptance-checks.md): Acceptance checks
21
- - [Ask date](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/ask-date.md): Ask date
22
- - [Discoverability](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/discoverability.md): Discoverability
23
- - [Installer](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/installer.md): Installer
24
- - [Launch venues](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/launch-venues.md): Launch venues
25
- - [Coding agents](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/readers/agents.md): Coding agents
26
- - [Answer engines](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/readers/answer-engines.md): Answer engines
27
- - [People](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/readers/people.md): People
28
- - [Registries](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/readers/registries.md): Registries
29
- - [Binary releases](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/release/binaries.md): Binary releases
30
- - [Release contract](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/release/contract.md): Release contract
31
- - [npm release](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/release/npm.md): npm release
32
- - [PyPI release](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/release/pypi.md): PyPI release
33
- - [Skills and plugins release](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/release/skills-and-plugins.md): Skills and plugins release
34
- - [Cloudflare Workers release](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/release/workers.md): Cloudflare Workers release
35
- - [Frame](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/01-frame.md): Frame
36
- - [Stack card](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/02-stack.md): Stack card
37
- - [Scaffold](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/03-scaffold.md): Scaffold
38
- - [README / AGENTS.md / llms.txt](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/04-write.md): README / AGENTS.md / llms.txt
39
- - [SEO and AEO for repos](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/05-discover.md): SEO and AEO for repos
40
- - [Release with trusted publishing](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/06-release.md): Release with trusted publishing
41
- - [Product site](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/07-site.md): Product site
42
- - [Launch venues](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/08-launch.md): Launch venues
43
- - [Maintenance](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/stages/09-maintain.md): Maintenance
44
- - [Workflow assets](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/skills/repo-build-skill/references/workflows.md): Workflow assets
45
-
46
- ## Optional
47
-
48
- - [Credits](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/CREDITS.md): Credits
49
- - [Contributing](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/CONTRIBUTING.md): Contributing
50
- - [Provenance](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/docs/PROVENANCE.md): Provenance
51
- - [repo-build-skill chat bundle](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.4/docs/bundles/chat-upload.md): repo-build-skill chat bundle
19
+ - [Repository build skill](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/SKILL.md): Repository build skill
20
+ - [Acceptance checks](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/acceptance-checks.md): Acceptance checks
21
+ - [Ask date](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/ask-date.md): Ask date
22
+ - [Discoverability](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/discoverability.md): Discoverability
23
+ - [Installer](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/installer.md): Installer
24
+ - [Launch venues](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/launch-venues.md): Launch venues
25
+ - [Coding agents](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/readers/agents.md): Coding agents
26
+ - [Answer engines](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/readers/answer-engines.md): Answer engines
27
+ - [People](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/readers/people.md): People
28
+ - [Registries](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/readers/registries.md): Registries
29
+ - [Binary releases](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/release/binaries.md): Binary releases
30
+ - [Release contract](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/release/contract.md): Release contract
31
+ - [npm release](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/release/npm.md): npm release
32
+ - [PyPI release](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/release/pypi.md): PyPI release
33
+ - [Skills and plugins release](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/release/skills-and-plugins.md): Skills and plugins release
34
+ - [Cloudflare Workers release](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/release/workers.md): Cloudflare Workers release
35
+ - [Frame](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/01-frame.md): Frame
36
+ - [Stack card](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/02-stack.md): Stack card
37
+ - [Scaffold](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/03-scaffold.md): Scaffold
38
+ - [README / AGENTS.md / llms.txt](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/04-write.md): README / AGENTS.md / llms.txt
39
+ - [SEO and AEO for repos](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/05-discover.md): SEO and AEO for repos
40
+ - [Release with trusted publishing](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/06-release.md): Release with trusted publishing
41
+ - [Product site](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/07-site.md): Product site
42
+ - [Launch venues](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/08-launch.md): Launch venues
43
+ - [Maintenance](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/stages/09-maintain.md): Maintenance
44
+ - [Workflow assets](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/skills/repo-build-skill/references/workflows.md): Workflow assets
52
45
 
53
46
  <!-- set:start -->
54
47
  ## Part of a set
@@ -56,4 +49,16 @@ Install: `npx repo-build-skill`
56
49
  - [agent-personalizer](https://github.com/aunysillyme/agent-personalizer): AI custom instructions from approved entries: a profile and rules for Claude Code, Codex, Cursor, Gemini CLI and ChatGPT, kept in sync from one source.
57
50
  - [model-orchestrator](https://github.com/aunysillyme/model-orchestrator): Model router for AI coding agents: routes routine work to cheaper models with routing rules, 8 subagents, hooks and a CLI runner
58
51
  - [website-build-skill](https://github.com/aunysillyme/website-build-skill): A skill pack that turns your AI into an expert website builder: current research, design, code, accessibility, speed, SEO and security, alone or as a team.
52
+ - [lean-browser-use](https://github.com/aunysillyme/lean-browser-use): Cut Claude Code browser use cost 3% to 25% (about 14% in 2 runs): fresh runner subagent, bulk reads, 3 guards and a token meter. One npx command.
53
+ - [lean-computer-use](https://github.com/aunysillyme/lean-computer-use): Background Mac computer control for AI agents: desk tools, a fresh runner subagent, retry guards and a transcript token meter, installed with one command
54
+ - [decompose](https://github.com/aunysillyme-dev/aunx-decompose): Task planner and wave checker for AI coding agents: splits prompts into checkable units and parallel waves, rejecting cycles and overlapping writes
55
+ - [aunx-skills](https://github.com/aunysillyme-dev/aunx-skills): Ten standalone agent skills for Claude Code, Codex, Cursor and Gemini CLI: full output keeper, number guard, docs fetch ladder, rename sweep and more
56
+ - [stack](https://github.com/aunysillyme-dev/stack): AI tools list for everything you build with AI: curated stacks of tools, models and workflows as open JSON. Video and design live, more coming.
59
57
  <!-- set:end -->
58
+
59
+ ## Optional
60
+
61
+ - [Credits](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/CREDITS.md): Credits
62
+ - [Contributing](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/CONTRIBUTING.md): Contributing
63
+ - [Provenance](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/docs/PROVENANCE.md): Provenance
64
+ - [repo-build-skill chat bundle](https://github.com/aunysillyme/repo-build-skill/blob/v0.1.6/docs/bundles/chat-upload.md): repo-build-skill chat bundle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-build-skill",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "repo-build-skill": "bin/repo-build-skill.mjs"
@@ -21,27 +21,47 @@
21
21
  "claude-skills",
22
22
  "claude-code",
23
23
  "codex",
24
+ "cursor",
25
+ "gemini",
26
+ "gemini-cli",
27
+ "antigravity",
28
+ "ai-agents",
29
+ "coding-agents",
24
30
  "agents-md",
25
31
  "llms-txt",
26
32
  "readme",
27
33
  "github",
34
+ "github-actions",
28
35
  "open-source",
29
36
  "repository",
30
37
  "github-seo",
31
38
  "seo",
32
39
  "aeo",
40
+ "geo",
41
+ "answer-engine-optimization",
42
+ "generative-engine-optimization",
43
+ "ai-search",
33
44
  "npm",
34
45
  "pypi",
35
46
  "trusted-publishing",
47
+ "oidc",
36
48
  "provenance",
49
+ "slsa",
50
+ "openssf-scorecard",
37
51
  "release-automation",
52
+ "package-publishing",
38
53
  "developer-tools",
54
+ "cli",
55
+ "nodejs",
56
+ "linter",
57
+ "documentation",
39
58
  "launch",
40
59
  "repo-checker",
41
60
  "llm-skills",
42
- "ai-search"
61
+ "claude-plugin",
62
+ "skills"
43
63
  ],
44
- "homepage": "https://www.npmjs.com/package/repo-build-skill",
64
+ "homepage": "https://repo-build-skill.aunysillyme.dev/",
45
65
  "repository": "git+https://github.com/aunysillyme/repo-build-skill.git",
46
66
  "bugs": "https://github.com/aunysillyme/repo-build-skill/issues",
47
67
  "funding": "https://github.com/sponsors/aunysillyme",
@@ -4,7 +4,7 @@ description: "Teaches you to frame, pick a stack for, scaffold, write, release a
4
4
  license: MIT
5
5
  compatibility: "Web access for each stage's live re-check; without it the work proceeds and marks those facts UNVERIFIED."
6
6
  metadata:
7
- version: "0.1.4"
7
+ version: "0.1.6"
8
8
  ---
9
9
 
10
10
  # Repository build skill
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-build-skill",
3
- "packageVersion": "0.1.4",
3
+ "packageVersion": "0.1.6",
4
4
  "budgets": {
5
5
  "skillMd": 6144,
6
6
  "skillMdLines": 120,
@@ -195,7 +195,7 @@
195
195
  "assets": [
196
196
  {
197
197
  "path": "SKILL.md",
198
- "sha256": "07829a877307cc6659da5861a1449ad05dc6180208bd65f6cba0abb01c712d82",
198
+ "sha256": "6272a5b8e45359f5ea57e09ea220f231f3924542f9114ab072e1f00b8efb8099",
199
199
  "kind": "asset"
200
200
  },
201
201
  {
@@ -325,7 +325,7 @@
325
325
  },
326
326
  {
327
327
  "path": "references/discoverability.md",
328
- "sha256": "10a4ab2eb0e31e033b4ad672858d5abc1a6e0c7fb5f7e682877e4aa80aef11c7",
328
+ "sha256": "a9a415e4851ea9c238c877d2dea4583270b73e7d60af44eeab7f153664e5a204",
329
329
  "kind": "card"
330
330
  },
331
331
  {
@@ -435,7 +435,7 @@
435
435
  },
436
436
  {
437
437
  "path": "references/workflows.md",
438
- "sha256": "cf9858d23f4eeb0e9b50da21c26abd762e65e8644bf79a7e84ce820e0d8d864a",
438
+ "sha256": "73b48829e669a241b881539583d434397238c39a0005a31734b0dfbde3528749",
439
439
  "kind": "card"
440
440
  }
441
441
  ]
@@ -12,15 +12,17 @@ Improve the files each reader sees, then find the places those readers already u
12
12
 
13
13
  | Grade | Tactic | Source and action |
14
14
  |---|---|---|
15
+ | CONFIRMED | Put primary category and host terms in `name`, `description` and `topics`: default GitHub repository search queries `in:name,description,topics` and omits `README.md` unless `in:readme` is added. | [Searching for repositories](https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories); check default search scope on the ask date. |
15
16
  | CONFIRMED | Use relevant GitHub topics, at most 20 and at most 50 characters each. | [GitHub topics](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics); re-check limits before setting them. |
16
17
  | CONFIRMED | Keep the social preview image under 1 MB. | [Social preview](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview); inspect the rendered preview. |
17
18
  | CONFIRMED | Keep the useful README first; GitHub truncates content beyond 500 KiB. | [About READMEs](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes); link long guides from the index. |
19
+ | CONFIRMED | Allow answer-engine search crawlers (`OAI-SearchBot`, `Claude-SearchBot`, `PerplexityBot`) in product-site `robots.txt` separately from model-training crawlers (`GPTBot`, `ClaudeBot`). | Re-check [OpenAI crawlers](https://developers.openai.com/api/docs/bots), [Anthropic crawlers](https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler) and [Perplexity crawlers](https://docs.perplexity.ai/docs/resources/perplexity-crawlers) on the ask date. |
18
20
  | PRACTICE | Keep About, package description, lead and canonical URLs in one facts source. | Run the checker and compare published metadata to the tag after each release. This reduces conflicting descriptions. |
19
21
  | PRACTICE | Put search terms in descriptive headings and brand on the command. | Capture a dated cold read and search baseline; assess whether readers can find the right task. |
20
22
  | PRACTICE | Use question headings, concise answers and sourced comparisons. | Check comprehension separately from rank. Publish a comparison when it helps the reader choose. |
21
23
  | PRACTICE | Generate llms.txt with labelled absolute links. | Follow the [proposal](https://llmstxt.org/); test agent retrieval and link resolution. |
22
24
  | REPORTED | Question and comparison pages can be cited more often by answer engines. | Read the repo-GEO synthesis in [github-morestar-skill](https://github.com/everest-an/github-morestar-skill) and the evidence-labelled findings in [legends-github](https://github.com/avalonreset/legends-github) on the ask date. Follow their cited studies and record each corpus and method before making a causal claim. |
23
- | REPORTED | Bing results can feed ChatGPT search. | Re-check the provider's [search documentation](https://help.openai.com/en/articles/9237897-chatgpt-search); include Bing Webmaster verification in the site handoff when applicable. |
25
+ | REPORTED | Bing results can feed ChatGPT search. | Re-check [ChatGPT search documentation](https://help.openai.com/en/articles/9237897-searching-the-web-with-chatgpt); include Bing Webmaster verification in the site handoff when applicable. |
24
26
  | REPORTED | llms.txt may receive little direct crawler traffic. | Treat the observations in [legends-github](https://github.com/avalonreset/legends-github) as reported; follow their original sources on the ask date. Measure actual request logs and keep agent-index usefulness separate from traffic. |
25
27
 
26
28
  Read official limits within the Discover stage's window. When web access is unavailable, keep the research rows UNVERIFIED while preparing metadata and copy.
@@ -17,4 +17,4 @@ Add this README badge, replacing `{owner}` and `{repo}`:
17
17
  Publishing requires read-only workflow permissions, an Ubuntu runner and `id-token: write` only in the Scorecard job. Keep top-level `env` and `defaults`, job-level `env` and containers absent. Every action in that job must be one of `actions/checkout`, `actions/upload-artifact`, `github/codeql-action/upload-sarif`, `ossf/scorecard-action` or `step-security/harden-runner`. Set `publish_results: true` on the Scorecard step. The API supports only the default branch; adapt `main` to that branch when needed.
18
18
 
19
19
  Private repositories need GitHub Advanced Security for the code-scanning upload; otherwise run the `scorecard` CLI.
20
- Re-check the [upstream reference workflow](https://github.com/ossf/scorecard/blob/main/.github/workflows/scorecard.yml) and [Scorecard action publishing restrictions](https://github.com/ossf/scorecard-action#publishing-results) before adapting the pins or permissions. The supplied reference and restrictions are dated 2026-10-27; live verification remains UNVERIFIED in this offline change.
20
+ Re-check the [upstream reference workflow](https://github.com/ossf/scorecard-action/blob/main/examples/scorecard.yml) and [Scorecard action publishing restrictions](https://github.com/ossf/scorecard-action#publishing-results) before adapting the pins or permissions. The supplied reference and restrictions are dated 2026-10-27; live verification remains UNVERIFIED in this offline change.
package/src/bundle.mjs CHANGED
@@ -16,7 +16,7 @@ export function rebase(text,source,target) {
16
16
  });
17
17
  }
18
18
  export function gateTable(m,stage) {
19
- const cell=s=>String(s).replace(/\|/g,'\\|').replace(/\n/g,' ');
19
+ const cell=s=>String(s).replace(/\\/g,'\\\\').replace(/\|/g,'\\|').replace(/\n/g,' ');
20
20
  const rows=rules.filter(r=>r.stage===stage).map(r=>[r.id,`Unmet requirement: ${r.pass}`,`${r.id}: checker receipt, initially BLOCKED`]);
21
21
  for(const r of m.gates[stage]?.manual||[])rows.push([r.check+(r.hands?' (HANDS)':''),r.reject,r.evidence+(r.waivable?' Status WAIVED needs owner, reason and date.':'')]);
22
22
  return '| Check | Reject condition | Evidence |\n|---|---|---|\n'+rows.map(row=>'| '+row.map(cell).join(' | ')+' |').join('\n')+'\n';
@@ -40,8 +40,9 @@ export function generated(root) {
40
40
  const categories=[['Docs',['README.md','docs/README.md','docs/INSTALLER.md','docs/CHECKER.md','docs/EVALUATION.md','docs/RULES.md','docs/STACK.md']],['Reference',m.assets.filter(a=>a.kind==='stage'||a.kind==='card'||a.path==='SKILL.md').map(a=>`${CORE}/${a.path}`)],['Optional',['CREDITS.md','CONTRIBUTING.md','docs/PROVENANCE.md',target]]];
41
41
  const rulesDoc='# Repository checks\n\n'+rules.map(r=>`## ${r.id}: ${r.title}\n\nReader: ${r.reader}. Stage: ${r.stage}. Severity: ${r.severity}.\n\nWhy: ${r.why}\n\nPass: ${r.pass}\n\nLearn: [Stage reference](${pinned(`${CORE}/${r.learn}`)})\n`).join('\n');
42
42
  out['docs/RULES.md']=rulesDoc;
43
- for(const [heading,files]of categories){index+=`\n## ${heading}\n\n`;for(const f of files){let label;try{label=firstHeading(out[f]||read(root,f));}catch{}label||=posix.basename(f).replace(/\.[^.]+$/,'').replace(/[-_]/g,' ');index+=`- [${label}](${pinned(f)}): ${label}\n`;}}
44
43
  const set=jsonOptional(root,'.repo-build/set.json');
45
- out['llms.txt']=set?replaceBlock(index,renderBlocks(set,facts.name||pkg.name).llms):index;
44
+ const setBlock=set?renderBlocks(set,facts.name||pkg.name).llms:'';
45
+ for(const [heading,files]of categories){if(heading==='Optional'&&setBlock)index+=`\n${setBlock}\n`;index+=`\n## ${heading}\n\n`;for(const f of files){let label;try{label=firstHeading(out[f]||read(root,f));}catch{}label||=posix.basename(f).replace(/\.[^.]+$/,'').replace(/[-_]/g,' ');index+=`- [${label}](${pinned(f)}): ${label}\n`;}}
46
+ out['llms.txt']=set?replaceBlock(index,setBlock):index;
46
47
  return out;
47
48
  }
@@ -21,13 +21,14 @@ const manifestRules=new Set(['A_CMD','R_DESC','R_META','R_VERSION','R_FILES','O_
21
21
  export const rules=[...people,...agents,...engines,...registries,...workflows,...privacy,...proof,...credits,...set,...online];
22
22
  export function createContext(root,options={}) {
23
23
  root=resolve(root);if(!existsSync(root)||!statSync(root).isDirectory())throw Error('Check path must be a directory.');
24
- const files=publicFiles(root),cache=new Map();
25
- const read=file=>{if(!files.includes(file))return '';if(!cache.has(file)){try{cache.set(file,textFile(root,file));}catch(e){if(e.code==='ENOENT')cache.set(file,'');else throw e;}}return cache.get(file);};
24
+ const files=publicFiles(root),fileSet=new Set(files),dirSet=new Set(),checkedDirs=new Set(),cache=new Map();
25
+ for(const f of files){let at=f.indexOf('/');while(at>0){dirSet.add(f.slice(0,at));at=f.indexOf('/',at+1);}}
26
+ const read=file=>{if(!fileSet.has(file))return '';if(!cache.has(file)){try{cache.set(file,textFile(root,file,checkedDirs));}catch(e){if(e.code==='ENOENT')cache.set(file,'');else throw e;}}return cache.get(file);};
26
27
  const config=jsonOptional(root,'.repo-build/config.json',{});
27
28
  if(config.disable!==undefined&&(typeof config.disable!=='object'||!config.disable||Array.isArray(config.disable)))throw Error('disable must map rule codes to reasons.');
28
29
  for(const [id,reason]of Object.entries(config.disable||{})){if(!rules.some(r=>r.id===id))throw Error(`Unknown disabled code: ${id}`);if(typeof reason!=='string'||!reason.trim())throw Error(`Disabled code ${id} needs a reason.`);}
29
30
  const env=options.env||process.env,manifests=readManifests(root),privateLists=loadPrivateLists(root,env);
30
- return {root,files,read,exists:file=>files.includes(file),facts:readFacts(root),...manifests,config,privateLists,options,env,now:options.now?new Date(options.now).getTime():Date.now(),fetch:options.fetchImpl||options.fetch||globalThis.fetch,history:options.history&&existsSync(join(root,'.git'))?historyItems(root):[],workflows:files.filter(f=>/^\.github\/workflows\/.*\.ya?ml$/.test(f)).map(file=>readWorkflow(file,read(file)))};
31
+ return {root,files,fileSet,read,exists:file=>fileSet.has(file),hasDir:dir=>dirSet.has(dir),facts:readFacts(root),...manifests,config,privateLists,options,env,now:options.now?new Date(options.now).getTime():Date.now(),fetch:options.fetchImpl||options.fetch||globalThis.fetch,history:options.history&&existsSync(join(root,'.git'))?historyItems(root):[],workflows:files.filter(f=>/^\.github\/workflows\/.*\.ya?ml$/.test(f)).map(file=>readWorkflow(file,read(file)))};
31
32
  }
32
33
  export async function check(root='.',options={}) {
33
34
  let c;try{c=createContext(root,options);}catch(e){return {version:VERSION,profile:'invalid',results:[],summary:summarize([]),exitCode:2,error:e.message};}
@@ -6,10 +6,10 @@ export const absence=/\b(?:limits?|not|missing|risks?|without|cannot|unsupported
6
6
  export default [
7
7
  rule('H_LEAD','people','01-frame','One clear lead','The first screen gives the reader a definition.','A bold lead in the first ten lines equals facts.lead.',c=>need(c,['lead'],()=>c.read('README.md').split('\n').slice(0,10).some(l=>l.trim()===`**${c.facts.lead}**`)?[]:[fail('README.md','Use the lead from facts in bold within ten lines.')])),
8
8
  rule('H_INSTALL','people','04-write','Install on the first screen','A reader can try the project immediately.','The install command occurs in the first forty lines.',c=>need(c,['install'],()=>c.read('README.md').split('\n').slice(0,40).join('\n').includes(c.facts.install)?[]:[fail('README.md','Show the install command within forty lines.')])),
9
- rule('H_FENCE','people','04-write','Short front-page examples','Short examples leave room for what the tool gives.','Fenced README blocks have at most eight lines or a reasoned allow marker.',c=>{let start=-1,allowed=false;const hits=[];c.read('README.md').split('\n').forEach((l,i)=>{if(/^\s*(```|~~~)/.test(l)){if(start<0){start=i;allowed=/<!--\s*(?:allow-fence|fence:allow|allow:)[^>]*\S[^>]*-->/.test(c.read('README.md').split('\n')[i-1]||'');}else{if(i-start-1>8&&!allowed)hits.push(fail('README.md','Keep this example within eight lines or explain an allow marker.',start+1));start=-1;}}});return hits;},{house:true}),
9
+ rule('H_FENCE','people','04-write','Short front-page examples','Short examples leave room for what the tool gives.','Fenced README blocks have at most eight lines or a reasoned allow marker.',c=>{let start=-1,allowed=false;const hits=[],lines=c.read('README.md').split('\n');lines.forEach((l,i)=>{if(/^\s*(```|~~~)/.test(l)){if(start<0){start=i;allowed=/<!--\s*(?:allow-fence|fence:allow|allow:)[^>]*\S[^>]*-->/.test(lines[i-1]||'');}else{if(i-start-1>8&&!allowed)hits.push(fail('README.md','Keep this example within eight lines or explain an allow marker.',start+1));start=-1;}}});return hits;},{house:true}),
10
10
  rule('H_FAQ','people','04-write','Common questions answer searches','Question headings make answers easy to find.','Common questions contains four to six H3 headings.',c=>{const h=headings(c.read('README.md')),i=h.findIndex(x=>x.level===2&&/common questions/i.test(x.text));const group=i<0?[]:h.slice(i+1,h.findIndex((x,j)=>j>i&&x.level<=2)<0?undefined:h.findIndex((x,j)=>j>i&&x.level<=2)).filter(x=>x.level===3);return group.length>=4&&group.length<=6?[]:[fail('README.md','Add four to six Common questions headings.')];},{house:true}),
11
11
  rule('H_UNINSTALL','people','02-stack','Explain removal','People can reverse an install.','An installer has an uninstall command in README.',c=>need(c,['uninstall'],()=>c.read('README.md').includes(c.facts.uninstall)?[]:[fail('README.md','Show the uninstall command.')]),{applies:c=>Boolean(c.pkg?.bin||c.facts.install)}),
12
12
  rule('H_FLOOR','people','03-scaffold','Professional repository files','Community files explain use, contribution and maintenance.','Every floor file, issue form and check workflow is present and non-empty.',c=>[...FLOOR,...['bug','feature'].map(x=>`.github/ISSUE_TEMPLATE/${x}.yml`),'.github/ISSUE_TEMPLATE/config.yml'].filter(f=>!c.read(f).trim()).map(f=>fail(f,'Create this community file.')).concat(c.workflows.length?[]:[fail('.github/workflows','Add a check workflow.')])),
13
- rule('H_LINK','people','04-write','Local links resolve','Readers can follow the promised next step.','Relative Markdown links and heading anchors exist.',c=>{const hits=[];for(const f of c.files.filter(f=>/\.md$/i.test(f))){for(const link of links(c.read(f))){if(/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(link.url))continue;let url;try{url=decodeURIComponent(link.url);}catch{hits.push(fail(f,'Malformed link encoding.',link.line));continue;}const [path,anchor]=url.split('#');const dest=path?posix.normalize(posix.join(posix.dirname(f),path)):f;if(dest.startsWith('../')||(!c.files.includes(dest)&&!c.files.some(p=>p.startsWith(dest.replace(/\/$/,'')+'/')))){hits.push(fail(f,`Link target does not resolve: ${link.url}`,link.line));continue;}if(anchor&&dest.endsWith('.md')&&!headings(c.read(dest)).some(h=>h.slug===anchor)&&!c.read(dest).includes(`id="${anchor}"`))hits.push(fail(f,`Anchor does not resolve: ${link.url}`,link.line));}}return hits;}),
13
+ rule('H_LINK','people','04-write','Local links resolve','Readers can follow the promised next step.','Relative Markdown links and heading anchors exist.',c=>{const hits=[],slugs=new Map(),hasFile=d=>c.exists?c.exists(d):c.files.includes(d),hasDir=d=>c.hasDir?c.hasDir(d):c.files.some(p=>p.startsWith(d+'/'));const slugsOf=d=>{let s=slugs.get(d);if(!s){s=new Set(headings(c.read(d)).map(h=>h.slug));slugs.set(d,s);}return s;};for(const f of c.files.filter(f=>/\.md$/i.test(f))){for(const link of links(c.read(f))){if(/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(link.url))continue;let url;try{url=decodeURIComponent(link.url);}catch{hits.push(fail(f,'Malformed link encoding.',link.line));continue;}const [path,anchor]=url.split('#');const dest=path?posix.normalize(posix.join(posix.dirname(f),path)):f;if(dest.startsWith('../')||(!hasFile(dest)&&!hasDir(dest.replace(/\/$/,'')))){hits.push(fail(f,`Link target does not resolve: ${link.url}`,link.line));continue;}if(anchor&&dest.endsWith('.md')&&!slugsOf(dest).has(anchor)&&!c.read(dest).includes(`id="${anchor}"`))hits.push(fail(f,`Anchor does not resolve: ${link.url}`,link.line));}}return hits;}),
14
14
  rule('H_ABSENCE','people','04-write','Headings name useful content','Positive headings say what the reader gets.','Headings describe the content they give.',c=>c.files.filter(f=>/\.md$/.test(f)).flatMap(f=>headings(c.read(f)).filter(h=>absence.test(h.text)).map(h=>fail(f,'Name what this section gives.',h.line))),{house:true})
15
15
  ];
@@ -5,10 +5,13 @@ import { git } from '../../io.mjs';
5
5
  const placeholder=/^(?:you|user|<user>|me|example|runner|name)$/i;
6
6
  const homeName=/\/(?:Users|home)\/([^/\\\s"'`)\]},;]+)|[A-Za-z]:\\{1,2}Users\\{1,2}([^\\\s"'`)\]},;]+)/g;
7
7
  export function pathHits(text) {
8
+ if(!text.includes('Users')&&!text.includes('/home/'))return [];
8
9
  const hits=[];for(const m of text.matchAll(homeName)){const name=(m[1]||m[2]).replace(/[.:!?]+$/,'');if(name&&!placeholder.test(name))hits.push(m.index);}return hits;
9
10
  }
11
+ const tokenFast=/gh[pousr]_|github_pat_|npm_|sk-|AKIA|xox[baprs]-|-----BEGIN |AIza/;
10
12
  const tokenPatterns=[/gh[pousr]_[A-Za-z0-9]{20,}/g,/github_pat_[A-Za-z0-9_]{20,}/g,/npm_[A-Za-z0-9]{20,}/g,/sk-(?:proj-)?[A-Za-z0-9_-]{20,}/g,/AKIA[A-Z0-9]{16}/g,/xox[baprs]-[A-Za-z0-9-]{20,}/g,/-----BEGIN (?:RSA |EC |OPENSSH |DSA )?PRIVATE KEY-----/g,/AIza[A-Za-z0-9_-]{30,}/g];
11
- export const tokenHits=text=>tokenPatterns.flatMap(re=>[...text.matchAll(new RegExp(re.source,'g'))].map(m=>m.index));
13
+ export const tokenHits=text=>tokenFast.test(text)?tokenPatterns.flatMap(re=>[...text.matchAll(re)].map(m=>m.index)):[];
14
+ const compileTerms=terms=>terms.map(t=>typeof t==='string'?{plain:t,re:new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,'\\$&'),'g')}:{plain:null,re:t});
12
15
  export function loadPrivateLists(root,env=process.env) {
13
16
  const paths=[join(root,'.repo-build/private.local.txt'),...(env.REPO_BUILD_PRIVATE_LISTS||'').split(delimiter).filter(Boolean).map(p=>resolve(p))];
14
17
  const lists=[],terms=[],allow=[],problems=[];
@@ -25,16 +28,24 @@ export function loadPrivateLists(root,env=process.env) {
25
28
  else terms.push(s.toLowerCase());
26
29
  }
27
30
  }
28
- return {paths:lists,terms,allow,problems};
31
+ return {paths:lists,terms,compiled:compileTerms(terms),allow,problems};
29
32
  }
30
33
  export function listHits(text,list) {
31
- const lower=text.toLowerCase(),spans=[];
32
- for(const a of list.allow){let i=lower.indexOf(a);while(i>=0){spans.push([i,i+a.length]);i=lower.indexOf(a,i+1);}}
33
- const hits=[];
34
- for(const t of list.terms){const positions=typeof t==='string'?[...lower.matchAll(new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,'\\$&'),'g'))].map(m=>[m.index,m[0].length]):[...text.matchAll(new RegExp(t.source,'gi'))].map(m=>[m.index,m[0].length]);for(const [i,n] of positions)if(!spans.some(([a,b])=>i>=a&&i+n<=b))hits.push(i);}
34
+ const compiled=list.compiled||(list.compiled=compileTerms(list.terms));
35
+ if(!compiled.length)return [];
36
+ const lower=text.toLowerCase(),hits=[];let spans=null;
37
+ const getSpans=()=>{if(spans===null){spans=[];for(const a of list.allow){let i=lower.indexOf(a);while(i>=0){spans.push([i,i+a.length]);i=lower.indexOf(a,i+1);}}}return spans;};
38
+ for(const item of compiled){
39
+ if(item.plain!==null&&!lower.includes(item.plain))continue;
40
+ const target=item.plain!==null?lower:text;
41
+ for(const m of target.matchAll(item.re)){
42
+ const i=m.index,n=m[0].length;
43
+ if(!list.allow.length||!getSpans().some(([a,b])=>i>=a&&i+n<=b))hits.push(i);
44
+ }
45
+ }
35
46
  return hits;
36
47
  }
37
- // Each blob is read once by object id and keeps the path where it was first seen.
48
+ // Each blob is read once by object id and keeps the path where it was first seen; binary blobs skip UTF-8 decoding.
38
49
  function blobsOnce(root) {
39
50
  const firstPath=new Map();
40
51
  for(const line of git(root,['rev-list','--objects','--all']).split('\n')){const at=line.indexOf(' ');if(at>0&&!firstPath.has(line.slice(0,at)))firstPath.set(line.slice(0,at),line.slice(at+1));else if(at<0&&line&&!firstPath.has(line))firstPath.set(line,'');}
@@ -48,8 +59,8 @@ function blobsOnce(root) {
48
59
  const out=git(root,['cat-file','--batch'],{input:Buffer.from(batch.join('\n')+'\n'),encoding:'buffer',maxBuffer:1024*1024*1024});
49
60
  let at=0;
50
61
  for(const oid of batch){
51
- const eol=out.indexOf(10,at),size=Number(out.toString('utf8',at,eol).split(' ')[2]);
52
- items.push({file:`history:${oid}:${firstPath.get(oid)}`,name:firstPath.get(oid),text:out.toString('utf8',eol+1,eol+1+size)});
62
+ const eol=out.indexOf(10,at),size=Number(out.toString('utf8',at,eol).split(' ')[2]),slice=out.subarray(eol+1,eol+1+size);
63
+ items.push({file:`history:${oid}:${firstPath.get(oid)}`,name:firstPath.get(oid),text:slice.includes(0)?'\0':slice.toString('utf8')});
53
64
  at=eol+1+size+1;
54
65
  }
55
66
  }
@@ -59,33 +70,63 @@ export function historyItems(root) {
59
70
  const items=[];
60
71
  for(const record of git(root,['log','--all','-z','--no-textconv','--no-ext-diff','--format=%H%n%B']).split('\0').filter(Boolean)){const eol=record.indexOf('\n');items.push({file:`history:${record.slice(0,eol).trim()}:message`,text:record.slice(eol+1)});}
61
72
  items.push(...blobsOnce(root));
62
- for(const ref of git(root,['for-each-ref','--format=%(refname)','refs/tags']).trim().split('\n').filter(Boolean))items.push({file:`tag:${ref}`,name:ref,text:git(root,['cat-file','-p',ref])});
73
+ const tagRefs=git(root,['for-each-ref','--format=%(refname)','refs/tags']).trim().split('\n').filter(Boolean);
74
+ if(tagRefs.length){
75
+ const out=git(root,['cat-file','--batch'],{input:Buffer.from(tagRefs.join('\n')+'\n'),encoding:'buffer',maxBuffer:64*1024*1024});
76
+ let at=0;
77
+ for(const ref of tagRefs){
78
+ const eol=out.indexOf(10,at),parts=out.toString('utf8',at,eol).split(' '),size=Number(parts[2]||0);
79
+ if(parts[1]==='missing'){at=eol+1;continue;}
80
+ const slice=out.subarray(eol+1,eol+1+size);
81
+ items.push({file:`tag:${ref}`,name:ref,text:slice.includes(0)?'\0':slice.toString('utf8')});
82
+ at=eol+1+size+1;
83
+ }
84
+ }
63
85
  return items;
64
86
  }
87
+ const preparedCache=new WeakMap();
88
+ function prepareScan(c) {
89
+ let entry=preparedCache.get(c);
90
+ if(!entry){
91
+ const workItems=[],workErrors=[],listPaths=c.privateLists.paths.length?new Set(c.privateLists.paths):null;
92
+ for(const file of c.files){
93
+ if(listPaths){try{if(listPaths.has(realpathSync(resolve(c.root,file))))continue;}catch{}}
94
+ try{const text=c.read(file);workItems.push({file,name:file,lines:text.includes('\0')?null:text.split('\n')});}
95
+ catch(e){workErrors.push({file,detail:e.code||e.message});}
96
+ }
97
+ entry={workItems,workErrors,historyItems:null};
98
+ preparedCache.set(c,entry);
99
+ }
100
+ if(c.options.history&&entry.historyItems===null){
101
+ entry.historyItems=c.history.map(item=>({file:item.file,name:item.name,lines:item.text.includes('\0')?null:item.text.split('\n')}));
102
+ }
103
+ return entry;
104
+ }
65
105
  function scan(c,probe,message,history=false) {
66
- const items=[],findings=[];
67
- for(const file of c.files){
68
- try{if(c.privateLists.paths.includes(realpathSync(resolve(c.root,file))))continue;}catch{}
69
- try{items.push({file,name:file,text:c.read(file)});}
70
- catch(e){findings.push(fail(file,`Unreadable path, so it was not scanned (${e.code||e.message}).`,0));}
106
+ const {workItems,workErrors,historyItems:hist}=prepareScan(c);
107
+ const findings=workErrors.map(e=>fail(e.file,`Unreadable path, so it was not scanned (${e.detail}).`,0));
108
+ const sets=history&&c.options.history&&hist?[workItems,hist]:[workItems];
109
+ for(const group of sets)for(const item of group){
110
+ if(item.name&&probe(item.name).length)findings.push(fail(item.file,message+' (filename)',0));
111
+ if(item.lines)for(let i=0;i<item.lines.length;i++)if(probe(item.lines[i]).length)findings.push(fail(item.file,message,i+1));
71
112
  }
72
- if(history&&c.options.history)items.push(...c.history);
73
- for(const item of items){if(item.name&&probe(item.name).length)findings.push(fail(item.file,message+' (filename)',0));if(!item.text.includes('\0'))for(const [i,line]of item.text.split('\n').entries())if(probe(line).length)findings.push(fail(item.file,message,i+1));}
74
113
  return findings;
75
114
  }
76
115
  const fileDomain=/(?:^|\.)(?:md|txt|json|js|mjs|cjs|ts|yml|yaml|toml|py|sh)$/;
77
116
  // A file reference has no mailbox name: "`@AGENTS.md`", or the escaped newline in a quoted "\n@AGENTS.md" source string.
78
117
  const fileReference=(m,text)=>{const local=m[0].split('@')[0];return !/[A-Za-z0-9]/.test(local)||local==='n'&&text[m.index-1]==='\\';};
79
- export function emailHits(text,facts={}) {
80
- const allow=(facts.emails_allow||[]).map(x=>x.toLowerCase());
81
- return [...text.matchAll(/[A-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi)].filter(m=>{
118
+ const emailPattern=/[A-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi;
119
+ export function emailHits(text,facts={},allowSet=null) {
120
+ if(!text.includes('@'))return [];
121
+ const allow=allowSet||new Set((facts.emails_allow||[]).map(x=>x.toLowerCase()));
122
+ return [...text.matchAll(emailPattern)].filter(m=>{
82
123
  const raw=m[0].toLowerCase(),s=raw.startsWith("'")&&text[m.index+m[0].length]==="'"?raw.slice(1):raw,domain=s.split('@')[1];
83
- return !allow.includes(s)&&!['noreply@anthropic.com','noreply@openai.com'].includes(s)&&!['users.noreply.github.com','example.com','example.org','example.net'].includes(domain)&&!/(?:^|\.)(?:invalid|test|example|localhost)$/.test(domain)&&!(fileDomain.test(domain)&&fileReference(m,text));
124
+ return !allow.has(s)&&!['noreply@anthropic.com','noreply@openai.com'].includes(s)&&!['users.noreply.github.com','example.com','example.org','example.net'].includes(domain)&&!/(?:^|\.)(?:invalid|test|example|localhost)$/.test(domain)&&!(fileDomain.test(domain)&&fileReference(m,text));
84
125
  }).map(m=>m.index);
85
126
  }
86
127
  export default [
87
128
  rule('P_PATH','registries','03-scaffold','Keep home paths private','Local usernames are private environment details.','Home paths use placeholder usernames in contents and filenames.',c=>scan(c,pathHits,'Replace the private home path with a placeholder.',true)),
88
- rule('P_EMAIL','registries','03-scaffold','Publish only approved contact addresses','A contact address should be an explicit public choice.','Email addresses are in the allowlist or a standard example or noreply domain.',c=>scan(c,text=>emailHits(text,c.facts),'Use an explicitly approved public email address.')),
129
+ rule('P_EMAIL','registries','03-scaffold','Publish only approved contact addresses','A contact address should be an explicit public choice.','Email addresses are in the allowlist or a standard example or noreply domain.',c=>{const allow=new Set((c.facts.emails_allow||[]).map(x=>x.toLowerCase()));return scan(c,text=>emailHits(text,c.facts,allow),'Use an explicitly approved public email address.');}),
89
130
  rule('P_TOKEN','registries','03-scaffold','Keep token-shaped values private','A public artifact must not carry access credentials.','Token-shaped strings and private key headers are absent.',c=>scan(c,tokenHits,'Remove the token-shaped value.',true)),
90
131
  rule('P_LIST','registries','03-scaffold','Apply the maintainer privacy lists','Private names are supplied locally by the maintainer.','Untracked list files contain no matches in the public tree or history.',c=>c.privateLists.problems.length?c.privateLists.problems.map(m=>fail('.repo-build/private.local.txt',m)):c.privateLists.paths.length?scan(c,text=>listHits(text,c.privateLists),'Remove the private-list match.',true):[skip('No maintainer private list supplied.')])
91
132
  ];
package/src/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { NAME,VERSION } from './constants.mjs';
2
2
  export const help=`${NAME} ${VERSION}
3
3
  Usage: ${NAME} [install] [--host HOST] [--scope project|user] [--dir PATH] [--yes] [--dry-run]
4
- ${NAME} uninstall [--host HOST] [--scope project|user] [--dir PATH] [--dry-run]
4
+ ${NAME} uninstall [--host HOST] [--scope project|user] [--dir PATH] [--yes] [--dry-run]
5
5
  ${NAME} check [path] [--json] [--online] [--strict] [--history] [--house]
6
6
  ${NAME} explain CODE
7
7
  ${NAME} set sync|check
@@ -9,7 +9,7 @@ Usage: ${NAME} [install] [--host HOST] [--scope project|user] [--dir PATH] [--ye
9
9
  Hosts: claude-code, codex, gemini-antigravity, cursor, agents-md, chat-upload`;
10
10
  export async function main(args=process.argv.slice(2),io={}) {
11
11
  try {
12
- if(args.length===1&&args[0]==='--help')return {code:0,message:help};
12
+ if(args.includes('--help')||args.includes('-h'))return {code:0,message:help};
13
13
  if(args.length===1&&args[0]==='--version')return {code:0,message:VERSION};
14
14
  if(args[0]==='explain') {
15
15
  if(args.length!==2)throw Error('Usage: explain CODE');
package/src/install.mjs CHANGED
@@ -215,7 +215,7 @@ export async function runInstaller(args = [], io = {}) {
215
215
  }
216
216
  let readline;
217
217
  const question = io.question ?? (async prompt => {
218
- if (!process.stdin.isTTY) throw Error('Use --host and --yes for a headless install.');
218
+ if (!process.stdin.isTTY) throw Error(`Use --host and --yes for a headless ${options.uninstall ? 'uninstall' : 'install'}.`);
219
219
  readline ??= createInterface({ input: process.stdin, output: process.stdout });
220
220
  return readline.question(prompt);
221
221
  });
package/src/io.mjs CHANGED
@@ -3,15 +3,22 @@ import { resolve, relative, sep, join, dirname } from 'node:path';
3
3
  import { createHash } from 'node:crypto';
4
4
  import { execFileSync } from 'node:child_process';
5
5
  export const digest = bytes => createHash('sha256').update(bytes).digest('hex');
6
- export function owned(root, file, mustExist = true) {
6
+ /** @param {string} root @param {string} file @param {boolean} [mustExist] @param {Set<string>} [checkedDirs] */
7
+ export function owned(root, file, mustExist = true, checkedDirs = undefined) {
7
8
  if (typeof file !== 'string' || !file || file.includes('\\') || file.split('/').includes('..') || /^[A-Za-z]:|^\//.test(file)) throw Error('Expected a relative owned path');
8
9
  const base = resolve(root), full = resolve(base, file);
9
10
  if (full !== base && !full.startsWith(base + sep)) throw Error('Path leaves root');
11
+ const parts = relative(base, full).split(sep).filter(Boolean);
10
12
  let current = base;
11
- for (const part of ['', ...relative(base, full).split(sep).filter(Boolean)]) {
12
- current = part ? join(current, part) : current;
13
- try { if (lstatSync(current).isSymbolicLink()) throw Error('Symlink path refused'); }
14
- catch (e) { if (e.code !== 'ENOENT' || mustExist) throw e; }
13
+ for (let i = 0; i <= parts.length; i++) {
14
+ if (i > 0) current = join(current, parts[i - 1]);
15
+ const isDir = i < parts.length;
16
+ if (isDir && checkedDirs?.has(current)) continue;
17
+ try {
18
+ const st = lstatSync(current);
19
+ if (st.isSymbolicLink()) throw Error('Symlink path refused');
20
+ if (isDir && st.isDirectory()) checkedDirs?.add(current);
21
+ } catch (e) { if (e.code !== 'ENOENT' || mustExist) throw e; }
15
22
  }
16
23
  return full;
17
24
  }
@@ -44,8 +51,9 @@ export function publicFiles(root) {
44
51
  const gitlinks = new Set(git(root,['ls-files','-s','-z']).split('\0').flatMap(record => { const m = record.match(/^(\d+) [0-9a-f]+ \d\t([\s\S]*)$/); return m?.[1] === '160000' ? [m[2]] : []; }));
45
52
  return [...new Set(git(root,['ls-files','-z','--cached','--others','--exclude-standard']).split('\0').filter(file => file && !file.endsWith('/') && !gitlinks.has(file)))];
46
53
  }
47
- export function textFile(root,file) {
54
+ /** @param {string} root @param {string} file @param {Set<string>} [checkedDirs] */
55
+ export function textFile(root, file, checkedDirs = undefined) {
48
56
  const full = join(root,file), st = lstatSync(full);
49
- const bytes = st.isSymbolicLink() ? Buffer.from(readlinkSync(full)) : readFileSync(owned(root,file));
57
+ const bytes = st.isSymbolicLink() ? Buffer.from(readlinkSync(full)) : readFileSync(owned(root,file,true,checkedDirs));
50
58
  return bytes.includes(0) ? '' : bytes.toString('utf8');
51
59
  }
@@ -1,4 +1,8 @@
1
- export const slug = s => s.toLowerCase().replace(/<[^>]*>/g,'').replace(/[^\p{L}\p{N}_\s-]/gu,'').trim().replace(/\s/g,'-');
1
+ export const slug = s => {
2
+ let text=s.toLowerCase(), previous;
3
+ do { previous=text; text=text.replace(/<[^<>]*>/g,''); } while(text!==previous);
4
+ return text.replace(/[^\p{L}\p{N}_\s-]/gu,'').trim().replace(/\s/g,'-');
5
+ };
2
6
  // One forward scan: 1-6 hashes, a space, then the text without its trailing whitespace and closing hashes.
3
7
  function heading(line) {
4
8
  let level = 0; while (level < line.length && line[level] === '#') level++;