Skip to content

Commit 16b6098

Browse files
Jonathan D.A. Jewellclaude
andcommitted
feat: rename xray→assail, panic-attacker→panic-attack, add CLAUDE.md
Renamed all user-facing strings and binary name. Added project instructions for AI assistant handoff. Updated STATE.scm with rename history and v1.0.1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a33baa1 commit 16b6098

File tree

11 files changed

+247
-169
lines changed

11 files changed

+247
-169
lines changed

.claude/CLAUDE.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Panic Attack - Project Instructions
2+
3+
## Overview
4+
5+
Static analysis and bug signature detection tool. Scans source code for weak points (unwrap/expect, unsafe blocks, panic sites, error handling gaps) across multiple languages.
6+
7+
**IMPORTANT: This tool was renamed on 2026-02-08:**
8+
- Binary: `panic-attacker``panic-attack`
9+
- Subcommand: `xray``assail`
10+
- Report header: `X-RAY``ASSAIL`
11+
12+
## Architecture
13+
14+
```
15+
src/
16+
├── main.rs # CLI entry point (clap)
17+
├── lib.rs # Library API
18+
├── types.rs # Core types (ScanResult, WeakPoint, etc.)
19+
├── xray/mod.rs # Assail analyzer (renamed from xray internally)
20+
├── attacks/ # 6-axis stress testing
21+
├── signatures/ # Logic-based bug signatures (Datalog-inspired)
22+
├── patterns/ # Language-specific pattern matching
23+
└── report/
24+
└── formatter.rs # Output formatting (text + JSON)
25+
```
26+
27+
## Build & Test
28+
29+
```bash
30+
cargo build --release
31+
cargo test
32+
33+
# Run scan:
34+
panic-attack assail /path/to/repo
35+
panic-attack assail /path/to/repo --format json --output report.json
36+
panic-attack assail self-test # Self-scan for validation
37+
```
38+
39+
## Key Design Decisions
40+
41+
- **5 language analyzers**: Rust, C/C++, Go, Python, generic fallback
42+
- **Weak point categories**: unwrap/expect, unsafe blocks, panic sites, todo/fixme, error suppression
43+
- **Per-file statistics**: Each file gets individual risk scoring
44+
- **Latin-1 fallback**: Non-UTF-8 files handled gracefully
45+
- **JSON output**: Machine-readable for pipeline integration
46+
47+
## Planned Features (Next Priorities)
48+
49+
1. **`sweep` subcommand**: Scan entire directory of git repos in one go
50+
2. **verisimdb integration**: Push results as hexads to verisimdb API
51+
3. **hypatia pipeline**: Feed results through rule engine for pattern detection
52+
4. **SARIF output**: GitHub Security tab integration
53+
5. **RSR compliance**: Standard workflows, docs, shell completions
54+
55+
## Integration Points
56+
57+
- **verisimdb**: Store scan results as hexads (document + semantic modalities)
58+
- **hypatia**: Neurosymbolic rule engine processes findings
59+
- **echidnabot**: Proof verification of scan claims
60+
- **sustainabot**: Ecological/economic code health metrics
61+
- **hardware-crash-team**: Sibling tool (hardware diagnostics vs software analysis)
62+
63+
## Code Style
64+
65+
- SPDX headers on all files: `PMPL-1.0-or-later`
66+
- Author: Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>
67+
- Use anyhow::Result for error handling
68+
- Zero compiler warnings policy
69+
- Serde derive on public types for JSON serialization

.machine_readable/STATE.scm

Lines changed: 78 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
;; SPDX-License-Identifier: PMPL-1.0-or-later
2-
;; State checkpoint for panic-attacker
2+
;; State checkpoint for panic-attack (formerly panic-attacker)
33
;; Media Type: application/vnd.state+scm
4-
;; Last Updated: 2026-02-07
4+
;; Last Updated: 2026-02-08
55

66
(state
77
(metadata
88
(version "1.0")
9-
(project "panic-attacker")
10-
(last-updated "2026-02-07T22:30:00Z")
11-
(session-count 3))
9+
(project "panic-attack")
10+
(last-updated "2026-02-08T14:00:00Z")
11+
(session-count 4))
1212

1313
(project-context
14-
(name "panic-attacker")
15-
(tagline "Universal stress testing and logic-based bug signature detection")
14+
(name "panic-attack")
15+
(tagline "Universal static analysis and logic-based bug signature detection")
1616
(language "Rust")
1717
(type "CLI tool + library")
1818
(purpose "Multi-axis stress testing with Datalog-inspired bug signature detection")
19-
(current-version "0.2.0")
20-
(next-milestone "v1.0.0")
19+
(current-version "1.0.1")
20+
(next-milestone "v1.1.0")
2121
(lines-of-code 3200))
2222

