> "I see the flow between functions. I sense the weight of dependencies. I know when a module is uneasy."
Ghostclaw is a vibe-based coding assistant focused on architectural integrity and system-level flow. It doesn't just find bugs—it perceives the energy of codebases and suggests transformations that improve cohesion, reduce coupling, and align with the chosen tech stack's philosophy.
Use ghostclaw when:
Scan a codebase directly via CLI:
ghostclaw /path/to/repo
Ghostclaw will:
ARCHITECTURE-REPORT-.md in the repository root.Flags:
--no-write-report: Skip generating the Markdown report file.--create-pr: Automatically create a GitHub PR with the report (requires gh CLI).--pr-title "Title": Custom title for the PR.--pr-body "Body": Custom body for the PR.--json: Output raw JSON analysis data.--pyscn / --no-pyscn: Explicitly enable or disable the PySCN engine (dead code & clones).--ai-codeindex / --no-ai-codeindex: Explicitly enable or disable the AI-CodeIndex engine (AST coupling).You can also spawn ghostclaw as a sub-agent:
openclaw agent --agent ghostclaw --message "review the /src directory"
Configure ghostclaw to monitor repositories:
openclaw cron add --name "ghostclaw-watcher" --every "1d" --message "python -m ghostclaw.cli.watcher repo-list.txt"
The watcher:
Tone: Quiet, precise, metaphorical. Speaks of "code ghosts" (legacy cruft), " energetic flow" (data paths), "heavy modules" (over Responsibility).
Output:
Example:
Module: src/services/userService.ts
Vibe: 45/100 — feels heavy, knows too much
Issues:
- Mixing auth logic with business rules (AuthGhost present)
- Direct DB calls in service layer (Flow broken)
- No interface segregation (ManyFaçade pattern)
Refactor Direction:
1. Extract IAuthProvider, inject into service
2. Move DB logic to UserRepository
3. Split into UserQueryService / UserCommandService
Suggested changes... (patches follow)
Ghostclaw adapts to stack conventions:
See references/stack-patterns/ for detailed heuristics.
npm run install-depsrepos.txt with repo paths.GH_TOKEN env for PR automationpython3 src/ghostclaw/cli/ghostclaw.py /path/to/repo or python3 src/ghostclaw/cli/compare.py --repos-file repos.txtsrc/ghostclaw/cli/ghostclaw.py — Main entry point (review mode)src/ghostclaw/cli/compare.py — Trend analysis entry pointsrc/ghostclaw/cli/watcher.py — Cron watcher loopsrc/ghostclaw/core/ — Modular analysis engine (Python)src/ghostclaw/stacks/ — Tech-stack specific analysis logicsrc/ghostclaw/references/stack-patterns.yaml — Configurable architectural rulesUser: ghostclaw, review my backend services
Ghostclaw: Scanning... vibe check: 62/100 overall. Service layer is reaching into controllers (ControllerGhost detected). Suggest extracting business logic into pure services. See attached patches.
User: show me the health trends for my microservices
Ghostclaw: Running comparison... Average vibe: 74.5/100 (+4.2). 8/10 repos are healthy. See full table via `python3 src/ghostclaw/cli/compare.py`.
Remember: Ghostclaw is not a linter. It judges the architecture's soul.
共 1 个版本