role-os 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "role-os",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Role OS — a repo-native operating layer where specialized roles execute work through contracts, handoffs, review, and escalation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,74 +1,176 @@
1
1
  # Full Treatment
2
2
 
3
- Role OS does not own or redefine the full treatment protocol. The canonical protocol lives in Claude project memory (`memory/full-treatment.md`) and is a 7-phase polish + publish playbook.
4
-
5
- ## Canonical source
6
-
7
- The full treatment is defined in Claude project memory as a 7-phase protocol:
8
-
9
- 1. Pre-flight + finalize README + hand off translations
10
- 2. Scaffold landing page (Astro site-theme)
11
- 3. Handbook (Starlight docs)
12
- 4. Repo metadata + coverage
13
- 5. Repo Knowledge DB entry
14
- 6. Commit and deploy
15
- 7. Post-deploy verification
16
-
17
- Read `memory/full-treatment.md` and `memory/handbook-playbook.md` before starting.
3
+ Every tool repo gets the full treatment before it's "whole." This is the complete 7-phase protocol not a pointer to an external file.
18
4
 
19
5
  ## Gate: Shipcheck runs first
20
6
 
21
- Full treatment does not start until shipcheck passes. Shipcheck is the 31-item quality gate (hard gates A-D block release). The canonical shipcheck reference lives in Claude project memory (`memory/shipcheck.md`).
7
+ Full treatment does not start until shipcheck passes. Shipcheck is the 31-item quality gate (hard gates A-D block release).
22
8
 
23
9
  Order: `npx @mcptoolshop/shipcheck audit` → exits 0 → then full treatment.
24
10
 
25
11
  No v1.0.0 bump without passing hard gates A-D.
26
12
 
27
- ## Role chain per phase
13
+ ## Phase 1 Pre-flight + finalize README + hand off translations
14
+
15
+ a) Clone repo, verify Pages source is "GitHub Actions", enable if not. Check for existing site/ and pages.yml.
16
+ b) Note whether root package.json has "private": true (controls npm badge/link decisions).
17
+ c) Push logo to brand repo: `mcp-tool-shop-org/brand/logos/<slug>/readme.png`, run `brand manifest`, commit+push. Min 530x530px.
18
+ d) Update README: brand logo URL (`https://raw.githubusercontent.com/mcp-tool-shop-org/brand/main/logos/<slug>/readme.png`), width="400", centered.
19
+ e) Badges (after logo, centered): CI status, Codecov coverage, MIT license, Landing Page. Only if published: npm/PyPI version badges.
20
+ f) If logo contains product name, remove redundant `<h1>`.
21
+ g) Update footer: `Built by <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>`
22
+ h) README is now final — hand the user the translation command(s).
23
+
24
+ Translation command (user runs in PowerShell, NOT Claude):
25
+ ```
26
+ node F:/AI/polyglot-mcp/scripts/translate-all.mjs F:/AI/<repo>/README.md
27
+ ```
28
+ Monorepos: chain with semicolons. Large monorepos: batch into groups of 5-7.
28
29
 
29
- Each treatment phase maps to specific roles:
30
+ WARNING: NEVER run translations from Claude — wastes Claude points. User runs locally (TranslateGemma 12B, Ollama, zero API cost, ~2-4 min/README).
30
31
 
31
- ### Phase 1 — Pre-flight + README + translations
32
+ ### Role owners
32
33
  - **Repo Researcher** — verify repo state, Pages config, package.json
33
34
  - **Brand Guardian** — verify logo, README identity, footer
34
35
  - **Repo Translator** — hand off and verify translations
35
36
 
