@maccesar/titools 2.2.4 → 2.2.9

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 (98) hide show
  1. package/README.md +23 -23
  2. package/agents/ti-pro.md +17 -17
  3. package/lib/commands/update.js +6 -14
  4. package/lib/downloader.js +17 -2
  5. package/package.json +1 -1
  6. package/skills/alloy-guides/SKILL.md +31 -31
  7. package/skills/alloy-guides/references/CONCEPTS.md +3 -3
  8. package/skills/alloy-guides/references/CONTROLLERS.md +1 -1
  9. package/skills/alloy-guides/references/MODELS.md +6 -6
  10. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +1 -1
  11. package/skills/alloy-guides/references/VIEWS_XML.md +1 -1
  12. package/skills/alloy-guides/references/WIDGETS.md +1 -1
  13. package/skills/alloy-howtos/SKILL.md +27 -27
  14. package/skills/alloy-howtos/references/best_practices.md +9 -9
  15. package/skills/alloy-howtos/references/cli_reference.md +14 -14
  16. package/skills/alloy-howtos/references/config_files.md +16 -16
  17. package/skills/alloy-howtos/references/custom_tags.md +16 -16
  18. package/skills/alloy-howtos/references/debugging_troubleshooting.md +11 -15
  19. package/skills/alloy-howtos/references/samples.md +19 -19
  20. package/skills/purgetss/SKILL.md +11 -1
  21. package/skills/purgetss/references/animation-system.md +1 -1
  22. package/skills/purgetss/references/cli-commands.md +3 -3
  23. package/skills/purgetss/references/customization-deep-dive.md +1 -1
  24. package/skills/purgetss/references/dynamic-component-creation.md +1 -1
  25. package/skills/purgetss/references/icon-fonts.md +4 -0
  26. package/skills/purgetss/references/installation-setup.md +8 -1
  27. package/skills/purgetss/references/migration-guide.md +4 -0
  28. package/skills/purgetss/references/tikit-components.md +193 -204
  29. package/skills/purgetss/references/ui-ux-design.md +1 -1
  30. package/skills/ti-expert/SKILL.md +78 -118
  31. package/skills/ti-expert/references/alloy-builtins.md +18 -18
  32. package/skills/ti-expert/references/alloy-structure.md +21 -21
  33. package/skills/ti-expert/references/anti-patterns.md +15 -15
  34. package/skills/ti-expert/references/cli-expert.md +15 -15
  35. package/skills/ti-expert/references/code-conventions.md +38 -38
  36. package/skills/ti-expert/references/contracts.md +8 -8
  37. package/skills/ti-expert/references/controller-patterns.md +14 -14
  38. package/skills/ti-expert/references/error-handling.md +11 -11
  39. package/skills/ti-expert/references/examples.md +12 -12
  40. package/skills/ti-expert/references/migration-patterns.md +24 -24
  41. package/skills/ti-expert/references/patterns.md +10 -10
  42. package/skills/ti-expert/references/performance-listview.md +16 -16
  43. package/skills/ti-expert/references/performance-optimization.md +41 -41
  44. package/skills/ti-expert/references/security-device.md +22 -22
  45. package/skills/ti-expert/references/security-fundamentals.md +19 -19
  46. package/skills/ti-expert/references/state-management.md +33 -33
  47. package/skills/ti-expert/references/testing-e2e-ci.md +25 -25
  48. package/skills/ti-expert/references/testing-unit.md +24 -24
  49. package/skills/ti-expert/references/theming.md +15 -15
  50. package/skills/ti-guides/SKILL.md +58 -60
  51. package/skills/ti-guides/references/advanced-data-and-images.md +33 -33
  52. package/skills/ti-guides/references/android-manifest.md +15 -15
  53. package/skills/ti-guides/references/app-distribution.md +70 -166
  54. package/skills/ti-guides/references/application-frameworks.md +96 -114
  55. package/skills/ti-guides/references/cli-reference.md +294 -294
  56. package/skills/ti-guides/references/coding-best-practices.md +42 -33
  57. package/skills/ti-guides/references/commonjs-advanced.md +57 -51
  58. package/skills/ti-guides/references/hello-world.md +36 -36
  59. package/skills/ti-guides/references/hyperloop-native-access.md +66 -66
  60. package/skills/ti-guides/references/javascript-primer.md +83 -101
  61. package/skills/ti-guides/references/reserved-words.md +9 -9
  62. package/skills/ti-guides/references/resources.md +75 -83
  63. package/skills/ti-guides/references/style-and-conventions.md +35 -28
  64. package/skills/ti-guides/references/tiapp-config.md +110 -74
  65. package/skills/ti-howtos/SKILL.md +88 -92
  66. package/skills/ti-howtos/references/android-platform-deep-dives.md +104 -104
  67. package/skills/ti-howtos/references/automation-fastlane-appium.md +39 -39
  68. package/skills/ti-howtos/references/buffer-codec-streams.md +60 -60
  69. package/skills/ti-howtos/references/cross-platform-development.md +115 -136
  70. package/skills/ti-howtos/references/debugging-profiling.md +167 -181
  71. package/skills/ti-howtos/references/extending-titanium.md +121 -121
  72. package/skills/ti-howtos/references/google-maps-v2.md +84 -82
  73. package/skills/ti-howtos/references/ios-map-kit.md +65 -60
  74. package/skills/ti-howtos/references/ios-platform-deep-dives.md +123 -123
  75. package/skills/ti-howtos/references/local-data-sources.md +79 -78
  76. package/skills/ti-howtos/references/location-and-maps.md +116 -120
  77. package/skills/ti-howtos/references/media-apis.md +87 -86
  78. package/skills/ti-howtos/references/notification-services.md +250 -260
  79. package/skills/ti-howtos/references/remote-data-sources.md +98 -93
  80. package/skills/ti-howtos/references/tutorials.md +226 -216
  81. package/skills/ti-howtos/references/using-modules.md +73 -102
  82. package/skills/ti-howtos/references/web-content-integration.md +101 -103
  83. package/skills/ti-howtos/references/webpack-build-pipeline.md +52 -44
  84. package/skills/ti-ui/SKILL.md +85 -85
  85. package/skills/ti-ui/references/accessibility-deep-dive.md +57 -57
  86. package/skills/ti-ui/references/animation-and-matrices.md +79 -79
  87. package/skills/ti-ui/references/application-structures.md +96 -99
  88. package/skills/ti-ui/references/custom-fonts-styling.md +99 -99
  89. package/skills/ti-ui/references/event-handling.md +58 -58
  90. package/skills/ti-ui/references/gestures.md +62 -64
  91. package/skills/ti-ui/references/icons-and-splash-screens.md +88 -88
  92. package/skills/ti-ui/references/layouts-and-positioning.md +87 -97
  93. package/skills/ti-ui/references/listviews-and-performance.md +107 -107
  94. package/skills/ti-ui/references/orientation.md +87 -88
  95. package/skills/ti-ui/references/platform-ui-android.md +87 -81
  96. package/skills/ti-ui/references/platform-ui-ios.md +63 -61
  97. package/skills/ti-ui/references/scrolling-views.md +29 -29
  98. package/skills/ti-ui/references/tableviews.md +56 -56
