anvil-engineering-workbench 1.0.2 → 1.0.4

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +18 -9
  3. package/dist/cli.js +276 -183
  4. package/dist/cli.js.map +1 -1
  5. package/dist/core/agent-config-release.js +1 -1
  6. package/dist/core/agent-config-versioning.js +1 -1
  7. package/dist/core/agent-evaluation-intelligence.js +1 -1
  8. package/dist/core/agent-evolution.js +1 -1
  9. package/dist/core/agent-experiment-studio.js +2 -2
  10. package/dist/core/agent-optimization.js +1 -1
  11. package/dist/core/agent-security-audit.js +1 -1
  12. package/dist/core/architecture-map.js +181 -20
  13. package/dist/core/architecture-map.js.map +1 -1
  14. package/dist/core/benchmark-engine.js +1 -1
  15. package/dist/core/benchmark-matrix.js +1 -1
  16. package/dist/core/benchmark-regression.js +1 -1
  17. package/dist/core/change-intelligence.js +1 -1
  18. package/dist/core/code-intelligence.js +1 -1
  19. package/dist/core/code-review.js +1 -1
  20. package/dist/core/dashboard-server.js +48 -44
  21. package/dist/core/dashboard-server.js.map +1 -1
  22. package/dist/core/dependency-impact.js +1 -1
  23. package/dist/core/dependency-intelligence.js +1 -1
  24. package/dist/core/doctor.d.ts +6 -0
  25. package/dist/core/doctor.js +175 -19
  26. package/dist/core/doctor.js.map +1 -1
  27. package/dist/core/engineering-risk.js +1 -1
  28. package/dist/core/git-intelligence.js +1 -1
  29. package/dist/core/intelligence-timeline.js +1 -1
  30. package/dist/core/patch-validation.js +1 -1
  31. package/dist/core/project-cleaner.d.ts +78 -0
  32. package/dist/core/project-cleaner.js +847 -0
  33. package/dist/core/project-cleaner.js.map +1 -0
  34. package/dist/core/project-health.js +1 -1
  35. package/dist/core/project-inspector.js +2 -2
  36. package/dist/core/quality-audit.js +2 -2
  37. package/dist/core/regression-intelligence.js +1 -1
  38. package/dist/core/remediation-planner.js +4 -4
  39. package/dist/core/review-history.js +1 -1
  40. package/dist/core/sandbox-cleanup-audit.js +2 -2
  41. package/dist/core/sandbox-compliance.js +1 -1
  42. package/dist/core/sandbox-lifecycle.js +3 -3
  43. package/dist/core/sandbox-policy.js +1 -1
  44. package/dist/core/sandbox-runtime.js +1 -1
  45. package/dist/core/skill-registry.js +1 -1
  46. package/dist/core/verification.js +1 -1
  47. package/dist/index.d.ts +2 -1
  48. package/dist/index.js +2 -1
  49. package/dist/index.js.map +1 -1
  50. package/dist/mcp/server.js +38 -1
  51. package/dist/mcp/server.js.map +1 -1
  52. package/package.json +10 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # ANVIL Changelog
2
2
 