36
- ### Phase 2 — Scaffold landing page
37
+ ## Phase 2 — Scaffold landing page (while translations run)
38
+
39
+ a) `npx @mcptoolshop/site-theme init` from repo root
40
+ b) Add to .gitignore: site/.astro/, site/dist/, site/node_modules/, .polyglot-cache.json
41
+ c) `cd site && npm install`
42
+ d) Verify site/astro.config.mjs base matches `/<repo-name>/` (case-sensitive)
43
+ e) Write site/src/site-config.ts (typed as SiteConfig). Description from root package.json.
44
+ f) pages.yml does NOT count toward "max 2 workflow files" rule
45
+
46
+ ### Role owners
37
47
  - **Docs Architect** — site-theme init, site-config.ts
38
48
  - **Frontend Developer** — landing page content and build
39
49
  - **Brand Guardian** — verify brand alignment
40
50
 
41
- ### Phase 3 — Handbook (Starlight docs)
51
+ ## Phase 3 — Handbook (Starlight docs)
52
+
53
+ a) `cd <repo>/site && npm install @astrojs/starlight`
54
+ b) Replace astro.config.mjs (social must be array, disable404Route: true)
55
+ c) Create content.config.ts in site/src/:
56
+ ```ts
57
+ import { defineCollection } from 'astro:content';
58
+ import { docsLoader } from '@astrojs/starlight/loaders';
59
+ import { docsSchema } from '@astrojs/starlight/schema';
60
+ export const collections = { docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }) };
61
+ ```
62
+ d) Create starlight-custom.css (derive accent from global.css):
63
+
64
+ | Accent | --sl-color-accent-low | --sl-color-accent | --sl-color-accent-high |
65
+ |--------|----------------------|-------------------|------------------------|
66
+ | emerald (default) | #022c22 | #34d399 | #6ee7b7 |
67
+ | amber | #451a03 | #d97706 | #fbbf24 |
68
+ | blue | #1e1b4b | #3b82f6 | #93c5fd |
69
+ | rose | #4c0519 | #f43f5e | #fb7185 |
70
+ | violet | #2e1065 | #8b5cf6 | #a78bfa |
71
+ | cyan | #083344 | #06b6d4 | #67e8f9 |
72
+ | pink | #500724 | #ec4899 | #f9a8d4 |
73
+
74
+ Dark background vars: `--sl-color-bg: #09090b`, `--sl-color-hairline: #27272a`, etc.
75
+
76
+ e) Create handbook pages in site/src/content/docs/handbook/ (min 3: index, getting-started, reference)
77
+
78
+ | Source | File | Order |
79
+ |--------|------|-------|
80
+ | Welcome | index.md | 0 |
81
+ | Install/Quick Start | getting-started.md | 1 |
82
+ | Usage | usage.md | 2 |
83
+ | Config/Options | configuration.md | 3 |
84
+ | API/Commands | reference.md | 4 |
85
+ | Architecture | architecture.md | 5 |
86
+ | Security | security.md | 6 |
87
+
88
+ Minimum 3 pages. Rich repos get 5-7. Expand README content — don't just copy-paste.
89
+
90
+ f) Update landing page CTA in site-config.ts: `secondaryCta: { href: 'handbook/', label: 'Read the Handbook' }`
91
+ g) Build and verify: `cd site && npm run build` — check dist/index.html + dist/handbook/
92
+
93
+ ### Role owners
42
94
  - **Docs Architect** — Starlight setup, page structure, content
43
95
  - **Repo Translator** — docs translation if applicable
44
96
 
45
- ### Phase 4 — Repo metadata + coverage
97
+ ## Phase 4 — Repo metadata + coverage
98
+
99
+ a) Set GitHub metadata:
100
+ ```
101
+ gh repo edit mcp-tool-shop-org/<repo> --description "<from package.json>" --homepage "https://mcp-tool-shop-org.github.io/<repo-name>/"
102
+ gh repo edit mcp-tool-shop-org/<repo> --add-topic <tags>
103
+ ```
104
+ b) Code coverage: add coverage dep, coverage CI step (one matrix entry), codecov upload, badge in README
105
+ c) Verify site builds, .gitignore complete, logo renders at brand URL
106
+ d) Review README for typos, broken links, stale content
107
+
108
+ ### Role owners
46
109
  - **Metadata Curator** — GitHub metadata, badges, manifest
