Switch skit-aist plan to ArgumentParser analyze subcommand on skit#167
Conversation
Drop ConfigKeyKit and swift-configuration in favor of ArgumentParser, which skit already uses. The analyzer becomes a 'skit analyze' subcommand instead of a new skit-aist executable; domain logic lives in AiSTKit and the OpenAPI client in ClaudeKit. Remove the unreferenced Sources/ConfigKeyKit module and the vendored swift-configuration docs. GitHub issues #108-#111/#123 still need matching edits (deferred). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review — PR #167: Switch skit-aist plan to ArgumentParser analyze subcommandOverviewThis is a planning/documentation-only PR — no Swift implementation yet. It reworks the design for
The direction is correct. The cleanup alone justifies merging. Strengths
Issues & Suggestions1. Test-mode flags are missing from the
|
Move the iterate/compare/fix loop from Future Enhancements into core scope as plan Section 9, tracked by issue #168 (depends on #120, which stays the single-shot Part 1). AiSTKit gets the LibraryVerifying protocol and ConvergenceLoop driver; skit supplies the Subprocess-backed verifier and a --max-iterations option, keeping Subprocess out of the SDK layer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Code review posted below (see full review in the comment thread). |
|
Overview This PR is a planning and cleanup change with no new Swift implementation. It reworks the skit-aist design by removing 13 unreferenced ConfigKeyKit source files and a 13,333-line vendored swift-configuration doc (never wired into Package.swift), switching the architecture to a skit analyze subcommand using ArgumentParser (instead of a new skit-aist executable), and updating planning docs. Strengths
Issues
Nits
Summary The architectural pivot is sound and the cleanup is warranted. Action items before implementation: (1) add output-folder parent validation in validate(); (2) extract the model string to a constant; (3) edit issue #120 to reflect the single-shot/convergence split; (4) merge only after #106 is out of draft and merged. Generated with Claude Code |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Code review for PR 167 (already merged) - see inline analysis below. Overview: Planning-only PR, no production Swift code yet. Drops ConfigKeyKit/swift-configuration in favor of ArgumentParser, removes skit-aist executable, adds convergence loop as Part 2 (issue 168). STRENGTHS: (1) Removing dead ConfigKeyKit module and vendored docs is clean. (2) Plain Sendable AnalyzerConfiguration is simpler than framework-dependent config. (3) Skit.Analyze follows the same pattern as Skit.Run/Skit.Parse. (4) accessModifier package in openapi-generator-config.yaml is correct for cross-module visibility. (5) LibraryVerifying protocol boundary mirrors how Runner works today. ISSUES TO ADDRESS BEFORE IMPLEMENTATION: Issue 1 - validate() missing output folder parent check: The proposed validate() checks inputFolder and syntaxKitPath but not the parent of outputFolder. A missing parent will surface as a cryptic LibraryWriter error. Issue 111 should add a FileManager check on URL(fileURLWithPath: outputFolder).deletingLastPathComponent() and throw ValidationError if it does not exist. Issue 2 - Test-mode flags vs Skit.Analyze definition mismatch: Section 8 shows skit analyze --test, --test-stop-on-fail, --test-filter, --test-cases but none appear in the Skit.Analyze struct in Section 2. If test mode is deferred, the plan should say so explicitly so the implementor of issue 111 knows the scope. Issue 3 - ClaudeKit.swift wrapper vs ClaudeKit target name collision: Sources/AiSTKit/ClaudeKit.swift is the wrapper around the OpenAPI-generated client, but ClaudeKit is also the Swift target name. Rename the wrapper file and type to ClaudeAPIClient to avoid ambiguity. Issue 4 - Unofficial OpenAPI spec maintenance risk: laszukdawid/anthropic-openapi-spec is community-maintained and may lag behind the real API. Add a strategy for keeping it current (pin to a commit hash, periodic update task). The hardcoded default model claude-opus-4-6 has the same staleness risk. SECURITY: API key handling is sound. Issue 111 should note: never log the key, even in verbose mode. MINOR: Scripts/issue-config.json is missing a trailing newline. Issue 168 spec should clarify whether diff normalization means running SwiftFormat or simpler whitespace collapsing. SUMMARY: Correct simplification. ArgumentParser subcommand is the right call. Follow-up items for implementation: output-folder-parent validation in issue 111, clarify test-mode flag scope, rename the ClaudeKit.swift wrapper. |
Summary
Reworks the skit-aist plan (#106) based on review feedback:
skitalready uses. Removes the unreferencedSources/ConfigKeyKit/module (13 files, never registered in Package.swift, headers copied from another project) and the 13,333-line vendored swift-configuration doc under.claude/.skit analyzesubcommand alongsiderunandparse(Skit.Analyze: AsyncParsableCommandinSources/skit/Skit+Analyze.swift). Domain logic lives in the newAiSTKittarget; the OpenAPI-generated Claude client lives inClaudeKit.AnalyzerConfigurationbecomes a plainSendablevalue type assembled from parsed arguments.Docs/skit-analyze-plan.md,IMPLEMENTATION_STATUS.md,Scripts/issue-config.json, andScripts/ISSUE_CREATION_SUMMARY.mdto match.Corresponding GitHub issue updates (already applied)
Convergence loop (added in second commit)
The iterate/compare/fix-until-match loop is now in core scope as plan Section 9, split as Part 2 of the orchestration: #120 stays the single-shot pipeline (Part 1), and new issue #168 (depends on #120) tracks the loop — build the generated library, render dsl.swift against it, diff vs expected.swift, re-prompt with the errors/diff until converged or --max-iterations is hit.
🤖 Generated with Claude Code