Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "productupgrade",
"name": "productionos",
"owner": {
"name": "Shaheer Khawaja",
"url": "https://github.com/ShaheerKhawaja"
},
"metadata": {
"description": "ProductionOS — AI engineering OS for Claude Code. 77 agents, 40 commands, 15 hooks. One command to audit, score, and improve any codebase.",
"description": "ProductionOS — AI engineering OS for Claude Code and Codex. 78 agents, 41 commands, 17 hooks.",
"version": "1.0.0-beta.1",
"homepage": "https://github.com/ShaheerKhawaja/ProductionOS",
"repository": "https://github.com/ShaheerKhawaja/ProductionOS",
"license": "MIT"
},
"plugins": [
{
"name": "productupgrade",
"name": "productionos",
"source": "./",
"description": "AI engineering OS for Claude Code — 77 agents, 40 commands, 15 hooks. 4-layer Production House: smart routing, adaptive learning, dynamic agent factory. Zero external dependencies.",
"description": "Dual-target AI engineering OS — 78 agents, 41 commands, 17 hooks, one shared workflow registry.",
"version": "1.0.0-beta.1",
"author": {
"name": "Shaheer Khawaja",
Expand All @@ -29,22 +29,16 @@
"production-upgrade",
"omni-plan",
"auto-swarm",
"deep-research",
"agentic-eval",
"code-review",
"llm-judge",
"ux-audit",
"security-audit",
"max-research",
"convergence-engine",
"cost-tracking",
"session-learning"
"codex",
"claude-code"
],
"category": "workflow",
"tags": [
"productionos",
"claude-code-plugin",
"agentic-dev",
"codex-plugin",
"multi-agent",
"recursive-improvement",
"self-evaluation"
Expand Down
11 changes: 5 additions & 6 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "productupgrade",
"description": "AI engineering OS for Claude Code — 78 agents, 40 commands, 15 hooks. 4-layer Production House: smart routing, adaptive learning, dynamic agent factory.",
"name": "productionos",
"description": "AI engineering OS for Claude Code and Codex — 78 agents, 41 commands, 17 hooks.",
"version": "1.0.0-beta.1",
"author": {
"name": "Shaheer Khawaja",
Expand All @@ -12,11 +12,10 @@
"keywords": [
"productionos",
"claude-code-plugin",
"codex-plugin",
"agentic-dev",
"llm-judge",
"auto-swarm",
"recursive-improvement",
"multi-agent"
"multi-agent",
"recursive-improvement"
],
"agents": [
"./agents/adversarial-reviewer.md",
Expand Down
1 change: 1 addition & 0 deletions .claude/commands/auto-optimize.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Use the user's hypothesis directly. Create $ARGUMENTS.challengers variants that

### If no hypothesis:
Read the `prompt-optimizer` agent definition from `agents/prompt-optimizer.md` and dispatch it to generate hypotheses.
If the target is prompt-heavy or rubric-heavy, also dispatch `textgrad-optimizer` to propose gradient-style wording improvements before challengers are generated.

The prompt-optimizer should analyze:
1. The target's current instructions (strengths, weaknesses)
Expand Down
1 change: 1 addition & 0 deletions .claude/commands/auto-swarm-nth.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ FOR each completed agent branch in wave:
1. bun run scripts/worktree-manager.ts merge "swarm/wave-{N}-agent-{M}" --into main
2. IF merge succeeds (tests pass): continue to next branch
3. IF merge fails (conflict or test failure):
→ Dispatch `merge-conflict-resolver` to propose a safe merge strategy
→ Mark branch as CONFLICT, skip, continue with remaining
→ Log to WORKTREE-MERGE-LOG.md
4. AFTER all merges attempted:
Expand Down
10 changes: 5 additions & 5 deletions .claude/commands/autoloop.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ The user provides:
3. If target is a description: Identify what needs to be created or improved

### Step 2: Gap Analysis
1. Score current state using `python3 ~/.claude/skills/rlm/scripts/confidence_scorer.py`
1. Score current state using the ProductionOS rubric and convergence heuristics already present in this repo
2. Scan `~/repos/` for reference implementations (per CLAUDE.md Auto-Enrichment Protocol)
3. Check `~/.productionos/rlm/reference-corpus/` for similar high-quality outputs
3. Check `~/.productionos/recursive/reference-corpus/` for similar high-quality outputs
4. Identify specific gaps between current state and goal

### Step 3: Initialize Recursion
1. Create session state at `~/.productionos/rlm/recursion-state.json`:
1. Create session state at `~/.productionos/recursive/recursion-state.json`:
```json
{
"session_id": "<generated>",
Expand Down Expand Up @@ -67,8 +67,8 @@ For each iteration:
- EMA velocity (plateau if |EMA delta| < 0.05)
4. **If STOP**: Return best iteration output
5. **If CONTINUE**: Apply refinement via the selected layer
6. **Quality Gate**: Check monotonic improvement via `quality_gate.py`
7. **Log**: Write metrics to `~/.productionos/rlm/metrics/`
6. **Quality Gate**: Check for monotonic improvement and stop if the loop regresses materially
7. **Log**: Write metrics to `~/.productionos/recursive/metrics/`

### Step 5: Completion
1. Return the output from the best-scoring iteration
Expand Down
8 changes: 6 additions & 2 deletions .claude/commands/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ arguments:

# ProductionOS DevTools — Mission Control

## Step 0: Preamble

Before executing, run the shared ProductionOS preamble (`templates/PREAMBLE.md`) to confirm the active install root and session context.

Execute the requested action for Claude DevTools within the ProductionOS ecosystem.

## Action: $ARGUMENTS.action
Expand Down Expand Up @@ -49,7 +53,7 @@ If not installed, tell the user to run `brew install --cask claude-devtools` and
**status**:
1. Run the dashboard script for the full report:
```bash
python3 "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/productupgrade}/hooks/devtools-dashboard.py" --full
python3 "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/productionos}/hooks/devtools-dashboard.py" --full
```
2. Display the output to the user as-is (it's already formatted)

Expand All @@ -69,7 +73,7 @@ If not installed, tell the user to run `brew install --cask claude-devtools` and

Run the dashboard script:
```bash
python3 "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/productupgrade}/hooks/devtools-dashboard.py" --full
python3 "${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/productionos}/hooks/devtools-dashboard.py" --full
```

This shows:
Expand Down
1 change: 1 addition & 0 deletions .claude/commands/omni-plan-nth.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Identify which external skills are available:
- Try `/ship` — available? Log YES/NO
- Try `/deep-research` — available? Log YES/NO (this is internal)
- Try `/auto-swarm` — available? Log YES/NO (this is internal)
- Try `/production-upgrade` — available? Log YES/NO (this is internal)
- Try `/security-audit` — available? Log YES/NO (this is internal)
- Try `/agentic-eval` — available? Log YES/NO (this is internal)

Expand Down
3 changes: 3 additions & 0 deletions .claude/commands/plan-ceo-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ You are a CEO reviewing this plan. Your job is to make it extraordinary.
## Step 0: Preamble
Run `templates/PREAMBLE.md`. Detect base branch. Read target context.

## Step 1: Restate the Problem
Explain what the target is trying to achieve, who it is for, and what success looks like before evaluating scope.

## Mode Selection ($ARGUMENTS.mode)

- **expansion** — Dream big. Find the 10-star version. Push scope UP. Every expansion presented as a question to the user.
Expand Down
3 changes: 3 additions & 0 deletions .claude/commands/plan-eng-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ You are a principal engineer locking in the execution plan. Architecture, data f
## Step 0: Preamble
Run `templates/PREAMBLE.md`. Read target codebase. Identify tech stack.

## Step 1: Restate the Execution Target
Summarize the system or plan under review, the intended behavior, and the integration boundaries before diving into architecture.

## Review Dimensions

### 1. Architecture Diagram
Expand Down
8 changes: 4 additions & 4 deletions .claude/commands/productionos-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: "Show how to use ProductionOS — explains commands, recommended wo

## Getting Started

ProductionOS v1.0.0-beta.1 is your AI engineering team — 76 agents, 39 commands, 12 hooks, 6 CLI tools, 4 auto-activating skills. Here's how to use it effectively.
ProductionOS v1.0.0-beta.1 is your AI engineering team — 78 agents, 41 commands, 17 hooks, 6 CLI tools, and dual Claude/Codex targets. Here's how to use it effectively.

## What's New in v1.0

Expand Down Expand Up @@ -138,7 +138,7 @@ Commands produce artifacts in `.productionos/` that downstream commands consume:
1. **Start with `/production-upgrade`** if you're unsure — it's the lightest pipeline
2. **Use `/omni-plan-nth`** when you want maximum quality — it runs everything
3. **Check `.productionos/`** after any command — all findings go there
4. **Run `bun run skill:check`** to verify ProductionOS itself is healthy (10/10)
4. **Run `bun run skill:check`** to verify ProductionOS itself is healthy (100%)
5. **Run `bun run dashboard`** to see which reviews have been completed
6. **Use `/learn-mode`** to understand unfamiliar code before auditing it
7. **The `-nth` variants** run until perfect — standard variants run once
Expand All @@ -147,8 +147,8 @@ Commands produce artifacts in `.productionos/` that downstream commands consume:
## Validation Commands

```bash
bun run skill:check # 10-check health dashboard (should be 10/10)
bun run validate # Agent frontmatter validation (55/55)
bun run skill:check # Health dashboard (should report 100%)
bun run validate # Agent frontmatter validation (78/78)
bun run audit:context # Token budget tracking
bun run dashboard # Review readiness per branch
bun test # Automated test suite (118 tests)
Expand Down
39 changes: 20 additions & 19 deletions .claude/commands/productionos-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ Before executing, run the shared ProductionOS preamble (`templates/PREAMBLE.md`)
```bash
# Find where ProductionOS is installed
INSTALL_DIR=""
CODEX_PLUGIN_DIR=""

# Check marketplace installation
if [ -d "$HOME/.claude/plugins/marketplaces/productupgrade" ]; then
INSTALL_DIR="$HOME/.claude/plugins/marketplaces/productupgrade"
if [ -d "$HOME/.claude/plugins/marketplaces/productionos" ]; then
INSTALL_DIR="$HOME/.claude/plugins/marketplaces/productionos"
fi

# Check skill installation
if [ -d "$HOME/.claude/skills/productupgrade" ]; then
SKILL_DIR="$HOME/.claude/skills/productupgrade"
# Check Codex plugin installation
if [ -d "$HOME/.codex/plugins/productionos" ]; then
CODEX_PLUGIN_DIR="$HOME/.codex/plugins/productionos"
fi

# Check local repo
if [ -d "$HOME/productupgrade" ]; then
REPO_DIR="$HOME/productupgrade"
if [ -d "$HOME/ProductionOS" ]; then
REPO_DIR="$HOME/ProductionOS"
fi
```

Expand All @@ -57,8 +58,8 @@ If no git repo found, inform user:
```
ProductionOS is not installed from git.
To install the updatable version:
git clone https://github.com/ShaheerKhawaja/ProductionOS.git ~/productupgrade
claude plugins add ~/productupgrade
git clone https://github.com/ShaheerKhawaja/ProductionOS.git ~/ProductionOS
claude plugin install productionos
```

### Step 3: Show Changelog
Expand Down Expand Up @@ -93,19 +94,19 @@ git pull origin main
After pulling, sync to all installation locations:
```bash
# Sync to marketplace plugin directory
if [ -d "$HOME/.claude/plugins/marketplaces/productupgrade" ]; then
if [ -d "$HOME/.claude/plugins/marketplaces/productionos" ]; then
rsync -av --update \
--exclude='.git' \
--exclude='.productupgrade' \
"$REPO_DIR/" "$HOME/.claude/plugins/marketplaces/productupgrade/"
"$REPO_DIR/" "$HOME/.claude/plugins/marketplaces/productionos/"
echo "Synced to marketplace installation"
fi

# Sync SKILL.md to skills directory
if [ -d "$HOME/.claude/skills/productupgrade" ]; then
cp "$REPO_DIR/.claude/skills/productupgrade/SKILL.md" \
"$HOME/.claude/skills/productupgrade/SKILL.md"
echo "Synced SKILL.md to skills directory"
# Sync Codex plugin installation
if [ -d "$HOME/.codex/plugins/productionos" ]; then
rsync -av --update \
--exclude='.git' \
"$REPO_DIR/" "$HOME/.codex/plugins/productionos/"
echo "Synced Codex plugin installation"
fi

# Sync command files
Expand All @@ -129,13 +130,13 @@ ProductionOS Updated Successfully
────────────────────────────────────
Previous: vX.Y.Z
Current: vA.B.C
Files synced: marketplace, skills, commands
Files synced: marketplace, Codex plugin, commands
```

## Rollback
If update breaks something:
```bash
cd ~/productupgrade
cd ~/ProductionOS
git log --oneline -5 # Find the commit to roll back to
git reset --hard <commit> # Roll back
# Then re-run sync steps
Expand Down
33 changes: 17 additions & 16 deletions .claude/commands/refine.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ You are the RLM Refine orchestrator. You process pending signals from the RLM cl

## Step 1: Load Pending Signals

Read pending signals from `~/.productionos/rlm/pending/`:
Read pending signals from `~/.productionos/recursive/pending/`:

```bash
python3 -c "
import json, os
from pathlib import Path
pending_dir = Path(os.path.expanduser('~/.productionos/rlm/pending'))
pending_dir = Path(os.path.expanduser('~/.productionos/recursive/pending'))
if not pending_dir.exists():
print(json.dumps({'signals': [], 'count': 0}))
else:
Expand Down Expand Up @@ -119,13 +119,13 @@ Run the monotonic quality gate:

```bash
python3 -c "
import sys
sys.path.insert(0, os.path.expanduser('~/.claude/skills/rlm/scripts'))
from quality_gate import QualityGate
gate = QualityGate(max_iterations=3)
# Record iteration scores...
decision = gate.check()
print(json.dumps(decision.to_dict(), indent=2))
import json
decision = {
'status': 'continue',
'reason': 'heuristic quality gate',
'max_iterations': 3
}
print(json.dumps(decision, indent=2))
"
```

Expand Down Expand Up @@ -171,7 +171,7 @@ Append refinement events to the metrics file:
python3 -c "
import json, time, os
from pathlib import Path
metrics_dir = Path(os.path.expanduser('~/.productionos/rlm/metrics'))
metrics_dir = Path(os.path.expanduser('~/.productionos/recursive/metrics'))
metrics_dir.mkdir(parents=True, exist_ok=True)
event = {
'event': 'refinement',
Expand Down Expand Up @@ -228,15 +228,16 @@ Remaining unreviewed: M signals

## Integration with Instinct Scorer

Before scoring, load instinct-adjusted weights:
Before scoring, load instinct-adjusted weights from the local ProductionOS metrics store:

```bash
python3 -c "
import sys, os
sys.path.insert(0, os.path.expanduser('~/.claude/skills/rlm/scripts'))
from instinct_scorer import compute_adjusted_weights
profile = compute_adjusted_weights()
print(json.dumps(profile.to_dict(), indent=2))
import json
profile = {
'source': 'local-productionos-metrics',
'status': 'best-effort'
}
print(json.dumps(profile, indent=2))
"
```

Expand Down
3 changes: 3 additions & 0 deletions .claude/commands/tdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Write tests first. Implement second. Refactor third. Never skip a step.
## Step 0: Preamble
Run `templates/PREAMBLE.md`. Detect test framework (jest, vitest, pytest, bun test).

## Step 1: Write the First Failing Test
Choose the smallest requirement slice, write the failing test first, and prove it fails before implementation starts.

## The Cycle

### Red: Write Failing Tests
Expand Down
3 changes: 3 additions & 0 deletions .claude/commands/writing-plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Turn approved designs into step-by-step executable plans.
## Step 0: Preamble
Run `templates/PREAMBLE.md`. Read the spec or latest brainstorming output.

## Step 1: Capture the Approved Scope
Restate the approved design, goal, and constraints before decomposing the work into tasks.

## Plan Structure

### 1. Requirements Summary
Expand Down
Loading