nativeapptemplate-agent 0.1.1 → 0.2.0

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 (99) hide show
  1. package/CLAUDE.md +9 -7
  2. package/README.md +65 -21
  3. package/dist/agents/judge.d.ts +8 -0
  4. package/dist/agents/judge.d.ts.map +1 -1
  5. package/dist/agents/judge.js +100 -14
  6. package/dist/agents/judge.js.map +1 -1
  7. package/dist/agents/repair.d.ts +14 -0
  8. package/dist/agents/repair.d.ts.map +1 -0
  9. package/dist/agents/repair.js +103 -0
  10. package/dist/agents/repair.js.map +1 -0
  11. package/dist/agents/types.d.ts +34 -1
  12. package/dist/agents/types.d.ts.map +1 -1
  13. package/dist/dispatch.d.ts +21 -2
  14. package/dist/dispatch.d.ts.map +1 -1
  15. package/dist/dispatch.js +250 -14
  16. package/dist/dispatch.js.map +1 -1
  17. package/dist/env-bridge.d.ts +17 -0
  18. package/dist/env-bridge.d.ts.map +1 -0
  19. package/dist/env-bridge.js +211 -0
  20. package/dist/env-bridge.js.map +1 -0
  21. package/dist/index.d.ts +11 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +88 -3
  24. package/dist/index.js.map +1 -1
  25. package/dist/mcp.d.ts +5 -0
  26. package/dist/mcp.d.ts.map +1 -0
  27. package/dist/mcp.js +83 -0
  28. package/dist/mcp.js.map +1 -0
  29. package/dist/mobile.d.ts +30 -0
  30. package/dist/mobile.d.ts.map +1 -0
  31. package/dist/mobile.js +173 -0
  32. package/dist/mobile.js.map +1 -0
  33. package/dist/rails-lifecycle.d.ts +16 -0
  34. package/dist/rails-lifecycle.d.ts.map +1 -0
  35. package/dist/rails-lifecycle.js +184 -0
  36. package/dist/rails-lifecycle.js.map +1 -0
  37. package/dist/rename-overrides.d.ts +23 -0
  38. package/dist/rename-overrides.d.ts.map +1 -0
  39. package/dist/rename-overrides.js +58 -0
  40. package/dist/rename-overrides.js.map +1 -0
  41. package/dist/repair-loop.d.ts +25 -0
  42. package/dist/repair-loop.d.ts.map +1 -0
  43. package/dist/repair-loop.js +67 -0
  44. package/dist/repair-loop.js.map +1 -0
  45. package/dist/report/collect.d.ts +28 -0
  46. package/dist/report/collect.d.ts.map +1 -0
  47. package/dist/report/collect.js +117 -0
  48. package/dist/report/collect.js.map +1 -0
  49. package/dist/report/model.d.ts +49 -0
  50. package/dist/report/model.d.ts.map +1 -0
  51. package/dist/report/model.js +2 -0
  52. package/dist/report/model.js.map +1 -0
  53. package/dist/report/render.d.ts +3 -0
  54. package/dist/report/render.d.ts.map +1 -0
  55. package/dist/report/render.js +242 -0
  56. package/dist/report/render.js.map +1 -0
  57. package/dist/report/theme.d.ts +2 -0
  58. package/dist/report/theme.d.ts.map +1 -0
  59. package/dist/report/theme.js +115 -0
  60. package/dist/report/theme.js.map +1 -0
  61. package/dist/ruby.d.ts.map +1 -1
  62. package/dist/ruby.js +11 -2
  63. package/dist/ruby.js.map +1 -1
  64. package/dist/slug.d.ts +3 -0
  65. package/dist/slug.d.ts.map +1 -1
  66. package/dist/slug.js +30 -0
  67. package/dist/slug.js.map +1 -1
  68. package/dist/validation/capture.d.ts.map +1 -1
  69. package/dist/validation/capture.js +19 -2
  70. package/dist/validation/capture.js.map +1 -1
  71. package/dist/validation/index.d.ts +6 -0
  72. package/dist/validation/index.d.ts.map +1 -1
  73. package/dist/validation/index.js +3 -0
  74. package/dist/validation/index.js.map +1 -1
  75. package/dist/validation/launch.d.ts +10 -0
  76. package/dist/validation/launch.d.ts.map +1 -1
  77. package/dist/validation/launch.js +103 -5
  78. package/dist/validation/launch.js.map +1 -1
  79. package/dist/validation/layer1.d.ts.map +1 -1
  80. package/dist/validation/layer1.js +12 -4
  81. package/dist/validation/layer1.js.map +1 -1
  82. package/dist/validation/scenarios/queue.d.ts +12 -0
  83. package/dist/validation/scenarios/queue.d.ts.map +1 -0
  84. package/dist/validation/scenarios/queue.js +204 -0
  85. package/dist/validation/scenarios/queue.js.map +1 -0
  86. package/dist/validation/stage2-judge.d.ts +21 -0
  87. package/dist/validation/stage2-judge.d.ts.map +1 -0
  88. package/dist/validation/stage2-judge.js +204 -0
  89. package/dist/validation/stage2-judge.js.map +1 -0
  90. package/dist/validation/stage2.d.ts +73 -0
  91. package/dist/validation/stage2.d.ts.map +1 -0
  92. package/dist/validation/stage2.js +313 -0
  93. package/dist/validation/stage2.js.map +1 -0
  94. package/dist/version.d.ts +2 -0
  95. package/dist/version.d.ts.map +1 -0
  96. package/dist/version.js +17 -0
  97. package/dist/version.js.map +1 -0
  98. package/package.json +6 -3
  99. package/scripts/ruby/rename.rb +18 -8
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "nativeapptemplate-agent",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "A Claude Code agent that turns a natural-language SaaS spec into a working three-platform implementation (Rails API + SwiftUI iOS + Jetpack Compose Android).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
- "nativeapptemplate-agent": "dist/index.js"
8
+ "nativeapptemplate-agent": "dist/index.js",
9
+ "nativeapptemplate-agent-mcp": "dist/mcp.js"
9
10
  },