47
110
  - **Coverage Auditor** — test coverage assessment, CI integration
48
111
 
49
- ### Phase 5 — Repo Knowledge DB entry
112
+ ## Phase 5 — Repo Knowledge DB entry
113
+
114
+ Every treated repo gets a proper entry in the repo-knowledge database. This is NOT optional.
115
+
116
+ a) Sync the repo if not already in the DB:
117
+ ```
118
+ rk sync --owners mcp-tool-shop-org
119
+ ```
120
+
121
+ b) Add required notes using MCP tools or CLI:
122
+ - **thesis** — what the repo is and why it exists (1-2 sentences)
123
+ - **architecture** — how it's built, key components, data flow
124
+ - At least one **relationship** mapped (depends_on, related_to, shares_domain_with, etc.)
125
+
126
+ c) Add recommended notes where applicable:
127
+ - **convention** — important patterns/rules specific to this repo
128
+ - **next_step** — what should happen next
129
+ - **warning** or **drift_risk** — known issues or things that could break
130
+ - **command** — key commands to build/test/deploy
131
+
132
+ d) Verify the entry:
133
+ ```
134
+ rk show <slug>
135
+ ```
136
+ Confirm: thesis present, architecture present, relationships mapped, tech detected, docs indexed.
137
+
138
+ ### Role owners
50
139
  - **Repo Researcher** — thesis, architecture, relationships
51
140
  - **Metadata Curator** — verify entry completeness
52
141
 
53
- ### Phase 6 — Commit and deploy
142
+ ## Phase 6 — Commit and deploy
143
+
144
+ Stage explicitly: `git add site/ .github/workflows/pages.yml .gitignore README.md README.*.md`
145
+ WARNING: Use `README.*.md` glob — NEVER hand-type individual filenames.
146
+ Never `git add .` — translated READMEs may have CRLF drift on Windows.
147
+ Push to main. Verify landing page + handbook render.
148
+
149
+ ### Role owners
54
150
  - **Release Engineer** — staging, version, tag, push
55
151
 
56
- ### Phase 7 — Post-deploy verification
152
+ ## Phase 7 — Post-deploy verification
153
+
154
+ - Landing page renders at `https://mcp-tool-shop-org.github.io/<repo-name>/`
155
+ - Handbook renders at `.../handbook/`
156
+ - Pagefind search works in handbook
157
+ - Translations are complete (check ja for degenerate output)
158
+ - Coverage badge shows real data
159
+ - `rk show <slug>` returns complete knowledge entry
160
+ - Repo-knowledge DB has thesis, architecture, and relationships
161
+
162
+ ### Role owners
57
163
  - **Deployment Verifier** — landing page, handbook, package, badges, translations
58
164
 
59
165
  ### Final gate
60
166
  - **Critic Reviewer** — accept or reject treatment completeness
61
167
 
62
- ## What Role OS adds
63
-
64
- - Explicit role ownership for each treatment phase
65
- - Structured handoffs between phases
66
- - Review gate on treatment completeness
67
- - Routing and escalation law
68
-
69
- ## What Role OS does not own
168
+ ## Do NOT
70
169
 
71
- - The treatment protocol itself
72
- - The shipcheck gate
73
- - Claude project memory
74
- - Treatment history and repo facts (those live in Claude project memory)
170
+ - Copy or modify theme components locally
171
+ - Add extra Astro pages beyond index.astro unless requested
172
+ - Skip the init CLI and scaffold manually
173
+ - Add npm badges for private/unpublished repos
174
+ - Skip the repo-knowledge DB entry — it's part of the treatment now
175
+ - Run translations from Claude
176
+ - Reference "memory/" paths without absolute paths — protocols must be self-contained