package/README.md CHANGED
@@ -8,11 +8,11 @@
8
8
 
9
9
  </div>
10
10
 
11
- A CLI that gives your AI coding assistant access to **Titanium SDK** knowledge. One command installs 7 specialized skills, a research agent, and 100+ reference files for Titanium SDK, Alloy MVC, and PurgeTSS.
11
+ TiTools is a CLI that installs Titanium SDK skills and a knowledge index for AI coding assistants. One command installs 7 skills, a research agent, and 100+ reference files for Titanium SDK, Alloy MVC, and PurgeTSS.
12
12
 
13
- Without `titools`, assistants fall back on general training data, which is often outdated or off-target for Titanium. With `titools`, your assistant can reference Alloy architecture, memory cleanup patterns, PurgeTSS utility classes, and platform-specific APIs.
13
+ Without TiTools, assistants rely on general training data. That data can be outdated or too generic for Titanium work. With TiTools, the assistant can look up Alloy architecture, memory cleanup patterns, PurgeTSS utility classes, and platform-specific APIs.
14
14
 
15
- Based on [Vercels research on AGENTS.md](https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals), they found that the knowledge index approach achieved a 100% pass rate, compared to 5379% using skills alone.
15
+ Vercel's AGENTS.md evaluation reports a 100% pass rate for the knowledge index approach, compared to 53-79% using skills alone.
16
16
 
17
17
  ---
18
18
 
@@ -36,7 +36,7 @@ claude # or gemini, or codex
36
36
 
37
37
  # 6) Ask away!
38
38
  # "How should I structure a new app with login, signup, and a dashboard?"
