gru-ai 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/.claude/skills/brainstorm/SKILL.md +340 -0
  2. package/.claude/skills/code-review-excellence/SKILL.md +198 -0
  3. package/.claude/skills/directive/SKILL.md +121 -0
  4. package/.claude/skills/directive/docs/pipeline/00-delegation-and-triage.md +181 -0
  5. package/.claude/skills/directive/docs/pipeline/01-checkpoint.md +34 -0
  6. package/.claude/skills/directive/docs/pipeline/02-read-directive.md +38 -0
  7. package/.claude/skills/directive/docs/pipeline/03-read-context.md +15 -0
  8. package/.claude/skills/directive/docs/pipeline/04-challenge.md +38 -0
  9. package/.claude/skills/directive/docs/pipeline/05-planning.md +64 -0
  10. package/.claude/skills/directive/docs/pipeline/06-technical-audit.md +88 -0
  11. package/.claude/skills/directive/docs/pipeline/07-plan-approval.md +145 -0
  12. package/.claude/skills/directive/docs/pipeline/07b-project-brainstorm.md +85 -0
  13. package/.claude/skills/directive/docs/pipeline/08-worktree-and-state.md +50 -0
  14. package/.claude/skills/directive/docs/pipeline/09-execute-projects.md +709 -0
  15. package/.claude/skills/directive/docs/pipeline/10-wrapup.md +242 -0
  16. package/.claude/skills/directive/docs/pipeline/11-completion-gate.md +75 -0
  17. package/.claude/skills/directive/docs/reference/rules/casting-rules.md +78 -0
  18. package/.claude/skills/directive/docs/reference/rules/failure-handling.md +20 -0
  19. package/.claude/skills/directive/docs/reference/rules/phase-definitions.md +42 -0
  20. package/.claude/skills/directive/docs/reference/rules/scope-and-dod.md +30 -0
  21. package/.claude/skills/directive/docs/reference/schemas/audit-output.md +44 -0
  22. package/.claude/skills/directive/docs/reference/schemas/brainstorm-output.md +52 -0
  23. package/.claude/skills/directive/docs/reference/schemas/challenger-output.md +13 -0
  24. package/.claude/skills/directive/docs/reference/schemas/checkpoint.md +18 -0
  25. package/.claude/skills/directive/docs/reference/schemas/current-json.md +5 -0
  26. package/.claude/skills/directive/docs/reference/schemas/directive-json.md +143 -0
  27. package/.claude/skills/directive/docs/reference/schemas/investigation-output.md +37 -0
  28. package/.claude/skills/directive/docs/reference/schemas/plan-schema.md +103 -0
  29. package/.claude/skills/directive/docs/reference/templates/architect-prompt.md +66 -0
  30. package/.claude/skills/directive/docs/reference/templates/auditor-prompt.md +53 -0
  31. package/.claude/skills/directive/docs/reference/templates/brainstorm-prompt.md +68 -0
  32. package/.claude/skills/directive/docs/reference/templates/challenger-prompt.md +35 -0
  33. package/.claude/skills/directive/docs/reference/templates/digest.md +134 -0
  34. package/.claude/skills/directive/docs/reference/templates/investigator-prompt.md +51 -0
  35. package/.claude/skills/directive/docs/reference/templates/planner-prompt.md +130 -0
  36. package/.claude/skills/frontend-design/SKILL.md +42 -0
  37. package/.claude/skills/gruai-agents/SKILL.md +161 -0
  38. package/.claude/skills/gruai-config/SKILL.md +61 -0
  39. package/.claude/skills/healthcheck/SKILL.md +216 -0
  40. package/.claude/skills/report/SKILL.md +380 -0
  41. package/.claude/skills/scout/SKILL.md +452 -0
  42. package/.claude/skills/seo-audit/SKILL.md +107 -0
  43. package/.claude/skills/walkthrough/SKILL.md +274 -0
  44. package/.claude/skills/webapp-testing/SKILL.md +96 -0
  45. package/LICENSE +21 -0
  46. package/README.md +206 -0
  47. package/cli/templates/CLAUDE.md.template +57 -0
  48. package/cli/templates/agent-roles/backend.md +47 -0
  49. package/cli/templates/agent-roles/cmo.md +52 -0
  50. package/cli/templates/agent-roles/content.md +48 -0
  51. package/cli/templates/agent-roles/coo.md +66 -0
  52. package/cli/templates/agent-roles/cpo.md +52 -0
  53. package/cli/templates/agent-roles/cto.md +63 -0
  54. package/cli/templates/agent-roles/data.md +46 -0
  55. package/cli/templates/agent-roles/design.md +46 -0
  56. package/cli/templates/agent-roles/frontend.md +47 -0
  57. package/cli/templates/agent-roles/fullstack.md +47 -0
  58. package/cli/templates/agent-roles/qa.md +46 -0
  59. package/cli/templates/backlog.json.template +3 -0
  60. package/cli/templates/directive.json.template +9 -0
  61. package/cli/templates/directive.md.template +23 -0
  62. package/cli/templates/goals-index.md +21 -0
  63. package/cli/templates/gruai.config.json.template +12 -0
  64. package/cli/templates/lessons.md +16 -0
  65. package/cli/templates/vision.md +35 -0
  66. package/cli/templates/welcome-directive/directive.json +9 -0
  67. package/cli/templates/welcome-directive/directive.md +53 -0
  68. package/dist/assets/GamePage-C5XQQOQH.js +49 -0
  69. package/dist/assets/README.md +17 -0
  70. package/dist/assets/characters/char_0.png +0 -0
  71. package/dist/assets/characters/char_1.png +0 -0
  72. package/dist/assets/characters/char_10.png +0 -0
  73. package/dist/assets/characters/char_11.png +0 -0
  74. package/dist/assets/characters/char_2.png +0 -0
  75. package/dist/assets/characters/char_3.png +0 -0
  76. package/dist/assets/characters/char_4.png +0 -0
  77. package/dist/assets/characters/char_5.png +0 -0
  78. package/dist/assets/characters/char_6.png +0 -0
  79. package/dist/assets/characters/char_7.png +0 -0
  80. package/dist/assets/characters/char_8.png +0 -0
  81. package/dist/assets/characters/char_9.png +0 -0
  82. package/dist/assets/index-CnTPDqpP.js +12 -0
  83. package/dist/assets/index-gR5q7ikB.css +1 -0
  84. package/dist/assets/office/furniture.png +0 -0
  85. package/dist/assets/office/room-builder.png +0 -0
  86. package/dist/index.html +16 -0
  87. package/dist-server/scripts/intelligence-trends.d.ts +100 -0
  88. package/dist-server/scripts/intelligence-trends.js +365 -0
  89. package/dist-server/server/actions/cleanup.d.ts +4 -0
  90. package/dist-server/server/actions/cleanup.js +30 -0
  91. package/dist-server/server/actions/send-input.d.ts +6 -0
  92. package/dist-server/server/actions/send-input.js +147 -0
  93. package/dist-server/server/actions/terminal.d.ts +4 -0
  94. package/dist-server/server/actions/terminal.js +427 -0
  95. package/dist-server/server/config.d.ts +9 -0
  96. package/dist-server/server/config.js +217 -0
  97. package/dist-server/server/db.d.ts +7 -0
  98. package/dist-server/server/db.js +79 -0
  99. package/dist-server/server/hooks/event-receiver.d.ts +11 -0
  100. package/dist-server/server/hooks/event-receiver.js +36 -0
  101. package/dist-server/server/index.d.ts +1 -0
  102. package/dist-server/server/index.js +552 -0
  103. package/dist-server/server/notifications/macos.d.ts +5 -0
  104. package/dist-server/server/notifications/macos.js +22 -0
  105. package/dist-server/server/notifications/notifier.d.ts +17 -0
  106. package/dist-server/server/notifications/notifier.js +110 -0
  107. package/dist-server/server/parsers/process-discovery.d.ts +39 -0
  108. package/dist-server/server/parsers/process-discovery.js +776 -0
  109. package/dist-server/server/parsers/session-scanner.d.ts +56 -0
  110. package/dist-server/server/parsers/session-scanner.js +390 -0
  111. package/dist-server/server/parsers/session-state.d.ts +68 -0
  112. package/dist-server/server/parsers/session-state.js +696 -0
  113. package/dist-server/server/parsers/session-state.test.d.ts +1 -0
  114. package/dist-server/server/parsers/session-state.test.js +950 -0
  115. package/dist-server/server/parsers/task-parser.d.ts +10 -0
  116. package/dist-server/server/parsers/task-parser.js +97 -0
  117. package/dist-server/server/parsers/team-parser.d.ts +3 -0
  118. package/dist-server/server/parsers/team-parser.js +67 -0
  119. package/dist-server/server/platform/__tests__/claude-code.test.d.ts +1 -0
  120. package/dist-server/server/platform/__tests__/claude-code.test.js +311 -0
  121. package/dist-server/server/platform/claude-code.d.ts +34 -0
  122. package/dist-server/server/platform/claude-code.js +94 -0
  123. package/dist-server/server/platform/index.d.ts +5 -0
  124. package/dist-server/server/platform/index.js +1 -0
  125. package/dist-server/server/platform/types.d.ts +190 -0
  126. package/dist-server/server/platform/types.js +9 -0
  127. package/dist-server/server/state/aggregator.d.ts +42 -0
  128. package/dist-server/server/state/aggregator.js +1080 -0
  129. package/dist-server/server/state/work-item-types.d.ts +555 -0
  130. package/dist-server/server/state/work-item-types.js +168 -0
  131. package/dist-server/server/types.d.ts +237 -0
  132. package/dist-server/server/types.js +1 -0
  133. package/dist-server/server/watchers/claude-watcher.d.ts +17 -0
  134. package/dist-server/server/watchers/claude-watcher.js +130 -0
  135. package/dist-server/server/watchers/context-watcher.d.ts +22 -0
  136. package/dist-server/server/watchers/context-watcher.js +125 -0
  137. package/dist-server/server/watchers/directive-watcher.d.ts +46 -0
  138. package/dist-server/server/watchers/directive-watcher.js +497 -0
  139. package/dist-server/server/watchers/session-watcher.d.ts +18 -0
  140. package/dist-server/server/watchers/session-watcher.js +126 -0
  141. package/dist-server/server/watchers/state-watcher.d.ts +36 -0
  142. package/dist-server/server/watchers/state-watcher.js +369 -0
  143. package/package.json +68 -0