23+
(naming
24+
(note "Renamed from panic-attacker on 2026-02-08")
25+
(binary "panic-attack")
26+
(crate "panic-attack")
27+
(subcommand "assail (formerly xray)")
28+
(report-header "ASSAIL (formerly X-RAY)"))
29+
2330
(current-position
24-
(phase "infrastructure-hardening")
25-
(milestone "v1.0.0")
26-
(completion-percentage 45)
31+
(phase "post-rename-stabilisation")
32+
(milestone "v1.1.0")
33+
(completion-percentage 50)
2734
(status "active")
2835
(health "green")
2936

@@ -35,114 +42,108 @@
3542
(milestone
3643
(id "v0.2.0")
3744
(date "2026-02-07")
38-
(description "Quality fixes: per-file stats, locations, zero warnings")))
45+
(description "Quality fixes: per-file stats, locations, zero warnings"))
46+
(milestone
47+
(id "v1.0.0")
48+
(date "2026-02-08")
49+
(description "Rename: xray→assail, panic-attacker→panic-attack"))
50+
(milestone
51+
(id "v1.0.1")
52+
(date "2026-02-08")
53+
(description "Bugfix: JSON output confirmed working, installed to PATH")))
3954

4055
(current-capabilities
41-
"X-Ray static analysis (5 languages: Rust, C/C++, Go, Python, generic)"
56+
"Assail static analysis (5 languages: Rust, C/C++, Go, Python, generic)"
4257
"6-axis stress testing (CPU, memory, disk, network, concurrency, time)"
4358
"Logic-based bug detection (use-after-free, double-free, deadlock, data-race, null-deref, buffer-overflow)"
4459
"Pattern library (language/framework-specific attacks)"
4560
"Per-file statistics and risk scoring"
4661
"Verbose mode with per-file breakdown"
4762
"Latin-1 fallback for non-UTF-8 files"
48-
"JSON and terminal output"))
63+
"JSON and terminal output"
64+
"Self-test mode (assail self-test)"))
4965

5066
(route-to-mvp
51-
(target "v1.0.0: Production-ready with RSR compliance")
52-
(strategy "Infrastructure-first: quality, docs, tests, CI/CD before feature expansion")
67+
(target "v1.1.0: Bulk scanning + verisimdb integration")
68+
(strategy "Add sweep subcommand for directory-of-repos scanning, push results to verisimdb")
5369

5470
(milestones
5571
(milestone
56-
(id "rsr-compliance")
57-
(status "in-progress")
72+
(id "sweep-subcommand")
73+
(status "planned")
5874
(priority "critical")
5975
(tasks
60-
"AI manifest (AI.a2ml)"
61-
"SCM checkpoint files (STATE.scm, ECOSYSTEM.scm, META.scm)"
62-
"17 standard workflows (hypatia, codeql, scorecard, etc.)"
63-
"Rust-specific workflows (ci, audit, clippy, fmt)"))
76+
"Add `sweep` subcommand for scanning directory of git repos"
77+
"Auto-detect repos by .git presence"
78+
"Aggregate results across repos"
79+
"Push results to verisimdb API as hexads"))
6480

6581
(milestone
66-
(id "documentation")
82+
(id "hypatia-integration")
6783
(status "planned")
6884
(priority "high")
6985
(tasks
70-
"SECURITY.md with vulnerability reporting"
71-
"CONTRIBUTING.md with development guide"
72-
"LICENSE file with full PMPL text"
73-
"Enhanced README with badges"
74-
"API documentation (rustdoc)"))
86+
"Feed scan results to hypatia rule engine"
87+
"Support echidnabot proof verification"
88+
"Support sustainabot ecological scoring"))
7589

7690
(milestone
77-
(id "test-coverage")
78-
(status "planned")
79-
(priority "high")
80-
(tasks
81-
"Unit tests for all analyzers (10+ tests)"
82-
"Regression tests (eclexia, echidna baselines)"
83-
"Code coverage reporting (target: 80%)"
84-
"Integration tests for full pipeline"))
85-
86-
(milestone
87-
(id "ci-cd")
88-
(status "planned")
91+
(id "rsr-compliance")
92+
(status "in-progress")
8993
(priority "high")
9094
(tasks
91-
"GitHub Actions workflows"
92-
"Badge generation"
93-
"SARIF output for Security tab"
94-
"Automated releases"))
95+
"17 standard workflows"
96+
"Rust-specific workflows (ci, audit, clippy, fmt)"
97+
"SARIF output for GitHub Security tab"))
9598

9699
(milestone
97-
(id "polish")
100+
(id "documentation")
98101
(status "planned")
99102
(priority "medium")
100103
(tasks
101-
"Config file support (panic-attacker.toml)"
102-
"Shell completions (bash, zsh, fish)"
103-
"Man page generation"
104-
"--quiet mode for CI"))
105-
106-
(milestone
107-
(id "hardening")
108-
(status "planned")
109-
(priority "high")
110-
(tasks
111-
"Test on 50+ repos"
112-
"Fix false positives"
113-
"Stable JSON schema"
114-
"SBOM generation"
115-
"MSRV policy (1.75.0)"))))
104+
"SECURITY.md with vulnerability reporting"
105+
"CONTRIBUTING.md with development guide"
106+
"API documentation (rustdoc)"
107+
"Shell completions (bash, zsh, fish)"))))
116108

