great-cto 3.71.1 → 3.72.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "great-cto",
3
3
  "description": "You already have the agent. This is everything around it. great_cto runs Claude Code as a pipeline of 72 specialist agents \u2014 an independent model checks each stage before the next builds on it, spending caps refuse rather than warn, and three decisions stay yours: what gets built, how, and whether it ships.",
4
- "version": "3.71.1",
4
+ "version": "3.72.0",
5
5
  "author": {
6
6
  "name": "Alexander Velikiy",
7
7
  "url": "https://hashnode.com/@Greatcto"
@@ -376,7 +376,7 @@ constraint in the new ARCH doc — document why this design choice was not taken
376
376
  ARCHETYPE=$(grep "^archetype:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); ARCHETYPE=${ARCHETYPE:-web-service}
377
377
  PROJECT_SIZE=$(grep "^project_size:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); PROJECT_SIZE=${PROJECT_SIZE:-medium}
378
378
  SECURITY_GATE=$(grep "^security-gate:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); SECURITY_GATE=${SECURITY_GATE:-conditional}
379
- COMPLIANCE=$(grep "^compliance:" .great_cto/PROJECT.md 2>/dev/null | sed 's/compliance: //' || echo "[]")
379
+ COMPLIANCE=$(grep "^compliance:" .great_cto/PROJECT.md 2>/dev/null | sed 's/compliance: //'); COMPLIANCE=${COMPLIANCE:-[]}
380
380
  ```
381
381
  Read ARCHETYPES.md for QA strategy, deploy method, and thresholds matching `$ARCHETYPE`. Use these as constraints for the architecture design.
382
382
  - **Greenfield check** — determines how deep to read existing code:
@@ -48,8 +48,9 @@ fi
48
48
  echo "Migrations to review:"
49
49
  echo "$MIGRATIONS"
50
50
 
51
- DB_ENGINE=$(grep "^db:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}' || \
52
- grep -rn "postgresql\|mysql\|sqlite\|aurora\|cockroach\|planetscale" .great_cto/PROJECT.md 2>/dev/null | head -1 | grep -oE "postgresql|mysql|sqlite|aurora|cockroach|planetscale" | head -1 || echo "unknown")
51
+ DB_ENGINE=$(grep "^db:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}')
52
+ [ -n "$DB_ENGINE" ] || DB_ENGINE=$(grep -oE "postgresql|mysql|sqlite|aurora|cockroach|planetscale" .great_cto/PROJECT.md 2>/dev/null | head -1)
53
+ DB_ENGINE=${DB_ENGINE:-unknown}
53
54
 
54
55
  # Slug from latest ARCH doc; date fallback must be an explicit branch —
55
56
  # `|| echo` after a pipeline never fires (basename "" exits 0 with empty output)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: design-advisor
3
- description: Use after architect, before/parallel to pm, for any UI-bearing feature (landing pages, dashboards, admin panels, web apps, React Native apps). Picks a design system, enumerates the component inventory, writes text-form wireframes, and locks the a11y + responsive + (mobile) platform-integration contract. Outputs docs/design/DESIGN-{slug}.md. Plan altitude only — never writes implementation code.
3
+ description: Use after architect and before pm, for any UI-bearing feature (landing pages, dashboards, admin panels, web apps, React Native apps). Picks a design system, enumerates the component inventory, writes text-form wireframes, and locks the a11y + responsive + (mobile) platform-integration contract. Outputs docs/design/DESIGN-{slug}.md. Plan altitude only — never writes implementation code.
4
4
  model: claude-opus-5
5
5
  authority: autonomous
6
6
  tools: Read, Write, Glob, Grep, WebFetch, Bash(git:*), Bash(bd:*), Bash(ls:*), Bash(cat:*), Bash(find:*), Bash(touch:*), Bash(head:*), Bash(tail:*), Bash(grep:*), Bash(wc:*), Bash(date:*), Bash(printf:*), Bash(echo:*), Bash(mkdir:*), memory_20250929, advisor_20260301
@@ -572,7 +572,7 @@ step for that condition before proceeding to Step 1 (gate:ship check).
572
572
  ESTIMATED=${ESTIMATED_RAW:-0}
573
573
  CONSOLE_URL=$(grep "console-url:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}')
574
574
  SERVICE=$(grep "^service:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}' || basename "$PWD")
575
- FEATURE=$(basename "$ARCH_DOC" .md 2>/dev/null | sed 's/^ARCH-//' || echo "unknown")
575
+ FEATURE=$(basename "$ARCH_DOC" .md 2>/dev/null | sed 's/^ARCH-//'); FEATURE=${FEATURE:-unknown}
576
576
 
577
577
  COST_LOG=.great_cto/cost-history.log
578
578
  [ ! -f "$COST_LOG" ] && printf '# Cost history — append only. Format: ISO8601 | service | estimated_usd_month | actual_usd_month | source | feature\n' > "$COST_LOG"
@@ -91,7 +91,7 @@ ARCH_FILE=$(ls -t docs/architecture/ARCH-*.md 2>/dev/null | head -1)
91
91
  SLUG=$(basename "$ARCH_FILE" .md | sed 's/^ARCH-//')
92
92
 
93
93
  ARCHETYPE=$(grep "^archetype:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}')
94
- GROWTH_GOAL=$(grep "^growth-goal:" .great_cto/PROJECT.md 2>/dev/null | sed 's/growth-goal: //' || echo "not specified")
94
+ GROWTH_GOAL=$(grep "^growth-goal:" .great_cto/PROJECT.md 2>/dev/null | sed 's/growth-goal: //'); GROWTH_GOAL=${GROWTH_GOAL:-not specified}
95
95
  # Is there an analytics/connector layer we can read from?
96
96
  CONNECT=$(ls docs/connectors/CONNECT-*.md 2>/dev/null | head -1)
97
97
  echo "slug=$SLUG archetype=$ARCHETYPE goal='$GROWTH_GOAL' connector=${CONNECT:-none}"
@@ -28,7 +28,7 @@ Run in parallel:
28
28
  cat .great_cto/lessons.md 2>/dev/null || echo "(no lessons yet)"
29
29
 
30
30
  # Cross-project decisions (supplement)
31
- cat ~/.great_cto/decisions.md 2>/dev/null | head -300 || echo "(none)"
31
+ D=$(head -300 ~/.great_cto/decisions.md 2>/dev/null); [ -n "$D" ] && printf '%s\n' "$D" || echo "(none)"
32
32
 
33
33
  # Session log pattern lines across all sessions
34
34
  grep -h "^## pattern:" .great_cto/logs/session-*-end.md 2>/dev/null \
@@ -327,7 +327,7 @@ node "$PLUGIN_DIR/scripts/lib/pattern-lookup.mjs" --role incident
327
327
 
328
328
  # Priority 4: systemd / journalctl
329
329
  if [ -z "$LOG_PATH" ] && [ -z "$APP_CONTAINER" ]; then
330
- journalctl --since "30 min ago" -p err 2>/dev/null | tail -50 || \
330
+ { J=$(journalctl --since "30 min ago" -p err 2>/dev/null | tail -50); [ -n "$J" ] && printf '%s\n' "$J"; } || \
331
331
  echo "No log source found. Add 'error-log: /path/to/log' to PROJECT.md L3 section."
332
332
  fi
333
333
 
@@ -76,7 +76,7 @@ ARCH_FILE=$(ls -t docs/architecture/ARCH-*.md 2>/dev/null | head -1)
76
76
  [ -z "$ARCH_FILE" ] && { echo "BLOCKED: no ARCH doc" >&2; exit 1; }
77
77
  SLUG=$(basename "$ARCH_FILE" .md | sed 's/^ARCH-//')
78
78
 
79
- PERF_SLA=$(grep "^performance-sla:" .great_cto/PROJECT.md 2>/dev/null | sed 's/performance-sla: //' || echo "not specified")
79
+ PERF_SLA=$(grep "^performance-sla:" .great_cto/PROJECT.md 2>/dev/null | sed 's/performance-sla: //'); PERF_SLA=${PERF_SLA:-not specified}
80
80
  MONTHLY_RPS=$(grep "^expected-rps:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); MONTHLY_RPS=${MONTHLY_RPS:-unknown}
81
81
 
82
82
  # Check for existing baseline
@@ -115,6 +115,10 @@ PHASE=$(grep "^phase:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); PH
115
115
  TEAM_SIZE=$(grep "^team-size:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); TEAM_SIZE=${TEAM_SIZE:-1}
116
116
  MONTHLY_BUDGET=$(grep "^monthly-budget-llm-usd:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}')
117
117
 
118
+ # Design contract — design-advisor runs before pm on UI features; plan UI tasks against it
119
+ DESIGN_DOC=$(ls -t docs/design/DESIGN-*.md 2>/dev/null | head -1)
120
+ [ -n "$DESIGN_DOC" ] && echo "=== DESIGN CONTRACT: $DESIGN_DOC (components, a11y, responsive — one task per screen/component group) ==="
121
+
118
122
  # Past lessons — calibrate cost/time estimates against actuals
119
123
  if [ -f .great_cto/lessons.md ]; then
120
124
  COST_LESSONS=$(grep -B1 -A4 "shape: B" .great_cto/lessons.md 2>/dev/null | head -20)
@@ -138,7 +142,7 @@ FEATURE_SLUG=$(basename "$ARCH_FILE" .md | sed 's/^ARCH-//' | tr '[:upper:]' '[:
138
142
 
139
143
  # Goal ancestry (Paperclip pattern) — injected into every bd create call.
140
144
  # Built AFTER FEATURE_SLUG is known (it interpolates the slug).
141
- COMPLIANCE=$(grep "^compliance:" .great_cto/PROJECT.md 2>/dev/null | sed 's/compliance: //' || echo "")
145
+ COMPLIANCE=$(grep "^compliance:" .great_cto/PROJECT.md 2>/dev/null | sed 's/compliance: //')
142
146
  _COMP_CLEAN=$(echo "$COMPLIANCE" | sed 's/^\[none\]$//;s/^\[none, *\]//;s/, *\[none\]//')
143
147
  GOAL_ANCESTRY="[archetype:${ARCHETYPE}]$([ -n "$_COMP_CLEAN" ] && echo " [compliance:${_COMP_CLEAN}]") [feature:${FEATURE_SLUG}] [phase:${PHASE}] | Why: see docs/plans/PLAN-${FEATURE_SLUG}.md"
144
148
 
@@ -286,9 +286,9 @@ PROJECT_SIZE=$(grep "^project_size:" .great_cto/PROJECT.md 2>/dev/null | awk '{p
286
286
 
287
287
  ```bash
288
288
  ARCHETYPE=$(grep "^archetype:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); ARCHETYPE=${ARCHETYPE:-web-service}
289
- COMPLIANCE=$(grep "^compliance:" .great_cto/PROJECT.md 2>/dev/null | sed 's/compliance: //' || echo "[]")
290
- QA_EXTRAS=$(grep "^qa-extras:" .great_cto/PROJECT.md 2>/dev/null | sed 's/qa-extras: //' || echo "[]")
291
- PERF_SLA=$(grep "^performance-sla:" .great_cto/PROJECT.md 2>/dev/null | sed 's/performance-sla: //' || echo "")
289
+ COMPLIANCE=$(grep "^compliance:" .great_cto/PROJECT.md 2>/dev/null | sed 's/compliance: //'); COMPLIANCE=${COMPLIANCE:-[]}
290
+ QA_EXTRAS=$(grep "^qa-extras:" .great_cto/PROJECT.md 2>/dev/null | sed 's/qa-extras: //'); QA_EXTRAS=${QA_EXTRAS:-[]}
291
+ PERF_SLA=$(grep "^performance-sla:" .great_cto/PROJECT.md 2>/dev/null | sed 's/performance-sla: //')
292
292
  ```
293
293
 
294
294
  Read ARCHETYPES.md → find QA strategy row for `$ARCHETYPE`. This gives base QA plan.
@@ -362,7 +362,7 @@ PII column additions) that functional tests miss by design — the
362
362
  specialist agent owns this.
363
363
 
364
364
  ```bash
365
- BASE=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null | sed 's|.*/||' || echo "main")
365
+ BASE=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null | sed 's|.*/||'); BASE=${BASE:-main}
366
366
  MIGRATION_HIT=$(git diff "$BASE"...HEAD --name-only 2>/dev/null | \
367
367
  grep -E '(^|/)(migrations|alembic/versions|db/migrate|prisma/migrations|flyway|knex/migrations)/.*\.(sql|py|ts|js|rb)$' | head -5)
368
368
 
@@ -424,7 +424,7 @@ Continues from the original Workflow below — produces `CSO-{slug}-{date}.md`,
424
424
  1b. **Read** `.great_cto/PROJECT.md` → get `archetype`, `type`, `stack`, and `compliance` params:
425
425
  ```bash
426
426
  ARCHETYPE=$(grep "^archetype:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); ARCHETYPE=${ARCHETYPE:-web-service}
427
- COMPLIANCE=$(grep "^compliance:" .great_cto/PROJECT.md 2>/dev/null | sed 's/compliance: //' || echo "[]")
427
+ COMPLIANCE=$(grep "^compliance:" .great_cto/PROJECT.md 2>/dev/null | sed 's/compliance: //'); COMPLIANCE=${COMPLIANCE:-[]}
428
428
  ```
429
429
  Read ARCHETYPES.md → find security rules for `$ARCHETYPE`.
430
430
  The `compliance:` list in PROJECT.md determines which checklists to run (see Step 5).
@@ -670,7 +670,7 @@ Observations (signal < 2 or no direct evidence): record in a separate `## Observ
670
670
  the pipeline dispatcher and the board parse this line):
671
671
  ```bash
672
672
  bash scripts/log-verdict.sh security-officer <APPROVED|BLOCKED> auto \
673
- findings=P0:<n>,P1:<n>,P2:<n> triaged=<n> valid=<n> invalid=<n> feature=<slug> need=<implementer|decision> finding=<id>
673
+ findings=P0:<n>,P1:<n>,P2:<n> triaged=<n> valid=<n> invalid=<n> feature=<slug> report=docs/security/CSO-<YYYY-MM-DD>.md need=<implementer|decision> finding=<id>
674
674
  ```
675
675
  On BLOCKED, `need` mirrors the report's `need` line: `implementer` for
676
676
  "senior-dev fix <finding>", `decision` for "CTO waive risk on <finding>".
@@ -318,7 +318,7 @@ REPORT=docs/security/AUDIT-{slug}.md
318
318
  [ -s "$REPORT" ] || { echo "STOP: no audit report at $REPORT — write it first." >&2; exit 1; }
319
319
 
320
320
  bash scripts/log-verdict.sh smart-contract-auditor <PASS|FAIL|BLOCKED> auto \
321
- feature=<slug> "audit=$REPORT" findings=C:<n>,H:<n>,M:<n> not_checked=<n> need=<implementer|decision> finding=<id>
321
+ feature=<slug> "report=$REPORT" findings=C:<n>,H:<n>,M:<n> not_checked=<n> need=<implementer|decision> finding=<id>
322
322
  ```
323
323
 
324
324
  In prepare mode add `package=docs/security/audit-package-{slug}` and
@@ -64,13 +64,15 @@ export const DEFAULT_LEVEL = 'gates-only';
64
64
 
65
65
  /**
66
66
  * Archetypes where a compliance/security sign-off is not the operator's to skip.
67
- * SKILL.md already states these carry a `strict` minimum; encoding it here means
68
- * a new level cannot become a bypass by omission.
67
+ * The floor is gate:security + gate:compliance (with gate:ship) at every level, so
68
+ * a new level cannot become a bypass by omission. It is not `strict`: it adds no
69
+ * gate:code. reference/approval-level.md lists this set and a test holds the two equal.
69
70
  */
70
71
  const REGULATED = new Set([
71
72
  'ai-system', 'agent-product', 'commerce', 'web3', 'iot-embedded', 'regulated',
72
73
  'fintech', 'healthcare', 'insurance', 'legal', 'gov-public', 'defense-govcon',
73
74
  ]);
75
+ export const REGULATED_ARCHETYPES = Object.freeze([...REGULATED]);
74
76
  const REGULATED_FLOOR = ['security', 'compliance'];
75
77
 
76
78
  /**
@@ -303,7 +303,13 @@ next = ["qa-engineer"]
303
303
  on = ["DONE", "APPROVED"]
304
304
  # DESIGN-{slug}.md — the design + a11y contract
305
305
  produces = ["design"]
306
- next = ["senior-dev"]
306
+ # Into pm, not senior-dev. Both used to lead to senior-dev with no join, and the
307
+ # routing table ran design-advisor alongside pm, so each success opened the edge
308
+ # and senior-dev could start twice. A join cannot fix it: design-advisor runs only
309
+ # for UI features, and pm would wait for a stage that never starts. One path into
310
+ # senior-dev does; pm also plans the UI tasks against the finished contract — the
311
+ # order the Codex controller already runs (design-advisor-prebuild).
312
+ next = ["pm"]
307
313
 
308
314
  # Audits the Solidity/EVM contracts once they exist (web3, or /review --contracts).
309
315
  # PASS hands the audit to security-officer, which reads it before gate:ship; FAIL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "great-cto",
3
- "version": "3.71.1",
3
+ "version": "3.72.0",
4
4
  "description": "One command install for the great_cto Claude Code plugin. Auto-detects your stack, picks the right archetype, bootstraps PROJECT.md.",
5
5
  "keywords": [
6
6
  "claude-code",