role-os 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.es.md +160 -0
  4. package/README.fr.md +160 -0
  5. package/README.hi.md +160 -0
  6. package/README.it.md +160 -0
  7. package/README.ja.md +160 -0
  8. package/README.md +160 -0
  9. package/README.pt-BR.md +160 -0
  10. package/README.zh.md +160 -0
  11. package/bin/roleos.mjs +90 -0
  12. package/package.json +41 -0
  13. package/src/fs-utils.mjs +60 -0
  14. package/src/init.mjs +36 -0
  15. package/src/packet.mjs +144 -0
  16. package/src/prompts.mjs +76 -0
  17. package/src/review.mjs +94 -0
  18. package/src/route.mjs +169 -0
  19. package/src/status.mjs +352 -0
  20. package/starter-pack/.claude/workflows/full-treatment.md +74 -0
  21. package/starter-pack/README.md +74 -0
  22. package/starter-pack/agents/core/critic-reviewer.md +39 -0
  23. package/starter-pack/agents/core/orchestrator.md +40 -0
  24. package/starter-pack/agents/core/product-strategist.md +40 -0
  25. package/starter-pack/agents/design/brand-guardian.md +41 -0
  26. package/starter-pack/agents/design/ui-designer.md +42 -0
  27. package/starter-pack/agents/engineering/backend-engineer.md +39 -0
  28. package/starter-pack/agents/engineering/dependency-auditor.md +40 -0
  29. package/starter-pack/agents/engineering/frontend-developer.md +40 -0
  30. package/starter-pack/agents/engineering/performance-engineer.md +42 -0
  31. package/starter-pack/agents/engineering/refactor-engineer.md +41 -0
  32. package/starter-pack/agents/engineering/security-reviewer.md +42 -0
  33. package/starter-pack/agents/engineering/test-engineer.md +38 -0
  34. package/starter-pack/agents/growth/community-manager.md +41 -0
  35. package/starter-pack/agents/growth/content-strategist.md +41 -0
  36. package/starter-pack/agents/growth/launch-strategist.md +42 -0
  37. package/starter-pack/agents/growth/support-triage-lead.md +41 -0
  38. package/starter-pack/agents/marketing/launch-copywriter.md +39 -0
  39. package/starter-pack/agents/product/feedback-synthesizer.md +39 -0
  40. package/starter-pack/agents/product/information-architect.md +40 -0
  41. package/starter-pack/agents/product/roadmap-prioritizer.md +41 -0
  42. package/starter-pack/agents/product/spec-writer.md +42 -0
  43. package/starter-pack/agents/research/competitive-analyst.md +40 -0
  44. package/starter-pack/agents/research/trend-researcher.md +40 -0
  45. package/starter-pack/agents/research/user-interview-synthesizer.md +41 -0
  46. package/starter-pack/agents/research/ux-researcher.md +40 -0
  47. package/starter-pack/agents/treatment/coverage-auditor.md +40 -0
  48. package/starter-pack/agents/treatment/deployment-verifier.md +41 -0
  49. package/starter-pack/agents/treatment/docs-architect.md +40 -0
  50. package/starter-pack/agents/treatment/metadata-curator.md +40 -0
  51. package/starter-pack/agents/treatment/release-engineer.md +43 -0
  52. package/starter-pack/agents/treatment/repo-researcher.md +40 -0
  53. package/starter-pack/agents/treatment/repo-translator.md +38 -0
  54. package/starter-pack/context/brand-rules.md +52 -0
  55. package/starter-pack/context/current-priorities.md +33 -0
  56. package/starter-pack/context/product-brief.md +47 -0
  57. package/starter-pack/context/repo-map.md +45 -0
  58. package/starter-pack/examples/feature-packet.md +39 -0
  59. package/starter-pack/examples/identity-packet.md +39 -0
  60. package/starter-pack/examples/integration-packet.md +39 -0
  61. package/starter-pack/handbook.md +67 -0
  62. package/starter-pack/policy/done-definition.md +15 -0
  63. package/starter-pack/policy/escalation-rules.md +20 -0
  64. package/starter-pack/policy/routing-rules.md +199 -0
  65. package/starter-pack/policy/tool-permissions.md +134 -0
  66. package/starter-pack/schemas/handoff.md +52 -0
  67. package/starter-pack/schemas/review-verdict.md +26 -0
  68. package/starter-pack/schemas/task-packet.md +44 -0
  69. package/starter-pack/workflows/fix-bug.md +18 -0
  70. package/starter-pack/workflows/launch-update.md +15 -0
  71. package/starter-pack/workflows/ship-feature.md +22 -0
