cc-workspace 4.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 (36) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +382 -0
  3. package/bin/cli.js +735 -0
  4. package/global-skills/agents/implementer.md +39 -0
  5. package/global-skills/agents/team-lead.md +143 -0
  6. package/global-skills/agents/workspace-init.md +207 -0
  7. package/global-skills/bootstrap-repo/SKILL.md +70 -0
  8. package/global-skills/constitution.md +58 -0
  9. package/global-skills/cross-service-check/SKILL.md +67 -0
  10. package/global-skills/cycle-retrospective/SKILL.md +133 -0
  11. package/global-skills/dispatch-feature/SKILL.md +168 -0
  12. package/global-skills/dispatch-feature/references/anti-patterns.md +31 -0
  13. package/global-skills/dispatch-feature/references/frontend-ux-standards.md +73 -0
  14. package/global-skills/dispatch-feature/references/spawn-templates.md +109 -0
  15. package/global-skills/hooks/notify-user.sh +30 -0
  16. package/global-skills/hooks/permission-auto-approve.sh +16 -0
  17. package/global-skills/hooks/session-start-context.sh +85 -0
  18. package/global-skills/hooks/subagent-start-context.sh +35 -0
  19. package/global-skills/hooks/task-completed-check.sh +21 -0
  20. package/global-skills/hooks/teammate-idle-check.sh +29 -0
  21. package/global-skills/hooks/track-file-modifications.sh +20 -0
  22. package/global-skills/hooks/user-prompt-guard.sh +19 -0
  23. package/global-skills/hooks/validate-spawn-prompt.sh +79 -0
  24. package/global-skills/hooks/worktree-create-context.sh +22 -0
  25. package/global-skills/incident-debug/SKILL.md +86 -0
  26. package/global-skills/merge-prep/SKILL.md +87 -0
  27. package/global-skills/plan-review/SKILL.md +70 -0
  28. package/global-skills/qa-ruthless/SKILL.md +102 -0
  29. package/global-skills/refresh-profiles/SKILL.md +22 -0
  30. package/global-skills/rules/constitution-en.md +67 -0
  31. package/global-skills/rules/context-hygiene.md +43 -0
  32. package/global-skills/rules/model-routing.md +42 -0
  33. package/global-skills/templates/claude-md.template.md +124 -0
  34. package/global-skills/templates/constitution.template.md +18 -0
  35. package/global-skills/templates/workspace.template.md +33 -0
  36. package/package.json +28 -0
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Model routing rules. The orchestrator never writes in repos — it delegates to teammates. Can write in orchestrator/.
3
+ globs: ["workspace.md", "plans/**", "constitution.md", "templates/**"]
4
+ ---
5
+
6
+ # Model Routing
7
+
8
+ ## Golden rule
9
+ The orchestrator NEVER writes code in repos. It describes what teammates must do.
10
+ Writing plans, workspace.md, constitution.md in orchestrator/ is expected and normal.
11
+ If you write code for a repo (not a markdown plan), you have failed — delegate.
12
+
13
+ ## Security layers (3 layers in agent frontmatter — no settings.json pollution)
14
+ 1. **Agent frontmatter**: `disallowedTools` — refused at model level
15
+ 2. **Agent frontmatter**: `allowed-tools` — whitelist of permitted tools
16
+ 3. **Agent hook**: `PreToolUse` in frontmatter — structured deny response
17
+
18
+ ## Routing table
19
+ | Role | Model | Mechanism |
20
+ |------|-------|-----------|
21
+ | Orchestrator | **Opus 4.6** | `claude --agent team-lead` (frontmatter `model: opus`) |
22
+ | Implementation teammates | **Sonnet 4.6** | `CLAUDE_CODE_SUBAGENT_MODEL=sonnet` |
23
+ | QA investigators | **Sonnet 4.6** | Same |
24
+ | Explorers / cross-checks | **Haiku** | `model: haiku` in skill/agent frontmatter |
25
+ | Plan review | **Haiku** | `model: haiku` in skill frontmatter |
26
+
27
+ ## Effort levels
28
+ | Role | Effort | Rationale |
29
+ |------|--------|-----------|
30
+ | Orchestrator (team-lead) | **high** | Complex planning, multi-step reasoning |
31
+ | Implementation teammates | **medium** | Focused implementation, clear scope |
32
+ | QA investigators | **medium** | Thorough but bounded analysis |
33
+ | Explorers / cross-checks (Haiku) | **low** | Fast scans, read-only |
34
+ | Plan review (Haiku) | **low** | Structural checks, no deep reasoning |
35
+
36
+ Effort levels are set in agent frontmatter (`effort: high|medium|low|max`).
37
+ Use `max` only for critical debugging or complex architectural decisions.
38
+
39
+ ## Custom agent `implementer`
40
+ For Task subagents that need to write code in an isolated worktree,
41
+ use `@implementer` (frontmatter with `isolation: worktree`).
42
+ Agent Teams teammates (Teammate tool) get automatic isolation.
@@ -0,0 +1,124 @@
1
+ # CLAUDE.md — [REPO_NAME]
2
+
3
+ > [REPO_DESCRIPTION — one line]
4
+
5
+ ## Stack technique
6
+
7
+ | Technologie | Version | Notes |
8
+ |-------------|---------|-------|
9
+ | [language] | [version] | |
10
+ | [framework] | [version] | |
11
+ | [database] | [version] | [usage] |
12
+ | [test framework] | [version] | |
13
+
14
+ ## Architecture
15
+
16
+ <!-- Describe the architecture pattern and show the directory tree -->
17
+
18
+ ```
19
+ [repo]/
20
+ ├── src/ ← [description]
21
+ ├── tests/ ← [description]
22
+ └── ...
23
+ ```
24
+
25
+ <!-- Explain the layering or module organization -->
26
+
27
+ ## Regles critiques
28
+
29
+ <!-- Numbered rules. Each rule has a short name and ✅/❌ examples.
30
+ Keep only rules that an AI agent MUST know to avoid mistakes.
31
+ Not a style guide — only rules where violations cause bugs or break patterns. -->
32
+
33
+ ### 1. [Rule name]
34
+
35
+ [One-line explanation]
36
+
37
+ ```
38
+ ❌ [wrong pattern]
39
+ ✅ [correct pattern]
40
+ ```
41
+
42
+ ### 2. [Rule name]
43
+
44
+ [One-line explanation]
45
+
46
+ ```
47
+ ❌ [wrong pattern]
48
+ ✅ [correct pattern]
49
+ ```
50
+
51
+ <!-- Add more rules as needed. Typical count: 3-8 rules per repo. -->
52
+
53
+ ## Conventions de nommage
54
+
55
+ | Type | Pattern | Exemple |
56
+ |------|---------|---------|
57
+ | [files] | [pattern] | [example] |
58
+ | [classes] | [pattern] | [example] |
59
+ | [functions] | [pattern] | [example] |
60
+ | [routes/endpoints] | [pattern] | [example] |
61
+
62
+ ## Tests
63
+
64
+ <!-- Test framework, how to run, patterns to follow -->
65
+
66
+ **Lancer les tests :**
67
+ ```bash
68
+ [test command]
69
+ ```
70
+
71
+ **Patterns :**
72
+ - [describe test organization]
73
+ - [describe mocking strategy]
74
+ - [minimum coverage if applicable]
75
+
76
+ ## Anti-patterns
77
+
78
+ <!-- Two-column table: forbidden vs required. Keep it short and impactful. -->
79
+
80
+ | Interdit | Faire plutot |
81
+ |----------|--------------|
82
+ | [bad pattern] | [good pattern] |
83
+ | [bad pattern] | [good pattern] |
84
+ | [bad pattern] | [good pattern] |
85
+
86
+ ## Commandes
87
+
88
+ <!-- Essential commands for dev workflow -->
89
+
90
+ | Commande | Description |
91
+ |----------|-------------|
92
+ | `[cmd]` | Build / compile |
93
+ | `[cmd]` | Run tests |
94
+ | `[cmd]` | Lint / format |
95
+ | `[cmd]` | Start dev server |
96
+
97
+ ## Domaines existants
98
+
99
+ <!-- List existing modules/domains/packages if the repo uses a modular architecture.
100
+ Remove this section if not applicable. -->
101
+
102
+ | Domaine | Chemin | Description |
103
+ |---------|--------|-------------|
104
+ | [name] | [path] | [one-line description] |
105
+
106
+ <!-- === OPTIONAL SECTIONS (add only if relevant) === -->
107
+
108
+ <!-- ## Multi-tenancy
109
+ Describe tenant scoping pattern, trait/mixin used, tables affected. -->
110
+
111
+ <!-- ## Auth
112
+ Describe authentication mechanism, tokens, middleware, guards. -->
113
+
114
+ <!-- ## Checklist avant livraison
115
+ - [ ] Tests passent
116
+ - [ ] Lint clean
117
+ - [ ] Pas de code mort introduit
118
+ - [ ] Conventions respectees -->
119
+
120
+ <!-- ## Decisions architecturales
121
+ Document any ADRs (Architecture Decision Records) specific to this repo. -->
122
+
123
+ ---
124
+ _Last Updated: [DATE]_
@@ -0,0 +1,18 @@
1
+ # Constitution — [PROJECT_NAME]
2
+ > Configured on: [DATE]
3
+
4
+ > The 12 universal principles (security, UX, code, process) apply automatically.
5
+ > This file contains ONLY project-specific rules, numbered from 13.
6
+
7
+ ## Project-specific rules
8
+
9
+ 13. **[Rule name].** [Description — what, why, and when it applies]
10
+ <!-- Example: **Data precision.** Financial amounts stored as integers (cents). Never floats. -->
11
+
12
+ 14. **[Rule name].** [Description]
13
+ <!-- Example: **Multi-tenancy.** Every query, endpoint, and view scoped by tenant_id. No exceptions. -->
14
+
15
+ 15. **[Rule name].** [Description]
16
+ <!-- Example: **Irreversible operations.** Any irreversible DB change requires feature flag. -->
17
+
18
+ <!-- Add more rules as needed. Keep each rule actionable and verifiable. -->
@@ -0,0 +1,33 @@
1
+ # Workspace: [PROJECT_NAME]
2
+ > Configured on: [DATE]
3
+ > Orchestrator v4.0
4
+
5
+ ## Projet
6
+ <!-- What does this project do? Who is it for? Scale? -->
7
+ [UNCONFIGURED]
8
+
9
+ ## Service map
10
+ <!-- Auto-generated from sibling repo scan. Review and add descriptions. -->
11
+ | Service | Repo | Type | CLAUDE.md | Description |
12
+ |---------|------|------|-----------|-------------|
13
+ <!-- [AUTO_DISCOVERED_REPOS] -->
14
+
15
+ ## Inter-service relationships
16
+ <!-- Describe the request flow between services -->
17
+ ```
18
+ [service-a] → [service-b] → [database]
19
+ ```
20
+
21
+ ## Business rules
22
+ <!-- Key rules that teammates must know. Examples:
23
+ - Amounts in cents (no floats)
24
+ - Multi-tenant: all queries scoped by company_id
25
+ - Audit logs mandatory for all mutations
26
+ -->
27
+
28
+ ## Onboarding notes
29
+ <!-- Anything the orchestrator should tell teammates that isn't in CLAUDE.md files.
30
+ - Common pitfalls
31
+ - Local setup requirements
32
+ - Non-obvious dependencies
33
+ -->
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "cc-workspace",
3
+ "version": "4.0.0",
4
+ "description": "Claude Code multi-workspace orchestrator — skills, hooks, agents, and templates for multi-service projects",
5
+ "bin": {
6
+ "cc-workspace": "./bin/cli.js"
7
+ },
8
+ "files": [
9
+ "bin/",
10
+ "global-skills/",
11
+ "LICENSE",
12
+ "README.md"
13
+ ],
14
+ "keywords": [
15
+ "claude",
16
+ "claude-code",
17
+ "orchestrator",
18
+ "agent-teams",
19
+ "multi-repo",
20
+ "workspace",
21
+ "monorepo"
22
+ ],
23
+ "author": "Vincent",
24
+ "license": "MIT",
25
+ "engines": {
26
+ "node": ">=18"
27
+ }
28
+ }