3
+ ## 1.0.4 — Zero-Fear Rollback, Self-Healing Verification Loop & Framework Entrypoint Engine
4
+
5
+ ANVIL 1.0.4 introduces production-grade safety nets and developer velocity superpowers: instant single-command rollback (`anvil undo`), an automated self-healing test verification gate (`--verify`), Git pre-commit hook automation (`anvil hook install`), and framework-aware entrypoint resolution for modern full-stack frameworks.
6
+
7
+ ### Features & Capabilities
8
+ - **Instant Rollback Engine (`anvil undo`):** Every destructive action (`anvil clean --apply` or `anvil fix`) automatically creates a byte-accurate snapshot in `.anvil/backups/<backup-id>/` before touching disk. Running `anvil undo` instantly restores deleted files, re-creates pruned directories, and reverts modified source code with 100% byte fidelity.
9
+ - **Self-Healing Test Verification Gate (`--verify`):** When `--verify` is passed to `anvil clean` or `anvil fix`, ANVIL automatically detects the project's test suite (`npm test`, `cargo test`, `pytest`, `go test ./...`) and runs it after applying repairs. If tests fail, ANVIL **automatically rolls back all changes** before the developer even notices, guaranteeing zero regression.
10
+ - **Framework-Aware Entry Point Manifests:** Solves false-positive orphan file detection across modern full-stack frameworks including Next.js, Remix, Nuxt, SvelteKit, FastAPI, Django, Celery, and Go/Rust CLI binaries. Convention-based routes (`page.tsx`, `layout.tsx`, `route.ts`, `urls.py`, `conftest.py`, `build.rs`, `cmd/**/main.go`) are automatically recognized as entrypoints.
11
+ - **Automated Git Pre-commit Hook (`anvil hook install`):** Generates and installs a lightweight `.git/hooks/pre-commit` hook that intercepts commits and prevents OS junk, partial downloads, and syntax errors from entering Git staging.
12
+
13
+ ## 1.0.3 — Multi-Language Architecture Mapping, Farzi Cleaner & Self-Healing Wizard
14
+
15
+ ANVIL 1.0.3 introduces comprehensive multi-language architecture mapping (Python, Go, Rust, Java, C/C++), an automated junk/farzi-file scrubber (`anvil clean`), automated code repair (`anvil fix`), and a one-command environment doctor auto-fix wizard (`anvil doctor --fix`).
16
+
17
+ ### Features & Capabilities
18
+ - **Multi-Language Architecture Mapping (`anvil map`):** Expanded from JS/TS to Python (with relative package imports), Go, Rust (`mod` resolution), Java/Kotlin, and C/C++ (`#include`). Internal import resolution accurately maps hundreds of module relationships across mixed-language repositories with 0 false-positive circular loops.
19
+ - **Automated Cleaner Engine (`anvil clean`):** Scans and safely prunes OS clutter (`.DS_Store`, `Thumbs.db`), incomplete downloads (`.crdownload`, `.part`, `.tmp`), error logs, editor swap/backup files, multi-language build caches (Python `__pycache__`/`*.pyc`, Java `*.class`, Rust/C++ `*.o`/`*.obj`/`*.pdb`), and empty directory residue. Supports safe dry-run preview by default, with `--apply` to execute.
20
+ - **Code Auto-Repair (`anvil fix` & `anvil clean --fix`):** Safely detects and prunes unused named imports in TypeScript/JavaScript and Python (`from x import a, b`), preserves TypeScript type specifiers, normalizes trailing whitespace, collapses excessive blank lines, and guarantees trailing newlines without breaking compilations.
21
+ - **Self-Healing Doctor Wizard (`anvil doctor --fix`):** Scaffolds missing `.anvil/` configuration directories (`agents/`, `skills/`, `workflows/`), creates multi-language safe `.gitignore`, generates `.env.example` templates, and initializes Git if absent.
22
+ - **Dashboard Stability & Null-Safety:** Resolved deferred element listener binding in `src/core/dashboard-server.ts` with universal safe listener wrappers (`on()`), ensuring real-time dashboard telemetry populates instantly without script halts.
23
+ - **CLI Brand & Help Unification:** Aligned all commands, help strings, and examples under the official `anvil` command.
24
+
3
25
  ## 1.0.2 — Maintainer & Contact Verification
4
26
 
5
27
  ANVIL 1.0.2 updates official maintainer contact information, aligning all security, support, and package metadata with Aditya Tiwari (`m.g.atiwari28@gmail.com`).
package/README.md CHANGED
@@ -111,7 +111,7 @@ git --version
111
111
  Install the released CLI directly from the GitHub repository:
112
112
 
113
113
  ```bash
114
- npm install --global git+https://github.com/anvil-workbench/ANVIL.git#v1.0.0
114
+ npm install --global git+https://github.com/anvil-workbench/ANVIL.git#v1.0.3
115
115
  ```
116
116
 
117
117
  Verify the installation:
