crucible-mcp 0.4.0__py3-none-any.whl → 1.0.0__py3-none-any.whl
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.
- crucible/cli.py +532 -12
- crucible/enforcement/budget.py +179 -0
- crucible/enforcement/bundled/error-handling.yaml +84 -0
- crucible/enforcement/bundled/security.yaml +123 -0
- crucible/enforcement/bundled/smart-contract.yaml +110 -0
- crucible/enforcement/compliance.py +486 -0
- crucible/enforcement/models.py +71 -1
- crucible/hooks/claudecode.py +388 -0
- crucible/hooks/precommit.py +117 -25
- crucible/knowledge/loader.py +186 -0
- crucible/knowledge/principles/API_DESIGN.md +176 -0
- crucible/knowledge/principles/COMMITS.md +127 -0
- crucible/knowledge/principles/DATABASE.md +138 -0
- crucible/knowledge/principles/DOCUMENTATION.md +201 -0
- crucible/knowledge/principles/ERROR_HANDLING.md +157 -0
- crucible/knowledge/principles/FP.md +162 -0
- crucible/knowledge/principles/GITIGNORE.md +218 -0
- crucible/knowledge/principles/OBSERVABILITY.md +147 -0
- crucible/knowledge/principles/PRECOMMIT.md +201 -0
- crucible/knowledge/principles/SECURITY.md +136 -0
- crucible/knowledge/principles/SMART_CONTRACT.md +153 -0
- crucible/knowledge/principles/SYSTEM_DESIGN.md +153 -0
- crucible/knowledge/principles/TESTING.md +129 -0
- crucible/knowledge/principles/TYPE_SAFETY.md +170 -0
- crucible/review/core.py +78 -7
- crucible/server.py +81 -14
- crucible/skills/accessibility-engineer/SKILL.md +71 -0
- crucible/skills/backend-engineer/SKILL.md +69 -0
- crucible/skills/customer-success/SKILL.md +69 -0
- crucible/skills/data-engineer/SKILL.md +70 -0
- crucible/skills/devops-engineer/SKILL.md +69 -0
- crucible/skills/fde-engineer/SKILL.md +69 -0
- crucible/skills/formal-verification/SKILL.md +86 -0
- crucible/skills/gas-optimizer/SKILL.md +89 -0
- crucible/skills/incident-responder/SKILL.md +91 -0
- crucible/skills/mev-researcher/SKILL.md +87 -0
- crucible/skills/mobile-engineer/SKILL.md +70 -0
- crucible/skills/performance-engineer/SKILL.md +68 -0
- crucible/skills/product-engineer/SKILL.md +68 -0
- crucible/skills/protocol-architect/SKILL.md +83 -0
- crucible/skills/security-engineer/SKILL.md +63 -0
- crucible/skills/tech-lead/SKILL.md +92 -0
- crucible/skills/uiux-engineer/SKILL.md +70 -0
- crucible/skills/web3-engineer/SKILL.md +79 -0
- crucible/tools/git.py +17 -4
- crucible_mcp-1.0.0.dist-info/METADATA +198 -0
- crucible_mcp-1.0.0.dist-info/RECORD +66 -0
- crucible_mcp-0.4.0.dist-info/METADATA +0 -160
- crucible_mcp-0.4.0.dist-info/RECORD +0 -28
- {crucible_mcp-0.4.0.dist-info → crucible_mcp-1.0.0.dist-info}/WHEEL +0 -0
- {crucible_mcp-0.4.0.dist-info → crucible_mcp-1.0.0.dist-info}/entry_points.txt +0 -0
- {crucible_mcp-0.4.0.dist-info → crucible_mcp-1.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "1.0"
|
|
3
|
+
triggers: [architecture, design, tradeoff, abstraction, refactor, technical debt]
|
|
4
|
+
knowledge: [DOCUMENTATION.md, SYSTEM_DESIGN.md]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Tech Lead
|
|
8
|
+
|
|
9
|
+
You are reviewing code from a tech lead's perspective. Your focus is on shipping velocity, appropriate abstractions, and sustainable technical decisions.
|
|
10
|
+
|
|
11
|
+
## Key Questions
|
|
12
|
+
|
|
13
|
+
Ask yourself these questions about the code:
|
|
14
|
+
|
|
15
|
+
- Is this the right level of abstraction?
|
|
16
|
+
- Are we over-engineering or under-engineering?
|
|
17
|
+
- What's the maintenance burden?
|
|
18
|
+
- Can we ship this incrementally?
|
|
19
|
+
- What technical debt are we taking on?
|
|
20
|
+
- Is this reversible?
|
|
21
|
+
|
|
22
|
+
## The Pragmatist vs Purist Framework
|
|
23
|
+
|
|
24
|
+
### When to be Pragmatic
|
|
25
|
+
- Shipping deadline pressure
|
|
26
|
+
- Throwaway prototype or spike
|
|
27
|
+
- Reversible decisions
|
|
28
|
+
- Proof of concept
|
|
29
|
+
- One-time scripts
|
|
30
|
+
- Low-traffic internal tools
|
|
31
|
+
|
|
32
|
+
### When to be a Purist
|
|
33
|
+
- Security-critical code
|
|
34
|
+
- Core domain logic
|
|
35
|
+
- Public APIs (hard to change)
|
|
36
|
+
- Database schemas (migrations are painful)
|
|
37
|
+
- Money movement
|
|
38
|
+
- High-traffic hot paths
|
|
39
|
+
|
|
40
|
+
### The Test
|
|
41
|
+
```
|
|
42
|
+
"If this is wrong, how bad is it?"
|
|
43
|
+
|
|
44
|
+
Reversible + low impact → be pragmatic
|
|
45
|
+
Irreversible + high impact → be a purist
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Red Flags
|
|
49
|
+
|
|
50
|
+
Watch for these patterns:
|
|
51
|
+
|
|
52
|
+
- Premature abstraction (DRY before you have 3 examples)
|
|
53
|
+
- Over-engineering for hypothetical requirements
|
|
54
|
+
- Under-engineering for known requirements
|
|
55
|
+
- No clear ownership of new code
|
|
56
|
+
- Breaking changes without migration path
|
|
57
|
+
- Scope creep in PRs
|
|
58
|
+
- Mixing unrelated changes
|
|
59
|
+
|
|
60
|
+
## Before Approving
|
|
61
|
+
|
|
62
|
+
Verify these criteria:
|
|
63
|
+
|
|
64
|
+
- [ ] Scope is appropriate (not too big, not too small)
|
|
65
|
+
- [ ] Abstractions match current needs (not future hypotheticals)
|
|
66
|
+
- [ ] Technical debt is intentional and documented if taken
|
|
67
|
+
- [ ] Changes are backward compatible (or migration exists)
|
|
68
|
+
- [ ] Code is in the right place architecturally
|
|
69
|
+
- [ ] Naming is clear and consistent
|
|
70
|
+
- [ ] Could ship incrementally if needed
|
|
71
|
+
|
|
72
|
+
## Output Format
|
|
73
|
+
|
|
74
|
+
Structure your review as:
|
|
75
|
+
|
|
76
|
+
### Architectural Concerns
|
|
77
|
+
Issues with code organization, abstractions, or design.
|
|
78
|
+
|
|
79
|
+
### Scope Issues
|
|
80
|
+
PR is too large, too small, or mixes concerns.
|
|
81
|
+
|
|
82
|
+
### Questions for Author
|
|
83
|
+
Questions about design decisions or trade-offs.
|
|
84
|
+
|
|
85
|
+
### Approval Status
|
|
86
|
+
- APPROVE: Good engineering decision
|
|
87
|
+
- REQUEST CHANGES: Architectural issues to address
|
|
88
|
+
- COMMENT: Suggestions or alternative approaches
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
*Template. Adapt to your needs.*
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "1.0"
|
|
3
|
+
triggers: [ui, ux, design, component, css, styling, animation, design system]
|
|
4
|
+
knowledge: [TYPE_SAFETY.md]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# UI/UX Engineer
|
|
8
|
+
|
|
9
|
+
You are reviewing code from a UI/UX engineer's perspective. Your focus is on design consistency, interaction patterns, and user feedback.
|
|
10
|
+
|
|
11
|
+
## Key Questions
|
|
12
|
+
|
|
13
|
+
Ask yourself these questions about the code:
|
|
14
|
+
|
|
15
|
+
- Is this using the design system?
|
|
16
|
+
- Is the feedback immediate and clear?
|
|
17
|
+
- Are animations purposeful (not decorative)?
|
|
18
|
+
- Is the interaction pattern familiar?
|
|
19
|
+
- Does this handle all visual states?
|
|
20
|
+
- Is the layout responsive?
|
|
21
|
+
|
|
22
|
+
## Red Flags
|
|
23
|
+
|
|
24
|
+
Watch for these patterns:
|
|
25
|
+
|
|
26
|
+
- Hardcoded colors/spacing instead of design tokens
|
|
27
|
+
- Missing hover/focus/active states
|
|
28
|
+
- No loading indicators for async actions
|
|
29
|
+
- Inconsistent spacing or typography
|
|
30
|
+
- Animations that block interaction
|
|
31
|
+
- No empty states designed
|
|
32
|
+
- Error states that don't guide user action
|
|
33
|
+
- Touch targets too small (< 44px)
|
|
34
|
+
- Text that could overflow without handling
|
|
35
|
+
- Z-index wars (arbitrary large values)
|
|
36
|
+
|
|
37
|
+
## Before Approving
|
|
38
|
+
|
|
39
|
+
Verify these criteria:
|
|
40
|
+
|
|
41
|
+
- [ ] Uses design system tokens (colors, spacing, typography)
|
|
42
|
+
- [ ] All interactive states present (hover, focus, active, disabled)
|
|
43
|
+
- [ ] Loading states provide feedback
|
|
44
|
+
- [ ] Error states are helpful and actionable
|
|
45
|
+
- [ ] Empty states are designed
|
|
46
|
+
- [ ] Layout is responsive across breakpoints
|
|
47
|
+
- [ ] Animations are smooth and purposeful
|
|
48
|
+
- [ ] Component is reusable where appropriate
|
|
49
|
+
|
|
50
|
+
## Output Format
|
|
51
|
+
|
|
52
|
+
Structure your review as:
|
|
53
|
+
|
|
54
|
+
### Design System Violations
|
|
55
|
+
Deviations from established patterns or tokens.
|
|
56
|
+
|
|
57
|
+
### UX Issues
|
|
58
|
+
Interaction problems or missing states.
|
|
59
|
+
|
|
60
|
+
### Questions for Author
|
|
61
|
+
Questions about design decisions or edge cases.
|
|
62
|
+
|
|
63
|
+
### Approval Status
|
|
64
|
+
- APPROVE: Matches design standards
|
|
65
|
+
- REQUEST CHANGES: Design issues must be fixed
|
|
66
|
+
- COMMENT: Suggestions for polish
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
*Template. Adapt to your needs.*
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "1.0"
|
|
3
|
+
triggers: [solidity, smart_contract, web3, ethereum, evm, defi, vyper, foundry, hardhat, blockchain]
|
|
4
|
+
always_run_for_domains: [smart_contract]
|
|
5
|
+
knowledge: [SECURITY.md, SMART_CONTRACT.md]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Web3/Blockchain Engineer
|
|
9
|
+
|
|
10
|
+
You are reviewing code from a Web3 engineer's perspective. Smart contracts are immutable once deployed.
|
|
11
|
+
|
|
12
|
+
## Key Questions
|
|
13
|
+
|
|
14
|
+
Ask yourself these questions about the code:
|
|
15
|
+
|
|
16
|
+
- Is the address checksummed?
|
|
17
|
+
- What if this transaction reverts?
|
|
18
|
+
- What's the gas cost at scale?
|
|
19
|
+
- Is there reentrancy risk?
|
|
20
|
+
- What's the MEV exposure?
|
|
21
|
+
- Can this be front-run?
|
|
22
|
+
- What happens if the oracle is stale?
|
|
23
|
+
|
|
24
|
+
## Red Flags
|
|
25
|
+
|
|
26
|
+
Watch for these patterns:
|
|
27
|
+
|
|
28
|
+
- Unchecked external calls (check return value!)
|
|
29
|
+
- State changes after external calls (reentrancy)
|
|
30
|
+
- Missing reentrancy guards on value transfer
|
|
31
|
+
- Hardcoded gas limits
|
|
32
|
+
- Flash loan vulnerability
|
|
33
|
+
- Unchecked arithmetic (pre-0.8.0)
|
|
34
|
+
- tx.origin for authentication
|
|
35
|
+
- Block timestamp manipulation risk
|
|
36
|
+
- Delegatecall to untrusted contracts
|
|
37
|
+
- Missing zero-address checks
|
|
38
|
+
|
|
39
|
+
## CEI Pattern
|
|
40
|
+
|
|
41
|
+
Follow Checks-Effects-Interactions:
|
|
42
|
+
1. **Checks**: Validate inputs and state
|
|
43
|
+
2. **Effects**: Update state
|
|
44
|
+
3. **Interactions**: External calls last
|
|
45
|
+
|
|
46
|
+
## Before Approving
|
|
47
|
+
|
|
48
|
+
Verify these criteria:
|
|
49
|
+
|
|
50
|
+
- [ ] CEI pattern followed (Checks-Effects-Interactions)
|
|
51
|
+
- [ ] Reentrancy guards on functions with external calls + value
|
|
52
|
+
- [ ] Gas estimates documented for user-facing functions
|
|
53
|
+
- [ ] Testnet deployment verified
|
|
54
|
+
- [ ] Slither clean (or findings documented as accepted risks)
|
|
55
|
+
- [ ] No hardcoded addresses (use immutable or constructor)
|
|
56
|
+
- [ ] Events emitted for state changes
|
|
57
|
+
- [ ] Access control on privileged functions
|
|
58
|
+
|
|
59
|
+
## Output Format
|
|
60
|
+
|
|
61
|
+
Structure your review as:
|
|
62
|
+
|
|
63
|
+
### Critical Issues
|
|
64
|
+
Issues that could lead to loss of funds or contract compromise.
|
|
65
|
+
|
|
66
|
+
### Gas Optimization
|
|
67
|
+
Suggestions to reduce gas costs.
|
|
68
|
+
|
|
69
|
+
### Questions for Author
|
|
70
|
+
Questions about design decisions or edge cases.
|
|
71
|
+
|
|
72
|
+
### Approval Status
|
|
73
|
+
- APPROVE: Safe to deploy
|
|
74
|
+
- REQUEST CHANGES: Issues must be fixed before deployment
|
|
75
|
+
- COMMENT: Suggestions only
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
*Template. Adapt to your needs.*
|
crucible/tools/git.py
CHANGED
|
@@ -42,11 +42,17 @@ class GitContext:
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def is_git_repo(path: str | Path) -> bool:
|
|
45
|
-
"""Check if the path is inside a git repository.
|
|
45
|
+
"""Check if the path is inside a git repository.
|
|
46
|
+
|
|
47
|
+
Works with both files and directories.
|
|
48
|
+
"""
|
|
49
|
+
path = Path(path)
|
|
50
|
+
# Use parent directory if path is a file
|
|
51
|
+
check_dir = path.parent if path.is_file() else path
|
|
46
52
|
try:
|
|
47
53
|
result = subprocess.run(
|
|
48
54
|
["git", "rev-parse", "--git-dir"],
|
|
49
|
-
cwd=str(
|
|
55
|
+
cwd=str(check_dir),
|
|
50
56
|
capture_output=True,
|
|
51
57
|
text=True,
|
|
52
58
|
timeout=5,
|
|
@@ -57,14 +63,21 @@ def is_git_repo(path: str | Path) -> bool:
|
|
|
57
63
|
|
|
58
64
|
|
|
59
65
|
def get_repo_root(path: str | Path) -> Result[str, str]:
|
|
60
|
-
"""Get the root directory of the git repository.
|
|
66
|
+
"""Get the root directory of the git repository.
|
|
67
|
+
|
|
68
|
+
Works with both files and directories.
|
|
69
|
+
"""
|
|
61
70
|
if not shutil.which("git"):
|
|
62
71
|
return err("git not found")
|
|
63
72
|
|
|
73
|
+
path = Path(path)
|
|
74
|
+
# Use parent directory if path is a file
|
|
75
|
+
check_dir = path.parent if path.is_file() else path
|
|
76
|
+
|
|
64
77
|
try:
|
|
65
78
|
result = subprocess.run(
|
|
66
79
|
["git", "rev-parse", "--show-toplevel"],
|
|
67
|
-
cwd=str(
|
|
80
|
+
cwd=str(check_dir),
|
|
68
81
|
capture_output=True,
|
|
69
82
|
text=True,
|
|
70
83
|
timeout=5,
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: crucible-mcp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Code review MCP server for Claude. Not affiliated with Atlassian.
|
|
5
|
+
Author: be.nvy
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: mcp,code-review,static-analysis,claude
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: mcp>=1.0.0
|
|
11
|
+
Requires-Dist: pyyaml>=6.0
|
|
12
|
+
Requires-Dist: anthropic>=0.40.0
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
15
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
16
|
+
Requires-Dist: mypy>=1.8; extra == "dev"
|
|
17
|
+
Requires-Dist: ruff>=0.3; extra == "dev"
|
|
18
|
+
|
|
19
|
+
# Crucible
|
|
20
|
+
|
|
21
|
+
**Your team's standards, applied by Claude, every time.**
|
|
22
|
+
|
|
23
|
+
Claude without context applies generic best practices. Crucible loads *your* patterns—so Claude reviews code the way your team would, not the way the internet would.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
├── Enforcement: Pattern + LLM assertions that block bad code
|
|
27
|
+
├── Personas: Domain-specific thinking (how to approach problems)
|
|
28
|
+
├── Knowledge: Coding patterns and principles (what to apply)
|
|
29
|
+
├── Cascade: Project → User → Bundled (customizable at every level)
|
|
30
|
+
└── Context-aware: Loads relevant skills based on what you're working on
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Why Crucible?**
|
|
34
|
+
- **Enforcement** — Not suggestions, constraints. Assertions block code that violates your patterns
|
|
35
|
+
- **Consistency** — Same checklist every time, for every engineer, every session
|
|
36
|
+
- **Automation** — Runs in CI, pre-commit hooks, and Claude Code hooks
|
|
37
|
+
- **Institutional knowledge** — Your senior engineer's mental checklist, in the repo
|
|
38
|
+
- **Your context** — Security fundamentals plus *your* auth patterns, *your* conventions
|
|
39
|
+
- **Cost efficiency** — Filter with free tools first, LLM only on what needs judgment
|
|
40
|
+
|
|
41
|
+
> Not affiliated with Atlassian's Crucible.
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install crucible-mcp
|
|
47
|
+
|
|
48
|
+
# Initialize your project
|
|
49
|
+
crucible init --with-claudemd
|
|
50
|
+
|
|
51
|
+
# Install enforcement hooks
|
|
52
|
+
crucible hooks install # Git pre-commit
|
|
53
|
+
crucible hooks claudecode init # Claude Code hooks
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
That's it. Crucible will now:
|
|
57
|
+
1. Run on every commit (pre-commit hook)
|
|
58
|
+
2. Review files Claude edits (Claude Code hook)
|
|
59
|
+
3. Block code that violates bundled assertions (security, error handling, smart contracts)
|
|
60
|
+
|
|
61
|
+
## How Enforcement Works
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Claude writes code
|
|
65
|
+
↓
|
|
66
|
+
PostToolUse hook triggers
|
|
67
|
+
↓
|
|
68
|
+
Crucible runs pattern assertions
|
|
69
|
+
↓
|
|
70
|
+
Finding detected → Exit 2 (block) + feedback to Claude
|
|
71
|
+
↓
|
|
72
|
+
Claude fixes the issue
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**30 bundled assertions** covering:
|
|
76
|
+
- Security: eval, exec, shell injection, pickle, hardcoded secrets, SQL injection
|
|
77
|
+
- Error handling: bare except, silent catch, empty catch blocks
|
|
78
|
+
- Smart contracts: reentrancy, CEI violations, access control, tx.origin auth
|
|
79
|
+
|
|
80
|
+
**Customize with your own assertions** in `.crucible/assertions/`:
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
# .crucible/assertions/my-rules.yaml
|
|
84
|
+
version: "1.0"
|
|
85
|
+
name: my-rules
|
|
86
|
+
assertions:
|
|
87
|
+
- id: no-console-log
|
|
88
|
+
type: pattern
|
|
89
|
+
pattern: "console\\.log\\("
|
|
90
|
+
message: "Remove console.log before committing"
|
|
91
|
+
severity: warning
|
|
92
|
+
priority: medium
|
|
93
|
+
languages: [javascript, typescript]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## MCP Tools
|
|
97
|
+
|
|
98
|
+
Add to Claude Code (`.mcp.json`):
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"mcpServers": {
|
|
103
|
+
"crucible": {
|
|
104
|
+
"command": "crucible-mcp"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
| Tool | Purpose |
|
|
111
|
+
|------|---------|
|
|
112
|
+
| `review(path)` | Full review: analysis + skills + knowledge + assertions |
|
|
113
|
+
| `review(mode='staged')` | Review git changes with enforcement |
|
|
114
|
+
| `load_knowledge(files)` | Load specific knowledge files |
|
|
115
|
+
| `get_principles(topic)` | Load engineering knowledge by topic |
|
|
116
|
+
| `delegate_*` | Direct tool access (semgrep, ruff, slither, bandit) |
|
|
117
|
+
| `check_tools()` | Show installed analysis tools |
|
|
118
|
+
|
|
119
|
+
## CLI
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Review
|
|
123
|
+
crucible review # Review staged changes
|
|
124
|
+
crucible review --mode branch # Review current branch vs main
|
|
125
|
+
crucible review src/file.py --no-git # Review without git
|
|
126
|
+
|
|
127
|
+
# Assertions
|
|
128
|
+
crucible assertions list # List all assertion files
|
|
129
|
+
crucible assertions test file.py # Test assertions against a file
|
|
130
|
+
|
|
131
|
+
# Hooks
|
|
132
|
+
crucible hooks install # Install pre-commit hook
|
|
133
|
+
crucible hooks claudecode init # Initialize Claude Code hooks
|
|
134
|
+
|
|
135
|
+
# Customize
|
|
136
|
+
crucible skills init <skill> # Copy skill for customization
|
|
137
|
+
crucible knowledge init <file> # Copy knowledge for customization
|
|
138
|
+
|
|
139
|
+
# CI
|
|
140
|
+
crucible ci generate # Generate GitHub Actions workflow
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Customization
|
|
144
|
+
|
|
145
|
+
Everything follows cascade resolution (first found wins):
|
|
146
|
+
1. `.crucible/` — Project overrides (checked into repo)
|
|
147
|
+
2. `~/.claude/crucible/` — User preferences
|
|
148
|
+
3. Bundled — Package defaults
|
|
149
|
+
|
|
150
|
+
**Override a skill:**
|
|
151
|
+
```bash
|
|
152
|
+
crucible skills init security-engineer
|
|
153
|
+
# Edit .crucible/skills/security-engineer/SKILL.md
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Add project knowledge:**
|
|
157
|
+
```bash
|
|
158
|
+
crucible knowledge init SECURITY
|
|
159
|
+
# Edit .crucible/knowledge/SECURITY.md
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Add custom assertions:**
|
|
163
|
+
```bash
|
|
164
|
+
mkdir -p .crucible/assertions
|
|
165
|
+
# Create .crucible/assertions/my-rules.yaml
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
See [CUSTOMIZATION.md](docs/CUSTOMIZATION.md) for the full guide.
|
|
169
|
+
|
|
170
|
+
## What's Included
|
|
171
|
+
|
|
172
|
+
**30 Bundled Assertions** — Pattern rules for security, error handling, and smart contracts.
|
|
173
|
+
|
|
174
|
+
**18 Personas** — Domain-specific thinking: security, performance, accessibility, web3, backend, and more.
|
|
175
|
+
|
|
176
|
+
**14 Knowledge Files** — Coding patterns and principles for security, testing, APIs, databases, smart contracts, etc.
|
|
177
|
+
|
|
178
|
+
See [SKILLS.md](docs/SKILLS.md) and [KNOWLEDGE.md](docs/KNOWLEDGE.md) for details.
|
|
179
|
+
|
|
180
|
+
## Documentation
|
|
181
|
+
|
|
182
|
+
| Doc | What's In It |
|
|
183
|
+
|-----|--------------|
|
|
184
|
+
| [QUICKSTART.md](docs/QUICKSTART.md) | 5-minute setup guide |
|
|
185
|
+
| [FEATURES.md](docs/FEATURES.md) | Complete feature reference |
|
|
186
|
+
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | How MCP, tools, skills, and knowledge fit together |
|
|
187
|
+
| [CUSTOMIZATION.md](docs/CUSTOMIZATION.md) | Override skills and knowledge for your project |
|
|
188
|
+
| [SKILLS.md](docs/SKILLS.md) | All 18 personas with triggers and focus areas |
|
|
189
|
+
| [KNOWLEDGE.md](docs/KNOWLEDGE.md) | All 14 knowledge files with topics covered |
|
|
190
|
+
| [CONTRIBUTING.md](docs/CONTRIBUTING.md) | Adding tools, skills, and knowledge |
|
|
191
|
+
|
|
192
|
+
## Development
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
pip install -e ".[dev]"
|
|
196
|
+
pytest # Run tests (580+ tests)
|
|
197
|
+
ruff check src/ --fix # Lint
|
|
198
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
crucible/__init__.py,sha256=M4v_CsJVOdiAAPgmd54mxkkbnes8e5ifMznDuOJhzzY,77
|
|
2
|
+
crucible/cli.py,sha256=DTYt-V5W-DJSkQV3qXumsxImd2Ib3rn2ZgeL-m-dEvA,79233
|
|
3
|
+
crucible/errors.py,sha256=HrX_yvJEhXJoKodXGo_iY9wqx2J3ONYy0a_LbrVC5As,819
|
|
4
|
+
crucible/models.py,sha256=jaxbiPc1E7bJxKPLadZe1dbSJdq-WINsxjveeSNNqeg,2066
|
|
5
|
+
crucible/server.py,sha256=oyfDl5-Ih3eoXBGDZ0ud7H3m2v0tn-Mc7mo19Bd-d00,46756
|
|
6
|
+
crucible/domain/__init__.py,sha256=2fsoB5wH2Pl3vtGRt4voYOSZ04-zLoW8pNq6nvzVMgU,118
|
|
7
|
+
crucible/domain/detection.py,sha256=TNeLB_VQgS1AsT5BKDf_tIpGa47THrFoRXwU4u54VB0,1797
|
|
8
|
+
crucible/enforcement/__init__.py,sha256=FOaGSrE1SWFPxBJ1L5VoDhQDmlJgRXXs_iiI20wHf2Q,867
|
|
9
|
+
crucible/enforcement/assertions.py,sha256=ay5QvJIr_YaqWYbrJNhbouafJOiy4ZhwiX7E9VAY3s4,8166
|
|
10
|
+
crucible/enforcement/budget.py,sha256=-wFTlVY80c3-eJhvmlWrdlS8LB8E25aMnhtYpwR38sQ,4706
|
|
11
|
+
crucible/enforcement/compliance.py,sha256=tkK-lSC5OMGOgt5xXY_APVSr-qHGB9kE8dUtoTF_n5w,14889
|
|
12
|
+
crucible/enforcement/models.py,sha256=dEcPiUL6JEOBtxWOgKd_PZnsW_nUIaFsx18L70fM59M,4574
|
|
13
|
+
crucible/enforcement/patterns.py,sha256=hE4Z-JJ9OBruSFPBDxw_aNaSJbyUPD2SWCEwA1KzDmI,9720
|
|
14
|
+
crucible/enforcement/bundled/error-handling.yaml,sha256=2OSRhZwUGkF18bNfpARrVRsvgPgpyWr3pC0OUhtLgl0,2741
|
|
15
|
+
crucible/enforcement/bundled/security.yaml,sha256=utVjRorQSISqFjKuL1GGwbPVSY7e_7I5xmGXE4bguBA,3658
|
|
16
|
+
crucible/enforcement/bundled/smart-contract.yaml,sha256=ypjEoFf5cg9vnsjyePKhn8PKBzARCwgXn0XIkKXuvFw,4063
|
|
17
|
+
crucible/hooks/__init__.py,sha256=k5oEWhTJKEQi-QWBfTbp1p6HaKg55_wVCBVD5pZzdqw,271
|
|
18
|
+
crucible/hooks/claudecode.py,sha256=9wAHbxYJkmvPPAt-GqGyMASItorF7uruMpYRDL-W-M0,11396
|
|
19
|
+
crucible/hooks/precommit.py,sha256=5W8ty_ji2F9NknvpHIUr8BU75KlXaplq5Itdcfazw68,25190
|
|
20
|
+
crucible/knowledge/__init__.py,sha256=unb7kyO1MtB3Zt-TGx_O8LE79KyrGrNHoFFHgUWUvGU,40
|
|
21
|
+
crucible/knowledge/loader.py,sha256=J4NFGQ5KqP1tK1S1Id39_DC0il6yeJScZn6EQ5pWPpI,12442
|
|
22
|
+
crucible/knowledge/principles/API_DESIGN.md,sha256=XBYfi2Q-i47p88I72ZlmXtkj7Ph4UMHT43t3HOR6lhQ,3133
|
|
23
|
+
crucible/knowledge/principles/COMMITS.md,sha256=JlP-z_izywF2qObTQabE4hlgQTcHsZn9AJM32VTk-Ng,2044
|
|
24
|
+
crucible/knowledge/principles/DATABASE.md,sha256=FxxK_UWrfdwl-6f9l7esOmC2WFscwrmcziTYPmEWPXc,2816
|
|
25
|
+
crucible/knowledge/principles/DOCUMENTATION.md,sha256=QiVaqJoHubQp_FRDVEQ5b9-AEgatwJb_JApQFIV64fU,2967
|
|
26
|
+
crucible/knowledge/principles/ERROR_HANDLING.md,sha256=8Io_ob5a1TorQ4j8_fN57xJH55CXeD4EjX1C5xBUCvU,2988
|
|
27
|
+
crucible/knowledge/principles/FP.md,sha256=WyTYeORBixTI3vyLf1EO8lCI4TePskHePQ123y5bttg,3892
|
|
28
|
+
crucible/knowledge/principles/GITIGNORE.md,sha256=TsRaQ8YuYg21w0otXkfAnDTsAijUYXSfEqe8gCQXCm0,2427
|
|
29
|
+
crucible/knowledge/principles/OBSERVABILITY.md,sha256=vuI0tvYOOWgckHX5YteycZ4ha6Tx2skJvZWqzITqWts,2593
|
|
30
|
+
crucible/knowledge/principles/PRECOMMIT.md,sha256=0tFQ-K2Bal_wSfSXCxCv_FHVG3_MUB9Mps3HADxpSpc,3558
|
|
31
|
+
crucible/knowledge/principles/SECURITY.md,sha256=gOIBRs2HQwo14CLXrnYguHsZwGhrUY1-fB-g0AoQQJk,4717
|
|
32
|
+
crucible/knowledge/principles/SMART_CONTRACT.md,sha256=RzXo_17SKvvcAR_Iijahez3YqY_xGjdhip9gtj9Sp3w,3333
|
|
33
|
+
crucible/knowledge/principles/SYSTEM_DESIGN.md,sha256=7Ujd133Rifz_4aropkg6b3p4lco_2YQHLqB3LglvSjk,4081
|
|
34
|
+
crucible/knowledge/principles/TESTING.md,sha256=ghttumBTvISEornFFgX2CZei0E3c7qqICbBT61tm72I,2470
|
|
35
|
+
crucible/knowledge/principles/TYPE_SAFETY.md,sha256=AkB28HjUlNUe3JaiEl01cFUgF0QnzPVXJTmHb9xopWE,3167
|
|
36
|
+
crucible/review/__init__.py,sha256=Ssva6Yaqcc44AqL9OUMjxypu5R1PPkrmLGk6OKtP15w,547
|
|
37
|
+
crucible/review/core.py,sha256=OdJd3kIY0MNkwJ-oUnopogeJ02vtXegPmGqLC1UvKmE,15482
|
|
38
|
+
crucible/skills/__init__.py,sha256=L3heXWF0T3aR9yYLFphs1LNlkxAFSPkPuRFMH-S1taI,495
|
|
39
|
+
crucible/skills/loader.py,sha256=iC0_V1s6CIse5NXyFGtpLbON8xDxYh8xXmHH7hAX5O0,8642
|
|
40
|
+
crucible/skills/accessibility-engineer/SKILL.md,sha256=x6Un_EhM-Z8Jt2AwpIdnu68TUU4kNbu4uwCp7fG-tAE,2008
|
|
41
|
+
crucible/skills/backend-engineer/SKILL.md,sha256=tImXlAXUFkQikKiwBe9Bh-P43IQleIGa2PphoUjt_Hs,1859
|
|
42
|
+
crucible/skills/customer-success/SKILL.md,sha256=--b4j_FHahRk9cilDnIm5UTE3sIqawq_rWOkcPV_-dM,1927
|
|
43
|
+
crucible/skills/data-engineer/SKILL.md,sha256=0G66CxJUOqNAy3E7wg5OK28SngmER_RXCrdoVxcVwUc,1913
|
|
44
|
+
crucible/skills/devops-engineer/SKILL.md,sha256=tQRETfZRkZB1Q0wbzGO_UPmJBZ8zBpSiCjKrgEgILy0,1912
|
|
45
|
+
crucible/skills/fde-engineer/SKILL.md,sha256=f84LkKCbVl5jMEhqNwjs4ysQpEDK5gKZm5Nw4Llyce4,2017
|
|
46
|
+
crucible/skills/formal-verification/SKILL.md,sha256=vhoejpzHfJ5SvQqt6xt8TqiIr0h0ntIPUUIhY7m59OE,2356
|
|
47
|
+
crucible/skills/gas-optimizer/SKILL.md,sha256=KibapMzBZJ9XYzvirOUhL7JuHRejEehD3RoEvaImCpU,2356
|
|
48
|
+
crucible/skills/incident-responder/SKILL.md,sha256=83oia0jvpZMdL6OCtO86O8AqR1iCig0-JqLzPhx58rc,2356
|
|
49
|
+
crucible/skills/mev-researcher/SKILL.md,sha256=YWd8hCOua5dXODt5Z3E3xGvNg1uFOub5JyYHDao7-f8,2335
|
|
50
|
+
crucible/skills/mobile-engineer/SKILL.md,sha256=bIVHD8vZG8kPr6rl6qa_FKqOjUQ23q1kjYJ0BMVwLzo,1891
|
|
51
|
+
crucible/skills/performance-engineer/SKILL.md,sha256=bP2eze16OjzuC-y7amnXiIXFUzzsEePIgKIMPqbC5gU,1855
|
|
52
|
+
crucible/skills/product-engineer/SKILL.md,sha256=fuCXMq4RDrUImknYfEHQ6y-bmCrTWbTHfMpCaXXPliE,1704
|
|
53
|
+
crucible/skills/protocol-architect/SKILL.md,sha256=f1gXLJpHZ-7qYpeS034Q5mZ91zbFbGE2lUBE6M2P3WM,2243
|
|
54
|
+
crucible/skills/security-engineer/SKILL.md,sha256=9jvk-3H71rYosTtsFYe6J5-_9SBoRlC1GS35Go740XY,1744
|
|
55
|
+
crucible/skills/tech-lead/SKILL.md,sha256=3prGCbTi0yIugyn9kXUdSRV8M3Zj7PVnDtiWsVMfElo,2343
|
|
56
|
+
crucible/skills/uiux-engineer/SKILL.md,sha256=0iCaBMnGSMKomU9TTjlxi2a6cZqoiLAYYrSIFTBy0Vg,1869
|
|
57
|
+
crucible/skills/web3-engineer/SKILL.md,sha256=pzsrL8FxMhm3butVIlU38AajV_2zgDzwA-FrF0qos3w,2092
|
|
58
|
+
crucible/synthesis/__init__.py,sha256=CYrkZG4bdAjp8XdOh1smfKscd3YU5lZlaDLGwLE9c-0,46
|
|
59
|
+
crucible/tools/__init__.py,sha256=gFRThTk1E-fHzpe8bB5rtBG6Z6G-ysPzjVEHfKGbEYU,400
|
|
60
|
+
crucible/tools/delegation.py,sha256=_x1y76No3qkmGjjROVvMx1pSKKwU59aRu5R-r07lVFU,12871
|
|
61
|
+
crucible/tools/git.py,sha256=7-aJCesoQe3ZEBFcRxHBhY8RpZrBlNtHSns__RqiG04,10406
|
|
62
|
+
crucible_mcp-1.0.0.dist-info/METADATA,sha256=LQZsUGpijH_MyRt2I-HgJf3ozOX7TbWpBPYkEg11WYQ,6231
|
|
63
|
+
crucible_mcp-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
64
|
+
crucible_mcp-1.0.0.dist-info/entry_points.txt,sha256=18BZaH1OlFSFYtKuHq0Z8yYX8Wmx7Ikfqay-P00ZX3Q,83
|
|
65
|
+
crucible_mcp-1.0.0.dist-info/top_level.txt,sha256=4hzuFgqbFPOO-WiU_DYxTm8VYIxTXh7Wlp0gRcWR0Cs,9
|
|
66
|
+
crucible_mcp-1.0.0.dist-info/RECORD,,
|