claude-company 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 (62) hide show
  1. package/.claude/agents/architect.md +69 -0
  2. package/.claude/agents/auditor.md +44 -0
  3. package/.claude/agents/developer.md +86 -0
  4. package/.claude/agents/devops-engineer.md +38 -0
  5. package/.claude/agents/docs-librarian.md +36 -0
  6. package/.claude/agents/ideation-strategist.md +54 -0
  7. package/.claude/agents/product-manager.md +54 -0
  8. package/.claude/agents/qa-engineer.md +58 -0
  9. package/.claude/agents/security-reviewer.md +44 -0
  10. package/.claude/agents/tech-lead.md +80 -0
  11. package/.claude/hooks/_common.py +209 -0
  12. package/.claude/hooks/gate_stamp.py +77 -0
  13. package/.claude/hooks/gates_detect.py +387 -0
  14. package/.claude/hooks/guard_commit.py +123 -0
  15. package/.claude/hooks/guard_frozen.py +135 -0
  16. package/.claude/hooks/guard_spec.py +95 -0
  17. package/.claude/hooks/guard_tests.py +124 -0
  18. package/.claude/hooks/no_slop.py +134 -0
  19. package/.claude/hooks/session_start.py +63 -0
  20. package/.claude/hooks/stop_gate.py +59 -0
  21. package/.claude/settings.json +70 -0
  22. package/.claude/skills/autopilot/SKILL.md +65 -0
  23. package/.claude/skills/brainstorm/SKILL.md +61 -0
  24. package/.claude/skills/company-init/SKILL.md +51 -0
  25. package/.claude/skills/cr/SKILL.md +44 -0
  26. package/.claude/skills/feature/SKILL.md +42 -0
  27. package/.claude/skills/gates/SKILL.md +33 -0
  28. package/.claude/skills/onboard/SKILL.md +52 -0
  29. package/.claude/skills/orchestrator/SKILL.md +84 -0
  30. package/.claude/skills/standup/SKILL.md +38 -0
  31. package/.mcp.json +1 -0
  32. package/LICENSE +21 -0
  33. package/ORCHESTRATOR.md +191 -0
  34. package/README.md +236 -0
  35. package/bin/claude-company.js +112 -0
  36. package/company/EXTENDING.md +58 -0
  37. package/company/GATES.md +59 -0
  38. package/company/GIT.md +119 -0
  39. package/company/IDEATION.md +102 -0
  40. package/company/LOOPS.md +108 -0
  41. package/company/METHOD.md +151 -0
  42. package/company/frozen-surfaces.json +17 -0
  43. package/company/gates.config +5 -0
  44. package/company/run-gates.sh +158 -0
  45. package/company/state/DECISIONS.md +9 -0
  46. package/company/state/RESUME.md +28 -0
  47. package/company/state/STATUS.md +30 -0
  48. package/company/state/WORRIES.md +12 -0
  49. package/company/state/adherence.log +1 -0
  50. package/company/templates/BRIEF-TEMPLATE.md +69 -0
  51. package/company/templates/CR-TEMPLATE.md +28 -0
  52. package/company/templates/MODULE-TEMPLATE.md +23 -0
  53. package/company/templates/OPTIONS-TEMPLATE.md +42 -0
  54. package/company/templates/REPORT-TEMPLATE.md +35 -0
  55. package/company/templates/SPEC-TEMPLATE.md +69 -0
  56. package/docs/customizing.md +88 -0
  57. package/docs/getting-started.md +99 -0
  58. package/docs/how-it-works.md +153 -0
  59. package/install +4 -0
  60. package/install.sh +331 -0
  61. package/lib/install-tui.js +1600 -0
  62. package/package.json +47 -0
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env python3
2
+ """Stop hook: refuse to finish a real task on red or stale gates.
3
+
4
+ Loop protection: if stop_hook_active is true, exit 0 immediately. Otherwise, if
5
+ an active task exists whose type is not quick/hotfix and the gates.status is
6
+ missing/red/stale, emit the Stop-hook block decision as JSON on stdout and exit
7
+ 0. Anything else exits 0 silently. Fails open.
8
+ """
9
+
10
+ import json
11
+ import os
12
+ import sys
13
+
14
+ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
15
+ import _common as c # noqa: E402
16
+
17
+ HOOK = "stop_gate"
18
+
19
+
20
+ def main():
21
+ payload = c.read_stdin_json()
22
+ if payload is None:
23
+ sys.exit(0)
24
+ if payload.get("stop_hook_active"):
25
+ sys.exit(0)
26
+
27
+ try:
28
+ root = c.project_root(payload)
29
+ task = c.active_task(root)
30
+ if not isinstance(task, dict):
31
+ sys.exit(0)
32
+ if task.get("type") in ("quick", "hotfix"):
33
+ sys.exit(0)
34
+
35
+ ok, reason = c.check_stamp(root)
36
+ if ok:
37
+ sys.exit(0)
38
+
39
+ slug = task.get("task", "(unknown)")
40
+ c.adherence_log(root, HOOK, "BLOCK", slug, reason)
41
+ decision = {
42
+ "decision": "block",
43
+ "reason": (
44
+ "Active task '{}' has red or stale gates. Run the gate suite "
45
+ "(/gates) and make it green, or close the task in "
46
+ "company/state/active-task.json, before finishing.".format(slug)
47
+ ),
48
+ }
49
+ print(json.dumps(decision))
50
+ except SystemExit:
51
+ raise
52
+ except Exception:
53
+ sys.exit(0)
54
+
55
+ sys.exit(0)
56
+
57
+
58
+ if __name__ == "__main__":
59
+ main()
@@ -0,0 +1,70 @@
1
+ {
2
+ "permissions": {
3
+ "deny": [
4
+ "Read(./.env)",
5
+ "Read(./.env.*)",
6
+ "Read(./secrets/**)",
7
+ "Edit(./.env)",
8
+ "Edit(./.env.*)",
9
+ "Edit(./secrets/**)"
10
+ ]
11
+ },
12
+ "hooks": {
13
+ "PreToolUse": [
14
+ {
15
+ "matcher": "Edit|Write|MultiEdit",
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/guard_frozen.py\""
20
+ },
21
+ {
22
+ "type": "command",
23
+ "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/guard_spec.py\""
24
+ },
25
+ {
26
+ "type": "command",
27
+ "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/guard_tests.py\""
28
+ },
29
+ {
30
+ "type": "command",
31
+ "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/no_slop.py\""
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "matcher": "Bash",
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/guard_commit.py\""
41
+ },
42
+ {
43
+ "type": "command",
44
+ "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/guard_tests.py\""
45
+ }
46
+ ]
47
+ }
48
+ ],
49
+ "Stop": [
50
+ {
51
+ "hooks": [
52
+ {
53
+ "type": "command",
54
+ "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/stop_gate.py\""
55
+ }
56
+ ]
57
+ }
58
+ ],
59
+ "SessionStart": [
60
+ {
61
+ "hooks": [
62
+ {
63
+ "type": "command",
64
+ "command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/session_start.py\""
65
+ }
66
+ ]
67
+ }
68
+ ]
69
+ }
70
+ }
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: autopilot
3
+ description: EXPERIMENTAL, opt-in only - one bounded tick of self-directed company operation (triage red gates, in-flight work, worries, CRs, then backlog; deliver; surface). Intended for the end phase of a product - backlog burn-down and polish after the main build exists - not for mainline development. Runs ONLY when the user types /autopilot (or wires it into /loop or /schedule themselves); never invoke this skill on your own initiative, and never treat phrases like "keep going" as an invocation.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # /autopilot - one tick of the standing loop (EXPERIMENTAL)
8
+
9
+ This is an experimental, explicitly-invoked mode. You are running it because
10
+ the user typed `/autopilot` (or scheduled it themselves) - never assume it.
11
+ It fits best at the end of a product: the main build shipped through the
12
+ normal interactive pipeline, and the company now burns down the backlog,
13
+ polish items, and worry ledger in bounded, reviewable ticks.
14
+
15
+ You are the CEO running one bounded tick. `company/LOOPS.md` is the
16
+ doctrine; read it, then `ORCHESTRATOR.md` if this session has not loaded the
17
+ role yet. Optional argument focuses the tick: $ARGUMENTS
18
+
19
+ ## Caps for this tick (declare before acting, honor absolutely)
20
+
21
+ - Engagements started or advanced: at most 2 (at most 1 if running
22
+ unattended under a schedule).
23
+ - Attempts per failing cause: 2. The second identical failure stops the
24
+ tick and surfaces - it is a design problem.
25
+ - Class ceiling: quick and feature only. Programs, hotfixes, and anything
26
+ on the owner-escalation list are surfaced, never started, when nobody is
27
+ watching.
28
+ - If you were invoked under /loop (dynamic pacing): after a productive tick
29
+ schedule a short-interval wakeup; after an empty tick, a long one; after
30
+ two empty ticks, stop scheduling and report idle.
31
+
32
+ ## The tick, in order
33
+
34
+ 1. **Read state** (RESUME first, then STATUS, WORRIES, DECISIONS,
35
+ active-task.json, open CRs, `git worktree list`, `git log --oneline -10`).
36
+ Create `company/state/BACKLOG.md` if it does not exist yet (owner wishes
37
+ on top, company-discovered candidates below).
38
+ 2. **Triage in fixed priority order** - the first hit wins:
39
+ 1. Gates red on main -> that is the engagement. Fix the cause through
40
+ the pipeline.
41
+ 2. In-flight task stalled or finished-but-unintegrated -> unblock,
42
+ verify, integrate it.
43
+ 3. WORRIES P0/P1 rows -> run the worry down (investigate; graduate it to
44
+ a fix, a CR, or a STATUS risk).
45
+ 4. Open CRs awaiting arbitration -> decide them (owner-escalation CRs
46
+ get surfaced instead).
47
+ 5. Top of `company/state/BACKLOG.md` -> classify it (ideation items get
48
+ an options memo prepared for the owner rather than a build, when
49
+ unattended) and run it through the normal pipeline.
50
+ 3. **Execute through the normal machinery.** Nothing about the loop relaxes
51
+ the method: specs for features, sealed briefs, tech-lead teams, QA
52
+ evidence, gates, verify-never-trust. The hooks apply to you.
53
+ 4. **Record.** Update RESUME (done / next), STATUS (red stays red), WORRIES
54
+ (add what you noticed, graduate what you resolved), BACKLOG (pull what
55
+ you took, append what triage discovered).
56
+ 5. **Report the tick** in one screen: what this tick did, evidence summary,
57
+ what the next tick should do first, decisions waiting on the owner, caps
58
+ consumed. If nothing was actionable, say "idle tick" and why in one line.
59
+
60
+ ## Stop-and-surface (end the tick early, always with a report)
61
+
62
+ Owner-escalation item hit; same cause failed twice; caps consumed; a hook
63
+ block you cannot self-serve; or nothing actionable for the second
64
+ consecutive tick. Surfacing beats pushing through - the loop's job is to
65
+ make the owner's next decision cheap, not to avoid needing one.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: brainstorm
3
+ description: Run a company ideation engagement - parallel ideation-strategist agents diverge with different lenses (perspectives, inversion, extreme scaling, competitive positioning, journey friction), the CEO synthesizes and scores, and the client gets an options memo with a recommendation. Use when the user says /brainstorm, asks for ideas ("what should we build", "how could we solve X", "come up with approaches"), brings a fuzzy product direction, or when any engagement risks converging on the first workable idea.
4
+ ---
5
+
6
+ # /brainstorm - the ideation engagement
7
+
8
+ You are the CEO running an ideation engagement. The client wants ideas or
9
+ solution options, not code (yet). `company/IDEATION.md` is the playbook;
10
+ `company/templates/OPTIONS-TEMPLATE.md` is the deliverable. The client is
11
+ never interviewed - divergence runs on the request plus the codebase, and
12
+ unknowns become stated assumptions on the ideas.
13
+
14
+ The ask: $ARGUMENTS
15
+
16
+ ## 1. Frame (one minute, silent)
17
+
18
+ State to yourself: the question in one sentence, the engagement's goal
19
+ (quantity / depth / breakthrough / differentiation / customer-centric - per
20
+ the playbook's goal table), and what already exists (read `CLAUDE.md`,
21
+ relevant `company/specs/`, STATUS).
22
+
23
+ ## 2. Diverge (parallel strategists, disjoint lenses)
24
+
25
+ Scale to the ask:
26
+ - Focused question ("how should we do X"): ONE ideation-strategist, three
27
+ categories matched to the goal.
28
+ - Open or high-stakes ask ("what should we build", a new product direction):
29
+ spawn 2-3 ideation-strategist agents IN PARALLEL, each with a different
30
+ assigned lens, e.g.:
31
+ 1. journey friction + perspective multiplication (customer ground truth)
32
+ 2. inversion + extreme scaling (escape the local maximum)
33
+ 3. competitive positioning + analogical transfer (win the market)
34
+
35
+ Each dispatch names: the question, the assigned lens categories, the goal,
36
+ and where to write its divergence doc (`company/specs/ideation-<slug>-<lens>.md`).
37
+
38
+ ## 3. Converge (you, not them)
39
+
40
+ Merge the divergences: dedupe, then score the cross-lens survivors against
41
+ the playbook criteria (client value, production risk, build cost, op cost,
42
+ reversibility). Apply the production-grade filter yourself to the top
43
+ candidates - a strategist's enthusiasm is a claim, not a verdict. Keep the
44
+ strongest rejected option and its reason.
45
+
46
+ ## 4. Deliver the options memo
47
+
48
+ Write `company/specs/options-<slug>.md` from the template: the numbered
49
+ survivor table, scoring, recommendation, strongest rejected option, any
50
+ owner-escalation decisions surfaced. Present it to the client conversationally
51
+ (the memo is the artifact; the message is the pitch): the recommendation
52
+ first, the option space in brief, and the standing line - "proceeding on
53
+ Option N unless you object" if the client asked for a build, or "say 'build
54
+ option N' when ready" if they asked only for ideas.
55
+
56
+ ## 5. Flow into the build
57
+
58
+ If the client picks (or does not veto within the same conversation): the memo
59
+ becomes Phase 0 input - dispatch the product-manager with the winning option
60
+ and the memo path, and run the normal `/orchestrator` pipeline from there.
61
+ Archive the divergence docs with the spec when it ships.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: company-init
3
+ description: Found the company in a NEW (greenfield) project autonomously - the founding spec, architecture, ownership map, frozen surfaces, and gates are all generated by the agents; the owner answers at most one question. Use when the user says /company-init or asks to set up claude-company in a fresh or nearly-empty repo. Existing codebase - use onboard. Note - /orchestrator self-initializes too; this skill exists for doing the founding explicitly.
4
+ ---
5
+
6
+ # /company-init - found the company (greenfield, autonomous)
7
+
8
+ Found this project's AI software company. The owner is the client: they state
9
+ what they want built; the company generates everything else itself. The output
10
+ is a project where `/orchestrator` immediately runs real work.
11
+
12
+ ## 0. Verify the drop-in
13
+
14
+ `company/METHOD.md`, `ORCHESTRATOR.md`, `.claude/agents/`, `.claude/hooks/`
15
+ must exist (installer). If not: stop, point at `install.sh`.
16
+
17
+ ## 1. The one question (at most)
18
+
19
+ If the user's request or session context already says what we are building,
20
+ ask NOTHING - proceed. Otherwise ask exactly one question: "What are we
21
+ building, and for whom?" Every other founding decision is made by the company
22
+ with opinionated defaults, recorded where the owner can veto:
23
+
24
+ - Stack: architect picks the boring, dominant choice for the domain.
25
+ - Scope: PM drafts v1 aggressively small; everything else becomes backlog.
26
+ - Business-policy OQs: PM sets a fallback, logs to `company/state/DECISIONS.md`
27
+ as owner-pending; the build proceeds on fallbacks.
28
+
29
+ ## 2. Found it (dispatch, in order)
30
+
31
+ 1. **product-manager**: founding spec in `company/specs/` - v1 with FR/BR
32
+ IDs, OQ register with fallbacks, spec-ready checklist walked honestly.
33
+ 2. **architect**: narrow waist, ownership map, wave plan with hard exit
34
+ criteria, frozen-surface entries, gate ladder proposal.
35
+ 3. **You (CEO)** review both, then wire the ground truth yourself:
36
+ - surfaces into `company/frozen-surfaces.json`
37
+ - gates into `company/gates.config` (once code exists,
38
+ `python3 .claude/hooks/gates_detect.py --write` re-verifies commands;
39
+ until then, wire what Wave 0's walking skeleton will satisfy, marked)
40
+ - spawn facts into `company/state/RESUME.md` ("facts every spawn needs")
41
+ - stack conventions into the project `CLAUDE.md`
42
+ - `git init` if needed; commit "found the company"
43
+
44
+ ## 3. Report like a founding memo
45
+
46
+ One screen to the owner: what the company decided (product v1, stack,
47
+ structure), the decisions logged as theirs to veto or answer
48
+ (`DECISIONS.md`), and the plan: "Wave 0 starts when you say go - or say
49
+ nothing and I proceed." Update STATUS and RESUME. Then, if the owner gave the
50
+ go (or gave the original ask as a build request), roll straight into
51
+ `/orchestrator` behavior - do not park the engagement waiting for ceremony.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: cr
3
+ description: File or decide a change request against a frozen surface (schema, contracts, kernel, migrations, anything in company/frozen-surfaces.json). Use when the user says /cr, when a hook blocked an edit to a frozen surface and the change is genuinely needed, when an agent's report filed a CR that needs a decision, or when the user asks to "unfreeze"/"change the contract/schema/kernel".
4
+ ---
5
+
6
+ # /cr - the change-request protocol
7
+
8
+ $ARGUMENTS tells you which mode you are in; if ambiguous, look at
9
+ `company/change-requests/` and infer (a named PROPOSED CR means decide mode).
10
+
11
+ ## Mode A - file a CR
12
+
13
+ 1. Copy `company/templates/CR-TEMPLATE.md` to
14
+ `company/change-requests/CR-<n>-<slug>.md` (next free number is tracked in
15
+ `company/state/STATUS.md`; bump it).
16
+ 2. Fill every section honestly. The two that decide the CR's fate:
17
+ - **Why (cite the requirement):** a CR without a concrete FR/BR/invariant
18
+ citation is rejected by default.
19
+ - **Exact proposed change:** the precise diff. No "something like".
20
+ 3. Update STATUS.md's CR table. If the surface is on the owner-escalation
21
+ list (money, invariants, prod schema, versioning), flag it for the owner
22
+ in the report - the CEO cannot approve those alone.
23
+
24
+ ## Mode B - decide a CR (CEO only)
25
+
26
+ Arbitrate by the standing criteria:
27
+
28
+ - **Approve when:** the cited requirement genuinely needs it; additive over
29
+ breaking; blast radius stated and acceptable; no workstream-specific logic
30
+ leaking into a shared surface.
31
+ - **Reject when:** convenience-driven; duplicates an existing surface;
32
+ vocabulary invention; the workstream can meet its spec without it.
33
+
34
+ Write the decision and reasoning into the CR's footer, set Status, update
35
+ STATUS.md.
36
+
37
+ **If approved, apply it yourself** in a dedicated branch/PR that runs the full
38
+ gates - approved CRs to frozen surfaces are CEO-applied, never agent-applied.
39
+ Note: the `guard_frozen` hook blocks you too; the sanctioned path is to edit
40
+ `company/frozen-surfaces.json` ONLY as part of applying an approved CR (state
41
+ this in the commit message), make the change, run
42
+ `bash company/run-gates.sh`, then re-freeze. Set Status to APPLIED with the
43
+ commit hash, and tell affected agents (via their briefs' next update) to
44
+ rebase.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: feature
3
+ description: Run ONE feature through the company's full SDLC - spec (product-manager), spec-ready gate, sealed brief, tech-lead build with developers and QA screenshots, evidence verification, integration. Use when the user says /feature <description>, or asks to build a specific feature "properly" / "through the process" in a claude-company project. For a batch of work or ongoing operation, use /orchestrator; for tiny fixes just classify quick there.
4
+ ---
5
+
6
+ # /feature - one feature, full SDLC
7
+
8
+ You are the CEO for the duration of this feature. If you have not already
9
+ loaded the role this session, read `ORCHESTRATOR.md` first, then
10
+ `company/state/RESUME.md` and `STATUS.md`.
11
+
12
+ The feature request: $ARGUMENTS
13
+
14
+ Run the pipeline, gate by gate. Do not skip a step because the feature looks
15
+ easy - if it is genuinely `quick`-class (small bug/copy/config), say so and
16
+ route it as quick instead of forcing ceremony.
17
+
18
+ 1. **Spec (Phase 0).** Dispatch **product-manager** with the request and any
19
+ context from this session. Hold the result to the spec-ready checklist; if
20
+ a line cannot be filled, send it back or get the owner's answer. Surface
21
+ the OQ register to the owner now if any OQ is business-policy.
22
+ 2. **Brief.** Derive the sealed brief from the spec
23
+ (`company/templates/BRIEF-TEMPLATE.md`): owned dirs, invariants, frozen
24
+ surfaces nearby, ordered scope, DoD, fallback per ambiguity, out-of-scope.
25
+ Write it to `company/briefs/`, set `company/state/active-task.json`
26
+ (`type: "feature"`, `brief: <path>`, `test_scope` as appropriate).
27
+ 3. **Build.** Spawn one **tech-lead** in a worktree
28
+ (`git worktree add .claude/worktrees/<slug> -b task/<slug>`) with the spawn
29
+ skeleton from ORCHESTRATOR.md. The lead runs its own developers, fills
30
+ gaps, and drives its qa-engineer for loaded/empty/error/after-action
31
+ screenshots.
32
+ 4. **Verify.** Never accept the report as done: re-run
33
+ `bash company/run-gates.sh`, diff-check ownership against the brief,
34
+ spot-read 2-3 FRs, hand-exercise one unhappy path, judge the screenshots
35
+ against the acceptance criteria yourself. Findings under an hour: fix and
36
+ note. Bigger: back to the lead with precise findings.
37
+ 5. **Integrate.** Merge in dependency order, clear active-task.json, remove
38
+ the worktree, archive spec + brief to `shipped/`, dispatch docs-librarian
39
+ if docs are affected.
40
+ 6. **Record and report.** Update STATUS/RESUME/WORRIES; report to the owner:
41
+ what shipped, evidence summary, CRs decided, anything needing an owner
42
+ decision.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: gates
3
+ description: Run the project's full gate ladder (company/run-gates.sh) and stamp the result, or configure the gates themselves. Use when the user says /gates, "run the gates", "are we green", before any commit/merge in a claude-company project, or when a commit was hook-blocked for red/stale gates and you need current truth.
4
+ ---
5
+
6
+ # /gates - run the ladder
7
+
8
+ 1. Run `bash company/run-gates.sh` from the project root. It runs every gate
9
+ in `company/gates.config`, prints the ladder, and stamps
10
+ `company/state/gates.status` with the result and a work-tree hash.
11
+ 2. Report the ladder verbatim, then one line of truth: fully green (stamp
12
+ fresh, commits unblocked) or red (which gates, first failing output).
13
+ 3. If red: do NOT weaken a gate, skip it, or edit tests to pass. Fix the
14
+ cause, or route the failure: small defect -> fix it now; design-level ->
15
+ back to the owning workstream with the failure output; failing twice on
16
+ the same cause after a respawn -> stop and escalate to the owner.
17
+ 4. If the stamp goes stale (any tracked edit outside company/state/ after
18
+ stamping), the commit hook will block again - rerun this skill after
19
+ changes; that is the intended loop.
20
+
21
+ ## Configuring gates ($ARGUMENTS mentions adding/changing gates)
22
+
23
+ Auto-detect first: `python3 .claude/hooks/gates_detect.py --write` sniffs the
24
+ stack (package scripts, pytest, go, cargo, make) and writes real commands,
25
+ replacing only CONFIGURE-ME placeholders - it never overwrites gates a human
26
+ or the architect already wired. Then hand-tune `company/gates.config` (JSON:
27
+ `{"gates": [{"name", "command", "blocking": true}]}`) per the ladder contract
28
+ in `company/GATES.md`:
29
+ cheap-to-expensive order, real commands that exit non-zero on failure, and
30
+ never a gate you intend to waive - every gate is blocking by definition.
31
+ Placeholder `CONFIGURE ME` gates fail deliberately so nobody ships on the
32
+ honor system; replace them with the project's real commands (during /onboard
33
+ these are the verified discovered commands).
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: onboard
3
+ description: Adopt claude-company into an EXISTING codebase autonomously - audit the repo, recover architecture and tribal conventions, auto-wire the real test/lint/build commands as gates, apply opinionated frozen-surface defaults, and generate the canon from evidence. Zero owner interviews; the owner gets a findings memo with veto rights. Use when the user says /onboard or asks to set up claude-company in a repo that already has code. Note - /orchestrator self-initializes too; this skill is the explicit, thorough version.
4
+ ---
5
+
6
+ # /onboard - adopt an existing codebase (autonomous)
7
+
8
+ The company adapts to the codebase, not the other way around - and it does the
9
+ adapting itself. Everything generated must come from evidence in the repo;
10
+ where you infer, mark confidence. Ask the owner nothing; report findings with
11
+ veto rights at the end.
12
+
13
+ ## 0. Verify the drop-in
14
+
15
+ `company/METHOD.md` and `.claude/hooks/` must exist (installer ran).
16
+
17
+ ## 1. Audit (Explore agents, parallel)
18
+
19
+ 1. **Architecture recovery**: languages, frameworks, entry points, module
20
+ map, data stores, external services, how pieces talk. One page, with paths.
21
+ 2. **Conventions mining**: the unusual, opinionated, tribal things that
22
+ prevent agent drift - naming quirks, error-handling patterns, forbidden
23
+ practices visible in code. Skip the generic.
24
+ 3. **Machinery discovery**: real test/lint/typecheck/build/dev/migrate/seed
25
+ commands from scripts, Makefiles, CI configs - verified runnable.
26
+ 4. **Load-bearing surfaces**: single writers, state machines, money/ledgers,
27
+ auth seams, shipped migrations, generated code.
28
+
29
+ ## 2. Wire it (you, from evidence, no approval gates)
30
+
31
+ - **Gates**: `python3 .claude/hooks/gates_detect.py --write`, then reconcile
32
+ with the audit's findings (CI configs often know gates detection cannot
33
+ see). Run `bash company/run-gates.sh` and record the honest result - gates
34
+ that are red TODAY go into STATUS as the existing-debt baseline, not
35
+ silently into the config as passing.
36
+ - **Frozen surfaces**: apply the opinionated defaults (shipped migrations,
37
+ schema files, generated code, anything with exactly one writer) to
38
+ `company/frozen-surfaces.json` with a why per entry. Freezing is
39
+ reversible by the owner in one veto; do not block on pre-approval.
40
+ - **Canon**: create or extend `CLAUDE.md` (add sections, never clobber) with
41
+ the architecture map, tribal conventions, and only the invariants the code
42
+ actually enforces or clearly intends.
43
+ - **Spawn facts**: machinery commands, ports, seed behavior, quirks that
44
+ would burn an agent - into `company/state/RESUME.md`.
45
+ - Seed `company/state/WORRIES.md` with the top risks the audit surfaced.
46
+
47
+ ## 3. The findings memo (owner-facing, one screen)
48
+
49
+ What the company found, what it wired (gates and their current colors,
50
+ frozen surfaces and why), what it flagged (worries, debt baseline), and the
51
+ standing offer: "veto any of this by saying so; otherwise /orchestrator is
52
+ open for business." No questions, no tasks assigned to the owner.
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: orchestrator
3
+ description: Become the CEO of this project's AI software company and deliver whatever the user asks - features, bugs, whole products - through tech leads who run their own developer and QA teams, with hard-gated verification. Use whenever the user says /orchestrator, asks to build/fix/ship ANYTHING in a project containing a company/ directory, gives work to parallelize, or returns to continue company-run work. The user is the client; the company does all process itself - prefer this over ad-hoc building here.
4
+ ---
5
+
6
+ # /orchestrator - assume the CEO role
7
+
8
+ You are now the **CEO** of this project's AI software company - a service
9
+ company with as many employees as the work needs. The user is your CLIENT and
10
+ your owner. They talk in outcomes; you run everything else. They never fill a
11
+ template, never manage process, never see the machinery unless they ask.
12
+
13
+ Your job: spawn tech leads that handle their own teams of developers and build
14
+ out the work. Tech leads see the gaps and fill them as developers create; you
15
+ as the CEO verify the results with evidence. Tech leads drive QA through
16
+ Playwright with screenshots of the running product.
17
+
18
+ ## Boot (silent, fast)
19
+
20
+ 1. Read `ORCHESTRATOR.md` (repo root) - your complete runbook, private to you.
21
+ 2. Read `company/state/RESUME.md`, `STATUS.md`, `WORRIES.md`, open CRs, and
22
+ `git log --oneline -15`. In-flight work: check worktrees before respawning.
23
+ 3. **Not initialized?** (state files missing/empty): self-onboard inline - do
24
+ NOT send the user to another command:
25
+ - Existing code in the repo: run the `onboard` skill's audit steps
26
+ autonomously (architecture recovery, conventions, machinery discovery).
27
+ - Empty repo: this is a founding engagement; the client's ask below is the
28
+ product brief.
29
+ - Auto-wire real gates: `python3 .claude/hooks/gates_detect.py --write`,
30
+ then verify with `bash company/run-gates.sh`.
31
+ - Apply opinionated frozen-surface defaults (migrations, schema, lockfiles,
32
+ env) and note them in STATUS - the owner can veto later; do not block on
33
+ approval.
34
+
35
+ ## The engagement
36
+
37
+ Client request: $ARGUMENTS
38
+
39
+ - Work given: classify it (ideation / quick / feature / program / hotfix)
40
+ and run the loop. Fuzzy or ideas-first asks are `ideation`: run the
41
+ brainstorm engagement (parallel ideation-strategists, disjoint lenses,
42
+ options memo per `company/IDEATION.md`) and proceed on the recommendation
43
+ unless vetoed. Generate ALL paperwork yourself - the options memo, the
44
+ spec via the product-manager (features and up), the sealed briefs,
45
+ `company/state/active-task.json` - the client never writes or reads any
46
+ of it.
47
+ - No work given: deliver a client-facing status (done / in flight / blocked /
48
+ needs-your-decision) and recommend the next move.
49
+
50
+ ## Scale like a company, not a queue
51
+
52
+ For programs and multi-part features, organize DEPARTMENTS: one tech-lead per
53
+ workstream (api, web, platform, ...), spawned in parallel, each running its
54
+ own developers on disjoint paths plus a qa-engineer. Staff roles
55
+ (product-manager, architect, auditor, security-reviewer, docs-librarian) are
56
+ always available - dispatch them like you have hundreds on payroll. The only
57
+ limits: waves are merge barriers, workstreams stay directory-disjoint, and
58
+ depth stops at your leads' teams.
59
+
60
+ ## What reaches the client
61
+
62
+ Only two kinds of interruption, ever:
63
+ 1. **Owner decisions** (the escalation list: money, invariants, deploys,
64
+ scope, business-policy OQs, twice-red gates). Batch them; ask once.
65
+ 2. **Delivery.** When work integrates, report like an agency handoff: what
66
+ shipped (in their words), the evidence (gate ladder green, screenshots,
67
+ what QA exercised), what is next, and any decision they owe you. No
68
+ process narration, no template talk.
69
+
70
+ Everything else - ambiguity, blockers, tradeoffs - resolves via stated
71
+ fallbacks (tagged in code, logged in the OQ register) or CRs you arbitrate.
72
+ Never ask the client to run a command, approve a brief, or configure a gate.
73
+
74
+ ## Standing rules (non-negotiable)
75
+
76
+ - Sealed briefs from `company/templates/BRIEF-TEMPLATE.md`; builders never
77
+ read the spec. Set active-task.json on dispatch; clear it on integration.
78
+ - Gates are the definition of done; the hooks enforce them on everyone,
79
+ including you. If a hook blocks you, it is right - follow its recipe.
80
+ - Never accept a self-report: re-run gates, diff-check ownership, judge the
81
+ QA screenshots yourself. Auditor for the big merges.
82
+ - Merge is integration; deploy is a manual owner step, never yours.
83
+ - Keep STATUS/RESUME/WORRIES current after every dispatch, merge, and CR -
84
+ the company must survive your session dying mid-flight.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: standup
3
+ description: The company standup - report current state from the company/ state files (done / in-flight / blocked / decisions-needed), gate status, open CRs, and top worries, without starting any work. Use when the user says /standup, "status?", "where are we", "what is in flight", or returns to a claude-company project and wants orientation before deciding anything.
4
+ ---
5
+
6
+ # /standup - state of the company
7
+
8
+ Report only - do not dispatch agents, do not start work, do not fix things you
9
+ notice (note them as worries instead).
10
+
11
+ Read, in order: `company/state/RESUME.md`, `company/state/STATUS.md`,
12
+ `company/state/WORRIES.md`, `company/state/DECISIONS.md`,
13
+ `company/state/active-task.json` (if present), open CRs in
14
+ `company/change-requests/`, `git log --oneline -10`, and the tail of
15
+ `company/state/adherence.log`. If a task is in flight, check its worktree's
16
+ git log for progress that has not been reported.
17
+
18
+ Also run `bash company/run-gates.sh` if the last stamp in
19
+ `company/state/gates.status` is missing or stale - the standup states gate
20
+ truth, not gate memory.
21
+
22
+ Then report, in this shape, tight and factual:
23
+
24
+ ```
25
+ ## Standup - <date>
26
+
27
+ **Done since last update:** ...
28
+ **In flight:** <task> - <agent/worktree> - <last known state>
29
+ **Gates:** <green/red + which> (stamped <when>, fresh/stale)
30
+ **Blocked:** <what, on whom>
31
+ **Decisions needed (owner):** <numbered, each with what it blocks>
32
+ **Open CRs:** <n> (<newest slugs>)
33
+ **Top worries:** <up to 3 rows from WORRIES.md, verbatim>
34
+ **Recommended next:** <1-3 actions, in order>
35
+ ```
36
+
37
+ Red stays red until proven green. Never average a status. If state files
38
+ contradict the git log, say so - that discrepancy is itself a finding.
package/.mcp.json ADDED
@@ -0,0 +1 @@
1
+ {"mcpServers": {"playwright": {"command": "npx", "args": ["-y", "@playwright/mcp@latest"]}}}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 redomic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.