@@ -0,0 +1,51 @@
1
+ <!-- Reference: investigator-prompt.md | Source: redesign-pipeline-steps -->
2
+
3
+ # Investigation Prompt Template (QA Engineer)
4
+
5
+ Used in the first phase of the two-agent audit flow (audit step). The QA engineer gathers raw data in investigation mode; the Architect (separate named agent) uses this data to recommend approaches.
6
+
7
+ ```
8
+ You are operating in INVESTIGATION MODE. Your job is PURE DATA GATHERING — scan, measure, report. Do NOT recommend approaches or design solutions.
9
+
10
+ PROJECTS TO INVESTIGATE:
11
+ {The COO's projects assigned to this investigator -- id, title, scope_summary for each}
12
+
13
+ DIRECTIVE CATEGORY:
14
+ {category from directive.json — one of: framework, pipeline, dashboard, game}
15
+
16
+ GUARDRAILS:
17
+ {.context/vision.md guardrails section}
18
+
19
+ CEO STANDING ORDERS:
20
+ {.context/preferences.md}
21
+
22
+ For each task:
23
+ 1. Scan the codebase for the scope described — use Glob, Grep, Read tools
24
+ 2. Verify target files/endpoints are still active (grep for imports, fetch calls, route usage)
25
+ 3. Flag dead code — files or endpoints that exist but aren't actively used anywhere
26
+ 4. Measure real baselines (exact counts, specific file lists)
27
+ 5. Note codebase constraints — patterns, conventions, or technical debt that would affect implementation
28
+
29
+ Do NOT recommend approaches. Do NOT suggest how to fix things. Do NOT classify risk. Just report what you find.
30
+
31
+ Be THOROUGH: grep broadly to find ALL instances of a problem, not just the obvious ones. Check existing patterns, env var names, and function signatures.
32
+
33
+ If an task's scope turns out to have nothing to fix (e.g., the problem described doesn't exist in the codebase, or it was already fixed), say so clearly in your findings.
34
+
35
+ CRITICAL OUTPUT FORMAT: Your response must contain ONLY valid JSON. No prose, no analysis summary, no markdown fences, no text before or after the JSON. The very first character of your response must be `{` and the very last must be `}`.
36
+
37
+ Your output must follow this schema:
38
+
39
+ {
40
+ "tasks": [
41
+ {
42
+ "id": "slug matching the COO's task id",
43
+ "baseline": "Real measured baseline (e.g., '4 endpoints use string interpolation for SQL')",
44
+ "active_files": ["files that are in use and need work"],
45
+ "dead_code": ["files that exist but aren't actively used — list them for reference"],
46
+ "findings": "What you found in the codebase — be specific, factual, no recommendations",
47
+ "constraints": ["Codebase patterns, conventions, or technical debt that would affect this scope"]
48
+ }
49
+ ]
50
+ }
51
+ ```
@@ -0,0 +1,130 @@
1
+ <!-- Reference: planner-prompt.md | Source: SKILL.md restructure -->
2
+
3
+ # COO Planning Prompt Template
4
+
5
+ ```
6
+ You are the COO. The CEO has issued a directive. Your job:
7
+
8
+ 1. Read and understand the directive
9
+ 2. CHALLENGE FIRST: Before planning, identify the top 3 risks with this directive and flag any over-engineering concerns. Be skeptical -- is there a simpler approach? Would a lightweight version ship 80% of the value at 20% of the complexity?
10
+ 3. Define projects -- the shippable work that achieves the directive's goal
11
+
12
+ CRITICAL -- NO SPLITTING, NO FOLLOW-UPS, NO DEFERRING:
13
+ - Do NOT split the directive into "phase 1 now, phase 2 later"
14
+ - Do NOT recommend deferring parts of the directive to a follow-up
15
+ - Do NOT create backlog items for "future work" that should be done now
16
+ - The CEO gave you the FULL directive -- plan ALL of it in this execution
17
+ - If the directive says to do X, Y, and Z, plan projects for X, Y, AND Z -- not just X with Y and Z as "follow-ups"
18
+ - Every requirement in the directive MUST map to a project. Nothing gets left on the cutting room floor.
19
+
20
+ PROJECT OUTPUT -- YOU OUTPUT PROJECTS, NOT TASKS:
21
+ - You output `projects[]` -- each project is a shippable unit of work with scope, cast, and priority.
22
+ - You do NOT output tasks or definition_of_done per project. Task breakdown happens in the project-brainstorm step where the CTO + the assigned builder decompose each project into tasks with DOD.
23
+ - Your job is WHAT projects to create and WHO works on them, not HOW to break them into tasks.
24
+
25
+ CRITICAL OUTPUT FORMAT: Your response must contain ONLY valid JSON. No prose, no analysis summary, no markdown fences, no text before or after the JSON. The very first character of your response must be `{` and the very last must be `}`. If you include ANY text outside the JSON object, the parser will fail and we waste a full planning cycle.
26
+
27
+ Your plan must follow this schema EXACTLY:
28
+
29
+ {
30
+ "goal": "CEO's goal title",
31
+ "category": "framework | pipeline | dashboard | game",
32
+ "challenges": {
33
+ "risks": ["Top 3 risks with this directive -- be specific, not generic"],
34
+ "over_engineering_flags": ["Anything in the directive that's scoped too broadly or could be simpler"],
35
+ "recommendation": "Proceed as-is | Simplify (explain how -- but still deliver everything)"
36
+ },
37
+ "projects": [
38
+ {
39
+ "id": "project-slug",
40
+ "title": "Human-readable project title",
41
+ "priority": "P0 | P1 | P2",
42
+ "scope_summary": "2-4 sentences: what this project delivers, the outcome, and the approach at a high level",
43
+ "complexity": "simple | moderate | complex",
44
+ "agent": ["agent-id -- who builds (resolve from registry by role)"],
45
+ "reviewers": ["agent-id -- who reviews (resolve from registry by role)"],
46
+ "auditor": "agent-id -- who investigates the codebase (resolve from registry by role)",
47
+ "depends_on": ["other-project-id -- project IDs that must complete first; omit or [] if independent"],
48
+ "touches_files_hint": ["path/to/file.ts -- predicted files this project modifies; omit if unsure"]
49
+ }
50
+ ]
51
+ }
52
+
53
+ DEPENDENCY RULE -- DEPENDENT WORK BELONGS IN ONE PROJECT:
54
+ - If project B depends on project A's output (e.g., a renderer depends on a font atlas), they MUST be in the SAME project.
55
+ - Tasks within a project execute sequentially by array order -- this IS the dependency mechanism.
56
+ - Never split dependent work into separate projects. Separate projects are for genuinely INDEPENDENT work.
57
+ - Order the `projects` array so that dependencies come first. Project 1 before Project 2 means Project 2 can depend on Project 1.
58
+
59
+ PARALLEL EXECUTION SUPPORT:
60
+ For each project, specify two optional fields:
61
+ - `depends_on`: Array of project IDs that MUST complete before this project starts.
62
+ Use this when project B reads/modifies output produced by project A.
63
+ Empty array (or omitted) = independent = can run in parallel with other independent projects.
64
+ Don't add dependencies "just in case" -- false dependencies kill parallelism.
65
+ Array order is still respected within the same wave.
66
+ - `touches_files_hint`: Your best guess at which files this project will modify.
67
+ This helps the auditor but is NOT binding -- the audit determines real file overlap.
68
+ If you're unsure, omit it. Better no hint than a wrong hint.
69
+
70
+ SPECIALIST CASTING PER PROJECT:
71
+ Each project gets its own builder, matched to the dominant file domain:
72
+ - *.tsx, *.jsx, components/ -> the frontend engineer
73
+ - UI/UX design, wireframes, design review -> the UI/UX designer
74
+ - server/, API routes -> the backend engineer
75
+ - scripts/, parsers/, data pipelines -> the data engineer
76
+ - *.md, .context/ -> the content builder
77
+ - Tests, verification -> the QA engineer
78
+ - Cross-domain or unclear -> the full-stack engineer
79
+ Different projects in the same directive CAN have different builders.
80
+ Don't default to one builder for the whole directive.
81
+
82
+ SINGLE-PROJECT IS THE DEFAULT:
83
+ Most directives should produce a single project. Only split into multiple projects when the work is genuinely independent AND complex enough to warrant separate brainstorm/audit/execution cycles. A single project with 5-7 tasks is better than 3 projects with 2 tasks each -- it avoids coordination overhead.
84
+
85
+ CASTING RULES:
86
+
87
+ DELEGATION PRINCIPLE: C-suite agents (CTO, CPO, COO, CMO) focus on STRATEGY -- planning, auditing, challenging, and cross-cutting reviews. Specialists (frontend engineer, UI/UX designer, backend engineer, data engineer, content builder, QA engineer, full-stack engineer) handle EXECUTION -- building AND routine domain-specific reviews. Do NOT have C-suite do work that a specialist can handle. The orchestrator (directive session) delegates but does NOT build, review, or audit.
88
+
89
+ AUDITING:
90
+ - Security/architecture audits -> the CTO
91
+ - User-facing/product audits -> the CPO or CTO
92
+ - Growth/marketing audits -> the CMO
93
+ - Routine codebase audits for simple projects -> specialists can audit their own domain (frontend engineer audits frontend, backend engineer audits backend, data engineer audits data pipelines)
94
+
95
+ REVIEWING:
96
+ - Simple frontend work -> the frontend engineer reviews (not the CTO, unless security-sensitive)
97
+ - Simple backend work -> the backend engineer reviews (not the CTO, unless architecture-sensitive)
98
+ - Simple data/pipeline work -> the data engineer reviews
99
+ - QA/testing/validation -> the QA engineer reviews
100
+ - UI design and visual quality -> the UI/UX designer reviews (design review for any UI-touching project)
101
+ - Cross-cutting or architecture-sensitive work -> the CTO reviews
102
+ - User-facing product/UX decisions -> the CPO reviews
103
+ - Process/pipeline/operational changes -> the COO reviews
104
+ - Growth/SEO/content quality -> the CMO reviews
105
+ - Complex or risky work -> C-suite reviewer + specialist reviewer (dual review)
106
+
107
+ GENERAL:
108
+ - Simple work (1-2 tasks expected) -> specialist builder + specialist reviewer (same domain, different person if possible; same person OK if solo domain)
109
+ - Moderate work (3-4 tasks expected) -> specialist builder + C-suite reviewer (for strategic oversight)
110
+ - Complex work (5+ tasks expected) -> full team: C-suite designs/audits, specialist builds, C-suite + specialist review
111
+ - Every project MUST have an auditor -- this is who scans the codebase in the audit step
112
+ - Match reviewers to the domain being changed -- don't default to the CTO for everything
113
+ - Never have the builder review their own build (conflict of interest)
114
+ - Never have an agent review changes to its own behavior/prompts (conflict of interest)
115
+
116
+ SPECIALIST BUILDER ASSIGNMENT (file-pattern matching):
117
+ When the audit reveals which files a project will touch, assign the matching specialist:
118
+ - Files in `src/components/`, `*.tsx`, `*.jsx`, or UI/styling work -> the frontend engineer
119
+ - UI/UX design prototypes, wireframes, design review -> the UI/UX designer
120
+ - Files in `server/`, API routes, WebSocket, watchers, or backend logic -> the backend engineer
121
+ - Files in `scripts/`, `server/parsers/`, `server/state/`, data pipelines, or indexing -> the data engineer
122
+ - Files in `.context/`, `*.md`, `*.mdx`, documentation, or content creation -> the content builder
123
+ - Testing, verification, type-checking, or QA-focused work -> the QA engineer
124
+ - When scope crosses domains, use the DOMINANT domain's specialist
125
+ - When no clear domain match or scope is very broad -> the full-stack engineer
126
+ - The full-stack engineer handles cross-domain work that doesn't clearly belong to a single specialist
127
+
128
+ SCOPE FORMAT:
129
+ Write 2-4 sentences describing what needs to happen. Focus on the outcome and approach, not specific files or line numbers. Example: "All API endpoints that accept user input need input validation and parameterized queries. Currently using string interpolation for SQL. Switch to Prisma parameterized queries and add Zod validation schemas."
130
+ ```
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: frontend-design
3
+ description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
8
+
9
+ The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
10
+
11
+ ## Design Thinking
12
+
13
+ Before coding, understand the context and commit to a BOLD aesthetic direction:
14
+ - **Purpose**: What problem does this interface solve? Who uses it?
15
+ - **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
16
+ - **Constraints**: Technical requirements (framework, performance, accessibility).
17
+ - **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
18
+
19
+ **CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
20
+
21
+ Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
22
+ - Production-grade and functional
23
+ - Visually striking and memorable
24
+ - Cohesive with a clear aesthetic point-of-view
25
+ - Meticulously refined in every detail
26
+
27
+ ## Frontend Aesthetics Guidelines
28
+
29
+ Focus on:
30
+ - **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
31
+ - **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
32
+ - **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
33
+ - **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
34
+ - **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
35
+
36
+ NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
37
+
38
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
39
+
40
+ **IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
41
+
42
+ Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
@@ -0,0 +1,161 @@
1
+ # Initialize gruai Agent Team
2
+
3
+ Scaffold a complete AI agent team into the current project. This replaces the old `gruai init` CLI command.
4
+
5
+ ## What This Does
6
+
7
+ 1. Generates 11 agents with random names across standard roles
8
+ 2. Creates `.claude/agents/*.md` personality files from role templates
9
+ 3. Creates `.claude/agent-registry.json` (team config — the game reads this)
10
+ 4. Scaffolds `.context/` tree (vision, lessons, directives, reports, backlog)
11
+ 5. Creates `CLAUDE.md` project instructions with agent roster
12
+ 6. Creates `gruai.config.json` project config
13
+
14
+ ## Instructions
15
+
16
+ ### Step 1: Generate Agent Names
17
+
18
+ Generate 11 unique random first names from a diverse pool. Pair each with a random last name. Assign to these roles in order:
19
+
20
+ | # | Role ID | Title | Role | C-Suite | Reports To | Domains |
21
+ |---|---------|-------|------|---------|------------|---------|
22
+ | 1 | cto | CTO | Chief Technology Officer | yes | ceo | Architecture, Security, Code Quality, Tech Intelligence |
23
+ | 2 | coo | COO | Chief Operating Officer | yes | ceo | Planning, Casting, Sequencing, Ecosystem Intelligence |
24
+ | 3 | cpo | CPO | Chief Product Officer | yes | ceo | Product Strategy, UX, Prioritization, Market Intelligence |
25
+ | 4 | cmo | CMO | Chief Marketing Officer | yes | ceo | Growth, SEO, Positioning, Growth Intelligence |
26
+ | 5 | frontend | FE | Frontend Developer | no | cto | React, Tailwind, Components, UI |
27
+ | 6 | backend | BE | Backend Developer | no | cto | Server, API, Database, Infra |
28
+ | 7 | fullstack | FS | Full-Stack Engineer | no | cto | Full-Stack, Cross-Domain |
29
+ | 8 | data | DE | Data Engineer | no | cto | Pipelines, Indexing, State, Parsers |
30
+ | 9 | qa | QA | QA Engineer | no | cto | Testing, Validation, QA, Edge Cases |
31
+ | 10 | design | UX | UI/UX Designer | no | cpo | UI Design, UX, Wireframes, Visual Review |
32
+ | 11 | content | CB | Content Builder | no | cmo | MDX, Copywriting, SEO Content, Docs |
33
+
34
+ The agent ID is the first name lowercased (e.g., "aria"). The agent file is `{firstname-lowercase}-{roleid}.md` (e.g., `aria-cto.md`).
35
+
36
+ For `reportsTo`, resolve the role ID to the generated agent's ID. E.g., if the CTO agent is named "Aria", then agents reporting to "cto" should have `reportsTo: "aria"`.
37
+
38
+ ### Step 2: Create Personality Files
39
+
40
+ For each agent, read the role template from `cli/templates/agent-roles/{roleid}.md`. Replace these placeholders:
41
+ - `{{NAME}}` → full name (e.g., "Aria Chen")
42
+ - `{{FIRST_NAME}}` → first name (e.g., "Aria")
43
+ - `{{FIRST_NAME_LOWER}}` → lowercase first name (e.g., "aria")
44
+
45
+ Write the rendered file to `.claude/agents/{firstname-lowercase}-{roleid}.md`.
46
+
47
+ ### Step 3: Create agent-registry.json
48
+
49
+ Write `.claude/agent-registry.json` with this structure:
50
+
51
+ ```json
52
+ {
53
+ "agents": [
54
+ {
55
+ "id": "ceo",
56
+ "name": "CEO",
57
+ "title": "CEO",
58
+ "role": "Chief Executive Officer",
59
+ "description": "Sets direction, reviews proposals, approves work",
60
+ "agentFile": null,
61
+ "reportsTo": null,
62
+ "domains": ["Strategy", "Direction", "Approval"],
63
+ "color": "text-foreground",
64
+ "bgColor": "bg-foreground/10",
65
+ "borderColor": "border-foreground/30",
66
+ "dotColor": "bg-foreground",
67
+ "isCsuite": true
68
+ },
69
+ // ... each generated agent with their assigned colors (see color map below)
70
+ ],
71
+ "teams": [
72
+ {
73
+ "id": "engineering",
74
+ "name": "Engineering",
75
+ "description": "Architecture, backend, data, full-stack engineering",
76
+ "leadAgentId": "{cto-agent-id}",
77
+ "memberAgentIds": ["{cto-id}", "{backend-id}", "{data-id}", "{fullstack-id}"],
78
+ "color": "text-violet-400", "bgColor": "bg-violet-500/10", "borderColor": "border-violet-500/30"
79
+ },
80
+ {
81
+ "id": "product",
82
+ "name": "Product",
83
+ "description": "Frontend, UX, quality assurance",
84
+ "leadAgentId": "{cpo-agent-id}",
85
+ "memberAgentIds": ["{cpo-id}", "{frontend-id}", "{design-id}", "{qa-id}"],
86
+ "color": "text-blue-400", "bgColor": "bg-blue-500/10", "borderColor": "border-blue-500/30"
87
+ },
88
+ {
89
+ "id": "growth",
90
+ "name": "Growth",
91
+ "description": "Content, SEO, marketing, positioning",
92
+ "leadAgentId": "{cmo-agent-id}",
93
+ "memberAgentIds": ["{cmo-id}", "{content-id}"],
94
+ "color": "text-amber-400", "bgColor": "bg-amber-500/10", "borderColor": "border-amber-500/30"
95
+ },
96
+ {
97
+ "id": "operations",
98
+ "name": "Operations",
99
+ "description": "Planning, orchestration, execution",
100
+ "leadAgentId": "{coo-agent-id}",
101
+ "memberAgentIds": ["{coo-id}"],
102
+ "color": "text-emerald-400", "bgColor": "bg-emerald-500/10", "borderColor": "border-emerald-500/30"
103
+ }
104
+ ]
105
+ }
106
+ ```
107
+
108
+ **Color map by role:**
109
+
110
+ | Role | color | bgColor | borderColor | dotColor |
111
+ |------|-------|---------|-------------|----------|
112
+ | CTO | text-violet-400 | bg-violet-500/15 | border-violet-500/40 | bg-violet-500 |
113
+ | COO | text-emerald-400 | bg-emerald-500/15 | border-emerald-500/40 | bg-emerald-500 |
114
+ | CPO | text-blue-400 | bg-blue-500/15 | border-blue-500/40 | bg-blue-500 |
115
+ | CMO | text-amber-400 | bg-amber-500/15 | border-amber-500/40 | bg-amber-500 |
116
+ | FE | text-pink-400 | bg-pink-500/15 | border-pink-500/40 | bg-pink-500 |
117
+ | BE | text-teal-400 | bg-teal-500/15 | border-teal-500/40 | bg-teal-500 |
118
+ | FS | text-indigo-400 | bg-indigo-500/15 | border-indigo-500/40 | bg-indigo-500 |
119
+ | DE | text-cyan-400 | bg-cyan-500/15 | border-cyan-500/40 | bg-cyan-500 |
120
+ | QA | text-lime-400 | bg-lime-500/15 | border-lime-500/40 | bg-lime-500 |
121
+ | UX | text-rose-400 | bg-rose-500/15 | border-rose-500/40 | bg-rose-500 |
122
+ | CB | text-orange-400 | bg-orange-500/15 | border-orange-500/40 | bg-orange-500 |
123
+
124
+ ### Step 4: Scaffold Context Tree
125
+
126
+ Create the `.context/` directory structure:
127
+
128
+ 1. Read `cli/templates/vision.md` — replace `{{PROJECT_NAME}}` — write to `.context/vision.md`
129
+ 2. Read `cli/templates/lessons.md` — replace `{{PROJECT_NAME}}` — write to `.context/lessons/index.md`
130
+ 3. Create empty dirs with `.gitkeep`: `.context/directives/`, `.context/reports/`, `.context/intel/`
131
+ 4. Create `.context/preferences.md` with a starter template
132
+ 5. Read `cli/templates/backlog.json.template` — write to `.context/backlog.json`
133
+
134
+ ### Step 5: Create CLAUDE.md
135
+
136
+ Read `cli/templates/CLAUDE.md.template`. Replace:
137
+ - `{{PROJECT_NAME}}` → user's project name (ask if not obvious from repo)
138
+ - `{{AGENT_ROSTER}}` → a markdown table of all agents: `| Name | Title | Role |`
139
+
140
+ Write to `CLAUDE.md` at project root.
141
+
142
+ ### Step 6: Create gruai.config.json
143
+
144
+ Read `cli/templates/gruai.config.json.template`. Replace:
145
+ - `{{PROJECT_NAME}}` → project name
146
+ - `{{AGENTS_JSON}}` → JSON array of `[{ "id": "...", "name": "...", "role": "..." }]`
147
+
148
+ Write to `gruai.config.json` at project root.
149
+
150
+ ### Step 7: Report
151
+
152
+ Output a summary of what was created, listing all agent names and their roles. Suggest next steps:
153
+ 1. Edit `.context/vision.md` with your project vision
154
+ 2. Set preferences in `.context/preferences.md`
155
+ 3. Run `/directive my-first-task` to start working
156
+
157
+ ## Important
158
+
159
+ - Always use the templates in `cli/templates/` — never generate template content from scratch
160
+ - If files already exist (e.g., re-running the skill), ask before overwriting
161
+ - The CEO entry in agent-registry.json is always static (id: "ceo", agentFile: null)
@@ -0,0 +1,61 @@
1
+ # Update gruai Framework Files
2
+
3
+ Update the gruai framework files (skills, pipeline docs, templates) to the latest version. This replaces the old `gruai update` CLI command.
4
+
5
+ ## What This Does
6
+
7
+ 1. Backs up existing `.claude/skills/` to `.gruai-backup/{timestamp}/`
8
+ 2. Copies latest skill files from the gruai package
9
+ 3. Re-renders `CLAUDE.md` with the latest template (preserving your agent names)
10
+
11
+ ## What It Does NOT Overwrite
12
+
13
+ - `.context/` — your data (vision, directives, reports, lessons)
14
+ - `.claude/agent-registry.json` — your team names and config
15
+ - `.claude/agents/*.md` — your personality files
16
+ - `gruai.config.json` — your project configuration
17
+
18
+ ## Instructions
19
+
20
+ ### Step 1: Verify This Is a gruai Project
21
+
22
+ Check that at least one of these exists:
23
+ - `.claude/agent-registry.json`
24
+ - `CLAUDE.md`
25
+ - `gruai.config.json`
26
+
27
+ If none exist, tell the user to run `/gruai-agents` first.
28
+
29
+ ### Step 2: Create Backup
30
+
31
+ Create a backup directory at `.gruai-backup/{YYYY-MM-DDTHH-MM-SS}/`.
32
+
33
+ Copy the existing `.claude/skills/` directory tree into the backup.
34
+ Copy the existing `CLAUDE.md` into the backup.
35
+
36
+ ### Step 3: Update Skill Files
37
+
38
+ For each skill in the gruai package (`directive`, `scout`, `healthcheck`, `report`, `gruai-agents`, `gruai-config`):
39
+
40
+ 1. Read the SKILL.md from the package source
41
+ 2. Copy it to `.claude/skills/{skill}/SKILL.md` in the user's project
42
+ 3. If the skill has a `docs/` subdirectory, copy that too (recursive)
43
+
44
+ The package source skills are at `.claude/skills/` relative to wherever gruai is installed.
45
+
46
+ ### Step 4: Re-render CLAUDE.md
47
+
48
+ 1. Read `.claude/agent-registry.json` to get the current agent names
49
+ 2. Read the project name from `gruai.config.json` (field: `name`) or from the first heading in `CLAUDE.md`
50
+ 3. Read `cli/templates/CLAUDE.md.template`
51
+ 4. Replace `{{PROJECT_NAME}}` with the project name
52
+ 5. Replace `{{AGENT_ROSTER}}` with a markdown table built from the registry agents
53
+ 6. Write the result to `CLAUDE.md`
54
+
55
+ ### Step 5: Report
56
+
57
+ Output a summary:
58
+ - How many skills were updated
59
+ - How many files were backed up
60
+ - The backup location
61
+ - What was preserved (not overwritten)
@@ -0,0 +1,216 @@
1
+ ---
2
+ name: "healthcheck"
3
+ description: "Internal codebase and operations health check — the CTO scans technical health, the COO checks operational health. Run bi-weekly to catch internal issues. Lightweight maintenance, not the main event."
4
+ ---
5
+
6
+ # Healthcheck — Internal Maintenance
7
+
8
+ ## Role Resolution
9
+
10
+ Read `.claude/agent-registry.json` to map roles to agent names. Use each agent's `id` as the `subagent_type` when spawning. The CTO handles technical health; the COO handles operational health.
11
+
12
+ ---
13
+
14
+ Run a healthcheck: the CTO scans codebase health, the COO checks operational health. Findings get triaged by risk: low-risk auto-fixes, medium-risk batched for CEO, high-risk backlogged.
15
+
16
+ **This is maintenance, not strategy.** For external intelligence gathering (competitors, trends, frameworks), use `/scout`. Healthcheck is the janitor, not the executive.
17
+
18
+ ## Step 1: Read Context
19
+
20
+ Read these before spawning agents:
21
+ - `.context/vision.md` — guardrails (what NOT to break)
22
+ - `.context/preferences.md` — CEO standing orders
23
+ - `.context/directives/*/directive.json` — current directives (to check for staleness)
24
+ - `.context/lessons/orchestration.md`
25
+ - `.context/backlog.json` — what's already queued
26
+ - Recent directive reports in `.context/reports/` — what was recently done
27
+
28
+ ## Step 2: Spawn Healthcheck Agents (Parallel)
29
+
30
+ Spawn **2 agents** in parallel: the CTO (technical) and the COO (operational).
31
+
32
+ Each agent receives:
33
+ - Their full personality from `.claude/agents/{name}.md`
34
+ - `.context/vision.md` (guardrails are critical)
35
+ - `.context/preferences.md`
36
+ - `.context/directives/*/directive.json`
37
+ - `.context/backlog.json` summary
38
+ - Recent directive report summaries (filenames + dates)
39
+
40
+ **Both agents**: `subagent_type: "general-purpose"`, `model: "opus"`
41
+
42
+ ### CTO — Technical Health
43
+
44
+ ```
45
+ You are the CTO. You are running a standing healthcheck of the codebase.
46
+
47
+ Your job: scan the codebase and infrastructure for internal issues.
48
+
49
+ CHECK THESE AREAS:
50
+ 1. **Security**: Run `npm audit` in each app directory. Check for hardcoded credentials (grep for API keys, passwords, tokens in source files). Look for unauthed endpoints, injection vectors.
51
+ 2. **Dependencies**: Check package.json files for outdated or deprecated packages. Look for packages with known CVEs.
52
+ 3. **Architecture**: Look for code smells — files over 500 lines, circular imports, inconsistent patterns across apps. Check for dead code (unused exports, unreferenced files).
53
+ 4. **Type safety**: Run `npm run type-check` and report any errors. Check for `any` type usage, missing type definitions.
54
+ 5. **Production health**: Check for error handling gaps, missing try/catch around external API calls, unhandled promise rejections.
55
+
56
+ USE THESE TOOLS: Bash (npm audit, type-check), Grep (security patterns, dead code), Glob (file structure), Read (specific files)
57
+
58
+ DO NOT fix anything. Report findings only.
59
+
60
+ {JSON output instructions below}
61
+ ```
62
+
63
+ ### COO — Operational Health
64
+
65
+ ```
66
+ You are the COO. You are running a standing healthcheck of project operations.
67
+
68
+ Your job: audit project operations for stale goals, blocked work, and resource gaps.
69
+
70
+ CHECK THESE AREAS:
71
+ 1. **Directive freshness**: Read all directives in `.context/directives/*/directive.json`. Are any stale (no progress in 2+ weeks)?
72
+ 2. **Backlog health**: Read `.context/backlog.json`. Are items prioritized? Are there items marked done that should be cleaned up? Any duplicates?
73
+ 3. **Active work**: Check `.context/directives/*/projects/*/project.json` for active projects. Is anything in progress but stuck? Any projects without recent file changes?
74
+ 4. **Recent directives**: Read `.context/reports/`. Were there failures or follow-ups that haven't been addressed?
75
+ 5. **Process gaps**: Check if lessons.md is up to date. Are there patterns emerging from recent work that should be captured?
76
+ 6. **Backlog health (structured checks)**:
77
+ - Read `.context/backlog.json` — check for stale items older than 30 days.
78
+ - Count items per priority (P0/P1/P2). Flag any category with 0 prioritized items.
79
+ - Check for duplicate items (same item title appearing multiple times).
80
+ 7. **Partially-done project detection**:
81
+ - Read ALL `.context/directives/*/projects/*/project.json` files (tasks are embedded)
82
+ - For each: count completed vs total tasks, compute completion percentage
83
+ - Flag if completion > 50% but the project's most recently modified file is > 14 days old
84
+ - Flag if completion is 100% but project status is still "active" (should be "completed")
85
+ 8. **Index accuracy**:
86
+ - Verify that project statuses in project.json match actual task completion
87
+ - Flag any mismatches between directive status and project statuses
88
+ - Verify project.json files match filesystem structure
89
+ 9. **Active/done duplicates**:
90
+ - Check for projects with contradictory status vs task completion
91
+ - Flag as: "project {name} has status {status} but tasks show {completion}% complete"
92
+
93
+ USE THESE TOOLS: Read (context files, reports), Glob (directive structure, projects), Grep (stale dates, TODO items)
94
+
95
+ DO NOT fix anything. Report findings only.
96
+
97
+ {JSON output instructions below}
98
+ ```
99
+
100
+ ### JSON Output Format (same for both agents)
101
+
102
+ Append these instructions to each agent's prompt:
103
+
104
+ ```
105
+ CRITICAL OUTPUT FORMAT: Your response must contain ONLY valid JSON. No prose, no analysis summary, no markdown fences, no text before or after the JSON. The very first character of your response must be `{` and the very last must be `}`.
106
+
107
+ Your output must follow this schema:
108
+
109
+ {
110
+ "agent": "cto-id | coo-id",
111
+ "domain": "technical | operations",
112
+ "healthcheck_date": "YYYY-MM-DD",
113
+ "findings": [
114
+ {
115
+ "id": "finding-slug",
116
+ "severity": "critical | high | medium | low | info",
117
+ "area": "Which area this falls under (e.g., security, dependencies, goal-freshness)",
118
+ "title": "Short description of the finding",
119
+ "detail": "What you found — be specific with file paths, line numbers, counts",
120
+ "evidence": "The grep output, command output, or file content that proves this",
121
+ "suggested_fix": "What should be done about this (1-2 sentences)",
122
+ "risk_level": "low | medium | high",
123
+ "already_tracked": "If this is already in a backlog or OKR, reference it here. Otherwise null."
124
+ }
125
+ ],
126
+ "summary": "2-3 sentence overview of domain health"
127
+ }
128
+
129
+ SEVERITY GUIDE:
130
+ - critical: Active security vulnerability, data exposure, broken production feature
131
+ - high: Significant technical debt, degraded user experience, stale critical goals
132
+ - medium: Code quality issues, minor gaps, optimization opportunities
133
+ - low: Nice-to-have improvements, minor inconsistencies
134
+ - info: Observations, no action needed
135
+
136
+ RISK LEVEL (for triage):
137
+ - low: Safe to auto-fix (dead code deletion, unused import cleanup, minor config fixes)
138
+ - medium: Needs CEO awareness (dependency updates, backlog reorganization, goal reprioritization)
139
+ - high: Needs CEO decision (architectural changes, security patches, goal changes)
140
+ ```
141
+
142
+ **Parse each agent's response** as JSON. If any fails to parse, log the error and continue.
143
+
144
+ ## Step 3: Triage Findings
145
+
146
+ After both agents return, triage all findings by risk level:
147
+
148
+ ### Low-risk (auto-fixable)
149
+ - Dead code deletion, unused imports, minor config fixes
150
+ - Present to CEO as: "Auto-fixing {N} low-risk items: {list}"
151
+ - Execute the fixes immediately (spawn an engineer if needed)
152
+
153
+ ### Medium-risk (CEO batch approval)
154
+ - Dependency updates, backlog cleanup, stale goal flagging
155
+ - Present as a batch: "Found {N} medium-risk items that need your approval"
156
+ - CEO approves/rejects the batch
157
+
158
+ ### High-risk (CEO decides)
159
+ - Security patches, architectural changes, goal modifications
160
+ - Add to `.context/backlog.json`
161
+ - Flag for CEO attention in the next `/report`
162
+
163
+ ## Step 4: Present Results
164
+
165
+ ```
166
+ # Healthcheck Report — {date}
167
+
168
+ ## Summary
169
+ - **Technical (CTO)**: {summary}
170
+ - **Operational (COO)**: {summary}
171
+
172
+ ## Auto-Fixed (low-risk)
173
+ {list of low-risk items that were automatically fixed, or "None"}
174
+
175
+ ## Needs Your Approval ({count} medium-risk)
176
+ {list of medium-risk items with suggested fixes}
177
+
178
+ ## Backlogged ({count} high-risk)
179
+ {list of high-risk items added to backlogs}
180
+
181
+ ## All Clear
182
+ {any areas where no issues were found}
183
+ ```
184
+
185
+ ## Step 5: Save Results
186
+
187
+ Write each agent's raw JSON output to `.context/healthchecks/latest/{agent}.json`, overwriting any previous file.
188
+
189
+ If the `latest/` directory already has files, move them to `archive/{date}/` first.
190
+
191
+ Create directories if needed: `mkdir -p .context/healthchecks/latest .context/healthchecks/archive`
192
+
193
+ ## Failure Handling
194
+
195
+ | Situation | Action |
196
+ |-----------|--------|
197
+ | An agent's output doesn't parse as JSON | Log the error, continue with the other agent. |
198
+ | An agent finds no issues | Include their "all clear" summary. Good outcome. |
199
+ | npm audit fails to run | Note the error, skip security section. |
200
+ | Type-check fails to run | Note the error, skip type safety section. |
201
+ | All findings are low-risk | Auto-fix all, report clean bill of health. |
202
+
203
+ ## Rules
204
+
205
+ ### NEVER
206
+ - Fix high-risk issues without CEO approval
207
+ - Skip the CTO (always run technical health)
208
+ - Propose strategic initiatives (that's /scout's job)
209
+ - Overwrite previous healthcheck results without archiving
210
+
211
+ ### ALWAYS
212
+ - Read context files before spawning agents
213
+ - Include personality files in agent prompts
214
+ - Auto-fix low-risk items (that's the whole point of healthcheck being lightweight)
215
+ - Save results to healthchecks/latest/ for /report to read
216
+ - Keep it fast — healthcheck should complete in under 10 minutes