39
- # "My ListView with 500 items scrolls like garbage on Android. How do I fix it?"
39
+ # "My ListView with 500 items scrolls poorly on Android. How do I fix it?"
40
40
  ```
41
41
 
42
42
  What gets installed:
@@ -125,15 +125,15 @@ The knowledge index is based on the latest Titanium SDK documentation. If your p
125
125
 
126
126
  ## Skills overview
127
127
 
128
- | Skill | Purpose | Best For |
129
- | ------------ | ----------------------------- | --------------------------------------- |
130
- | alloy-guides | Alloy MVC reference | Models, Views, Controllers, Widgets |
131
- | alloy-howtos | Alloy CLI & debugging | Project setup, CLI commands, errors |
132
- | purgetss | Utility-first styling | UI styling and animations |
133
- | ti-expert | Architecture + Implementation | Starting point for most tasks |
134
- | ti-guides | SDK fundamentals | Hyperloop, distribution, configuration |
135
- | ti-howtos | Native feature integration | Location, Push, Media, Platform APIs |
136
- | ti-ui | UI/UX patterns | Complex layouts, ListViews, platform UI |
128
+ | Skill | Purpose | Best For |
129
+ | ------------ | ------------------------------- | --------------------------------------- |
130
+ | alloy-guides | Alloy MVC reference | Models, Views, Controllers, Widgets |
131
+ | alloy-howtos | Alloy CLI and debugging | Project setup, CLI commands, errors |
132
+ | purgetss | Utility-first styling | UI styling and animations |
133
+ | ti-expert | Architecture and implementation | Starting point for most tasks |
134
+ | ti-guides | SDK fundamentals | Hyperloop, distribution, configuration |
135
+ | ti-howtos | Native feature integration | Location, Push, Media, Platform APIs |
136
+ | ti-ui | UI/UX patterns | Complex layouts, ListViews, platform UI |
137
137
 
138
138
  Note: `ti-guides`, `ti-howtos`, `ti-ui`, `alloy-guides`, and `alloy-howtos` are based on official Titanium SDK and Alloy documentation. `ti-expert` and `purgetss` are opinionated and reflect personal coding conventions (biased toward PurgeTSS).
139
139
 
@@ -206,9 +206,9 @@ All skills include automatic project detection to ensure compatibility:
206
206
  | ti-expert | Alloy vs Classic | Checks for `app/` (Alloy) vs `Resources/` (Classic) structure |
207
207
  | alloy-guides | Alloy projects | Checks for `app/views/`, `app/controllers/` |
208
208
  | alloy-howtos | Alloy projects | Checks for `alloy.jmk`, `config.json` |
209
- | ti-ui | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
210
- | ti-guides | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
211
- | ti-howtos | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
209
+ | ti-ui | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
210
+ | ti-guides | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
211
+ | ti-howtos | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
212
212
 
213
213
  Why this matters:
214
214
  - PurgeTSS suggestions are only provided if PurgeTSS is installed
@@ -620,8 +620,8 @@ Behavior depends on where you run it:
620
620
 
621
621
  What it does:
622
622
  1. Checks GitHub for the latest CLI version
623
- 2. If a newer version exists prompts you to update the CLI first with `npm update -g @maccesar/titools`
624
- 3. If CLI is current syncs skills and agents from the installed package (no download needed)
623
+ 2. If a newer version exists, it prompts you to update the CLI first with `npm update -g @maccesar/titools`
624
+ 3. If the CLI is current, it syncs skills and agents from the installed package (no download needed)
625
625
  4. Updates platform symlinks only for platforms that already have them
626
626
  5. Cleans up legacy artifacts (`alloy-expert` skill, `ti-researcher` agent)
627
627
  6. Auto-syncs knowledge index files if they exist in the current project
@@ -691,13 +691,13 @@ Codex CLI:
691
691
 
692
692
  | Skill | SKILL.md | References |
693
693
  | ------------ | ----------------------------- | ----------------------------------------------------- |
694
- | ti-expert | Architecture + Implementation | 19 refs + 1 asset (patterns, testing, security, etc.) |
695
- | purgetss | Setup + Critical Rules | 21 files (grid, animations, icons, class-index, etc.) |
696
- | ti-ui | UI Rules + Platform Diffs | 14 files (layouts, lists, gestures, etc.) |
697
- | ti-howtos | Integration Workflow | 18 files (location, media, maps, automation, etc.) |
698
- | ti-guides | Core Workflow | 14 files (hyperloop, distribution, etc.) |
699
694
  | alloy-guides | MVC Quick Start | 10 files (models, views, widgets, etc.) |
700
695
  | alloy-howtos | Best Practices | 6 files (CLI, config, debugging, etc.) |
696
+ | purgetss | Setup + Critical Rules | 21 files (grid, animations, icons, class-index, etc.) |
697
+ | ti-expert | Architecture + Implementation | 19 refs + 1 asset (patterns, testing, security, etc.) |
698
+ | ti-guides | Core Workflow | 14 files (hyperloop, distribution, etc.) |
699
+ | ti-howtos | Integration Workflow | 18 files (location, media, maps, automation, etc.) |
700
+ | ti-ui | UI Rules + Platform Diffs | 14 files (layouts, lists, gestures, etc.) |
701
701
 
702
702
  ---
703
703
 
package/agents/ti-pro.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ti-pro
3
- description: Titanium SDK and Alloy research specialist. Preloads all 7 titanium-related skills for comprehensive analysis. Use proactively for: analyzing Titanium/Alloy codebases, reviewing Alloy app architecture, researching Titanium SDK implementations, exploring mobile app architectural questions, multi-feature research across Titanium APIs, cross-referencing framework patterns, or investigating platform-specific Titanium differences. Returns findings with specific file/line references from all documentation.
3
+ description: Titanium SDK and Alloy research specialist. Loads the 7 Titanium skills and uses them together to answer research-style questions. Use for codebase analysis, architecture reviews, Titanium SDK implementation research, cross-feature questions, and platform-specific differences. Returns concrete findings with file and line references.
4
4
  skills:
5
5
  - alloy-guides
6
6
  - alloy-howtos
@@ -15,27 +15,27 @@ model: sonnet
15
15
 
16
16
  # Titanium SDK Research Specialist
17
17
 
18
- You are a deep-dive research specialist for Titanium SDK and Alloy mobile development.
18
+ You are a research specialist for Titanium SDK and Alloy mobile development. With more than 15 year of experience.
19
19
 
20
20
  ## What You Do
21
21
 
22
- When invoked, you research complex topics by consulting **all 7 preloaded titanium-\*** skills:
22
+ When invoked, you research complex topics by consulting all 7 Titanium skills:
23
23
 
24
24
  - `ti-expert` - Architecture, patterns, conventions
25
25
  - `alloy-guides` - Alloy MVC complete reference
26
26
  - `alloy-howtos` - CLI, config, debugging
27
- - `purgetss` - Utility-first styling classes (optional addon use when the project already has it or the user asks about it)
27
+ - `purgetss` - Utility-first styling classes (optional add-on; use when the project already has it or the user asks about it)
28
28
  - `ti-guides` - SDK official guides, Hyperloop, distribution
29
29
  - `ti-howtos` - Native features, platform-specific APIs
30
30
  - `ti-ui` - UI/UX patterns, layouts, gestures
31
31
 
32
32
  ## Research Process
33
33
 
34
- 1. **Understand the query** - What specific aspect needs research?
35
- 2. **Consult ALL relevant skills** - All skills are preloaded in your context
36
- 3. **Cross-reference** - Find connections across multiple skills
37
- 4. **Provide specifics** - Include file paths, line numbers, code examples
38
- 5. **Cite sources** - Reference which skill and file each answer comes from
34
+ 1. **Understand the query** - Identify what needs research.
35
+ 2. **Consult all relevant skills** - Use the full set.
36
+ 3. **Cross-reference** - Connect findings across skills.
37
+ 4. **Provide specifics** - Include file paths, line numbers, and code examples.
38
+ 5. **Cite sources** - Note which skill and file each answer comes from.
39
39
 
40
40
  ## What You're Good For
41
41
 
@@ -47,7 +47,7 @@ When invoked, you research complex topics by consulting **all 7 preloaded titani
47
47
  | **Architecture review** | "Review this project's folder structure and service layer" |
48
48
  | **Platform differences** | "Research iOS vs Android differences for this feature" |
49
49
 
50
- ## What You're NOT For
50
+ ## What You're Not For
51
51
 
52
52
  | Use Instead | Reason |
53
53
  | -------------------------------------------- | -------------------------------------- |
@@ -60,11 +60,11 @@ When invoked, you research complex topics by consulting **all 7 preloaded titani
60
60
 
61
61
  When returning research findings:
62
62
 
63
- 1. **Summary** - Brief overview of findings
64
- 2. **Key Points** - Bulleted list with specific references
65
- 3. **Code Examples** - From the skills, with source citations
66
- 4. **Related Skills** - Which skills were consulted
67
- 5. **File References** - Specific `path:line` format
63
+ 1. **Summary** - Brief overview of findings.
64
+ 2. **Key Points** - Bulleted list with specific references.
65
+ 3. **Code Examples** - From the skills, with source citations.
66
+ 4. **Related Skills** - Which skills were consulted.
67
+ 5. **File References** - Specific `path:line` format.
68
68
 
69
69
  Example:
70
70
  ```markdown