10
11
  "files": [
11
12
  "dist/",
@@ -64,6 +65,8 @@
64
65
  "dependencies": {
65
66
  "@anthropic-ai/claude-agent-sdk": "^0.2.114",
66
67
  "@anthropic-ai/sdk": "^0.90.0",
67
- "yaml": "^2.8.4"
68
+ "@modelcontextprotocol/sdk": "^1.29.0",
69
+ "yaml": "^2.8.4",
70
+ "zod": "^4.3.6"
68
71
  }
69
72
  }
@@ -7,7 +7,10 @@
7
7
  # Rewrites file content AND renames files/directories for every
8
8
  # PascalCase / snake_case / plural variant of each rename pair.
9
9
  # Word-boundary matching via Regexp; crude-but-sufficient English
10
- # pluralization. Skips .git, node_modules, tmp/, log/, vendor/bundle/.
10
+ # pluralization. Skips .git, node_modules, tmp/, log/, vendor/bundle/,
11
+ # and compiled build output (app/assets/builds, public/assets) — those
12
+ # are regenerated from source by the bundler, so renaming them desyncs
13
+ # them from their (un-renamed) sources, e.g. Turbo's VisitState.completed.
11
14
 
12
15
  require "json"
13
16
 
@@ -18,13 +21,14 @@ root = input.fetch("root")
18
21
  stats = { files_scanned: 0, files_changed: 0, substitutions: 0, files_renamed: 0 }
19
22
 
20
23
  SKIP_DIR_SEGMENTS = %w[.git node_modules tmp log DerivedData Pods Carthage xcuserdata .build build .gradle .idea .kotlin captures].freeze
21
- SKIP_SUBPATHS = %w[vendor/bundle].freeze
24
+ SKIP_SUBPATHS = %w[vendor/bundle app/assets/builds public/assets].freeze
22
25
  TEXT_EXTS = %w[
23
26
  .rb .erb .yml .yaml .json .md .gemspec .rake .ru .txt .sample .example .conf
24
27
  .html .css .scss .js .mjs .tt .lock
25
28
  .swift .plist .strings .xcconfig .entitlements .pbxproj .xcworkspacedata .modulemap .xcscheme
26
29
  .kt .kts .xml .gradle .pro .toml .properties .cfg
27
30
  .proto
31
+ .svg .webmanifest
28
32
  ].freeze
29
33
  TEXT_BASENAMES = %w[
30
34
  Gemfile Gemfile.lock Rakefile Procfile Procfile.dev
@@ -32,7 +36,7 @@ TEXT_BASENAMES = %w[
32
36
  config.ru Dockerfile
33
37
  Podfile Podfile.lock Package.swift Cartfile Makefile
34
38
  gradlew gradlew.bat gradle.properties local.properties
35
- brakeman.ignore
39
+ brakeman.ignore .swiftformat
36
40
  ].freeze
37
41
 
38
42
  def pluralize(word)
@@ -160,9 +164,15 @@ end
160
164
 
161
165
  all_patterns = plan.flat_map { |p| build_patterns(p.fetch("from"), p.fetch("to")) }
162
166
 
163
- def skip?(path)
164
- return true if SKIP_DIR_SEGMENTS.any? { |d| path.include?("/#{d}/") || path.end_with?("/#{d}") }
165
- return true if SKIP_SUBPATHS.any? { |sp| path.include?("/#{sp}") }
167
+ def skip?(path, root)
168
+ # Compare against the path RELATIVE to the project root, not the absolute
169
+ # path. Otherwise SKIP_DIR_SEGMENTS like "tmp" / "log" / "build" silently
170
+ # match user-cwd ancestors (e.g. /tmp/myproject/...) and skip every file.
171
+ rel = path.sub(/\A#{Regexp.escape(root)}\/?/, "")
172
+ return false if rel == path # path wasn't under root; don't skip
173
+ segments = rel.split("/")
174
+ return true if segments.any? { |seg| SKIP_DIR_SEGMENTS.include?(seg) }
175
+ return true if SKIP_SUBPATHS.any? { |sp| rel.include?(sp) || rel.start_with?(sp) }
166
176
  false
167
177
  end
168
178
 
@@ -176,7 +186,7 @@ end
176
186
  # Pass 1 — rewrite file contents.
177
187
  Dir.glob("#{root}/**/*", File::FNM_DOTMATCH).each do |path|
178
188
  next unless File.file?(path)
179
- next if skip?(path)
189
+ next if skip?(path, root)
180
190
  next unless text_file?(path)
181
191
 
182
192
  stats[:files_scanned] += 1
@@ -203,7 +213,7 @@ end
203
213
  # Pass 2 — rename paths. Deepest-first so renaming a parent directory
204
214
  # doesn't invalidate paths we haven't visited yet.
205
215
  Dir.glob("#{root}/**/*", File::FNM_DOTMATCH).sort_by { |p| -p.length }.each do |path|
206
- next if skip?(path)
216
+ next if skip?(path, root)
207
217
  next unless File.exist?(path)
208
218
 
209
219
  old_name = File.basename(path)