cc-workspace 4.0.1 → 4.0.3
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/README.md +190 -189
- package/bin/cli.js +80 -83
- package/global-skills/agents/team-lead.md +91 -91
- package/global-skills/agents/workspace-init.md +148 -148
- package/global-skills/bootstrap-repo/SKILL.md +1 -1
- package/global-skills/cross-service-check/SKILL.md +2 -2
- package/global-skills/cycle-retrospective/SKILL.md +2 -2
- package/global-skills/dispatch-feature/SKILL.md +8 -9
- package/global-skills/dispatch-feature/references/anti-patterns.md +2 -3
- package/global-skills/dispatch-feature/references/frontend-ux-standards.md +47 -47
- package/global-skills/dispatch-feature/references/spawn-templates.md +11 -24
- package/global-skills/incident-debug/SKILL.md +2 -2
- package/global-skills/merge-prep/SKILL.md +2 -2
- package/global-skills/qa-ruthless/SKILL.md +6 -7
- package/global-skills/refresh-profiles/SKILL.md +1 -1
- package/global-skills/templates/claude-md.template.md +21 -21
- package/global-skills/templates/constitution.template.md +33 -9
- package/global-skills/templates/workspace.template.md +1 -1
- package/package.json +2 -2
- package/global-skills/constitution.md +0 -58
- package/global-skills/rules/constitution-en.md +0 -67
|
@@ -2,22 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Reference file for dispatch-feature. Loaded on-demand, not at skill activation.
|
|
4
4
|
|
|
5
|
-
>
|
|
6
|
-
>
|
|
7
|
-
>
|
|
8
|
-
> `~/.claude/rules/constitution-en.md` (or the FR version from constitution.md).
|
|
5
|
+
> Teammates do NOT receive the constitution automatically. Every spawn template
|
|
6
|
+
> below includes a "Constitution" section that you MUST fill with all rules from
|
|
7
|
+
> your workspace's `constitution.md`.
|
|
9
8
|
|
|
10
9
|
## Backend/API teammate spawn template
|
|
11
10
|
|
|
12
11
|
```
|
|
13
12
|
You are teammate-[service]. Read the CLAUDE.md in your repo first.
|
|
14
13
|
|
|
15
|
-
##
|
|
16
|
-
[paste all
|
|
17
|
-
into teammates since v4.0. Copy them from ~/.claude/rules/constitution-en.md]
|
|
18
|
-
|
|
19
|
-
## Project rules (non-negotiable)
|
|
20
|
-
[paste project-specific rules from workspace constitution.md, translated to English]
|
|
14
|
+
## Constitution (non-negotiable)
|
|
15
|
+
[paste all rules from your workspace's constitution.md]
|
|
21
16
|
|
|
22
17
|
## API contract
|
|
23
18
|
[paste the exact request/response shapes this service must implement]
|
|
@@ -28,7 +23,7 @@ into teammates since v4.0. Copy them from ~/.claude/rules/constitution-en.md]
|
|
|
28
23
|
|
|
29
24
|
## Instructions
|
|
30
25
|
1. Read the repo CLAUDE.md first — follow its conventions
|
|
31
|
-
2. Implement the tasks above following the full constitution (
|
|
26
|
+
2. Implement the tasks above following the full constitution (all rules above)
|
|
32
27
|
3. Use the LSP tool for code navigation (go-to-definition, find-references)
|
|
33
28
|
4. Run the existing test suite — report pass/fail
|
|
34
29
|
5. List any dead code created or exposed by your changes
|
|
@@ -43,12 +38,8 @@ into teammates since v4.0. Copy them from ~/.claude/rules/constitution-en.md]
|
|
|
43
38
|
```
|
|
44
39
|
You are teammate-[service]. Read the CLAUDE.md in your repo first.
|
|
45
40
|
|
|
46
|
-
##
|
|
47
|
-
[paste all
|
|
48
|
-
into teammates since v4.0. Copy them from ~/.claude/rules/constitution-en.md]
|
|
49
|
-
|
|
50
|
-
## Project rules (non-negotiable)
|
|
51
|
-
[paste project-specific rules from workspace constitution.md, translated to English]
|
|
41
|
+
## Constitution (non-negotiable)
|
|
42
|
+
[paste all rules from your workspace's constitution.md]
|
|
52
43
|
|
|
53
44
|
## UX Standards (non-negotiable)
|
|
54
45
|
[paste full content of frontend-ux-standards.md]
|
|
@@ -61,7 +52,7 @@ into teammates since v4.0. Copy them from ~/.claude/rules/constitution-en.md]
|
|
|
61
52
|
|
|
62
53
|
## Instructions
|
|
63
54
|
1. Read the repo CLAUDE.md first — follow its conventions
|
|
64
|
-
2. Implement the tasks following the full constitution (
|
|
55
|
+
2. Implement the tasks following the full constitution (all rules above) and UX standards
|
|
65
56
|
3. Use the LSP tool for code navigation
|
|
66
57
|
4. Every new component MUST handle 4 states: skeleton loader, empty+CTA, error+retry, success
|
|
67
58
|
5. Run the existing test suite — report pass/fail
|
|
@@ -76,12 +67,8 @@ into teammates since v4.0. Copy them from ~/.claude/rules/constitution-en.md]
|
|
|
76
67
|
```
|
|
77
68
|
You are teammate-[service]. Read the CLAUDE.md in your repo first.
|
|
78
69
|
|
|
79
|
-
##
|
|
80
|
-
[paste all
|
|
81
|
-
into teammates since v4.0. Copy them from ~/.claude/rules/constitution-en.md]
|
|
82
|
-
|
|
83
|
-
## Project rules (non-negotiable)
|
|
84
|
-
[paste project-specific rules from workspace constitution.md, translated to English]
|
|
70
|
+
## Constitution (non-negotiable)
|
|
71
|
+
[paste all rules from your workspace's constitution.md]
|
|
85
72
|
|
|
86
73
|
## Your tasks
|
|
87
74
|
[paste tasks — typically: gateway routes, deployment configs, env vars]
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Debug incidents across a multi-service stack. Spawns parallel
|
|
5
5
|
investigators per layer. Use when user reports a bug, says "erreur",
|
|
6
6
|
"500", "bug", "debug", "ça marche pas", "investigate", or pastes
|
|
7
|
-
stack traces or error logs.
|
|
7
|
+
stack traces or error logs. Also French triggers: "erreur", "ça marche pas".
|
|
8
8
|
argument-hint: "[error description or stack trace]"
|
|
9
9
|
context: fork
|
|
10
10
|
allowed-tools: Read, Write, Glob, Grep, Task, Teammate, SendMessage
|
|
@@ -83,4 +83,4 @@ Create `./plans/incident-{date}-{name}.md`:
|
|
|
83
83
|
- Monitoring: [alert/metric]
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Ask: "
|
|
86
|
+
Ask: "Diagnosis complete. Dispatch fixes?"
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Prepare branches for merge after QA passes. Checks for conflicts between
|
|
5
5
|
teammate branches, generates PR summaries, lists review points.
|
|
6
6
|
Use after qa-ruthless passes, or when user says "merge", "PR", "pull request",
|
|
7
|
-
"
|
|
7
|
+
"prepare merge", "merge-prep", "ready to merge".
|
|
8
8
|
argument-hint: "[feature-name]"
|
|
9
9
|
context: fork
|
|
10
10
|
disable-model-invocation: true
|
|
@@ -84,4 +84,4 @@ Write to `./plans/{feature-name}.md`:
|
|
|
84
84
|
[list or "none — ready to merge"]
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
Ask user: "Merge prep
|
|
87
|
+
Ask user: "Merge prep complete. [N] services ready. Proceed with PRs?"
|
|
@@ -5,7 +5,7 @@ description: >
|
|
|
5
5
|
a clean report is a failed review. Executes tests, hunts dead code,
|
|
6
6
|
checks edge cases, validates UX standards compliance on frontend.
|
|
7
7
|
Use after dispatch-feature completes, or when user says "QA", "review",
|
|
8
|
-
"
|
|
8
|
+
"test", "quality", "qa ruthless", "find bugs".
|
|
9
9
|
argument-hint: "[plan-name or 'all']"
|
|
10
10
|
context: fork
|
|
11
11
|
allowed-tools: Read, Write, Glob, Grep, Task, Teammate, SendMessage
|
|
@@ -22,9 +22,8 @@ A review with zero findings = YOU failed.
|
|
|
22
22
|
2. Read `./plans/{feature-name}.md` for what was implemented
|
|
23
23
|
3. Read `./constitution.md` (project-specific rules)
|
|
24
24
|
|
|
25
|
-
>
|
|
26
|
-
>
|
|
27
|
-
> principles + project-specific rules in every QA teammate spawn prompt.
|
|
25
|
+
> Teammates do NOT receive the constitution automatically.
|
|
26
|
+
> You MUST include all rules from constitution.md in every QA teammate spawn prompt.
|
|
28
27
|
|
|
29
28
|
## Rules
|
|
30
29
|
|
|
@@ -41,7 +40,7 @@ Spawn one teammate per service impacted. All run in parallel via Agent Teams.
|
|
|
41
40
|
|
|
42
41
|
### Backend/API QA teammate prompt
|
|
43
42
|
|
|
44
|
-
Include in spawn prompt: **full constitution (
|
|
43
|
+
Include in spawn prompt: **full constitution (all rules from constitution.md)**, plan context, then these steps:
|
|
45
44
|
1. Run test suite — report pass/fail with details
|
|
46
45
|
2. Use the **LSP tool** (go-to-definition, find-references) to trace call chains
|
|
47
46
|
3. **Constitution check**: multi-tenant scoping, secrets, rollback, test coverage
|
|
@@ -53,7 +52,7 @@ Include in spawn prompt: **full constitution (12 universal principles + project-
|
|
|
53
52
|
|
|
54
53
|
### Frontend QA teammate prompt
|
|
55
54
|
|
|
56
|
-
Include in spawn prompt: **full constitution (
|
|
55
|
+
Include in spawn prompt: **full constitution (all rules from constitution.md)**, plan context, UX standards, then these steps:
|
|
57
56
|
1. Run tests — report pass/fail
|
|
58
57
|
2. Use the **LSP tool** for tracing component dependencies and store usage
|
|
59
58
|
3. **UX audit** on every new/modified component: 4 states (skeleton not spinner, empty+CTA, error+retry, smooth success), responsive, a11y, interactions (debounce, optimistic, confirmation), forms (inline validation, error messages, preserve data)
|
|
@@ -97,6 +96,6 @@ Write to `./plans/{feature-name}.md`:
|
|
|
97
96
|
[list]
|
|
98
97
|
```
|
|
99
98
|
|
|
100
|
-
Ask user: "QA
|
|
99
|
+
Ask user: "QA found [N] issues including [M] blockers. Dispatch fixes?"
|
|
101
100
|
If yes, spawn teammates for 🔴, 🟣, and 🟡 items.
|
|
102
101
|
After fixes, re-run QA on fixed files only.
|
|
@@ -3,7 +3,7 @@ name: refresh-profiles
|
|
|
3
3
|
description: >
|
|
4
4
|
Regenerate service-profiles.md by reading CLAUDE.md from all repos
|
|
5
5
|
listed in workspace.md. Use when conventions changed, or user says
|
|
6
|
-
"refresh profiles", "
|
|
6
|
+
"refresh profiles", "update profiles", "re-read CLAUDE.md files".
|
|
7
7
|
context: fork
|
|
8
8
|
disable-model-invocation: true
|
|
9
9
|
model: haiku
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> [REPO_DESCRIPTION — one line]
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Tech stack
|
|
6
6
|
|
|
7
|
-
|
|
|
8
|
-
|
|
7
|
+
| Technology | Version | Notes |
|
|
8
|
+
|------------|---------|-------|
|
|
9
9
|
| [language] | [version] | |
|
|
10
10
|
| [framework] | [version] | |
|
|
11
11
|
| [database] | [version] | [usage] |
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
<!-- Explain the layering or module organization -->
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Critical rules
|
|
28
28
|
|
|
29
29
|
<!-- Numbered rules. Each rule has a short name and ✅/❌ examples.
|
|
30
30
|
Keep only rules that an AI agent MUST know to avoid mistakes.
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
|
|
51
51
|
<!-- Add more rules as needed. Typical count: 3-8 rules per repo. -->
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## Naming conventions
|
|
54
54
|
|
|
55
|
-
| Type | Pattern |
|
|
55
|
+
| Type | Pattern | Example |
|
|
56
56
|
|------|---------|---------|
|
|
57
57
|
| [files] | [pattern] | [example] |
|
|
58
58
|
| [classes] | [pattern] | [example] |
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
|
|
64
64
|
<!-- Test framework, how to run, patterns to follow -->
|
|
65
65
|
|
|
66
|
-
**
|
|
66
|
+
**Run tests:**
|
|
67
67
|
```bash
|
|
68
68
|
[test command]
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
**Patterns
|
|
71
|
+
**Patterns:**
|
|
72
72
|
- [describe test organization]
|
|
73
73
|
- [describe mocking strategy]
|
|
74
74
|
- [minimum coverage if applicable]
|
|
@@ -77,30 +77,30 @@
|
|
|
77
77
|
|
|
78
78
|
<!-- Two-column table: forbidden vs required. Keep it short and impactful. -->
|
|
79
79
|
|
|
80
|
-
|
|
|
81
|
-
|
|
80
|
+
| Forbidden | Do instead |
|
|
81
|
+
|-----------|-----------|
|
|
82
82
|
| [bad pattern] | [good pattern] |
|
|
83
83
|
| [bad pattern] | [good pattern] |
|
|
84
84
|
| [bad pattern] | [good pattern] |
|
|
85
85
|
|
|
86
|
-
##
|
|
86
|
+
## Commands
|
|
87
87
|
|
|
88
88
|
<!-- Essential commands for dev workflow -->
|
|
89
89
|
|
|
90
|
-
|
|
|
91
|
-
|
|
90
|
+
| Command | Description |
|
|
91
|
+
|---------|-------------|
|
|
92
92
|
| `[cmd]` | Build / compile |
|
|
93
93
|
| `[cmd]` | Run tests |
|
|
94
94
|
| `[cmd]` | Lint / format |
|
|
95
95
|
| `[cmd]` | Start dev server |
|
|
96
96
|
|
|
97
|
-
##
|
|
97
|
+
## Existing domains
|
|
98
98
|
|
|
99
99
|
<!-- List existing modules/domains/packages if the repo uses a modular architecture.
|
|
100
100
|
Remove this section if not applicable. -->
|
|
101
101
|
|
|
102
|
-
|
|
|
103
|
-
|
|
102
|
+
| Domain | Path | Description |
|
|
103
|
+
|--------|------|-------------|
|
|
104
104
|
| [name] | [path] | [one-line description] |
|
|
105
105
|
|
|
106
106
|
<!-- === OPTIONAL SECTIONS (add only if relevant) === -->
|
|
@@ -111,13 +111,13 @@
|
|
|
111
111
|
<!-- ## Auth
|
|
112
112
|
Describe authentication mechanism, tokens, middleware, guards. -->
|
|
113
113
|
|
|
114
|
-
<!-- ##
|
|
115
|
-
- [ ] Tests
|
|
114
|
+
<!-- ## Pre-delivery checklist
|
|
115
|
+
- [ ] Tests pass
|
|
116
116
|
- [ ] Lint clean
|
|
117
|
-
- [ ]
|
|
118
|
-
- [ ] Conventions
|
|
117
|
+
- [ ] No dead code introduced
|
|
118
|
+
- [ ] Conventions followed -->
|
|
119
119
|
|
|
120
|
-
<!-- ##
|
|
120
|
+
<!-- ## Architectural decisions
|
|
121
121
|
Document any ADRs (Architecture Decision Records) specific to this repo. -->
|
|
122
122
|
|
|
123
123
|
---
|
|
@@ -1,18 +1,42 @@
|
|
|
1
1
|
# Constitution — [PROJECT_NAME]
|
|
2
2
|
> Configured on: [DATE]
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Non-negotiable principles for this project. The orchestrator and every teammate
|
|
5
|
+
must follow these rules without exception.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<!-- Write YOUR engineering principles below. Number them starting at 1.
|
|
8
|
+
The workspace-init agent will help you fill this interactively.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
Common categories to consider:
|
|
11
|
+
- Security & data (multi-tenancy, secrets, auth)
|
|
12
|
+
- UX & quality (loading states, responsive, feedback)
|
|
13
|
+
- Code & architecture (dead code, tests, consistency)
|
|
14
|
+
- Process (planning, QA, reviews)
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
<!-- Example: **Multi-tenancy.** Every query, endpoint, and view scoped by tenant_id. No exceptions. -->
|
|
16
|
+
Example rules for inspiration:
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
1. **Multi-tenancy is sacred.** No query may return data from one tenant
|
|
19
|
+
to another. Every query, endpoint, and view is scoped by tenant.
|
|
20
|
+
|
|
21
|
+
2. **No hardcoded secrets.** Zero passwords, API keys, or tokens in code.
|
|
22
|
+
Everything goes through environment variables.
|
|
23
|
+
|
|
24
|
+
3. **4 mandatory states.** Every component that displays data must handle:
|
|
25
|
+
loading, empty, error, success. No blank screens, ever.
|
|
26
|
+
|
|
27
|
+
4. **No feature without tests.** Every new behavior has at minimum one test
|
|
28
|
+
proving it works and one test proving it handles errors.
|
|
29
|
+
|
|
30
|
+
5. **Consistency over preference.** Follow existing patterns in the repo,
|
|
31
|
+
even if you'd prefer it differently.
|
|
32
|
+
-->
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
1. **[Rule name].** [Description — what, why, and when it applies]
|
|
37
|
+
|
|
38
|
+
2. **[Rule name].** [Description]
|
|
39
|
+
|
|
40
|
+
3. **[Rule name].** [Description]
|
|
17
41
|
|
|
18
42
|
<!-- Add more rules as needed. Keep each rule actionable and verifiable. -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-workspace",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "Claude Code multi-workspace orchestrator — skills, hooks, agents, and templates for multi-service projects",
|
|
5
5
|
"bin": {
|
|
6
6
|
"cc-workspace": "./bin/cli.js"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"workspace",
|
|
21
21
|
"monorepo"
|
|
22
22
|
],
|
|
23
|
-
"author": "
|
|
23
|
+
"author": "VincVan",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18"
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Constitution
|
|
2
|
-
|
|
3
|
-
Principes non négociables. S'appliquent à TOUS les projets, TOUS les teammates.
|
|
4
|
-
L'orchestrateur et chaque teammate doivent respecter ces règles sans exception.
|
|
5
|
-
|
|
6
|
-
## Sécurité & données
|
|
7
|
-
|
|
8
|
-
1. **Le multi-tenant est sacré.** Aucune requête ne doit retourner des données
|
|
9
|
-
d'un tenant à un autre. Chaque query, chaque endpoint, chaque vue est scopée.
|
|
10
|
-
En cas de doute, le teammate refuse d'implémenter et escalade à l'orchestrateur.
|
|
11
|
-
|
|
12
|
-
2. **Pas de secrets en dur.** Zéro mot de passe, clé API, token dans le code.
|
|
13
|
-
Tout passe par des variables d'environnement.
|
|
14
|
-
|
|
15
|
-
3. **Rollback toujours possible.** Chaque migration est réversible. Chaque
|
|
16
|
-
déploiement peut être annulé. Si une feature ne peut pas être rollback,
|
|
17
|
-
elle doit être derrière un feature flag.
|
|
18
|
-
|
|
19
|
-
## UX & qualité
|
|
20
|
-
|
|
21
|
-
4. **Feedback en moins de 200ms.** Toute action utilisateur déclenche un
|
|
22
|
-
retour visuel immédiat (spinner, skeleton, optimistic update). L'utilisateur
|
|
23
|
-
ne doit jamais douter que son clic a été pris en compte.
|
|
24
|
-
|
|
25
|
-
5. **Les 4 états obligatoires.** Chaque composant qui affiche des données
|
|
26
|
-
doit gérer : loading, empty, error, success. Pas d'écran blanc, jamais.
|
|
27
|
-
|
|
28
|
-
6. **Mobile-first.** Le responsive n'est pas un nice-to-have. On design
|
|
29
|
-
d'abord pour mobile, puis on enrichit pour desktop.
|
|
30
|
-
|
|
31
|
-
7. **Mieux vaut simple et solide.** Une feature simple qui fonctionne
|
|
32
|
-
parfaitement vaut mieux qu'une feature complète qui casse. Couper le
|
|
33
|
-
scope plutôt que livrer du fragile.
|
|
34
|
-
|
|
35
|
-
## Code & architecture
|
|
36
|
-
|
|
37
|
-
8. **Pas de code mort.** Chaque implémentation nettoie ce qu'elle rend obsolète.
|
|
38
|
-
Le code mort est une dette qui s'accumule en silence.
|
|
39
|
-
|
|
40
|
-
9. **Pas de feature sans test.** Chaque nouveau comportement a au minimum
|
|
41
|
-
un test qui prouve qu'il marche et un test qui prouve qu'il gère l'erreur.
|
|
42
|
-
|
|
43
|
-
10. **La cohérence prime sur la préférence.** Suivre les patterns existants
|
|
44
|
-
du repo, même si on préférerait faire autrement. L'uniformité du codebase
|
|
45
|
-
est plus importante que l'élégance locale.
|
|
46
|
-
|
|
47
|
-
## Processus
|
|
48
|
-
|
|
49
|
-
11. **Planifier avant de coder.** Aucun teammate ne commence sans plan validé.
|
|
50
|
-
Le plan est écrit, tracé en markdown, et survit aux sessions.
|
|
51
|
-
|
|
52
|
-
12. **Le QA est hostile.** Un QA qui ne trouve rien a échoué. La complaisance
|
|
53
|
-
est l'ennemi de la qualité.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
> Les règles spécifiques à un projet (ex: précision des données, contraintes
|
|
58
|
-
> de persona IA) sont dans le `constitution.md` du workspace concerné.
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Non-negotiable engineering principles for all agents, teammates, and subagents
|
|
3
|
-
globs: ["workspace.md", "constitution.md", "plans/**", "templates/**"]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Constitution
|
|
7
|
-
|
|
8
|
-
Non-negotiable principles. Apply to ALL projects, ALL teammates.
|
|
9
|
-
The orchestrator and every teammate must follow these rules without exception.
|
|
10
|
-
|
|
11
|
-
## Security & data
|
|
12
|
-
|
|
13
|
-
1. **Multi-tenancy is sacred.** No query may return data from one tenant to
|
|
14
|
-
another. Every query, endpoint, and view is scoped by tenant. When in doubt,
|
|
15
|
-
the teammate refuses to implement and escalates to the orchestrator.
|
|
16
|
-
|
|
17
|
-
2. **No hardcoded secrets.** Zero passwords, API keys, or tokens in code.
|
|
18
|
-
Everything goes through environment variables.
|
|
19
|
-
|
|
20
|
-
3. **Rollback always possible.** Every migration is reversible. Every deployment
|
|
21
|
-
can be rolled back. If a feature cannot be rolled back, it must be behind
|
|
22
|
-
a feature flag.
|
|
23
|
-
|
|
24
|
-
## UX & quality
|
|
25
|
-
|
|
26
|
-
4. **Feedback under 200ms.** Every user action triggers immediate visual feedback
|
|
27
|
-
(spinner, skeleton, optimistic update). The user must never doubt their click
|
|
28
|
-
was registered.
|
|
29
|
-
|
|
30
|
-
5. **4 mandatory states.** Every component that displays data must handle:
|
|
31
|
-
loading, empty, error, success. No blank screens, ever.
|
|
32
|
-
|
|
33
|
-
6. **Mobile-first.** Responsive is not a nice-to-have. Design for mobile first,
|
|
34
|
-
then enrich for desktop.
|
|
35
|
-
|
|
36
|
-
7. **Simple and solid beats complex and fragile.** A simple feature that works
|
|
37
|
-
perfectly is worth more than a complete feature that breaks. Cut scope rather
|
|
38
|
-
than ship fragile code.
|
|
39
|
-
|
|
40
|
-
## Code & architecture
|
|
41
|
-
|
|
42
|
-
8. **No dead code.** Every implementation cleans up what it makes obsolete.
|
|
43
|
-
Dead code is debt that accumulates silently.
|
|
44
|
-
|
|
45
|
-
9. **No feature without tests.** Every new behavior has at minimum one test
|
|
46
|
-
proving it works and one test proving it handles errors.
|
|
47
|
-
|
|
48
|
-
10. **Consistency over preference.** Follow existing patterns in the repo, even
|
|
49
|
-
if you'd prefer to do it differently. Codebase uniformity matters more than
|
|
50
|
-
local elegance.
|
|
51
|
-
|
|
52
|
-
## Process
|
|
53
|
-
|
|
54
|
-
11. **Plan before coding.** No teammate starts without a validated plan. The plan
|
|
55
|
-
is written in markdown, tracked, and survives sessions.
|
|
56
|
-
|
|
57
|
-
12. **QA is hostile.** A QA that finds nothing has failed. Complacency is the
|
|
58
|
-
enemy of quality.
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
> **v4.0 change**: This rule is now scoped to orchestrator/ files only.
|
|
63
|
-
> It is no longer auto-injected into ALL sessions globally.
|
|
64
|
-
>
|
|
65
|
-
> Consequence: teammates do NOT receive these principles automatically.
|
|
66
|
-
> The orchestrator MUST include all 12 universal principles + project rules
|
|
67
|
-
> in every teammate spawn prompt.
|