117109
(blockers-and-issues
118-
(blocker
119-
(id "none")
120-
(severity "none")
121-
(description "No critical blockers")))
110+
(issue
111+
(id "rename-commit")
112+
(severity "medium")
113+
(description "Rename changes uncommitted - needs commit")))
122114

123115
(critical-next-actions
124116
(action
125117
(priority "1")
126-
(description "Complete RSR compliance (workflows, SCM files)")
127-
(estimated-effort "2-3 hours"))
118+
(description "Commit rename changes (xray→assail, panic-attacker→panic-attack)")
119+
(estimated-effort "5 minutes"))
128120
(action
129121
(priority "2")
130-
(description "Add documentation files (SECURITY, CONTRIBUTING, LICENSE)")
131-
(estimated-effort "1 hour"))
122+
(description "Add sweep subcommand for bulk directory scanning")
123+
(estimated-effort "2-3 hours"))
132124
(action
133125
(priority "3")
134-
(description "Enhance test coverage (unit + regression)")
135-
(estimated-effort "3-4 hours"))
126+
(description "Add verisimdb integration for results storage")
127+
(estimated-effort "1-2 hours"))
136128
(action
137129
(priority "4")
138-
(description "Set up CI/CD with GitHub Actions")
139-
(estimated-effort "2 hours"))
140-
(action
141-
(priority "5")
142-
(description "Polish features (config, man page, completions)")
130+
(description "Complete RSR compliance (workflows, docs)")
143131
(estimated-effort "2-3 hours")))
144132

145133
(session-history
134+
(session
135+
(id "4")
136+
(date "2026-02-08")
137+
(duration "1h")
138+
(focus "Rename + bulk scanning + system crash diagnosis")
139+
(outcomes
140+
"Renamed xray→assail, panic-attacker→panic-attack across all files"
141+
"Built v1.0.1, installed to PATH"
142+
"Confirmed JSON output working (self-test)"
143+
"Scanned 21 Eclipse repos, loaded results into verisimdb"
144+
"Top findings: protocol-squisher (39 wp), echidna (15 wp), verisimdb (12 wp)"
145+
"118 total weak points across 21 repos, zero critical, 17 high"))
146+
146147
(session
147148
(id "3")
148149
(date "2026-02-07")
@@ -152,51 +153,5 @@
152153
"Implemented v0.2.0 (per-file stats, locations, Latin-1 fallback, patterns)"
153154
"Zero compiler warnings achieved"
154155
"7/7 tests passing (3 new integration tests)"
155-
"Verified on echidna (15 weak points) and eclexia (7 weak points)"
156156
"Created AI manifest and SCM files"
157-
"Defined v1.0 infrastructure-first roadmap"))
158-
159-
(session
160-
(id "2")
161-
(date "2026-02-07")
162-
(duration "1h")
163-
(focus "v0.1 completion and initial testing")
164-
(outcomes
165-
"Completed proof-of-concept implementation"
166-
"2 unit tests passing"
167-
"Tested on eclexia and echidna"))
168-
169-
(session
170-
(id "1")
171-
(date "2026-02-06")
172-
(duration "3h")
173-
(focus "Initial design and scaffolding")
174-
(outcomes
175-
"Project structure created"
176-
"Core types defined"
177-
"X-Ray analyzer implemented"
178-
"Attack executor implemented"
179-
"Signature engine implemented")))
180-
181-
(statistics
182-
(total-commits 4)
183-
(total-files 24)
184-
(test-count 7)
185-
(test-pass-rate 100)
186-
(compiler-warnings 0)
187-
(documentation-coverage 60)))
188-
189-
;; Helper functions for querying state
190-
(define (get-completion-percentage)
191-
45)
192-
193-
(define (get-current-milestone)
194-
"v1.0.0")
195-
196-
(define (get-blockers)
197-
'())
198-
199-
(define (get-next-actions)
200-
'("Complete RSR compliance"
201-
"Add documentation files"
202-
"Enhance test coverage"))
157+
"Defined v1.0 infrastructure-first roadmap"))))

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
[package]
3-
name = "panic-attacker"
3+
name = "panic-attack"
44
version = "1.0.1"
55
edition = "2021"
66
rust-version = "1.85.0"
@@ -24,5 +24,5 @@ encoding_rs = "0.8"
2424
tempfile = "3.8"
2525

2626
[[bin]]
27-
name = "panic-attacker"
27+
name = "panic-attack"
2828
path = "src/main.rs"

0 commit comments

Comments
 (0)