@@ -81,7 +81,7 @@ Your app uses `Ti.App.fireEvent` which causes memory leaks.
81
81
 
82
82
  ## Tool Usage
83
83
 
84
- You have **read-only tools**: `Read`, `Grep`, `Glob`, `Bash`
84
+ You have read-only tools: `Read`, `Grep`, `Glob`, `Bash`.
85
85
 
86
86
  Use them to:
87
87
  - Search the codebase when asked to analyze it
@@ -89,7 +89,7 @@ Use them to:
89
89
  - Verify claims against actual code
90
90
  - List files/directories and inspect structure with shell commands
91
91
 
92
- You **cannot** modify files. If the user asks for changes, provide the research and suggest using the appropriate skill or main conversation for implementation.
92
+ You cannot modify files. If the user asks for changes, provide the research and suggest using the appropriate skill or main conversation for implementation.
93
93
 
94
94
  ---
95
95
 
@@ -23,7 +23,7 @@ import {
23
23
  import { agentsCommand } from './agents.js';
24
24
  import {
25
25
  checkForUpdate,
26
- fetchLatestVersion,
26
+ fetchLatestNpmVersion,
27
27
  } from '../downloader.js';
28
28
  import { createSkillSymlinks } from '../symlink.js';
29
29
  import { formatList, isTitaniumProject } from '../utils.js';
@@ -125,7 +125,7 @@ export async function updateCommand(options) {
125
125
  if (hasUpdate) {
126
126
  let latestVersion = '(newer)';
127
127
  try {
128
- latestVersion = await fetchLatestVersion();
128
+ latestVersion = await fetchLatestNpmVersion();
129
129
  } catch {
130
130
  // Ignore error, we already know there's an update
131
131
  }
@@ -167,7 +167,7 @@ export async function updateCommand(options) {
167
167
  // Install skills
168
168
  spinner.start('Syncing skills...');
169
169
  const skillsResult = await installSkills(repoDir, baseDir);
170
- spinner.succeed(`Skills: ${formatList(skillsResult.installed)}`);
170
+ spinner.succeed(`${skillsResult.installed.length} skills updated`);
171
171
 
172
172
  // Install agents (only if Claude Code has symlinks)
173
173
  const claudePlatform = platformsWithSymlinks.find((p) => p.name === 'claude');
@@ -175,7 +175,7 @@ export async function updateCommand(options) {
175
175
  spinner.start('Syncing agents...');
176
176
  const agentsResult = await installAgents(repoDir, baseDir);
177
177
  if (agentsResult.installed.length > 0) {
178
- spinner.succeed(`Agents: ${formatList(agentsResult.installed)}`);
178
+ spinner.succeed('Platform agents updated');
179
179
  } else {
180
180
  spinner.info('No agents to sync');
181
181
  }
@@ -183,21 +183,13 @@ export async function updateCommand(options) {
183
183
 
184
184
  cleanupLegacyArtifacts(baseDir);
185
185
 
186
- // Update symlinks only for platforms that already had them
186
+ // Update symlinks silently for platforms that already had them
187
187
  for (const platform of platformsWithSymlinks) {
188
- spinner.start(`Updating ${platform.displayName} symlinks...`);
189
- const symlinkResult = await createSkillSymlinks(
188
+ await createSkillSymlinks(
190
189
  platform.skillsDir,
191
190
  SKILLS,
192
191
  baseDir
193
192
  );
194
- if (symlinkResult.linked.length === SKILLS.length) {
195
- spinner.succeed(`${platform.displayName} linked`);
196
- } else {
197
- spinner.warn(
198
- `${platform.displayName}: ${symlinkResult.linked.length}/${SKILLS.length} linked`
199
- );
200
- }
201
193
  }
202
194
 
203
195
  // Summary
package/lib/downloader.js CHANGED
@@ -112,13 +112,28 @@ export async function downloadRawFile(filePath, destPath, ref = 'main') {
112
112
  }
113
113
 
114
114
  /**
115
- * Check if an update is available
115
+ * Fetch latest version from npm registry
116
+ * @returns {Promise<string>} Latest version number
117
+ */
118
+ export async function fetchLatestNpmVersion() {
119
+ const response = await fetch('https://registry.npmjs.org/@maccesar/titools');
120
+
121
+ if (!response.ok) {
122
+ throw new Error(`Failed to fetch npm info: ${response.statusText}`);
123
+ }
124
+
125
+ const data = await response.json();
126
+ return data['dist-tags'].latest;
127
+ }
128
+
129
+ /**
130
+ * Check if an update is available (checks npm)
116
131
  * @param {string} currentVersion - Current version
117
132
  * @returns {Promise<boolean>} True if update available
118
133
  */
119
134
  export async function checkForUpdate(currentVersion) {
120
135
  try {
121
- const latestVersion = await fetchLatestVersion();
136
+ const latestVersion = await fetchLatestNpmVersion();
122
137
  // Remove 'v' prefix if present
123
138
  const latest = latestVersion.replace(/^v/, '');
124
139
  const current = currentVersion.replace(/^v/, '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maccesar/titools",
3
- "version": "2.2.4",
3
+ "version": "2.2.9",
4
4
  "description": "Titanium SDK skills and agents for AI coding assistants (Claude Code, Gemini CLI, Codex CLI)",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -5,11 +5,11 @@ argument-hint: "[concept]"
5
5
  allowed-tools: Read, Grep, Glob, Edit, Write, Bash(node *)
6
6
  ---
7
7
 
8
- # Alloy MVC Framework Guide
8
+ # Alloy MVC framework guide
9
9
 
10
- Complete reference for building Titanium mobile applications with the Alloy MVC framework and Backbone.js.
10
+ Reference for building Titanium mobile applications with the Alloy MVC framework and Backbone.js.
11
11
 
12
- ## Project Detection
12
+ ## Project detection
13
13
 
14
14
  :::info AUTO-DETECTS ALLOY PROJECTS
15
15
  This skill automatically detects Alloy projects when invoked and provides framework-specific guidance.
@@ -26,7 +26,7 @@ This skill automatically detects Alloy projects when invoked and provides framew
26
26
  - **Not detected** → Indicates this skill is for Alloy projects only, does not suggest Alloy-specific features
27
27
  :::
28
28
 
29
- ## Quick Reference
29
+ ## Quick reference
30
30
 
31
31
  | Topic | Reference File |
32
32
  | ------------------------------------------------ | ----------------------------------------------------------------------- |
@@ -41,7 +41,7 @@ This skill automatically detects Alloy projects when invoked and provides framew
41
41
  | CLI commands, code generation | [CLI_TASKS.md](references/CLI_TASKS.md) |
42
42
  | PurgeTSS integration (optional addon) | [PURGETSS.md](references/PURGETSS.md) |
43
43
 
44
- ## Project Structure
44
+ ## Project structure
45
45
 
46
46
  Standard Alloy project structure:
47
47
 
@@ -64,7 +64,7 @@ app/
64
64
  └── widgets/ # Widget components
65
65
  ```
66
66
 
67
- ## MVC Quick Start
67
+ ## MVC quick start
68
68
 
69
69
  **Controller** (`app/controllers/index.js`):
70
70
  ```javascript
@@ -89,7 +89,7 @@ $.index.open();
89
89
  "Label": { color: "#000" }
90
90
  ```
91
91
 
92
- ## Key Concepts
92
+ ## Key concepts
93
93
 
94
94
  - **Models/Collections**: Backbone.js objects with sync adapters (sql, properties)
95
95
  - **Views**: XML markup with TSS styling
@@ -98,29 +98,29 @@ $.index.open();
98
98
  - **Widgets**: Reusable components with MVC structure
99
99
  - **Conventions**: File naming and placement drive code generation
100
100
 
101
- ## Critical Rules
101
+ ## Critical rules
102
102
 
103
- ### Platform-Specific Properties in TSS
103
+ ### Platform-specific properties in TSS
104
104
 
105
- :::danger CRITICAL: Platform-Specific Properties Require Modifiers
106
- Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` properties in TSS WITHOUT platform modifiers causes cross-platform compilation failures.
105
+ :::danger CRITICAL: Platform-specific properties require modifiers
106
+ Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` properties in TSS without platform modifiers causes cross-platform compilation failures.
107
107
 
108
- **Example of the damage:**
108
+ Example of the failure:
109
109
  ```tss
110
- // WRONG - Adds Ti.UI.iOS to Android project
110
+ // WRONG - Adds Ti.UI.iOS to Android project
111
111
  "#mainWindow": {
112
112
  statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT // FAILS on Android!
113
113
  }
114
114
  ```
115
115
 
116
- **CORRECT approach - Use platform modifiers:**
116
+ Correct approach - use platform modifiers:
117
117
  ```tss
118
- // CORRECT - Only adds to iOS
118
+ // CORRECT - Only adds to iOS
119
119
  "#mainWindow[platform=ios]": {
120
120
  statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
121
121
  }
122
122
 
123
- // CORRECT - Only adds to Android
123
+ // CORRECT - Only adds to Android
124
124
  "#mainWindow[platform=android]": {
125
125
  actionBar: {
126
126
  displayHomeAsUp: true
@@ -128,23 +128,23 @@ Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` properties in TSS WITHOUT platform modi
128
128
  }
129
129
  ```
130
130
 
131
- **Properties that ALWAYS require platform modifiers:**
131
+ Properties that always require platform modifiers:
132
132
  - iOS: `statusBarStyle`, `modalStyle`, `modalTransitionStyle`, any `Ti.UI.iOS.*`
133
133
  - Android: `actionBar` config, any `Ti.UI.Android.*` constant
134
134
 
135
135
  **Available modifiers:** `[platform=ios]`, `[platform=android]`, `[formFactor=handheld]`, `[formFactor=tablet]`, `[if=Alloy.Globals.customVar]`
136
136
 
137
- **For more platform-specific patterns, see** [Code Conventions (ti-expert)](skills/ti-expert/references/code-conventions.md#platform--device-modifiers) or [Platform UI guides (ti-ui)](skills/ti-ui/references/platform-ui-ios.md).
137
+ For more platform-specific patterns, see [Code conventions (ti-expert)](skills/ti-expert/references/code-conventions.md#platform--device-modifiers) or [Platform UI guides (ti-ui)](skills/ti-ui/references/platform-ui-ios.md).
138
138
  :::
139
139
 
140
- ## Common Patterns
140
+ ## Common patterns
141
141
 
142
- ### Creating a Model
142
+ ### Creating a model
143
143
  ```bash
144
144
  alloy generate model book sql title:string author:string
145
145
  ```
146
146
 
147
- ### Data Binding
147
+ ### Data binding
148
148
  ```xml
149
149
  <Collection src="book" />
150
150
  <TableView dataCollection="book">
@@ -152,7 +152,7 @@ alloy generate model book sql title:string author:string
152
152
  </TableView>
153
153
  ```
154
154
 
155
- ### Platform-Specific Code
155
+ ### Platform-specific code
156
156
  ```javascript
157
157
  if (OS_IOS) {
158
158
  // iOS-only code
@@ -162,25 +162,25 @@ if (OS_ANDROID) {
162
162
  }
163
163
  ```
164
164
 
165
- ### Widget Usage
165
+ ### Widget usage
166
166
  ```xml
167
167
  <Widget src="mywidget" id="foo" />
168
168
  ```
169
169
 
170
- ## Compilation Process
170
+ ## Compilation process
171
171
 
172
- 1. **Cleanup**: Resources folder cleaned
173
- 2. **Build Config**: alloy.jmk loaded (pre:load task)
174
- 3. **Framework Files**: Backbone.js, Underscore.js, sync adapters copied
175
- 4. **MVC Generation**: Models, widgets, views, controllers compiled to JS
176
- 5. **Main App**: app.js generated from template
177
- 6. **Optimization**: UglifyJS optimization, platform-specific code removal
172
+ 1. Cleanup: Resources folder cleaned
173
+ 2. Build Config: alloy.jmk loaded (pre:load task)
174
+ 3. Framework Files: Backbone.js, Underscore.js, sync adapters copied
175
+ 4. MVC Generation: Models, widgets, views, controllers compiled to JS
176
+ 5. Main App: app.js generated from template
177
+ 6. Optimization: UglifyJS optimization, platform-specific code removal
178
178
 
179
179
  ## References
180
180
 
181
181
  Read detailed documentation from the reference files listed above based on your specific task.
182
182
 
183
- ## Related Skills
183
+ ## Related skills
184
184
 
185
185
  For tasks beyond Alloy MVC basics, use these complementary skills:
186
186
 
@@ -6,7 +6,7 @@ This guide covers the important concepts related to the Alloy framework, includi
6
6
 
7
7
  ## Model-View-Controller
8
8
 
9
- Alloy utilizes the model-view-controller (MVC) pattern, which separates the application into three different components:
9
+ Alloy uses the model-view-controller (MVC) pattern, which separates the application into three different components:
10
10
 
11
11
  * **Models** provide the business logic, containing the rules, data and state of the application
12
12
 
@@ -26,7 +26,7 @@ Alloy views are built from Titanium UI components. You define views using XML ma
26
26
 
27
27
  Alloy controllers generally have a one-to-one relationship with Alloy views. Controllers directly use the Titanium SDK API without an abstraction layer. The controller has access to all of the view components.
28
28
 
29
- Additionally, Alloy provides built-in support for Underscore.js, which provides a set of utility functions, such as array and iterative helpers.
29
+ Also, Alloy provides built-in support for Underscore.js, which provides a set of utility functions, such as array and iterative helpers.
30
30
 
31
31
  ## Alloy and the Titanium SDK
32
32
 
@@ -103,7 +103,7 @@ app/
103
103
 
104
104
  Alternatively, you can use special conditional code and attributes inside the controllers, views and styles to apply platform-specific code and components.
105
105
 
106
- Additionally, the `assets` folder is laid out the same way as the `Resources` folder in a Titanium project for platform-specific files and density-specific images.
106
+ Also, the `assets` folder is laid out the same way as the `Resources` folder in a Titanium project for platform-specific files and density-specific images.
107
107
 
108
108
  ## Widgets
109
109
 
@@ -137,7 +137,7 @@ if (OS_IOS) {
137
137
 
138
138
  ### Passing Arguments
139
139
 
140
- When initializing an external controller, you can pass arguments to customize it, for instance, `const controller = Alloy.createController('controller', {args1: 'foo'})`. In the external controller, the special variable `$.args` is used to receive the arguments. Prior to Alloy 1.6, you needed to use `arguments[0]`. For example, suppose you want to add multiple TableViewRow objects to a TableView object.
140
+ When initializing an external controller, you can pass arguments to customize it, for instance, `const controller = Alloy.createController('controller', {args1: 'foo'})`. In the external controller, the special variable `$.args` is used to receive the arguments. Before Alloy 1.6, you needed to use `arguments[0]`. For example, suppose you want to add multiple TableViewRow objects to a TableView object.
141
141
 
142
142
  For the TableViewRow object, called 'row', the view contains only the object, and the controller contains only a few lines of code to parse the arguments:
143
143
 
@@ -11,7 +11,7 @@
11
11
 
12
12
  Alloy uses Backbone.js to provide support for its models and collections. Alloy also borrows the concepts of migrations and adapters from Rails for storage integration.
13
13
 
14
- For models, collections and sync adapters, these guides only provides information on how Alloy utilizes the Backbone.js functionality and some simple examples of using it.
14
+ For models, collections and sync adapters, these guides only provides information on how Alloy uses the Backbone.js functionality and some simple examples of using it.
15
15
 
16
16
  ## Alloy Collection and Model Objects
17
17
 
@@ -214,7 +214,7 @@ exports.definition = {
214
214
 
215
215
  #### Underscore.js Functionality
216
216
 
217
- Additionally, the Backbone.Collection class inherits some functionality from [Underscore.js](https://underscorejs.org/), which can help simplify iterative functions. For example, to add the title of each book object in the library collection to a table, you could use the `map` function to set the table:
217
+ Also, the Backbone.Collection class inherits some functionality from [Underscore.js](https://underscorejs.org/), which can help simplify iterative functions. For example, to add the title of each book object in the library collection to a table, you could use the `map` function to set the table:
218
218
 
219
219
  **Iterating over a collection with underscore**
220
220
 
@@ -281,7 +281,7 @@ You can bind both a collection of models or an individual model. To bind a model
281
281
 
282
282
  ### Global Singleton vs Local Instance
283
283
 
284
- In the above code snippet, the model and collection are global singletons under `Alloy.Models.currentCategory` and `Alloy.Collections.book`. You can also use local instances for the current controller by adding `instance="true"` as attribute. You also need to assign them an ID in order to reference them in the XML and controller.
284
+ In the above code snippet, the model and collection are global singletons under `Alloy.Models.currentCategory` and `Alloy.Collections.book`. You can also use local instances for the current controller by adding `instance="true"` as attribute. You also need to assign them an ID to reference them in the XML and controller.
285
285
 
286
286
  ```xml
287
287
  <Alloy>
@@ -360,7 +360,7 @@ You can bind deep object properties:
360
360
 
361
361
  Before, you needed to use a transformer to create a reference like `authorName`.
362
362
 
363
- Prior to CLI 7.1.0, the only way to set object properties (e.g. `font.fontFamily` for a Label) was to use TSS. You can use dot notation in XML:
363
+ Before CLI 7.1.0, the only way to set object properties (e.g. `font.fontFamily` for a Label) was to use TSS. You can use dot notation in XML:
364
364
 
365
365
  ```xml
366
366
  <Alloy>
@@ -760,7 +760,7 @@ The sync adapter exports three functions:
760
760
 
761
761
  ### Migrations
762
762
 
763
- A migration is a description of incremental changes to a database, which takes your database from version 1 to version X, with a migration file for each step in the evolution of your database schema. This is helpful to keep different versions of a database in sync. For example, when version 7 of your application is deployed, migrations are able to successfully update the database from versions 1 through 6. Currently, migrations are only used with the `sql` sync adapter.
763
+ A migration is a description of incremental changes to a database, which takes your database from version 1 to version X, with a migration file for each step in the evolution of your database schema. This is helpful to keep different versions of a database in sync. For example, when version 7 of your application is deployed, migrations can successfully update the database from versions 1 through 6. Currently, migrations are only used with the `sql` sync adapter.
764
764
 
765
765
  The `migration.up` function upgrades the database from the previous version, while the `migration.down` function rolls back the changes to the previous version.
766
766
 
@@ -1014,7 +1014,7 @@ To use Backbone 1.1.2 to support Alloy Model and Collections objects, open the p
1014
1014
 
1015
1015
  #### Model APIs
1016
1016
 
1017
- **Validation**: Model validation is now only enforced with the `save()` method. Previously, models were also validated with the `set()` method. To force validation when the `set()` method is called, pass `{validate: true}` to the method or extend the Model class. Additionally, validation now occurs even during 'silent' changes (passing `{silent: true}` to methods). Previously, it would not. Failed validations return the `invalid` event. Previously, a failed model validation would return the `error` event.
1017
+ **Validation**: Model validation is now only enforced with the `save()` method. Previously, models were also validated with the `set()` method. To force validation when the `set()` method is called, pass `{validate: true}` to the method or extend the Model class. Also, validation now occurs even during 'silent' changes (passing `{silent: true}` to methods). Previously, it would not. Failed validations return the `invalid` event. Previously, a failed model validation would return the `error` event.
1018
1018
 
1019
1019
  **Parse Method**: All `parse` methods now run after a `fetch`. You cannot change the `id` of a model during `parse`. The `parse` method receives `options` as a second parameter.
1020
1020
 
@@ -84,7 +84,7 @@ $.index.add(profile.getView());
84
84
  $.index.open();
85
85
  ```
86
86
 
87
- **Prior to Alloy 1.4.0**, to dynamically generate a view:
87
+ **Before Alloy 1.4.0**, to dynamically generate a view:
88
88
 
89
89
  1. Create a new instance of the controller using `Alloy.createController()`.
90
90
  2. Modify the properties directly.
@@ -354,7 +354,7 @@ For UI objects that belong to a specific platform, use the `platform` attribute:
354
354
  <SplitWindow platform="ios"/>
355
355
  ```
356
356
 
357
- Additionally, use the alias `Ti` for `Titanium` when specifying namespaces.
357
+ Also, use the alias `Ti` for `Titanium` when specifying namespaces.
358
358
 
359
359
  Many of the Titanium view proxies not part of the `Titanium.UI` namespace do not require that the `ns` attribute be explicitly set. The following elements are implicitly mapped to a namespace:
360
360
 
@@ -10,7 +10,7 @@ See [Importing Widgets](./VIEWS_XML.md#importing-widgets) for more information o
10
10
 
11
11
  ## Creating Widgets
12
12
 
13
- Widgets should be built in their own directory in the Alloy project's `app/widgets/` directory. Widgets have their own views, controllers, models, styles and assets and are laid out the same as the `app` directory in the Alloy project. Additionally, since widgets are self-contained, they should not reference any code or assets not within its path, except for internationalization and localization files, which are located in the `i18n` folder.
13
+ Widgets should be built in their own directory in the Alloy project's `app/widgets/` directory. Widgets have their own views, controllers, models, styles and assets and are laid out the same as the `app` directory in the Alloy project. Also, since widgets are self-contained, they should not reference any code or assets not within its path, except for internationalization and localization files, which are located in the `i18n` folder.
14
14
 
15
15
  ## Assets and Libs
16
16