Skip to content

feat: manifest-aware modules, export granularity, and robustness fixes#48

Merged
corvid-agent merged 1 commit intomainfrom
feat/v2.2-improvements
Mar 25, 2026
Merged

feat: manifest-aware modules, export granularity, and robustness fixes#48
corvid-agent merged 1 commit intomainfrom
feat/v2.2-improvements

Conversation

@corvid-agent
Copy link
Collaborator

Summary

Addresses agent testing feedback from v2.2.0 deployment. Major improvements to module detection, export control, and cross-language support.

New features

  • Manifest-aware module detection — parses Package.swift, Cargo.toml, build.gradle.kts, package.json, pubspec.yaml, go.mod, and pyproject.toml to auto-discover targets, source paths, and dependencies instead of just scanning directories
  • Export granularity control — new exportLevel config option ("type" vs "member") so you can document at the type level (class/struct/enum) rather than listing every stored property and init
  • Configurable module definitions — new modules section in specsync.json to define module groupings directly with custom file lists
  • Language-specific spec templatesgenerate and --fix now produce Swift, Rust, Kotlin/Java, Go, and Python templates with appropriate section headers and table columns

Fixes

  • Test file detection — expanded Swift patterns (Spec, Mock, Stub, Fake), added Kotlin/Java/C# patterns, and detect well-known test directories (Tests/, __tests__/, spec/, mocks/, etc.)
  • Check command no longer hangs on empty specs — returns clean JSON/exit when --fix is used with no spec files
  • Exit code 101 panic → friendly error — wraps main in catch_unwind, converts panics to actionable error messages with bug report link
  • AI context boundaries — generation prompt now instructs the provider to only document symbols from the module's own files, not imported dependencies

Config additions

{
  "exportLevel": "type",
  "modules": {
    "auth": { "files": ["src/auth/service.swift", "src/auth/models.swift"] },
    "networking": { "files": ["src/net/"] }
  }
}

Test plan

  • All 136 tests pass (62 unit + 74 integration)
  • Clippy clean, cargo fmt clean
  • New manifest parser tests (Cargo.toml, Package.swift, package.json workspaces, go.mod)
  • Agent re-test with Swift project using exportLevel: "type" and manifest detection

🤖 Generated with Claude Code

… and robustness fixes

- Add manifest parsing for Package.swift, Cargo.toml, build.gradle.kts,
  package.json, pubspec.yaml, go.mod, and pyproject.toml to auto-discover
  targets, source paths, and dependencies
- Add `exportLevel` config option ("type" vs "member") to control export
  extraction granularity — "type" only extracts top-level declarations
- Add `modules` config section in specsync.json for explicit module
  groupings with custom file lists and dependency declarations
- Expand test file detection: add Swift patterns (Spec, Mock, Stub, Fake),
  Kotlin/Java/C# mock/spec patterns, and detect test directories by name
  (Tests/, __tests__/, spec/, mocks/, etc.)
- Fix check command hanging on empty specs — now returns clean JSON/exit
  when --fix is used with no spec files
- Catch panics (exit code 101) and convert to friendly error messages
  with bug report link
- Add language-specific spec templates for Swift, Rust, Kotlin/Java, Go,
  and Python with appropriate section headers and table columns
- Update --fix to generate language-aware table rows (e.g., Kind column
  for Swift/Kotlin/Java types)
- Add context boundary guidance to AI spec generation prompt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@corvid-agent corvid-agent force-pushed the feat/v2.2-improvements branch from 637e68a to 4b404cb Compare March 25, 2026 15:38
@corvid-agent corvid-agent merged commit 4db3ed8 into main Mar 25, 2026
7 checks passed
@corvid-agent corvid-agent deleted the feat/v2.2-improvements branch March 25, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant