ultra-builder-pro-cli 0.5.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.
- package/.ultra-template/delivery-report.json +9 -0
- package/.ultra-template/docs/research/README.md +53 -0
- package/.ultra-template/specs/architecture.md +250 -0
- package/.ultra-template/specs/discovery.md +248 -0
- package/.ultra-template/specs/product.md +223 -0
- package/.ultra-template/tasks/contexts/TEMPLATE.md +57 -0
- package/.ultra-template/tasks/tasks.json +33 -0
- package/.ultra-template/test-report.json +8 -0
- package/CHANGELOG.md +194 -0
- package/LICENSE +21 -0
- package/README.md +187 -0
- package/adapters/_shared/codex-assets.cjs +1128 -0
- package/adapters/_shared/codex-ultra-tools-entry.cjs +11 -0
- package/adapters/_shared/file-ops.cjs +115 -0
- package/adapters/_shared/frontmatter.cjs +52 -0
- package/adapters/_shared/handbook.cjs +144 -0
- package/adapters/_shared/md-to-toml.cjs +54 -0
- package/adapters/_shared/path-rewrite.cjs +79 -0
- package/adapters/_shared/rtk-detect.cjs +86 -0
- package/adapters/_shared/runtime-assets.cjs +70 -0
- package/adapters/_shared/settings-merge.cjs +76 -0
- package/adapters/_shared/tests/file-ops.test.cjs +54 -0
- package/adapters/_shared/tests/frontmatter.test.cjs +47 -0
- package/adapters/_shared/tests/handbook.test.cjs +86 -0
- package/adapters/_shared/tests/md-to-toml.test.cjs +48 -0
- package/adapters/_shared/tests/path-rewrite.test.cjs +60 -0
- package/adapters/_shared/tests/resolve-target.test.cjs +85 -0
- package/adapters/_shared/tests/rtk-detect.test.cjs +116 -0
- package/adapters/_shared/tests/runtime-assets.test.cjs +107 -0
- package/adapters/_shared/tests/settings-merge.test.cjs +85 -0
- package/adapters/_shared/tests/validate.test.cjs +30 -0
- package/adapters/_shared/validate.cjs +24 -0
- package/adapters/claude.js +182 -0
- package/adapters/codex.js +385 -0
- package/adapters/gemini.js +204 -0
- package/adapters/opencode.js +506 -0
- package/adapters/tests/claude.test.cjs +117 -0
- package/adapters/tests/codex-hook.test.cjs +90 -0
- package/adapters/tests/codex.test.cjs +356 -0
- package/adapters/tests/gemini.test.cjs +112 -0
- package/adapters/tests/opencode.test.cjs +246 -0
- package/agents/code-reviewer.md +102 -0
- package/agents/debugger.md +127 -0
- package/agents/review-code.md +125 -0
- package/agents/review-comments.md +98 -0
- package/agents/review-coordinator.md +146 -0
- package/agents/review-design.md +133 -0
- package/agents/review-errors.md +87 -0
- package/agents/review-tests.md +93 -0
- package/agents/tdd-runner.md +92 -0
- package/bin/handbook.js +54 -0
- package/bin/install.js +254 -0
- package/bin/orchestrator.js +214 -0
- package/commands/learn.md +41 -0
- package/commands/ultra-deliver.md +45 -0
- package/commands/ultra-dev.md +50 -0
- package/commands/ultra-init.md +51 -0
- package/commands/ultra-plan.md +49 -0
- package/commands/ultra-research.md +59 -0
- package/commands/ultra-status.md +46 -0
- package/commands/ultra-test.md +48 -0
- package/commands/ultra-think.md +45 -0
- package/docs/AGENT-CONTEXT.md +143 -0
- package/docs/ARCHITECTURE.md +197 -0
- package/docs/COMMIT-HASH-BACKFILL.md +101 -0
- package/docs/LEGACY-HERMES.md +1175 -0
- package/docs/PLAN.zh-CN.md +1683 -0
- package/docs/ROADMAP.md +102 -0
- package/docs/RUNTIME-COMPAT-MATRIX.md +98 -0
- package/docs/STATE-DB-ACCESS-POLICY.md +109 -0
- package/docs/USER-HANDBOOK-CONTRACT.md +61 -0
- package/hooks/README.md +24 -0
- package/hooks/active_task_context.py +44 -0
- package/hooks/adapters/codex.py +302 -0
- package/hooks/health_check.py +61 -0
- package/hooks/pre_stop_check.py +56 -0
- package/hooks/subagent_tracker.py +116 -0
- package/hooks/workflow_checkpoint.py +56 -0
- package/hooks/workflow_context.py +63 -0
- package/hooks/workflow_resume.py +50 -0
- package/mcp-server/lib/init-project.cjs +162 -0
- package/mcp-server/lib/llm-client.cjs +157 -0
- package/mcp-server/lib/llm-client.test.cjs +156 -0
- package/mcp-server/lib/plan-store.cjs +96 -0
- package/mcp-server/lib/plan-store.test.cjs +132 -0
- package/mcp-server/lib/prd-parser.cjs +110 -0
- package/mcp-server/lib/prd-parser.test.cjs +171 -0
- package/mcp-server/lib/pricing.cjs +53 -0
- package/mcp-server/lib/projector.cjs +158 -0
- package/mcp-server/lib/state-db.cjs +113 -0
- package/mcp-server/lib/state-db.test.cjs +116 -0
- package/mcp-server/lib/state-ops.cjs +725 -0
- package/mcp-server/lib/task-expander.cjs +123 -0
- package/mcp-server/lib/task-expander.test.cjs +253 -0
- package/mcp-server/lib/telemetry.cjs +72 -0
- package/mcp-server/lib/topo.cjs +131 -0
- package/mcp-server/lib/topo.test.cjs +158 -0
- package/mcp-server/server.cjs +482 -0
- package/mcp-server/tests/circuit-breaker.test.cjs +125 -0
- package/mcp-server/tests/commit-hash-flow.test.cjs +117 -0
- package/mcp-server/tests/concurrency-update.test.cjs +96 -0
- package/mcp-server/tests/concurrency.test.cjs +112 -0
- package/mcp-server/tests/db-ops.test.cjs +117 -0
- package/mcp-server/tests/init-project.test.cjs +141 -0
- package/mcp-server/tests/migrate.test.cjs +144 -0
- package/mcp-server/tests/projector.test.cjs +130 -0
- package/mcp-server/tests/server-contract.test.cjs +750 -0
- package/mcp-server/tests/staleness.test.cjs +190 -0
- package/mcp-server/tests/state-ops.test.cjs +286 -0
- package/mcp-server/tests/tagged-tasks.test.cjs +163 -0
- package/mcp-server/tests/telemetry.test.cjs +205 -0
- package/orchestrator/auto-merge.cjs +109 -0
- package/orchestrator/code-graph-watcher.cjs +121 -0
- package/orchestrator/daemon.cjs +112 -0
- package/orchestrator/dispatch-rules.cjs +93 -0
- package/orchestrator/parallel-orchestrator.cjs +195 -0
- package/orchestrator/planner/expand-prompt.cjs +62 -0
- package/orchestrator/planner/expand-prompt.test.cjs +52 -0
- package/orchestrator/planner/plan-builder.cjs +116 -0
- package/orchestrator/planner/plan-builder.test.cjs +165 -0
- package/orchestrator/planner/prd-prompt.cjs +44 -0
- package/orchestrator/planner/prd-prompt.test.cjs +30 -0
- package/orchestrator/recovery.cjs +70 -0
- package/orchestrator/session-runner.cjs +224 -0
- package/orchestrator/skill-miner.cjs +133 -0
- package/orchestrator/tests/auto-merge.test.cjs +216 -0
- package/orchestrator/tests/code-graph-watcher.test.cjs +183 -0
- package/orchestrator/tests/daemon.test.cjs +260 -0
- package/orchestrator/tests/dispatch-rules.test.cjs +122 -0
- package/orchestrator/tests/parallel-orchestrator.test.cjs +233 -0
- package/orchestrator/tests/phase-8b-gate.test.cjs +183 -0
- package/orchestrator/tests/recovery.test.cjs +190 -0
- package/orchestrator/tests/session-runner.test.cjs +314 -0
- package/orchestrator/tests/skill-miner.test.cjs +147 -0
- package/orchestrator/tests/worktree-manager.test.cjs +148 -0
- package/orchestrator/worktree-manager.cjs +131 -0
- package/output-styles/coding-vibes.md +67 -0
- package/output-styles/structural-thinking.md +61 -0
- package/package.json +109 -0
- package/settings.json +8 -0
- package/skills/cc-collab/SKILL.md +41 -0
- package/skills/code-review-expert/SKILL.md +118 -0
- package/skills/code-review-expert/references/code-quality-checklist.md +112 -0
- package/skills/code-review-expert/references/integration-checklist.md +46 -0
- package/skills/code-review-expert/references/removal-plan.md +52 -0
- package/skills/code-review-expert/references/security-checklist.md +100 -0
- package/skills/code-review-expert/references/solid-checklist.md +65 -0
- package/skills/codex-collab/SKILL.md +52 -0
- package/skills/codex-collab/evals/evals.json +40 -0
- package/skills/gemini-collab/SKILL.md +51 -0
- package/skills/gemini-collab/evals/evals.json +42 -0
- package/skills/integration-rules/SKILL.md +71 -0
- package/skills/learn/SKILL.md +117 -0
- package/skills/security-rules/SKILL.md +60 -0
- package/skills/testing-rules/SKILL.md +56 -0
- package/skills/ultra-deliver/SKILL.md +171 -0
- package/skills/ultra-dev/SKILL.md +324 -0
- package/skills/ultra-init/SKILL.md +148 -0
- package/skills/ultra-plan/SKILL.md +314 -0
- package/skills/ultra-research/SKILL.md +156 -0
- package/skills/ultra-research/steps/step-00-problem-validation.md +154 -0
- package/skills/ultra-research/steps/step-01-opportunity-discovery.md +172 -0
- package/skills/ultra-research/steps/step-02-market-assessment.md +195 -0
- package/skills/ultra-research/steps/step-03-competitive-landscape.md +197 -0
- package/skills/ultra-research/steps/step-04-product-strategy.md +196 -0
- package/skills/ultra-research/steps/step-05-assumptions-validation.md +234 -0
- package/skills/ultra-research/steps/step-10-user-personas.md +169 -0
- package/skills/ultra-research/steps/step-11-user-scenarios.md +181 -0
- package/skills/ultra-research/steps/step-20-user-stories.md +156 -0
- package/skills/ultra-research/steps/step-21-features-scope.md +157 -0
- package/skills/ultra-research/steps/step-22-success-metrics.md +195 -0
- package/skills/ultra-research/steps/step-30-architecture-context.md +154 -0
- package/skills/ultra-research/steps/step-31-solution-strategy.md +172 -0
- package/skills/ultra-research/steps/step-32-building-blocks.md +188 -0
- package/skills/ultra-research/steps/step-40-deployment.md +123 -0
- package/skills/ultra-research/steps/step-41-quality-risks.md +135 -0
- package/skills/ultra-research/steps/step-99-synthesis.md +188 -0
- package/skills/ultra-review/SKILL.md +437 -0
- package/skills/ultra-review/references/unified-schema.md +127 -0
- package/skills/ultra-review/scripts/review_verdict_update.py +99 -0
- package/skills/ultra-review/scripts/review_wait.py +120 -0
- package/skills/ultra-status/SKILL.md +162 -0
- package/skills/ultra-test/SKILL.md +195 -0
- package/skills/ultra-think/SKILL.md +109 -0
- package/skills/ultra-verify/SKILL.md +111 -0
- package/skills/ultra-verify/evals/evals.json +51 -0
- package/skills/ultra-verify/references/confidence-system.md +38 -0
- package/skills/ultra-verify/references/cross-verify-modes.md +73 -0
- package/skills/ultra-verify/scripts/verify_wait.py +131 -0
- package/spec/cli-protocol.md +118 -0
- package/spec/mcp-tools.yaml +658 -0
- package/spec/schemas/command-manifest.schema.json +47 -0
- package/spec/schemas/context-file.v4.5.schema.json +54 -0
- package/spec/schemas/mcp-tools.schema.json +136 -0
- package/spec/schemas/skill-manifest.schema.json +94 -0
- package/spec/schemas/state-db.sql +154 -0
- package/spec/schemas/tasks.v4.5.schema.json +66 -0
- package/ultra-tools/cli.cjs +121 -0
- package/ultra-tools/commands/db.cjs +175 -0
- package/ultra-tools/commands/legacy-memory.cjs +159 -0
- package/ultra-tools/commands/migrate.cjs +354 -0
- package/ultra-tools/commands/session.cjs +180 -0
- package/ultra-tools/commands/status.cjs +158 -0
- package/ultra-tools/commands/task.cjs +95 -0
- package/ultra-tools/legacy-memory.test.cjs +80 -0
- package/ultra-tools/status-command.test.cjs +132 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Phase 8B.3 — N-concurrent git worktree registry.
|
|
4
|
+
//
|
|
5
|
+
// Wraps session-runner's single-session gitWorktreeAdd/Remove with:
|
|
6
|
+
// • allocate({repoRoot, sid, baseRef}) — create .ultra/worktrees/<sid>
|
|
7
|
+
// • release({repoRoot, worktree_path}) — remove one
|
|
8
|
+
// • listActive(repoRoot) — scan git + filter our domain
|
|
9
|
+
// • releaseAll(repoRoot) — batch cleanup (crash recovery)
|
|
10
|
+
//
|
|
11
|
+
// Node single-thread execFileSync naturally serializes git calls, so
|
|
12
|
+
// `.git/config.lock` contention is a non-issue within one process. If the
|
|
13
|
+
// parallel orchestrator (8B.2) ever switches to async git spawning, an
|
|
14
|
+
// async mutex can be layered here without changing the API.
|
|
15
|
+
|
|
16
|
+
const fs = require('node:fs');
|
|
17
|
+
const path = require('node:path');
|
|
18
|
+
const { execFileSync } = require('node:child_process');
|
|
19
|
+
|
|
20
|
+
const { _internal } = require('./session-runner.cjs');
|
|
21
|
+
|
|
22
|
+
const WORKTREE_DOMAIN = path.join('.ultra', 'worktrees');
|
|
23
|
+
|
|
24
|
+
function worktreePath(repoRoot, sid) {
|
|
25
|
+
return path.join(repoRoot, WORKTREE_DOMAIN, sid);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function allocate({ repoRoot, sid, baseRef = 'HEAD' }) {
|
|
29
|
+
if (!repoRoot) throw new Error('allocate: repoRoot required');
|
|
30
|
+
if (!sid) throw new Error('allocate: sid required');
|
|
31
|
+
const wt = worktreePath(repoRoot, sid);
|
|
32
|
+
_internal.gitWorktreeAdd(repoRoot, wt, baseRef); // throws WORKTREE_FAILED
|
|
33
|
+
return { worktree_path: wt };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function release({ repoRoot, worktree_path }) {
|
|
37
|
+
if (!repoRoot) throw new Error('release: repoRoot required');
|
|
38
|
+
if (!worktree_path) throw new Error('release: worktree_path required');
|
|
39
|
+
_internal.gitWorktreeRemove(repoRoot, worktree_path);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function parsePorcelain(text) {
|
|
43
|
+
const entries = [];
|
|
44
|
+
let current = {};
|
|
45
|
+
for (const raw of text.split('\n')) {
|
|
46
|
+
const line = raw.trimEnd();
|
|
47
|
+
if (line.startsWith('worktree ')) {
|
|
48
|
+
if (current.worktree) entries.push(current);
|
|
49
|
+
current = { worktree: line.slice('worktree '.length) };
|
|
50
|
+
} else if (line.startsWith('HEAD ')) {
|
|
51
|
+
current.head = line.slice('HEAD '.length);
|
|
52
|
+
} else if (line.startsWith('branch ')) {
|
|
53
|
+
current.branch = line.slice('branch '.length);
|
|
54
|
+
} else if (line === 'detached') {
|
|
55
|
+
current.detached = true;
|
|
56
|
+
} else if (line === '' && current.worktree) {
|
|
57
|
+
entries.push(current);
|
|
58
|
+
current = {};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (current.worktree) entries.push(current);
|
|
62
|
+
return entries;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function listActive(repoRoot) {
|
|
66
|
+
let out;
|
|
67
|
+
try {
|
|
68
|
+
out = execFileSync('git', ['worktree', 'list', '--porcelain'], {
|
|
69
|
+
cwd: repoRoot, stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf8',
|
|
70
|
+
});
|
|
71
|
+
} catch (err) {
|
|
72
|
+
// Non-git or git failure — surface nothing but log via stderr so callers
|
|
73
|
+
// can trace. Return empty list so releaseAll is idempotent.
|
|
74
|
+
process.stderr.write(`worktree-manager: listActive git call failed: ${err.message}\n`);
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
const rawDomainRoot = path.resolve(repoRoot, WORKTREE_DOMAIN);
|
|
78
|
+
// On macOS tmpdir is a symlink (/var → /private/var); git returns realpath.
|
|
79
|
+
// Canonicalize both sides so prefix matching is robust.
|
|
80
|
+
const domainRoot = (fs.existsSync(rawDomainRoot)
|
|
81
|
+
? fs.realpathSync(rawDomainRoot)
|
|
82
|
+
: rawDomainRoot) + path.sep;
|
|
83
|
+
return parsePorcelain(out)
|
|
84
|
+
.filter((e) => {
|
|
85
|
+
if (!e.worktree) return false;
|
|
86
|
+
const canon = fs.existsSync(e.worktree) ? fs.realpathSync(e.worktree) : path.resolve(e.worktree);
|
|
87
|
+
return (canon + path.sep).startsWith(domainRoot);
|
|
88
|
+
})
|
|
89
|
+
.map((e) => ({
|
|
90
|
+
sid: path.basename(e.worktree),
|
|
91
|
+
worktree_path: e.worktree,
|
|
92
|
+
head: e.head || null,
|
|
93
|
+
branch: e.branch || null,
|
|
94
|
+
detached: !!e.detached,
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function releaseAll(repoRoot) {
|
|
99
|
+
const active = listActive(repoRoot);
|
|
100
|
+
let cleaned = 0;
|
|
101
|
+
for (const entry of active) {
|
|
102
|
+
try {
|
|
103
|
+
release({ repoRoot, worktree_path: entry.worktree_path });
|
|
104
|
+
cleaned += 1;
|
|
105
|
+
} catch (err) {
|
|
106
|
+
// Best-effort: one bad worktree shouldn't stop the sweep.
|
|
107
|
+
process.stderr.write(`worktree-manager: release(${entry.sid}) failed: ${err.message}\n`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// Sweep filesystem orphans that git no longer tracks.
|
|
111
|
+
const domainRoot = path.join(repoRoot, WORKTREE_DOMAIN);
|
|
112
|
+
if (fs.existsSync(domainRoot)) {
|
|
113
|
+
for (const name of fs.readdirSync(domainRoot)) {
|
|
114
|
+
const full = path.join(domainRoot, name);
|
|
115
|
+
try { fs.rmSync(full, { recursive: true, force: true }); }
|
|
116
|
+
catch (err) {
|
|
117
|
+
process.stderr.write(`worktree-manager: orphan sweep failed for ${full}: ${err.message}\n`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return { cleaned };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
module.exports = {
|
|
125
|
+
allocate,
|
|
126
|
+
release,
|
|
127
|
+
listActive,
|
|
128
|
+
releaseAll,
|
|
129
|
+
worktreePath,
|
|
130
|
+
WORKTREE_DOMAIN,
|
|
131
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Coding Vibes
|
|
3
|
+
description: Energetic, casual coding buddy with modern dev vibes - adapts to user's language while keeping the energy
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Coding Vibes Style 🚀
|
|
7
|
+
|
|
8
|
+
You're a high-energy coding buddy who talks like a modern developer friend. Your vibe is smart, fast-moving, and always hyped to help crush problems!
|
|
9
|
+
|
|
10
|
+
## Core Rule: Language Adaptation
|
|
11
|
+
**CRITICAL: Always match the user's language and cultural context while maintaining the energetic dev vibe.**
|
|
12
|
+
|
|
13
|
+
## Communication Style
|
|
14
|
+
|
|
15
|
+
**Tone & Energy:**
|
|
16
|
+
- Be casual, direct, and playful ✅
|
|
17
|
+
- Use modern slang appropriate to user's language/culture
|
|
18
|
+
- Include emojis for emotional context (🔥, 💀, 👍, 🙏, 🚀)
|
|
19
|
+
- Stay energetic and enthusiastic about problem-solving
|
|
20
|
+
|
|
21
|
+
**Writing Pattern:**
|
|
22
|
+
- Keep sentences short and punchy
|
|
23
|
+
- Use frequent line breaks for chat-like flow
|
|
24
|
+
- Avoid corporate speak or robotic language
|
|
25
|
+
- Sound like you're messaging a local teammate
|
|
26
|
+
|
|
27
|
+
**Developer Mindset:**
|
|
28
|
+
- Jump straight into solutions
|
|
29
|
+
- Share quick wins and insights
|
|
30
|
+
- Call out smooth solutions
|
|
31
|
+
- Be real when things get tricky
|
|
32
|
+
|
|
33
|
+
## Language-Specific Examples
|
|
34
|
+
|
|
35
|
+
**English:**
|
|
36
|
+
- Starting: "Let's gooo!" "I got you!" "This one's clean!"
|
|
37
|
+
- Success: "That's fire!" "Clean!" "Absolutely goated!"
|
|
38
|
+
- Thinking: "Lemme think..." "This is spicy..."
|
|
39
|
+
|
|
40
|
+
**中文:**
|
|
41
|
+
- Starting: "来咯!" "搞起!" "这个简单!"
|
|
42
|
+
- Success: "666!" "yyds!" "搞定了!"
|
|
43
|
+
- Thinking: "让我想想..." "这里tricky..."
|
|
44
|
+
|
|
45
|
+
**日本語:**
|
|
46
|
+
- Starting: "やるぞ!" "いいね!" "簡単だ!"
|
|
47
|
+
- Success: "すげー!" "完璧!" "やったー!"
|
|
48
|
+
- Thinking: "ちょっと待って..." "難しいな..."
|
|
49
|
+
|
|
50
|
+
**Español:**
|
|
51
|
+
- Starting: "¡Vamos!" "¡Perfecto!" "¡Fácil!"
|
|
52
|
+
- Success: "¡Genial!" "¡Increíble!" "¡Listo!"
|
|
53
|
+
- Thinking: "A ver..." "Está complicado..."
|
|
54
|
+
|
|
55
|
+
## Response Structure
|
|
56
|
+
|
|
57
|
+
**Quick Start:**
|
|
58
|
+
- Lead with energy in user's language
|
|
59
|
+
- Get to the point fast
|
|
60
|
+
- Match cultural enthusiasm patterns
|
|
61
|
+
|
|
62
|
+
**Problem Solving:**
|
|
63
|
+
- Use natural flow words in target language
|
|
64
|
+
- Celebrate wins appropriately for culture
|
|
65
|
+
- Be honest about complexity using local expressions
|
|
66
|
+
|
|
67
|
+
Remember: You're the local coding friend who makes development fun and approachable in any language! 🔥
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Structural Thinking
|
|
3
|
+
description: Structural thinking with architectural clarity - naturally considers foundations, layers, and clean interfaces
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Structural Thinking Style 🏗️
|
|
7
|
+
|
|
8
|
+
Your communication naturally follows structured, layered thinking patterns. You instinctively break problems into foundational components, interfaces, and hierarchical organization.
|
|
9
|
+
|
|
10
|
+
## Core Rule: Language Adaptation
|
|
11
|
+
**CRITICAL: Always match the user's language and cultural context while maintaining the structured thinking style.**
|
|
12
|
+
|
|
13
|
+
## Communication Style
|
|
14
|
+
|
|
15
|
+
**Natural Thinking Pattern:**
|
|
16
|
+
- Break problems into foundational layers and dependencies
|
|
17
|
+
- Instinctively consider modularity and composition
|
|
18
|
+
- Think in hierarchies, interfaces, and clean boundaries
|
|
19
|
+
- Build solutions that can be extended and composed
|
|
20
|
+
|
|
21
|
+
**Speaking Style:**
|
|
22
|
+
- Structured and methodical in expression
|
|
23
|
+
- Use architectural metaphors naturally
|
|
24
|
+
- Speak with quiet confidence and clarity
|
|
25
|
+
- Emphasize principles and reasoning behind ideas
|
|
26
|
+
|
|
27
|
+
**Tone Characteristics:**
|
|
28
|
+
- Thoughtful and deliberate, never rushed
|
|
29
|
+
- Educational but not condescending
|
|
30
|
+
- Always explain the "why" behind thoughts
|
|
31
|
+
- Acknowledge complexity and trade-offs gracefully
|
|
32
|
+
|
|
33
|
+
## Vocabulary & Expression Habits
|
|
34
|
+
|
|
35
|
+
**Natural Word Choices:**
|
|
36
|
+
- Foundations, layers, components, interfaces
|
|
37
|
+
- Modularity, composition, coupling, cohesion
|
|
38
|
+
- Dependencies, hierarchies, abstractions
|
|
39
|
+
- Blueprints, specifications, boundaries
|
|
40
|
+
|
|
41
|
+
**Preferred Metaphors:**
|
|
42
|
+
- Building foundations before higher floors
|
|
43
|
+
- Creating blueprints and specifications
|
|
44
|
+
- Designing load-bearing structures
|
|
45
|
+
- Composing modular, interchangeable parts
|
|
46
|
+
|
|
47
|
+
**Speaking Rhythm:**
|
|
48
|
+
- Measured and thoughtful pace
|
|
49
|
+
- Consider structural implications before responding
|
|
50
|
+
- Build ideas methodically from foundations up
|
|
51
|
+
- Connect components to overall architecture
|
|
52
|
+
|
|
53
|
+
## Communication Traits
|
|
54
|
+
|
|
55
|
+
**Structural Focus**: Always break down complexity into organized layers
|
|
56
|
+
**Interface Design**: Naturally think about clean boundaries and contracts
|
|
57
|
+
**Foundation-First**: Start with solid base before building complexity
|
|
58
|
+
**Composition Mindset**: See how parts combine into larger wholes
|
|
59
|
+
**Blueprint Thinking**: Consider the overall design before implementation
|
|
60
|
+
|
|
61
|
+
Remember: Think in layers and communicate with structural clarity - breaking complex problems into foundational components with clean interfaces, all while adapting to the user's language and culture! 🌳
|
package/package.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ultra-builder-pro-cli",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Multi-runtime installer for the Ultra Builder Pro agent engineering system — deploys commands, agents, skills, hooks, and MCP server to Claude Code, OpenCode, Codex CLI, and Gemini CLI.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"ultra-builder-pro-cli": "bin/install.js",
|
|
7
|
+
"ubp": "bin/install.js",
|
|
8
|
+
"ubp-handbook": "bin/handbook.js",
|
|
9
|
+
"ubp-orchestrator": "bin/orchestrator.js",
|
|
10
|
+
"ultra-tools": "ultra-tools/cli.cjs"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin",
|
|
14
|
+
"adapters",
|
|
15
|
+
"ultra-tools",
|
|
16
|
+
"mcp-server",
|
|
17
|
+
"orchestrator",
|
|
18
|
+
"commands",
|
|
19
|
+
"agents",
|
|
20
|
+
"skills/learn",
|
|
21
|
+
"skills/ultra-init",
|
|
22
|
+
"skills/ultra-research",
|
|
23
|
+
"skills/ultra-plan",
|
|
24
|
+
"skills/ultra-dev",
|
|
25
|
+
"skills/ultra-test",
|
|
26
|
+
"skills/ultra-review",
|
|
27
|
+
"skills/ultra-deliver",
|
|
28
|
+
"skills/ultra-status",
|
|
29
|
+
"skills/ultra-think",
|
|
30
|
+
"skills/code-review-expert",
|
|
31
|
+
"skills/security-rules",
|
|
32
|
+
"skills/integration-rules",
|
|
33
|
+
"skills/testing-rules",
|
|
34
|
+
"skills/cc-collab",
|
|
35
|
+
"skills/codex-collab",
|
|
36
|
+
"skills/gemini-collab",
|
|
37
|
+
"skills/ultra-verify",
|
|
38
|
+
"hooks/*.py",
|
|
39
|
+
"hooks/adapters/*.py",
|
|
40
|
+
"hooks/README.md",
|
|
41
|
+
"output-styles",
|
|
42
|
+
"spec/mcp-tools.yaml",
|
|
43
|
+
"spec/cli-protocol.md",
|
|
44
|
+
"spec/schemas",
|
|
45
|
+
"LICENSE",
|
|
46
|
+
"CHANGELOG.md",
|
|
47
|
+
"settings.json",
|
|
48
|
+
".ultra-template",
|
|
49
|
+
"docs/ROADMAP.md",
|
|
50
|
+
"docs/ARCHITECTURE.md",
|
|
51
|
+
"docs/AGENT-CONTEXT.md",
|
|
52
|
+
"docs/COMMIT-HASH-BACKFILL.md",
|
|
53
|
+
"docs/LEGACY-HERMES.md",
|
|
54
|
+
"docs/PLAN.zh-CN.md",
|
|
55
|
+
"docs/STATE-DB-ACCESS-POLICY.md",
|
|
56
|
+
"docs/USER-HANDBOOK-CONTRACT.md",
|
|
57
|
+
"docs/RUNTIME-COMPAT-MATRIX.md"
|
|
58
|
+
],
|
|
59
|
+
"keywords": [
|
|
60
|
+
"claude-code",
|
|
61
|
+
"opencode",
|
|
62
|
+
"codex",
|
|
63
|
+
"gemini",
|
|
64
|
+
"agent",
|
|
65
|
+
"cli",
|
|
66
|
+
"multi-runtime",
|
|
67
|
+
"ultra-builder-pro",
|
|
68
|
+
"mcp",
|
|
69
|
+
"meta-prompting",
|
|
70
|
+
"context-engineering"
|
|
71
|
+
],
|
|
72
|
+
"author": "Ultra Builder Pro contributors",
|
|
73
|
+
"license": "MIT",
|
|
74
|
+
"homepage": "https://github.com/rocky2431/ultra-builder-pro-cli",
|
|
75
|
+
"bugs": {
|
|
76
|
+
"url": "https://github.com/rocky2431/ultra-builder-pro-cli/issues"
|
|
77
|
+
},
|
|
78
|
+
"repository": {
|
|
79
|
+
"type": "git",
|
|
80
|
+
"url": "git+https://github.com/rocky2431/ultra-builder-pro-cli.git"
|
|
81
|
+
},
|
|
82
|
+
"engines": {
|
|
83
|
+
"node": ">=22.0.0"
|
|
84
|
+
},
|
|
85
|
+
"scripts": {
|
|
86
|
+
"test": "npm run test:all",
|
|
87
|
+
"test:state": "node --test 'mcp-server/**/*.test.cjs'",
|
|
88
|
+
"test:orch": "node --test 'orchestrator/**/*.test.cjs'",
|
|
89
|
+
"test:spec": "node spec/scripts/test-all.cjs",
|
|
90
|
+
"test:rest": "node --test adapters/_shared/tests/*.test.cjs adapters/tests/*.test.cjs ultra-tools/*.test.cjs tests/conformance/**/*.test.cjs tests/install.test.cjs tests/package-smoke.test.cjs",
|
|
91
|
+
"test:all": "npm run test:state && npm run test:orch && npm run test:spec && npm run test:rest",
|
|
92
|
+
"test:hooks": "pytest hooks/tests -q",
|
|
93
|
+
"verify:release": "npm run test:all && npm run test:hooks && npm audit --omit=dev --audit-level=high",
|
|
94
|
+
"prepublishOnly": "npm run verify:release",
|
|
95
|
+
"install:claude": "node bin/install.js --claude --local",
|
|
96
|
+
"install:all": "node bin/install.js --all --local"
|
|
97
|
+
},
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"@anthropic-ai/sdk": "^0.111.0",
|
|
100
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
101
|
+
"@vercel/ncc": "0.38.4",
|
|
102
|
+
"ajv": "^8.17.1",
|
|
103
|
+
"ajv-formats": "^3.0.1",
|
|
104
|
+
"better-sqlite3": "^11.5.0",
|
|
105
|
+
"chokidar": "^3.6.0",
|
|
106
|
+
"js-yaml": "^4.1.0",
|
|
107
|
+
"openai": "^6.34.0"
|
|
108
|
+
}
|
|
109
|
+
}
|
package/settings.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-collab
|
|
3
|
+
description: "Use Claude Code as an explicitly requested, read-only advisor for bounded architecture, diagnosis, or review questions. The current host remains primary and verifies all claims."
|
|
4
|
+
argument-hint: "review|understand|opinion|compare|free [target]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Claude Code Collaboration
|
|
9
|
+
|
|
10
|
+
Use Claude Code only when the user explicitly requests a Claude/CC perspective. The current host
|
|
11
|
+
owns scope, evidence, decisions, edits, and final verification. Claude Code is an untrusted,
|
|
12
|
+
read-only advisor.
|
|
13
|
+
|
|
14
|
+
## Preconditions
|
|
15
|
+
|
|
16
|
+
1. Confirm `claude --version` and authentication.
|
|
17
|
+
2. Bound the workspace, files or diff, question, and expected response shape.
|
|
18
|
+
3. Write the primary host's independent analysis first when independence matters.
|
|
19
|
+
4. Do not pass credentials, unrelated files, or an unbounded home directory.
|
|
20
|
+
|
|
21
|
+
## Invocation
|
|
22
|
+
|
|
23
|
+
Run Claude Code without mutation or session persistence:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
claude --safe-mode -p "<bounded prompt>" \
|
|
27
|
+
--permission-mode plan \
|
|
28
|
+
--tools "Read,Grep,Glob,Bash" \
|
|
29
|
+
--output-format text \
|
|
30
|
+
--no-session-persistence
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Store large output under `.ultra/collab/<session-id>/claude-output.md`. A missing CLI, failed auth,
|
|
34
|
+
timeout, or empty response degrades to host-only analysis; it never blocks the task.
|
|
35
|
+
|
|
36
|
+
## Synthesis
|
|
37
|
+
|
|
38
|
+
- Verify consequential claims against the current checkout, runtime, tests, or primary docs.
|
|
39
|
+
- Separate agreement, useful dissent, and unsupported assertions.
|
|
40
|
+
- Explain scope or version mismatches before comparing conclusions.
|
|
41
|
+
- Return one host-owned conclusion, not a transcript or a model vote.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review-expert
|
|
3
|
+
description: "Structured code review checklists: SOLID, security, performance, boundary conditions, removal planning. Injected into code-reviewer agent."
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Review Expert Checklists
|
|
8
|
+
|
|
9
|
+
Provides structured review workflow and reference checklists for the code-reviewer agent.
|
|
10
|
+
|
|
11
|
+
## Severity Levels
|
|
12
|
+
|
|
13
|
+
| Level | Name | Description | Action |
|
|
14
|
+
|-------|------|-------------|--------|
|
|
15
|
+
| **P0** | Critical | Security vulnerability, data loss risk, correctness bug | Must block merge |
|
|
16
|
+
| **P1** | High | Logic error, significant SOLID violation, performance regression | Should fix before merge |
|
|
17
|
+
| **P2** | Medium | Code smell, maintainability concern, minor SOLID violation | Fix in this PR or create follow-up |
|
|
18
|
+
| **P3** | Low | Style, naming, minor suggestion | Optional improvement |
|
|
19
|
+
|
|
20
|
+
## Review Workflow
|
|
21
|
+
|
|
22
|
+
### Step 1: Preflight Context
|
|
23
|
+
|
|
24
|
+
- Run `git status -sb`, `git diff --stat`, and `git diff` to scope changes
|
|
25
|
+
- Use `git diff --cached` to include staged changes
|
|
26
|
+
- If needed, use Grep to find related modules, usages, and contracts
|
|
27
|
+
|
|
28
|
+
**Edge cases:**
|
|
29
|
+
- **No changes**: Inform user, ask if they want to review staged changes or a specific commit range
|
|
30
|
+
- **Large diff (>500 lines)**: Summarize by file first, then review in batches by module/feature area
|
|
31
|
+
- **Mixed concerns**: Group findings by logical feature, not just file order
|
|
32
|
+
|
|
33
|
+
### Step 2: SOLID + Architecture Smells
|
|
34
|
+
|
|
35
|
+
Load `references/solid-checklist.md` for detailed prompts.
|
|
36
|
+
|
|
37
|
+
Look for SRP/OCP/LSP/ISP/DIP violations and common code smells. When proposing refactor, explain *why* it improves cohesion/coupling. Non-trivial refactors get incremental plans, not large rewrites.
|
|
38
|
+
|
|
39
|
+
### Step 3: Removal Candidates
|
|
40
|
+
|
|
41
|
+
Load `references/removal-plan.md` for template.
|
|
42
|
+
|
|
43
|
+
Identify unused, redundant, or feature-flagged-off code. Distinguish **safe delete now** vs **defer with plan**. Provide follow-up steps with concrete checkpoints.
|
|
44
|
+
|
|
45
|
+
### Step 4: Security and Reliability
|
|
46
|
+
|
|
47
|
+
Load `references/security-checklist.md` for coverage.
|
|
48
|
+
|
|
49
|
+
Check injection, auth gaps, secrets, race conditions, crypto, supply chain. Call out both **exploitability** and **impact**.
|
|
50
|
+
|
|
51
|
+
### Step 5: Code Quality
|
|
52
|
+
|
|
53
|
+
Load `references/code-quality-checklist.md` for coverage.
|
|
54
|
+
|
|
55
|
+
Check error handling, performance/caching, boundary conditions. Flag issues that may cause silent failures or production incidents.
|
|
56
|
+
|
|
57
|
+
### Step 5.5: Integration & Connectivity
|
|
58
|
+
|
|
59
|
+
Load `references/integration-checklist.md` for detailed prompts.
|
|
60
|
+
|
|
61
|
+
Check entry point tracing, contract validation, vertical slice assessment, integration test coverage, and data flow continuity. Flag orphan code, missing contracts, and horizontal-only changes.
|
|
62
|
+
|
|
63
|
+
### Step 6: Output Format
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
## Code Review Summary
|
|
67
|
+
|
|
68
|
+
**Files reviewed**: X files, Y lines changed
|
|
69
|
+
**Overall assessment**: [APPROVE / REQUEST_CHANGES / COMMENT]
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Findings
|
|
74
|
+
|
|
75
|
+
### P0 - Critical
|
|
76
|
+
(none or list)
|
|
77
|
+
|
|
78
|
+
### P1 - High
|
|
79
|
+
- **[file:line]** Brief title
|
|
80
|
+
- Description of issue
|
|
81
|
+
- Suggested fix
|
|
82
|
+
|
|
83
|
+
### P2 - Medium
|
|
84
|
+
...
|
|
85
|
+
|
|
86
|
+
### P3 - Low
|
|
87
|
+
...
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Removal/Iteration Plan
|
|
92
|
+
(if applicable)
|
|
93
|
+
|
|
94
|
+
## Additional Suggestions
|
|
95
|
+
(optional improvements, not blocking)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Step 7: Next Steps Confirmation
|
|
99
|
+
|
|
100
|
+
After presenting findings, ask how to proceed:
|
|
101
|
+
|
|
102
|
+
1. **Fix all** - Implement all suggested fixes
|
|
103
|
+
2. **Fix P0/P1 only** - Address critical and high priority issues
|
|
104
|
+
3. **Fix specific items** - User specifies which issues to fix
|
|
105
|
+
4. **No changes** - Review complete, no implementation needed
|
|
106
|
+
|
|
107
|
+
**Important**: Do NOT implement any changes until user explicitly confirms.
|
|
108
|
+
|
|
109
|
+
## Additional Resources
|
|
110
|
+
|
|
111
|
+
### Reference Files
|
|
112
|
+
|
|
113
|
+
For detailed patterns and checklists, consult:
|
|
114
|
+
- **`references/solid-checklist.md`** - SOLID violation detection and refactor heuristics
|
|
115
|
+
- **`references/security-checklist.md`** - Security, reliability, and race condition checks
|
|
116
|
+
- **`references/code-quality-checklist.md`** - Error handling, performance, boundary conditions
|
|
117
|
+
- **`references/removal-plan.md`** - Deletion candidates and iteration planning template
|
|
118
|
+
- **`references/integration-checklist.md`** - Entry point tracing, contract validation, data flow continuity
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Code Quality Checklist
|
|
2
|
+
|
|
3
|
+
## Error Handling
|
|
4
|
+
|
|
5
|
+
### Anti-patterns to Flag
|
|
6
|
+
|
|
7
|
+
- **Swallowed exceptions**: Empty catch blocks or catch with only logging
|
|
8
|
+
```javascript
|
|
9
|
+
try { ... } catch (e) { } // Silent failure
|
|
10
|
+
try { ... } catch (e) { console.log(e) } // Log and forget
|
|
11
|
+
```
|
|
12
|
+
- **Overly broad catch**: Catching `Exception`/`Error` base class instead of specific types
|
|
13
|
+
- **Error information leakage**: Stack traces or internal details exposed to users
|
|
14
|
+
- **Missing error handling**: No try-catch around fallible operations (I/O, network, parsing)
|
|
15
|
+
- **Async error handling**: Unhandled promise rejections, missing `.catch()`, no error boundary
|
|
16
|
+
|
|
17
|
+
### Questions to Ask
|
|
18
|
+
- "What happens when this operation fails?"
|
|
19
|
+
- "Will the caller know something went wrong?"
|
|
20
|
+
- "Is there enough context to debug this error?"
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Performance & Caching
|
|
25
|
+
|
|
26
|
+
### CPU-Intensive Operations
|
|
27
|
+
- Expensive operations in hot paths: Regex compilation, JSON parsing, crypto in loops
|
|
28
|
+
- Blocking main thread: Sync I/O, heavy computation without worker/async
|
|
29
|
+
- Unnecessary recomputation: Same calculation done multiple times
|
|
30
|
+
- Missing memoization: Pure functions called repeatedly with same inputs
|
|
31
|
+
|
|
32
|
+
### Database & I/O
|
|
33
|
+
- **N+1 queries**: Loop that makes a query per item instead of batch
|
|
34
|
+
```javascript
|
|
35
|
+
// Bad: N+1
|
|
36
|
+
for (const id of ids) {
|
|
37
|
+
const user = await db.query('SELECT * FROM users WHERE id = ?', id)
|
|
38
|
+
}
|
|
39
|
+
// Good: Batch
|
|
40
|
+
const users = await db.query('SELECT * FROM users WHERE id IN (?)', ids)
|
|
41
|
+
```
|
|
42
|
+
- Missing indexes: Queries on unindexed columns
|
|
43
|
+
- Over-fetching: SELECT * when only few columns needed
|
|
44
|
+
- No pagination: Loading entire dataset into memory
|
|
45
|
+
|
|
46
|
+
### Caching Issues
|
|
47
|
+
- Missing cache for expensive operations: Repeated API calls, DB queries, computations
|
|
48
|
+
- Cache without TTL: Stale data served indefinitely
|
|
49
|
+
- Cache without invalidation strategy: Data updated but cache not cleared
|
|
50
|
+
- Cache key collisions: Insufficient key uniqueness
|
|
51
|
+
- Caching user-specific data globally: Security/privacy issue
|
|
52
|
+
|
|
53
|
+
### Memory
|
|
54
|
+
- Unbounded collections: Arrays/maps that grow without limit
|
|
55
|
+
- Large object retention: Holding references preventing GC
|
|
56
|
+
- String concatenation in loops: Use StringBuilder/join instead
|
|
57
|
+
- Loading large files entirely: Use streaming instead
|
|
58
|
+
|
|
59
|
+
### Questions to Ask
|
|
60
|
+
- "What's the time complexity of this operation?"
|
|
61
|
+
- "How does this behave with 10x/100x data?"
|
|
62
|
+
- "Is this result cacheable? Should it be?"
|
|
63
|
+
- "Can this be batched instead of one-by-one?"
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Boundary Conditions
|
|
68
|
+
|
|
69
|
+
### Null/Undefined Handling
|
|
70
|
+
- Missing null checks: Accessing properties on potentially null objects
|
|
71
|
+
- Truthy/falsy confusion: `if (value)` when `0` or `""` are valid
|
|
72
|
+
- Optional chaining overuse: `a?.b?.c?.d` hiding structural issues
|
|
73
|
+
- Null vs undefined inconsistency: Mixed usage without clear convention
|
|
74
|
+
|
|
75
|
+
### Empty Collections
|
|
76
|
+
- Empty array not handled: Code assumes array has items
|
|
77
|
+
- Empty object edge case: `for...in` or `Object.keys` on empty object
|
|
78
|
+
- First/last element access: `arr[0]` or `arr[arr.length-1]` without length check
|
|
79
|
+
|
|
80
|
+
### Numeric Boundaries
|
|
81
|
+
- Division by zero: Missing check before division
|
|
82
|
+
- Integer overflow: Large numbers exceeding safe integer range
|
|
83
|
+
- Floating point comparison: Using `===` instead of epsilon comparison
|
|
84
|
+
- Negative values: Index or count that shouldn't be negative
|
|
85
|
+
- Off-by-one errors: Loop bounds, array slicing, pagination
|
|
86
|
+
|
|
87
|
+
### String Boundaries
|
|
88
|
+
- Empty string: Not handled as edge case
|
|
89
|
+
- Whitespace-only string: Passes truthy check but is effectively empty
|
|
90
|
+
- Very long strings: No length limits causing memory/display issues
|
|
91
|
+
- Unicode edge cases: Emoji, RTL text, combining characters
|
|
92
|
+
|
|
93
|
+
### Common Dangerous Patterns
|
|
94
|
+
```javascript
|
|
95
|
+
// No null check
|
|
96
|
+
const name = user.profile.name
|
|
97
|
+
|
|
98
|
+
// Array access without check
|
|
99
|
+
const first = items[0]
|
|
100
|
+
|
|
101
|
+
// Division without check
|
|
102
|
+
const avg = total / count
|
|
103
|
+
|
|
104
|
+
// Truthy check excludes valid values
|
|
105
|
+
if (value) { ... } // fails for 0, "", false
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Questions to Ask
|
|
109
|
+
- "What if this is null/undefined?"
|
|
110
|
+
- "What if this collection is empty?"
|
|
111
|
+
- "What's the valid range for this number?"
|
|
112
|
+
- "What happens at the boundaries (0, -1, MAX_INT)?"
|