@@ -128,8 +128,11 @@ Open a terminal in the repository you want to work on:
128
128
  ```bash
129
129
  cd /path/to/your-project
130
130
 
131
- # Create the local ANVIL workspace
132
- anvil init .
131
+ # Initialize or auto-scaffold workspace configuration
132
+ anvil doctor --fix
133
+
134
+ # Clean temporary farzi files, caches, and auto-fix code issues
135
+ anvil clean . --apply --fix
133
136
 
134
137
  # Inspect the project
135
138
  anvil inspect .
@@ -149,13 +152,14 @@ npm --version
149
152
  git --version
150
153
 
151
154
  # Install ANVIL
152
- npm install --global git+https://github.com/anvil-workbench/ANVIL.git#v1.0.0
155
+ npm install --global git+https://github.com/anvil-workbench/ANVIL.git#v1.0.4
153
156
 
154
157
  # Move into your project
155
158
  cd C:\Users\YourName\Projects\my-project
156
159
 
157
- # Initialize, inspect and launch
158
- anvil init .
160
+ # Initialize, clean, inspect and launch
161
+ anvil doctor --fix
162
+ anvil clean . --apply --fix
159
163
  anvil inspect .
160
164
  anvil dashboard .
161
165
  ```
@@ -325,6 +329,10 @@ Run `anvil --help` for the complete command list and `anvil <command> --help` fo
325
329
  | Command | Purpose |
326
330
  |---|---|
327
331
  | `anvil init [path]` | Create a local `.ANVIL` starter workspace |
332
+ | `anvil clean [path]` | Scan & scrub farzi files, logs, temp downloads; add `--apply` to delete, `--fix` to repair code, `--verify` to run test gate |
333
+ | `anvil fix [path]` | Auto-repair code: prune unused imports, normalize whitespace and blank lines; add `--verify` |
334
+ | `anvil undo [path]` | Instant single-command rollback of last clean/fix operation using saved snapshot backup |
335
+ | `anvil hook install` | Install automated ANVIL quality gate into `.git/hooks/pre-commit` |
328
336
  | `anvil inspect [path]` | Inspect project languages, tooling, dependencies and scripts |
329
337
  | `anvil map [path]` | Map source modules and import relationships |
330
338
  | `anvil dashboard [path]` | Start the local dashboard |
@@ -393,6 +401,7 @@ Run `anvil --help` for the complete command list and `anvil <command> --help` fo
393
401
 
394
402
  | Command | Purpose |
395
403
  |---|---|
404
+ | `anvil doctor [path]` | Environment health checks; add `--fix` to auto-scaffold missing config, .gitignore & .env |
396
405
  | `anvil sandbox-status` | Inspect Docker availability and advertised security options |
397
406
  | `anvil sandbox-compliance` | Generate a sandbox compliance report |
398
407
  | `anvil sandbox-policy-check` | Validate a fail-closed sandbox policy |
@@ -523,9 +532,9 @@ jobs:
523
532
  runs-on: ubuntu-latest
524
533
  steps:
525
534
  - uses: actions/checkout@v4
526
- - uses: anvil-workbench/ANVIL@v1.0.0
535
+ - uses: anvil-workbench/ANVIL@v1.0.3
527
536
  with:
528
- version: v1.0.0
537
+ version: v1.0.3
529
538
  project-path: .
530
539
  operation: inspect
531
540
  ```
@@ -729,7 +738,7 @@ Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.
729
738
 
730
739
  ## Project history
731
740
 
732
- ANVIL's v1.0.0 release brings the local CLI, dashboard, engineering intelligence, agent workflows, MCP integration, GitHub Action and GitHub App installation foundation into one versioned product.
741
+ ANVIL's v1.0.3 release brings full multi-language architecture mapping, automated farzi-file scrubbing, code auto-repair, one-command doctor self-healing, the local CLI, dashboard, engineering intelligence, agent workflows, MCP integration, GitHub Action and GitHub App installation foundation into one versioned product.
733
742
 
734
743
  The project is maintained as an original ANVIL codebase. ECC is a capability and documentation reference; ANVIL maintains its own identity, implementation, data models and roadmap.
735
744