@@ -0,0 +1,199 @@
1
+ # Routing Rules
2
+
3
+ Use the smallest number of roles needed to complete the task correctly.
4
+
5
+ ## Route to Orchestrator
6
+ - Multi-step work
7
+ - Cross-functional work
8
+ - Ambiguous ownership
9
+ - Need for sequencing or decomposition
10
+
11
+ ## Route to Product Strategist
12
+ - Problem framing
13
+ - Scope definition
14
+ - Prioritization
15
+ - Feature shaping
16
+ - Tradeoff decisions
17
+
18
+ ## Route to UI Designer
19
+ - Information hierarchy
20
+ - User flow
21
+ - Interaction design
22
+ - Screen structure
23
+ - Visual direction within existing brand
24
+
25
+ ## Route to Frontend Developer
26
+ - UI implementation
27
+ - Client state
28
+ - Components
29
+ - Interaction wiring
30
+ - Frontend integration
31
+
32
+ ## Route to Backend Engineer
33
+ - APIs
34
+ - Services
35
+ - Data flow
36
+ - Persistence
37
+ - Contracts
38
+ - Server logic
39
+
40
+ ## Route to Test Engineer
41
+ - Test plans
42
+ - Regression defense
43
+ - Edge cases
44
+ - Verification coverage
45
+
46
+ ## Route to Launch Copywriter
47
+ - Release notes
48
+ - Launch messaging
49
+ - Positioning
50
+ - Conversion copy
51
+
52
+ ## Route to Critic Reviewer
53
+ - Final acceptance
54
+ - Contract validation
55
+ - Quality gate
56
+ - Truthful rejection
57
+
58
+ ## Route to Repo Researcher
59
+ - Repo structure mapping
60
+ - Entrypoint and seam discovery
61
+ - Build/test command verification
62
+ - Dependency verification against live repo truth
63
+
64
+ ## Route to Repo Translator
65
+ - README or docs translation to other languages
66
+ - Cross-audience documentation adaptation
67
+ - Translation verification and degenerate output detection
68
+
69
+ ## Route to Docs Architect
70
+ - Handbook or docs site creation
71
+ - Documentation restructuring
72
+ - Starlight docs setup
73
+ - Information architecture for searchable docs
74
+
75
+ ## Route to Metadata Curator
76
+ - Package manifest audit
77
+ - GitHub repo metadata (description, topics, homepage)
78
+ - Badge verification
79
+ - Registry metadata alignment
80
+
81
+ ## Route to Coverage Auditor
82
+ - Test coverage assessment
83
+ - False confidence detection
84
+ - Missing defense identification
85
+ - CI coverage integration
86
+
87
+ ## Route to Deployment Verifier
88
+ - Post-deploy verification
89
+ - Landing page, handbook, and package live checks
90
+ - Badge resolution verification
91
+ - Translation spot-checks
92
+
93
+ ## Route to Release Engineer
94
+ - Version bump and tagging
95
+ - Changelog updates
96
+ - Package build and publish readiness
97
+ - Staging and release execution
98
+
99
+ ## Route to Brand Guardian
100
+ - Identity contamination audit
101
+ - Terminology and tone consistency
102
+ - Fork/ancestor residue detection
103
+ - Replacement doctrine enforcement
104
+
105
+ ## Route to Feedback Synthesizer
106
+ - User signal clustering and theme extraction
107
+ - Issue backlog analysis
108
+ - Complaint-to-action translation
109
+ - Post-launch signal interpretation
110
+
111
+ ## Route to Roadmap Prioritizer
112
+ - Work sequencing by leverage and dependency
113
+ - Backlog ordering
114
+ - Dependency mapping between work items
115
+ - "Stop doing this" recommendations
116
+
117
+ ## Route to Spec Writer
118
+ - Turning approved scope into execution-grade specs
119
+ - Acceptance criteria authoring
120
+ - Edge case enumeration
121
+ - Non-functional requirements definition
122
+
123
+ ## Route to Information Architect
124
+ - Navigation and hierarchy design
125
+ - Content organization and findability
126
+ - Cross-surface consistency
127
+ - Naming and labeling recommendations
128
+
129
+ ## Route to Refactor Engineer
130
+ - Structure cleanup without behavior change
131
+ - Duplication elimination
132
+ - Module boundary clarification
133
+ - Complexity reduction
134
+
135
+ ## Route to Performance Engineer
136
+ - Measured performance optimization
137
+ - Regression identification with profiling
138
+ - Hot path analysis
139
+ - Performance budget enforcement
140
+
141
+ ## Route to Dependency Auditor
142
+ - Dependency health assessment
143
+ - Vulnerability scanning and triage
144
+ - Supply-chain risk evaluation
145
+ - Stale package identification
146
+
147
+ ## Route to Security Reviewer
148
+ - Code security review (injection, auth, secrets)
149
+ - Threat model verification
150
+ - OWASP pattern detection
151
+ - Security claim validation
152
+
153
+ ## Route to Launch Strategist
154
+ - Launch planning and sequencing
155
+ - Proof packaging for launch claims
156
+ - Channel selection and timing
157
+ - Success criteria definition
158
+
159
+ ## Route to Content Strategist
160
+ - Long-form content planning
161
+ - Technical article and case study angles
162
+ - Docs-to-marketing bridge
163
+ - Content calendar development
164
+
165
+ ## Route to Community Manager
166
+ - Issue and discussion triage
167
+ - Community response drafting
168
+ - Contribution guidance
169
+ - Community health assessment
170
+
171
+ ## Route to Support Triage Lead
172
+ - Support request classification
173
+ - Bug vs user error distinction
174
+ - Priority assignment
175
+ - Recurring pattern analysis
176
+
177
+ ## Route to UX Researcher
178
+ - User flow friction analysis
179
+ - Heuristic evaluation
180
+ - Usability issue identification
181
+ - Evidence-based design input
182
+
183
+ ## Route to Competitive Analyst
184
+ - Competitive landscape mapping
185
+ - Differentiation assessment
186
+ - Positioning gap identification
187
+ - Honest disadvantage acknowledgment
188
+
189
+ ## Route to Trend Researcher
190
+ - Technology and market trend analysis
191
+ - Ecosystem signal assessment
192
+ - Risk and opportunity identification
193
+ - Adoption timing recommendations
194
+
195
+ ## Route to User Interview Synthesizer
196
+ - Interview theme extraction
197
+ - Mental model mapping
198
+ - Unmet needs ranking
199
+ - Sample-aware confidence assessment
@@ -0,0 +1,134 @@
1
+ # Tool Permissions
2
+
3
+ Each role should use the minimum tools needed.
4
+
5
+ ## Orchestrator
6
+ May read all task packets, handoffs, policies, and context.
7
+ Must not perform specialist work unless explicitly acting as fallback.
8
+
9
+ ## Product Strategist
10
+ May read context, plans, briefs, feedback, metrics.
11
+ Must not write implementation code.
12
+
13
+ ## UI Designer
14
+ May read product brief, repo map, brand rules, UI files.
15
+ May propose component structure.
16
+ Must not invent backend behavior.
17
+
18
+ ## Frontend Developer
19
+ May edit UI/client files.
20
+ Must not redefine product scope or backend contracts without escalation.
21
+
22
+ ## Backend Engineer
23
+ May edit server/data files.
24
+ Must not silently change public contracts without surfacing impact.
25
+
26
+ ## Test Engineer
27
+ May add or revise tests and verification notes.
28
+ Must not declare product direction.
29
+
30
+ ## Launch Copywriter
31
+ May write copy and messaging artifacts.
32
+ Must not invent product capabilities.
33
+
34
+ ## Critic Reviewer
35
+ May read all outputs and reject them.
36
+ Must not rewrite the work except for small clarifying examples.
37
+
38
+ ## Repo Researcher
39
+ May read all repo files, run build/test commands, inspect structure.
40
+ Must not modify code or make product decisions.
41
+
42
+ ## Repo Translator
43
+ May read finalized docs and write translated versions.
44
+ Must not modify source content or invent claims not in the original.
45
+
46
+ ## Docs Architect
47
+ May read product brief, README, repo map, and existing docs.
48
+ May create and edit documentation files and site configuration.
49
+ Must not make product decisions or change application code.
50
+
51
+ ## Metadata Curator
52
+ May read and update package manifests, repo metadata, and badge URLs.
53
+ Must not change application behavior or make product scope decisions.
54
+
55
+ ## Coverage Auditor
56
+ May read test files, coverage output, and CI configuration.
57
+ Must not write application code or declare product priorities.
58
+
59
+ ## Deployment Verifier
60
+ May read deployed URLs, package registries, and badge endpoints.
61
+ Must not modify deployed artifacts or make rollback decisions without escalation.
62
+
63
+ ## Release Engineer
64
+ May update version numbers, changelogs, tags, and packaging.
65
+ Must not bypass shipcheck gates or publish without confirmation.
66
+
67
+ ## Brand Guardian
68
+ May read all user-facing surfaces and brand rules.
69
+ May propose replacement terms and flag contamination.
70
+ Must not invent new brand identity or override existing brand rules.
71
+
72
+ ## Feedback Synthesizer
73
+ May read issues, reviews, support threads, and usage data.
74
+ Must not make product decisions or commit code.
75
+
76
+ ## Roadmap Prioritizer
77
+ May read priorities, backlogs, dependency information, and feedback syntheses.
78
+ Must not implement features or override product leadership decisions.
79
+
80
+ ## Spec Writer
81
+ May read product strategy output and write specification documents.
82
+ Must not implement the spec or make product scope decisions.
83
+
84
+ ## Information Architect
85
+ May read content inventories, site structures, and navigation.
86
+ Must not create content or make visual design decisions.
87
+
88
+ ## Refactor Engineer
89
+ May edit code to improve structure.
90
+ Must not change user-visible behavior without explicit approval.
91
+
92
+ ## Performance Engineer
93
+ May profile, measure, and optimize code.
94
+ Must not optimize without measurement evidence.
95
+
96
+ ## Dependency Auditor
97
+ May read manifests, lockfiles, and audit output.
98
+ Must not update dependencies without noting compatibility risk.
99
+
100
+ ## Security Reviewer
101
+ May read all source code and configuration.
102
+ Must not modify code (report findings for others to fix).
103
+
104
+ ## Launch Strategist
105
+ May read shipped evidence, product briefs, and channel information.
106
+ Must not invent product claims or commit code.
107
+
108
+ ## Content Strategist
109
+ May read shipped work, product briefs, and existing content.
110
+ Must not create final copy (hand off to Launch Copywriter for that).
111
+
112
+ ## Community Manager
113
+ May read and draft responses to issues and discussions.
114
+ Must not make product commitments or close valid reports without evidence.
115
+
116
+ ## Support Triage Lead
117
+ May read support requests and classify them.
118
+ Must not fix bugs directly or make product direction decisions.
119
+
120
+ ## UX Researcher
121
+ May read user-facing flows, feedback, and interaction patterns.
122
+ Must not redesign (hand off findings to UI Designer).
123
+
124
+ ## Competitive Analyst
125
+ May research public competitor information.
126
+ Must not access private or proprietary competitor data.
127
+
128
+ ## Trend Researcher
129
+ May research public ecosystem and market signals.
130
+ Must not recommend trend adoption without cost assessment.
131
+
132
+ ## User Interview Synthesizer
133
+ May read interview transcripts and notes.
134
+ Must not project desired outcomes onto user words.
@@ -0,0 +1,52 @@
1
+ # Handoff
2
+
3
+ Use the **full format** for cross-functional features (4+ roles), integration work with compatibility risks, or any packet where the next role genuinely needs all fields. Use the **light format** for routine packets (2-3 roles, narrow scope, low risk).
4
+
5
+ ## Light Format (routine packets)
6
+ ```
7
+ ## [Role Name]
8
+ **Ruling/Output:** [1-3 sentences]
9
+ **Files:** [list if applicable]
10
+ **Risk:** [1 sentence or "none"]
11
+ ```
12
+
13
+ ## Full Format
14
+
15
+ ## Handoff ID
16
+ {{handoff_id}}
17
+
18
+ ## From Role
19
+ {{from_role}}
20
+
21
+ ## To Role
22
+ {{to_role}}
23
+
24
+ ## Task ID
25
+ {{task_id}}
26
+
27
+ ## Status
28
+ ready | blocked | needs-clarification | completed-with-risks
29
+
30
+ ## Summary
31
+ What was done?
32
+
33
+ ## Artifacts
34
+ Files changed, outputs created, tests added, docs produced.
35
+
36
+ ## Decisions Made
37
+ Concrete decisions, not process narration.
38
+
39
+ ## Assumptions
40
+ What was assumed?
41
+
42
+ ## Risks
43
+ What could go wrong next?
44
+
45
+ ## Open Questions
46
+ What still needs resolution?
47
+
48
+ ## Recommended Next Step
49
+ Exactly what the receiving role should do next.
50
+
51
+ ## Evidence
52
+ Verification steps, test results, screenshots, notes.
@@ -0,0 +1,26 @@
1
+ # Review Verdict
2
+
3
+ ## Reviewer
4
+ {{role_name}}
5
+
6
+ ## Task ID
7
+ {{task_id}}
8
+
9
+ ## Verdict
10
+ accept | accept-with-notes | reject | blocked
11
+
12
+ ## Why
13
+ Short explanation tied to contract and output quality.
14
+
15
+ ## Contract Check
16
+ - Scope respected?
17
+ - Output shape complete?
18
+ - Quality bar met?
19
+ - Risks surfaced honestly?
20
+ - Ready for next stage?
21
+
22
+ ## Required Corrections
23
+ Only for reject or accept-with-notes.
24
+
25
+ ## Next Owner
26
+ Who should act next?
@@ -0,0 +1,44 @@
1
+ # Task Packet
2
+
3
+ ## Task ID
4
+ {{task_id}}
5
+
6
+ ## Title
7
+ {{title}}
8
+
9
+ ## Requested Outcome
10
+ What should exist or be true when this is done?
11
+
12
+ ## User Intent
13
+ Why does this matter?
14
+
15
+ ## Scope
16
+ What is in bounds?
17
+
18
+ ## Non-Goals
19
+ What is explicitly out of bounds?
20
+
21
+ ## Inputs
22
+ Files, docs, context, links, prior handoffs.
23
+
24
+ **Verification requirement:** All referenced files, classes, and modules must be verified as live and relevant to the current product before the packet is finalized. If a file belongs to a fork ancestor or deprecated system, it must not appear as an input unless the task is explicitly about removing or migrating it.
25
+
26
+ ## Constraints
27
+ Tech, product, legal, timeline, quality, compatibility.
28
+
29
+ ## Deliverable Type
30
+ Plan | Design | Code | Test | Copy | Review
31
+
32
+ ## Assigned Role
33
+ {{role_name}}
34
+
35
+ ## Upstream Dependencies
36
+ What must already be true before this role should proceed?
37
+
38
+ **Verification requirement:** Each dependency must be confirmed against repo truth (file exists, interface is accessible, state is reachable), not assumed from documentation or memory. If a dependency cannot be verified, mark it as `unverified` and flag for Orchestrator review before decomposition proceeds.
39
+
40
+ ## Done Definition
41
+ How do we know this role completed successfully?
42
+
43
+ ## Open Questions
44
+ Unknowns that may block execution.
@@ -0,0 +1,18 @@
1
+ # Fix Bug
2
+
3
+ ## Sequence
4
+ 1. **Orchestrator** routes the bug report.
5
+ 2. **Product Strategist** clarifies expected correct behavior (only if needed).
6
+ 3. **Backend Engineer** or **Frontend Developer** fixes the issue (routed by domain).
7
+ 4. **Test Engineer** adds regression defense.
8
+ 5. **Critic Reviewer** verifies the fix resolves the reported issue.
9
+
10
+ ## Skip Rules
11
+ - Skip Product Strategist if the correct behavior is already obvious.
12
+ - Only one of Backend/Frontend is typically needed per bug.
13
+
14
+ ## Handoff Format
15
+ Each step produces a handoff per `schemas/handoff.md`.
16
+
17
+ ## Done
18
+ The workflow is done when the Critic Reviewer confirms the fix matches the reported problem and regression tests exist.
@@ -0,0 +1,15 @@
1
+ # Launch Update
2
+
3
+ ## Sequence
4
+ 1. **Orchestrator** confirms what is truly shipped and ready.
5
+ 2. **Launch Copywriter** drafts user-facing copy grounded in implementation truth.
6
+ 3. **Critic Reviewer** checks claims against implementation reality.
7
+
8
+ ## Skip Rules
9
+ - None. All three steps are required.
10
+
11
+ ## Handoff Format
12
+ Each step produces a handoff per `schemas/handoff.md`.
13
+
14
+ ## Done
15
+ The workflow is done when the Critic Reviewer accepts the copy as truthful and grounded.
@@ -0,0 +1,22 @@
1
+ # Ship Feature
2
+
3
+ ## Sequence
4
+ 1. **Orchestrator** receives the task and decomposes it.
5
+ 2. **Product Strategist** clarifies scope and success criteria.
6
+ 3. **UI Designer** shapes the interaction (if UI work is involved).
7
+ 4. **Backend Engineer** executes backend work (if needed).
8
+ 5. **Frontend Developer** implements user-facing behavior.
9
+ 6. **Test Engineer** verifies the result.
10
+ 7. **Critic Reviewer** accepts or rejects.
11
+ 8. **Launch Copywriter** writes release language (after acceptance).
12
+
13
+ ## Skip Rules
14
+ - Skip UI Designer if the task is backend-only.
15
+ - Skip Backend Engineer if no server changes are needed.
16
+ - Skip Launch Copywriter if no external communication is required.
17
+
18
+ ## Handoff Format
19
+ Each step produces a handoff per `schemas/handoff.md` before the next role begins.
20
+
21
+ ## Done
22
+ The workflow is done when the Critic Reviewer issues an `accept` verdict and all downstream artifacts are complete.