@maccesar/titools 2.0.7 → 2.2.1

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 (133) hide show
  1. package/AGENTS-VERCEL-RESEARCH.md +172 -0
  2. package/README.md +408 -389
  3. package/agents/{ti-researcher.md → ti-pro.md} +14 -13
  4. package/bin/titools.js +16 -12
  5. package/lib/cleanup.js +95 -0
  6. package/lib/commands/agents.js +146 -70
  7. package/lib/commands/skills.js +349 -0
  8. package/lib/commands/uninstall.js +189 -154
  9. package/lib/commands/update.js +104 -21
  10. package/lib/config.js +26 -20
  11. package/lib/downloader.js +1 -1
  12. package/lib/installer.js +37 -97
  13. package/lib/platform.js +9 -5
  14. package/lib/prompts/checkboxCancel.js +264 -0
  15. package/lib/prompts/selectCancel.js +204 -0
  16. package/lib/symlink.js +19 -7
  17. package/lib/utils.js +17 -17
  18. package/package.json +10 -10
  19. package/skills/alloy-guides/SKILL.md +8 -30
  20. package/skills/alloy-guides/references/CLI_TASKS.md +14 -24
  21. package/skills/alloy-guides/references/CONCEPTS.md +5 -25
  22. package/skills/alloy-guides/references/CONTROLLERS.md +2 -19
  23. package/skills/alloy-guides/references/MODELS.md +40 -10
  24. package/skills/alloy-guides/references/PURGETSS.md +1 -11
  25. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +8 -14
  26. package/skills/alloy-guides/references/VIEWS_STYLES.md +14 -25
  27. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +2 -8
  28. package/skills/alloy-guides/references/VIEWS_XML.md +29 -40
  29. package/skills/alloy-guides/references/WIDGETS.md +1 -17
  30. package/skills/alloy-howtos/SKILL.md +1 -22
  31. package/skills/alloy-howtos/references/best_practices.md +0 -17
  32. package/skills/alloy-howtos/references/cli_reference.md +1 -23
  33. package/skills/alloy-howtos/references/config_files.md +86 -15
  34. package/skills/alloy-howtos/references/custom_tags.md +14 -13
  35. package/skills/alloy-howtos/references/debugging_troubleshooting.md +3 -22
  36. package/skills/alloy-howtos/references/samples.md +4 -14
  37. package/skills/purgetss/SKILL.md +11 -37
  38. package/skills/purgetss/references/EXAMPLES.md +106 -17
  39. package/skills/purgetss/references/animation-system.md +0 -67
  40. package/skills/purgetss/references/apply-directive.md +0 -18
  41. package/skills/purgetss/references/arbitrary-values.md +0 -25
  42. package/skills/purgetss/references/class-index.md +0 -46
  43. package/skills/purgetss/references/cli-commands.md +0 -41
  44. package/skills/purgetss/references/configurable-properties.md +0 -55
  45. package/skills/purgetss/references/custom-rules.md +0 -14
  46. package/skills/purgetss/references/customization-deep-dive.md +0 -49
  47. package/skills/purgetss/references/dynamic-component-creation.md +56 -37
  48. package/skills/purgetss/references/grid-layout.md +0 -32
  49. package/skills/purgetss/references/icon-fonts.md +0 -50
  50. package/skills/purgetss/references/installation-setup.md +61 -32
  51. package/skills/purgetss/references/migration-guide.md +127 -0
  52. package/skills/purgetss/references/opacity-modifier.md +0 -34
  53. package/skills/purgetss/references/performance-tips.md +261 -0
  54. package/skills/purgetss/references/platform-modifiers.md +0 -46
  55. package/skills/purgetss/references/smart-mappings.md +0 -12
  56. package/skills/purgetss/references/tikit-components.md +393 -0
  57. package/skills/purgetss/references/titanium-resets.md +1 -27
  58. package/skills/purgetss/references/ui-ux-design.md +467 -117
  59. package/skills/{alloy-expert → ti-expert}/SKILL.md +45 -54
  60. package/skills/ti-expert/references/alloy-builtins.md +387 -0
  61. package/skills/{alloy-expert → ti-expert}/references/alloy-structure.md +147 -40
  62. package/skills/ti-expert/references/anti-patterns.md +90 -0
  63. package/skills/ti-expert/references/cli-expert.md +109 -0
  64. package/skills/{alloy-expert → ti-expert}/references/code-conventions.md +182 -49
  65. package/skills/{alloy-expert → ti-expert}/references/controller-patterns.md +103 -93
  66. package/skills/{alloy-expert → ti-expert}/references/error-handling.md +12 -12
  67. package/skills/{alloy-expert → ti-expert}/references/examples.md +144 -85
  68. package/skills/{alloy-expert → ti-expert}/references/migration-patterns.md +38 -36
  69. package/skills/{alloy-expert → ti-expert}/references/patterns.md +8 -8
  70. package/skills/ti-expert/references/performance-listview.md +251 -0
  71. package/skills/{alloy-expert/references/performance-patterns.md → ti-expert/references/performance-optimization.md} +67 -283
  72. package/skills/{alloy-expert/references/security-patterns.md → ti-expert/references/security-device.md} +12 -295
  73. package/skills/ti-expert/references/security-fundamentals.md +284 -0
  74. package/skills/{alloy-expert → ti-expert}/references/state-management.md +10 -10
  75. package/skills/ti-expert/references/testing-e2e-ci.md +432 -0
  76. package/skills/ti-expert/references/testing-unit.md +433 -0
  77. package/skills/ti-expert/references/theming.md +394 -0
  78. package/skills/ti-guides/SKILL.md +1 -14
  79. package/skills/ti-guides/references/advanced-data-and-images.md +126 -10
  80. package/skills/ti-guides/references/app-distribution.md +48 -10
  81. package/skills/ti-guides/references/application-frameworks.md +9 -2
  82. package/skills/ti-guides/references/cli-reference.md +338 -82
  83. package/skills/ti-guides/references/coding-best-practices.md +14 -4
  84. package/skills/ti-guides/references/commonjs-advanced.md +103 -6
  85. package/skills/ti-guides/references/hello-world.md +5 -2
  86. package/skills/ti-guides/references/hyperloop-native-access.md +439 -46
  87. package/skills/ti-guides/references/javascript-primer.md +4 -3
  88. package/skills/ti-guides/references/resources.md +0 -1
  89. package/skills/ti-guides/references/style-and-conventions.md +57 -9
  90. package/skills/ti-guides/references/tiapp-config.md +48 -6
  91. package/skills/ti-howtos/SKILL.md +2 -27
  92. package/skills/ti-howtos/references/android-platform-deep-dives.md +41 -90
  93. package/skills/ti-howtos/references/automation-fastlane-appium.md +15 -14
  94. package/skills/ti-howtos/references/buffer-codec-streams.md +22 -22
  95. package/skills/ti-howtos/references/cross-platform-development.md +68 -37
  96. package/skills/ti-howtos/references/debugging-profiling.md +8 -53
  97. package/skills/ti-howtos/references/extending-titanium.md +12 -51
  98. package/skills/ti-howtos/references/google-maps-v2.md +30 -29
  99. package/skills/ti-howtos/references/ios-map-kit.md +19 -25
  100. package/skills/ti-howtos/references/ios-platform-deep-dives.md +95 -283
  101. package/skills/ti-howtos/references/local-data-sources.md +45 -37
  102. package/skills/ti-howtos/references/location-and-maps.md +47 -28
  103. package/skills/ti-howtos/references/media-apis.md +84 -27
  104. package/skills/ti-howtos/references/notification-services.md +40 -89
  105. package/skills/ti-howtos/references/remote-data-sources.md +21 -36
  106. package/skills/ti-howtos/references/tutorials.md +79 -39
  107. package/skills/ti-howtos/references/using-modules.md +4 -30
  108. package/skills/ti-howtos/references/web-content-integration.md +28 -45
  109. package/skills/ti-howtos/references/webpack-build-pipeline.md +54 -18
  110. package/skills/ti-ui/SKILL.md +1 -21
  111. package/skills/ti-ui/references/accessibility-deep-dive.md +71 -25
  112. package/skills/ti-ui/references/animation-and-matrices.md +0 -47
  113. package/skills/ti-ui/references/application-structures.md +0 -46
  114. package/skills/ti-ui/references/custom-fonts-styling.md +9 -57
  115. package/skills/ti-ui/references/event-handling.md +32 -40
  116. package/skills/ti-ui/references/gestures.md +0 -40
  117. package/skills/ti-ui/references/icons-and-splash-screens.md +21 -44
  118. package/skills/ti-ui/references/layouts-and-positioning.md +47 -39
  119. package/skills/ti-ui/references/listviews-and-performance.md +187 -73
  120. package/skills/ti-ui/references/orientation.md +57 -71
  121. package/skills/ti-ui/references/platform-ui-android.md +114 -48
  122. package/skills/ti-ui/references/platform-ui-ios.md +63 -38
  123. package/skills/ti-ui/references/scrolling-views.md +14 -23
  124. package/skills/ti-ui/references/tableviews.md +6 -56
  125. package/AGENTS-TEMPLATE.md +0 -174
  126. package/lib/commands/install.js +0 -188
  127. package/skills/alloy-expert/references/anti-patterns.md +0 -133
  128. package/skills/alloy-expert/references/testing.md +0 -872
  129. package/skills/ti-guides/references/alloy-cli-advanced.md +0 -84
  130. package/skills/ti-guides/references/alloy-data-mastery.md +0 -29
  131. package/skills/ti-guides/references/alloy-widgets-and-themes.md +0 -19
  132. /package/skills/{alloy-expert → ti-expert}/assets/ControllerAutoCleanup.js +0 -0
  133. /package/skills/{alloy-expert → ti-expert}/references/contracts.md +0 -0
package/README.md CHANGED
@@ -1,333 +1,224 @@
1
- # titools - Titanium CLI for AI Coding Assistants
1
+ # TiTools - Titanium CLI for AI coding assistants
2
2
 
3
- A comprehensive CLI that transforms your coding assistant into a **Titanium SDK expert**. Install skills, agents, and documentation for Titanium SDK, Alloy MVC, and PurgeTSS development.
3
+ <div align="center">
4
4
 
5
- ## Compatible Platforms
5
+ ![npm](https://img.shields.io/npm/dm/@maccesar%2Ftitools)
6
+ ![npm](https://img.shields.io/npm/v/@maccesar%2Ftitools)
7
+ ![NPM](https://img.shields.io/npm/l/@maccesar%2Ftitools)
6
8
 
7
- | Platform | Status | Installation Path |
8
- | --------------------------------------------------------- | ------------------ | ------------------- |
9
- | [Claude Code](https://claude.ai/claude-code) | ✅ Fully Compatible | `~/.claude/skills/` |
10
- | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | ✅ Fully Compatible | `~/.gemini/skills/` |
11
- | [Codex CLI](https://developers.openai.com/codex/cli/) | ✅ Fully Compatible | `~/.codex/skills/` |
9
+ </div>
12
10
 
13
- All three platforms use the same **Agent Skills open standard**: a `SKILL.md` file with YAML frontmatter.
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.
14
12
 
15
- ---
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.
14
+
15
+ Based on [Vercel’s 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 53–79% using skills alone.
16
16
 
17
- ## Quick Install
17
+ ---
18
18
 
19
- ### NPM Package (Recommended)
19
+ ## Quick setup
20
20
 
21
21
  ```bash
22
+ # 1) Install the CLI
22
23
  npm install -g @maccesar/titools
23
- ```
24
-
25
- This installs the `titools` CLI command globally:
26
24
 
27
- ```bash
28
- # Install skills and agents
25
+ # 2) Install skills globally
29
26
  titools install
30
27
 
31
- # Add AGENTS.md/CLAUDE.md to your project
32
- titools agents
33
-
34
- # Update to the latest version
35
- titools update
36
-
37
- # Show version
38
- titools --version
39
- ```
40
-
41
- **What it installs:**
42
- - ✅ All 7 titanium-* skills
43
- - ✅ ti-researcher agent
44
- - ✅ Automatic documentation generation
45
-
46
- **Why use NPM?**
47
- - ✅ Cross-platform support (macOS, Linux, Windows)
48
- - ✅ No sudo required
49
- - ✅ Easy version management
50
- - ✅ Simple updates with `titools update`
51
-
52
- ---
53
-
54
- ## Usage
55
-
56
- ### titools install
57
-
58
- Installs Titanium skills and agents globally:
59
- - ✅ All 7 titanium-* skills
60
- - ✅ ti-researcher agent
61
- - ✅ AGENTS-TEMPLATE.md (template for documentation generation)
28
+ # 3) Go to your Titanium project
29
+ cd /path/to/your/project
62
30
 
63
- ### Verify Installation
31
+ # 4) Sync the knowledge index into your project files
32
+ titools sync
64
33
 
65
- **Check titools version:**
66
- ```bash
67
- titools --version
68
- ```
69
-
70
- **Check central location:**
71
- ```bash
72
- ls ~/.agents/skills/
73
- # Should show: alloy-expert, purgetss, ti-ui, ti-howtos, ti-guides, alloy-guides, alloy-howtos
74
- ```
75
-
76
- **Claude Code (skills):**
77
- ```bash
78
- ls -la ~/.claude/skills/
79
- # Should show symlinks pointing to ~/.agents/skills/
80
- ```
34
+ # 5) Start your AI coding assistant
35
+ claude # or gemini, or codex
81
36
 
82
- **Claude Code (agents):**
83
- ```bash
84
- ls -la ~/.claude/agents/
85
- # Should show: ti-researcher.md
37
+ # 6) Ask away!
38
+ # "My ListView with 500 items scrolls like garbage on Android. How do I fix it?"
39
+ # "How should I structure a new app with login, signup, and a dashboard?"
86
40
  ```
87
41
 
88
- **Gemini CLI:**
89
- ```bash
90
- gemini skills list
91
- ```
42
+ What gets installed:
43
+ - All 7 titanium-related skills to `~/.agents/skills/`
44
+ - ti-pro agent for Claude Code
45
+ - Platform symlinks (Claude Code, Gemini CLI, Codex CLI)
46
+ - Knowledge index in your project's `AGENTS.md`/`CLAUDE.md`/`GEMINI.md`
92
47
 
93
- **Codex CLI:**
94
- ```bash
95
- # Type /skills in Codex or use $ to mention a skill
96
- ```
48
+ Why NPM?
49
+ - Cross-platform (macOS, Linux, Windows)
50
+ - No sudo required
51
+ - Simple updates with `titools update`
97
52
 
98
53
  ---
99
54
 
100
- ## AGENTS.md: Boost AI Performance to 100%
101
-
102
- ### ⚠️ Claude Code Users: Use CLAUDE.md
55
+ ## Compatible platforms
103
56
 
104
- **Claude Code specifically looks for `CLAUDE.md`** (not `AGENTS.md`).
57
+ | Platform | Status | Installation Path |
58
+ | --------------------------------------------------------- | ---------------- | ------------------- |
59
+ | [Claude Code](https://claude.ai/claude-code) | Fully Compatible | `~/.claude/skills/` |
60
+ | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Fully Compatible | `~/.gemini/skills/` |
61
+ | [Codex CLI](https://developers.openai.com/codex/cli/) | Fully Compatible | `~/.codex/skills/` |
105
62
 
106
- The `titools agents` command detects if you use Claude Code and creates `CLAUDE.md` automatically:
107
-
108
- ```bash
109
- cd /path/to/your/titanium/project
110
- titools agents
111
-
112
- # The command will ask:
113
- # Which AI assistant are you using?
114
- # 1) Claude Code (creates CLAUDE.md)
115
- # 2) Gemini CLI (creates GEMINI.md)
116
- # 3) Cursor/Copilot (creates AGENTS.md)
117
- ```
118
-
119
- The content is identical - only the filename differs per AI assistant.
63
+ All three platforms use the Agent Skills open standard: a `SKILL.md` file with YAML frontmatter.
120
64
 
121
65
  ---
122
66
 
123
- ### How AGENTS.md/CLAUDE.md Works
124
-
125
- | Approach | Pass Rate |
126
- | ---------------- | --------- |
127
- | No documentation | 53% |
128
- | Skills only | 53-79% |
129
- | **AGENTS.md** | **100%** |
67
+ ## Knowledge index
130
68
 
131
- **Why it works:**
132
- - **No decision point** - Information is always present, no need to invoke skills
133
- - **Consistent availability** - Available in every turn, not async-loaded
134
- - **No ordering issues** - No "read docs first vs explore project first" dilemma
69
+ The knowledge index is a compressed documentation map that gets injected into your project's instruction files. It tells the AI where Titanium reference docs are, so it can pull accurate information instead of relying on general training data.
135
70
 
136
- ### How to Install AGENTS.md
71
+ ### Why it works
137
72
 
138
- After installing titools, add AGENTS.md to your Titanium project:
73
+ | Approach | Reported Pass Rate |
74
+ | ---------------- | ------------------ |
75
+ | No documentation | 53% |
76
+ | Skills only | 53-79% |
77
+ | Knowledge index | 100% |
139
78
 
140
- ```bash
141
- cd /path/to/your/titanium/project
142
-
143
- # If using NPM installation:
144
- titools agents
145
- ```
79
+ Per Vercel's evaluation:
80
+ - No decision point: information is present without needing to invoke skills
81
+ - Consistent availability: available in every turn, not async-loaded
82
+ - No ordering issues: avoids "read docs first vs explore project first"
146
83
 
147
- The `titools agents` command will:
148
- 1. Verify this is a Titanium project (checks for `tiapp.xml`)
149
- 2. Detect your Titanium SDK version
150
- 3. Create `AGENTS.md`/`CLAUDE.md`/`GEMINI.md` with a compressed 8KB documentation index
151
- 4. Intelligently merge if file already exists (removes old block, adds new one)
84
+ For details, see `AGENTS-VERCEL-RESEARCH.md`.
152
85
 
153
- **Priority Logic:** If multiple AI files exist (CLAUDE.md, GEMINI.md, AGENTS.md), the command updates all of them automatically:
154
- - CLAUDE.md has highest priority (Claude Code users)
155
- - GEMINI.md has medium priority (Gemini CLI users)
156
- - AGENTS.md has lowest priority (Cursor/Copilot users)
86
+ ### What gets generated
157
87
 
158
- ### What AGENTS.md Contains
88
+ The `titools sync` command generates a block like this inside your project files:
159
89
 
160
90
  ```
161
91
  [Titanium SDK Docs Index]|root: ~/.agents/skills
162
- |alloy-expert/references:{alloy-structure.md,anti-patterns.md,...}
92
+ |ti-expert/references:{alloy-structure.md,anti-patterns.md,...}
163
93
  |purgetss/references:{animation-system.md,class-index.md,...}
164
94
  |ti-ui/references:{layouts-and-positioning.md,listviews-and-performance.md,...}
165
95
  ...
166
96
  ```
167
97
 
168
- The index points to all reference documentation, so your AI assistant can quickly retrieve accurate information without relying on potentially outdated training data.
169
-
170
- ### Version Notice
171
-
172
- AGENTS.md is based on the **latest Titanium SDK documentation**. If your project uses an older version, the command will detect and warn you about potential API differences.
173
-
174
- ---
175
-
176
- ## How to Use AGENTS.md/CLAUDE.md
177
-
178
- Once installed, the AI assistant automatically reads the documentation index in every conversation. Just ask natural questions about Titanium development:
179
-
180
- ### Example Prompts
181
-
182
- **General Architecture:**
183
- ```
184
- "How should I structure a new Alloy app with authentication?"
185
- "What's the best pattern for navigation between screens?"
186
- ```
187
-
188
- **PurgeTSS Styling:**
189
- ```
190
- "Create a product card with PurgeTSS: image, title, price, and buy button"
191
- "How do I use the 12-column grid system in PurgeTSS?"
192
- "Why does my build fail with platform-specific properties?"
193
- ```
194
-
195
- **UI Components:**
196
- ```
197
- "Create a ListView with custom templates for performance"
198
- "Implement pull-to-refresh on a ScrollView"
199
- ```
200
-
201
- **Native Features:**
202
- ```
203
- "Implement push notifications for iOS and Android"
204
- "How do I handle GPS location in the background?"
205
- ```
98
+ File selection per assistant:
99
+ - Claude Code -> `CLAUDE.md`
100
+ - Gemini CLI -> `GEMINI.md`
101
+ - Codex CLI / others -> `AGENTS.md`
206
102
 
207
- **Debugging:**
208
- ```
209
- "Why is my ListView scrolling poorly?"
210
- "I'm getting 'Alloy is not defined' in my lib file. How do I fix it?"
211
- ```
212
-
213
- ---
103
+ ### How skills and the knowledge index work together
214
104
 
215
- ## How Skills Work with AGENTS.md
105
+ The knowledge index provides always-available context (the documentation map). Skills provide specialized, on-demand expertise (the actual knowledge).
216
106
 
217
- **AGENTS.md** provides always-available context (the documentation index).
218
- **Skills** provide specialized, on-demand expertise.
107
+ Together they work like this:
219
108
 
220
- Together they work seamlessly:
221
-
222
- | Your Question | AGENTS.md Provides | Skills Activate |
109
+ | Your Question | Knowledge Index Provides | Skills Activate |
223
110
  | ------------------------------- | ------------------------------- | ----------------------------- |
224
- | "Create a login screen" | Context about project structure | `alloy-expert`, `purgetss` |
111
+ | "Create a login screen" | Context about project structure | `ti-expert`, `ti-ui` |
225
112
  | "Optimize ListView performance" | Points to docs location | `ti-ui` reads specific files |
226
113
  | "Implement push notifications" | API reference paths | `ti-howtos` provides workflow |
227
114
 
228
- **You don't need to explicitly invoke skills** - the AI detects when to use them based on your question.
115
+ You do not need to explicitly invoke skills. The AI detects when to use them based on your question.
116
+
117
+ ### Version notice
118
+
119
+ The knowledge index is based on the latest Titanium SDK documentation. If your project uses an older version, the command will warn you about potential API differences.
229
120
 
230
121
  ---
231
122
 
232
- ## Skills Overview
123
+ ## Skills overview
233
124
 
234
- | Skill | Purpose | Best For |
235
- | ---------------- | ----------------------------- | --------------------------------------- |
236
- | **alloy-expert** | Architecture + Implementation | Starting point for most tasks |
237
- | **purgetss** | Utility-first styling | UI styling and animations |
238
- | **ti-ui** | UI/UX patterns | Complex layouts, ListViews, platform UI |
239
- | **ti-howtos** | Native feature integration | Location, Push, Media, Platform APIs |
240
- | **ti-guides** | SDK fundamentals | Hyperloop, distribution, configuration |
241
- | **alloy-guides** | Alloy MVC reference | Models, Views, Controllers, Widgets |
242
- | **alloy-howtos** | Alloy CLI & debugging | Project setup, CLI commands, errors |
125
+ | Skill | Purpose | Best For |
126
+ | ------------ | ----------------------------- | --------------------------------------- |
127
+ | alloy-guides | Alloy MVC reference | Models, Views, Controllers, Widgets |
128
+ | alloy-howtos | Alloy CLI & debugging | Project setup, CLI commands, errors |
129
+ | purgetss | Utility-first styling | UI styling and animations |
130
+ | ti-expert | Architecture + Implementation | Starting point for most tasks |
131
+ | ti-guides | SDK fundamentals | Hyperloop, distribution, configuration |
132
+ | ti-howtos | Native feature integration | Location, Push, Media, Platform APIs |
133
+ | ti-ui | UI/UX patterns | Complex layouts, ListViews, platform UI |
243
134
 
244
- > **Note:** `ti-guides`, `ti-howtos`, `ti-ui`, `alloy-guides`, and `alloy-howtos` are based on **official Titanium SDK and Alloy documentation**. `alloy-expert` and `purgetss` are opinionated and reflect personal coding conventions (biased toward PurgeTSS).
135
+ 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).
245
136
 
246
137
  ---
247
138
 
248
- ## Agents (Claude Code Only)
139
+ ## Agents (Claude Code only)
249
140
 
250
- In addition to skills, this repository includes **sub-agents** for Claude Code. Sub-agents run in isolated contexts and are ideal for research tasks that produce verbose output.
141
+ In addition to skills, this repository includes sub-agents for Claude Code. Sub-agents run in isolated contexts and are useful for research tasks that produce verbose output.
251
142
 
252
- ### ti-researcher
143
+ ### ti-pro
253
144
 
254
- **Deep-dive research specialist that preloads all 7 titanium-\* skills.**
145
+ Deep-dive research specialist that preloads all 7 titanium-related skills.
255
146
 
256
- | Aspect | Details |
257
- | -------------------- | -------------------------------------------- |
258
- | **Location** | `~/.claude/agents/ti-researcher.md` |
259
- | **Model** | Sonnet (comprehensive analysis) |
260
- | **Tools** | Read-only (Read, Grep, Glob) |
261
- | **Preloaded Skills** | All 7 titanium-\* skills injected at startup |
147
+ | Aspect | Details |
148
+ | ---------------- | ------------------------------------------------- |
149
+ | Location | `~/.claude/agents/ti-pro.md` |
150
+ | Model | Sonnet (comprehensive analysis) |
151
+ | Tools | Read-only (Read, Grep, Glob) |
152
+ | Preloaded Skills | All 7 titanium-related skills injected at startup |
262
153
 
263
- **When to use the agent vs skills:**
154
+ When to use the agent vs skills:
264
155
 
265
- | Use Case | Use This | Why |
266
- | ---------------------------- | ---------------------------------- | ---------------------------------------------------- |
267
- | Quick inline reference | `/alloy-expert`, `/purgetss`, etc. | Runs in main conversation, interactive |
268
- | Analyzing an entire codebase | `ti-researcher` agent | Isolates verbose output, cross-references all skills |
269
- | Multi-feature research | `ti-researcher` agent | Preloads all skills for comprehensive answers |
270
- | Step-by-step implementation | Skills directly | Task-oriented guidance |
271
- | Architecture review | `ti-researcher` agent | Read-only analysis across all documentation |
156
+ | Use Case | Use This | Why |
157
+ | ---------------------------- | ------------------------------- | ---------------------------------------------------- |
158
+ | Quick inline reference | `/ti-expert`, `/purgetss`, etc. | Runs in main conversation, interactive |
159
+ | Analyzing an entire codebase | `ti-pro` agent | Isolates verbose output, cross-references all skills |
160
+ | Multi-feature research | `ti-pro` agent | Preloads all skills for comprehensive answers |
161
+ | Step-by-step implementation | Skills directly | Task-oriented guidance |
162
+ | Architecture review | `ti-pro` agent | Read-only analysis across all documentation |
272
163
 
273
- **Example prompts for the agent:**
164
+ Example prompts for the agent:
274
165
 
275
166
  ```
276
- "Use the ti-researcher agent to analyze this Alloy codebase's architecture"
277
- "Research how to implement location + push + background sync together in Titanium"
278
- "Compare ListView vs TableView for my use case with PurgeTSS styling"
279
- "Review this Titanium mobile app and identify anti-patterns"
167
+ "Can you use the ti-pro agent to analyze this Alloy codebase's architecture?"
168
+ "Can you research how to combine location, push, and background sync in Titanium?"
169
+ "Can you compare ListView vs TableView performance for my use case?"
170
+ "Review this Titanium mobile app and identify anti-patterns."
280
171
  ```
281
172
 
282
- > **Tip**: For automatic activation, include words like "Titanium", "Alloy", or "mobile app" in your prompt to ensure the specialized agent is used instead of generic code analysis.
173
+ Tip: For automatic activation, include words like "Titanium", "Alloy", or "mobile app" in your prompt to ensure the specialized agent is used instead of generic code analysis.
283
174
 
284
- **Key difference:**
285
- - **Skills** = Interactive help during development (inline, conversational)
286
- - **Agents** = Isolated research tasks (returns summary, keeps verbose output separate)
175
+ Key difference:
176
+ - Skills = interactive help during development (inline, conversational)
177
+ - Agents = isolated research tasks (returns summary, keeps verbose output separate)
287
178
 
288
179
  ---
289
180
 
290
- ## How Skills Work
181
+ ## How skills work
291
182
 
292
- Skills are **automatically activated** based on your questions. Just ask naturally:
183
+ Skills are automatically activated based on your questions. Just ask naturally:
293
184
 
294
185
  ```
295
- "Create a login screen with email validation and animations"
186
+ "Can you create a login screen with email validation and animations?"
296
187
  ```
297
188
 
298
189
  The AI will automatically use:
299
- - `alloy-expert` Architecture and controller structure
300
- - `purgetss` Styling classes and animations (if PurgeTSS detected)
301
- - `ti-howtos` Secure token storage
190
+ - `ti-expert` -> Architecture and controller structure
191
+ - `purgetss` -> Styling classes and animations (if PurgeTSS detected)
192
+ - `ti-howtos` -> Secure token storage
302
193
 
303
- **You don't need to call skills explicitly** - the AI reads skill descriptions and loads the appropriate knowledge when needed.
194
+ You do not need to call skills explicitly. The AI reads skill descriptions and loads the appropriate knowledge when needed.
304
195
 
305
- ### Project Detection
196
+ ### Project detection
306
197
 
307
- All skills now include **automatic project detection** to ensure compatibility:
198
+ All skills include automatic project detection to ensure compatibility:
308
199
 
309
- | Skill | What It Detects | How It Works |
310
- | ---------------- | --------------------- | ------------------------------------------------------------- |
311
- | **purgetss** | PurgeTSS installation | Checks for `purgetss/` folder, `config.cjs`, `utilities.tss` |
312
- | **alloy-expert** | Alloy vs Classic | Checks for `app/` (Alloy) vs `Resources/` (Classic) structure |
313
- | **alloy-guides** | Alloy projects | Checks for `app/views/`, `app/controllers/` |
314
- | **alloy-howtos** | Alloy projects | Checks for `alloy.jmk`, `config.json` |
315
- | **ti-ui** | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
316
- | **ti-guides** | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
317
- | **ti-howtos** | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
200
+ | Skill | What It Detects | How It Works |
201
+ | ------------ | --------------------- | ------------------------------------------------------------- |
202
+ | purgetss | PurgeTSS installation | Checks for `purgetss/` folder, `config.cjs`, `utilities.tss` |
203
+ | ti-expert | Alloy vs Classic | Checks for `app/` (Alloy) vs `Resources/` (Classic) structure |
204
+ | alloy-guides | Alloy projects | Checks for `app/views/`, `app/controllers/` |
205
+ | alloy-howtos | Alloy projects | Checks for `alloy.jmk`, `config.json` |
206
+ | ti-ui | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
207
+ | ti-guides | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
208
+ | ti-howtos | Titanium projects | Checks for `tiapp.xml` (both Alloy & Classic) |
318
209
 
319
- **Why this matters:**
320
- - PurgeTSS suggestions are **only provided** if PurgeTSS is installed
321
- - Alloy-specific patterns are **only suggested** for Alloy projects
322
- - Classic Titanium projects won't receive inappropriate Alloy advice
210
+ Why this matters:
211
+ - PurgeTSS suggestions are only provided if PurgeTSS is installed
212
+ - Alloy-specific patterns are only suggested for Alloy projects
213
+ - Classic Titanium projects will not receive inappropriate Alloy advice
323
214
 
324
- ### Skill Hierarchy
215
+ ### Skill hierarchy
325
216
 
326
- `alloy-expert` acts as the **orchestrator**, delegating to specialized skills when needed:
217
+ `ti-expert` acts as the orchestrator, delegating to specialized skills when needed:
327
218
 
328
219
  ```
329
220
  ┌─────────────────┐
330
- alloy-expert
221
+ ti-expert
331
222
  │ (Start Here) │
332
223
  └────────┬────────┘
333
224
 
@@ -352,13 +243,13 @@ All skills now include **automatic project detection** to ensure compatibility:
352
243
 
353
244
  ---
354
245
 
355
- ## Skill Details
246
+ ## Skill details
356
247
 
357
- ### alloy-expert
248
+ ### ti-expert
358
249
 
359
- **The primary skill for Titanium Alloy development.** Start here for most tasks.
250
+ The primary skill for Titanium Alloy development. Start here for most tasks.
360
251
 
361
- **When it activates:**
252
+ When it activates:
362
253
  - Designing project structure
363
254
  - Implementing controllers, views, services
364
255
  - Choosing data strategies (Models vs Collections)
@@ -368,28 +259,28 @@ All skills now include **automatic project detection** to ensure compatibility:
368
259
  - Security patterns
369
260
  - Migrating legacy apps
370
261
 
371
- **Example prompts:**
262
+ Example prompts:
372
263
  ```
373
264
  "How should I structure a new Titanium Alloy app with authentication?"
374
- "Create a user service that fetches data from an API"
265
+ "Create a user service that fetches data from an API."
375
266
  "What's the best pattern for navigation between screens?"
376
- "How do I prevent memory leaks in my controllers?"
377
- "Migrate this classic Titanium code to modern Alloy patterns"
267
+ "Prevent memory leaks in my controllers."
268
+ "Migrate classic Titanium code to modern Alloy patterns."
269
+ "What's a clean way to organize services in an Alloy app?"
378
270
  ```
379
271
 
380
- **Key features:**
381
- - PurgeTSS rules built-in (correct classes)
272
+ Key features:
382
273
  - Quick decision matrix for common questions
383
- - 13 reference guides for deep dives
274
+ - 18 reference guides for deep dives
384
275
  - Delegates to specialized skills when needed
385
276
 
386
277
  ---
387
278
 
388
279
  ### purgetss
389
280
 
390
- **Utility-first styling toolkit for Titanium/Alloy.**
281
+ Utility-first styling toolkit for Titanium/Alloy.
391
282
 
392
- **When it activates:**
283
+ When it activates:
393
284
  - Setting up PurgeTSS in a project
394
285
  - Complex layouts (Grid system)
395
286
  - Declarative animations (`<Animation>` component)
@@ -398,30 +289,30 @@ All skills now include **automatic project detection** to ensure compatibility:
398
289
  - Platform-specific styling
399
290
  - config.cjs configuration
400
291
 
401
- **Example prompts:**
292
+ Example prompts:
402
293
  ```
403
- "Set up PurgeTSS in my existing Alloy project"
404
- "Create a responsive 12-column grid layout"
405
- "Add a fade-in animation when my view appears"
406
- "Configure custom colors in config.cjs"
294
+ "How do I set up PurgeTSS in my existing Alloy project?"
295
+ "Create a responsive 12-column grid layout."
296
+ "Add a fade-in animation when my view appears."
297
+ "How do I configure custom colors in config.cjs?"
407
298
  "How do I use Font Awesome 7 icons?"
408
- "Style this button differently on iOS vs Android"
299
+ "Style this button differently on iOS vs Android."
409
300
  ```
410
301
 
411
- **Critical rules:**
412
- - **Platform-specific properties REQUIRE modifiers** (e.g., `[platform=ios]`) to prevent cross-platform build failures
413
- - NO flexbox (`flex-row`, `justify-between`) use `horizontal`/`vertical`
414
- - NO `w-full` use `w-screen`
415
- - NO `p-*` on Views use `m-*` on children
416
- - Arbitrary values use parentheses: `w-(100px)`, NOT `w-[100px]`
302
+ Rules:
303
+ - Platform-specific properties require modifiers (e.g., `[platform=ios]`) to prevent cross-platform build failures
304
+ - No flexbox (`flex-row`, `justify-between`) -> use `horizontal`/`vertical`
305
+ - No `w-full` -> use `w-screen`
306
+ - No `p-*` on Views -> use `m-*` on children
307
+ - Arbitrary values use parentheses: `w-(100px)`, not `w-[100px]`
417
308
 
418
309
  ---
419
310
 
420
311
  ### ti-ui
421
312
 
422
- **UI/UX expert for layouts and platform components.**
313
+ UI/UX expert for layouts and platform components.
423
314
 
424
- **When it activates:**
315
+ When it activates:
425
316
  - Layout systems (composite, vertical, horizontal)
426
317
  - ListView/TableView optimization
427
318
  - Event handling and bubbling
@@ -432,18 +323,18 @@ All skills now include **automatic project detection** to ensure compatibility:
432
323
  - Android Action Bar / iOS Navigation patterns
433
324
  - Accessibility (VoiceOver, TalkBack)
434
325
 
435
- **Example prompts:**
326
+ Example prompts:
436
327
  ```
437
- "Create a high-performance ListView with custom templates"
438
- "Handle swipe gestures on table rows"
439
- "Set up app icons for all iOS and Android densities"
440
- "Implement pull-to-refresh on a ScrollView"
441
- "Make my app accessible for VoiceOver users"
442
- "Configure the Android Action Bar with custom menu items"
328
+ "How do I create a high-performance ListView with custom templates?"
329
+ "Handle swipe gestures on table rows."
330
+ "Set up app icons for all iOS and Android densities."
331
+ "Implement pull-to-refresh on a ScrollView."
332
+ "How do I make my app accessible for VoiceOver users?"
333
+ "How do I configure the Android Action Bar with custom menu items?"
443
334
  ```
444
335
 
445
- **Key rules:**
446
- - NO `Ti.UI.SIZE` in ListView items (causes jerky scrolling)
336
+ Key rules:
337
+ - No `Ti.UI.SIZE` in ListView items (causes jerky scrolling)
447
338
  - Prefer ListView over TableView for large datasets
448
339
  - Use `dp` units for cross-platform consistency
449
340
  - Remove global listeners on pause
@@ -452,9 +343,9 @@ All skills now include **automatic project detection** to ensure compatibility:
452
343
 
453
344
  ### ti-howtos
454
345
 
455
- **Native feature integration expert.**
346
+ Native feature integration expert.
456
347
 
457
- **When it activates:**
348
+ When it activates:
458
349
  - Location services and Maps
459
350
  - Push notifications (APNs/FCM)
460
351
  - Local notifications
@@ -468,18 +359,19 @@ All skills now include **automatic project detection** to ensure compatibility:
468
359
  - iOS Background Services, iCloud, Keychain
469
360
  - Core Motion, WatchKit
470
361
 
471
- **Example prompts:**
362
+ Example prompts:
472
363
  ```
473
- "Implement battery-efficient GPS tracking"
474
- "Set up push notifications for iOS and Android"
475
- "Capture and resize photos from the camera"
476
- "Download files with progress indicator"
477
- "Store sensitive data in iOS Keychain"
478
- "Create an Android background service"
479
- "Integrate with Apple Watch using WatchKit"
364
+ "How do I implement battery-efficient GPS tracking?"
365
+ "How do I set up push notifications for iOS and Android?"
366
+ "How do I capture and resize photos from the camera?"
367
+ "Download files with a progress indicator."
368
+ "How should I store sensitive data in iOS Keychain?"
369
+ "Create an Android background service."
370
+ "Integrate with Apple Watch using WatchKit."
371
+ "Handle background location updates on iOS."
480
372
  ```
481
373
 
482
- **Key rules:**
374
+ Key rules:
483
375
  - Always handle both `onload` and `onerror` for HTTPClient
484
376
  - Always close database handles and result sets
485
377
  - Use `imageAsResized` to avoid memory exhaustion
@@ -489,9 +381,9 @@ All skills now include **automatic project detection** to ensure compatibility:
489
381
 
490
382
  ### ti-guides
491
383
 
492
- **SDK fundamentals and advanced configuration.**
384
+ SDK fundamentals and advanced configuration.
493
385
 
494
- **When it activates:**
386
+ When it activates:
495
387
  - Hyperloop native access
496
388
  - Native module development
497
389
  - App distribution (Play Store, App Store)
@@ -501,23 +393,23 @@ All skills now include **automatic project detection** to ensure compatibility:
501
393
  - CommonJS module patterns
502
394
  - Coding best practices
503
395
 
504
- **Example prompts:**
396
+ Example prompts:
505
397
  ```
506
- "Access native iOS APIs using Hyperloop"
507
- "Configure tiapp.xml for production build"
508
- "Prepare my app for Google Play submission"
509
- "Create a native Android module"
510
- "Optimize bridge crossings for better performance"
511
- "What are the reserved words I should avoid?"
398
+ "How do I access native iOS APIs using Hyperloop?"
399
+ "Configure tiapp.xml for a production build."
400
+ "What do I need for Google Play submission?"
401
+ "How do I create a native Android module?"
402
+ "Optimize bridge crossings for better performance."
403
+ "List reserved words I should avoid."
512
404
  ```
513
405
 
514
406
  ---
515
407
 
516
408
  ### alloy-guides
517
409
 
518
- **Complete Alloy MVC framework reference.**
410
+ Complete Alloy MVC framework reference.
519
411
 
520
- **When it activates:**
412
+ When it activates:
521
413
  - MVC architecture concepts
522
414
  - Backbone.js models and collections
523
415
  - Data binding patterns
@@ -527,13 +419,13 @@ All skills now include **automatic project detection** to ensure compatibility:
527
419
  - Sync adapters (sql, properties)
528
420
  - Migrations
529
421
 
530
- **Example prompts:**
422
+ Example prompts:
531
423
  ```
532
- "Explain how Alloy data binding works"
533
- "Create a model with SQLite adapter"
534
- "Bind a collection to a TableView"
535
- "Build a reusable widget"
536
- "What's the TSS syntax for platform-specific styles?"
424
+ "Explain how Alloy data binding works."
425
+ "How do I create a model with the SQLite adapter?"
426
+ "Bind a collection to a TableView."
427
+ "How do I build a reusable widget?"
428
+ "Show the TSS syntax for platform-specific styles."
537
429
  "How does the Alloy compilation process work?"
538
430
  ```
539
431
 
@@ -541,9 +433,9 @@ All skills now include **automatic project detection** to ensure compatibility:
541
433
 
542
434
  ### alloy-howtos
543
435
 
544
- **Alloy CLI, configuration, and debugging.**
436
+ Alloy CLI, configuration, and debugging.
545
437
 
546
- **When it activates:**
438
+ When it activates:
547
439
  - Alloy CLI commands (new, generate, compile)
548
440
  - Configuration files (alloy.jmk, config.json)
549
441
  - Debugging compilation errors
@@ -552,116 +444,254 @@ All skills now include **automatic project detection** to ensure compatibility:
552
444
  - Best practices and naming conventions
553
445
  - Backbone.Events patterns
554
446
 
555
- **Example prompts:**
447
+ Example prompts:
556
448
  ```
557
- "Generate a new model with CLI"
558
- "Configure alloy.jmk build hooks"
559
- "Fix 'No app.js found' error"
560
- "Create conditional views based on user state"
561
- "Build a custom XML tag without widgets"
562
- "Set up Backbone.Events for global communication"
449
+ "How do I generate a new model with the CLI?"
450
+ "Configure alloy.jmk build hooks."
451
+ "How do I fix "No app.js found"?"
452
+ "Create conditional views based on user state."
453
+ "How do I build a custom XML tag without widgets?"
454
+ "Set up Backbone.Events for global communication."
563
455
  ```
564
456
 
565
- **Key rules:**
457
+ Key rules:
566
458
  - Use Backbone.Events instead of Ti.App.fireEvent
567
459
  - Never use double underscore prefixes (`__foo`)
568
460
  - Access config at runtime with `Alloy.CFG.yourKey`
569
461
 
570
462
  ---
571
463
 
572
- ## Usage Examples
464
+ ## Usage examples and best practices
573
465
 
574
- ### Starting a New Project
466
+ ### Example prompts
467
+
468
+ Starting a new project:
575
469
  ```
576
470
  "I'm starting a new Titanium Alloy app for a food delivery service.
577
- Help me set up the project structure."
471
+ Can you help me set up the project structure?"
578
472
  ```
579
473
 
580
- ### UI Development
474
+ UI development:
581
475
  ```
582
- "Create a product listing screen with:
476
+ "Can you create a product listing screen with:
583
477
  - Pull-to-refresh
584
478
  - Infinite scroll pagination
585
479
  - Image caching
586
480
  - Swipe-to-delete"
587
481
  ```
588
482
 
589
- ### API Integration
483
+ API integration:
590
484
  ```
591
- "Build a complete authentication flow:
485
+ "Can you build a complete authentication flow with:
592
486
  - Login/Register screens
593
487
  - JWT token management
594
488
  - Secure storage
595
489
  - Auto-refresh tokens"
596
490
  ```
597
491
 
598
- ### Performance Optimization
492
+ Performance optimization:
599
493
  ```
600
- "My app is slow. The ListView scrolls poorly and
601
- the app uses too much memory. Help me optimize it."
494
+ "My app is slow - the ListView scrolls poorly and memory usage is high. How do I optimize it?"
602
495
  ```
603
496
 
604
- ### Migration
497
+ Migration:
605
498
  ```
606
- "I have a legacy Titanium classic app from 2015.
607
- Help me migrate it to modern Alloy with PurgeTSS."
499
+ "I have a legacy Titanium classic app from 2015. Can you help me migrate it to modern Alloy?"
608
500
  ```
609
501
 
610
- ### Platform-Specific Features
502
+ Platform-specific features:
611
503
  ```
612
- "Implement Apple Sign-In for iOS and Google Sign-In for Android"
504
+ "How do I implement Apple Sign-In for iOS and Google Sign-In for Android?"
613
505
  ```
614
506
 
615
- ### Debugging
507
+ Debugging:
616
508
  ```
617
- "I'm getting 'Alloy is not defined' in my lib file. How do I fix it?"
509
+ "How do I fix "Alloy is not defined" in my lib file?"
618
510
  ```
619
511
 
620
- ### Codebase Analysis (Using Agent)
512
+ Codebase analysis (using agent):
621
513
  ```
622
- "Use the ti-researcher agent to analyze this project:
623
- - Review the overall architecture
624
- - Identify memory leak patterns
625
- - Check for PurgeTSS anti-patterns
626
- - Suggest improvements"
514
+ "Use the ti-pro agent to analyze this project and:
515
+ - review the overall architecture
516
+ - identify memory leak patterns
517
+ - check for common anti-patterns
518
+ - suggest improvements"
627
519
  ```
628
520
 
521
+ ### Tips for better results
522
+
523
+ 1. Be specific. Instead of "Make a list", try "Can you create a ListView with user avatars, names, and swipe actions?"
524
+ 2. Provide context. Instead of "How do I fix this error?", try "I'm getting this error when compiling: [error message]. Here's my code: [code]"
525
+ 3. Ask for architecture first. For complex features, start with "How should I architect a real-time chat feature?" then follow up with implementation details.
526
+ 4. Mention constraints. "Build a settings screen. Must work offline and sync when connected."
527
+ 5. Reference existing code. "Here's my current controller. How can I improve memory management?"
528
+
529
+ More examples: See [Example Prompts](EXAMPLE-PROMPTS.md) for detailed prompts that test each skill's capabilities.
530
+
629
531
  ---
630
532
 
631
- ## Best Practices
533
+ ## CLI reference
534
+
535
+ ### titools install
536
+
537
+ Installs Titanium skills, agents, and platform symlinks.
538
+
539
+ ```bash
540
+ titools install [options]
541
+ ```
542
+
543
+ Options:
544
+ | Option | Description |
545
+ | --------------- | ------------------------------------------------------------------- |
546
+ | `-l, --local` | Install skills locally in the current project (`./.agents/skills/`) |
547
+ | `-a, --all` | Install to all detected platforms without prompting |
548
+ | `--path <path>` | Install to a custom path (skips symlink setup) |
549
+
550
+ Behavior depends on where you run it:
551
+
552
+ | Context | Behavior |
553
+ | -------------------------- | --------------------------------------------------------------------- |
554
+ | Outside a Titanium project | Installs skills globally to `~/.agents/skills/` |
555
+ | Inside a Titanium project | Prompts you to choose: Global or Local installation |
556
+ | With `--local` flag | Installs skills locally to `./.agents/skills/` in the current project |
557
+
558
+ What it does:
559
+ - Installs all 7 titanium-related skills (global or local depending on context)
560
+ - Installs ti-pro agent for Claude Code
561
+ - Detects installed AI platforms and lets you choose which to link
562
+ - Creates symlinks from platform directories to central skills
563
+ - Cleans up legacy artifacts (`alloy-expert` skill, `ti-researcher` agent)
564
+ - If run inside a Titanium project, prompts to run `titools sync` afterward
565
+ - Warns Gemini users if local skills override existing global Gemini skills
566
+
567
+ ### titools sync
632
568
 
633
- ### 1. Be Specific
634
- Instead of: "Make a list"
635
- Try: "Create a ListView with user avatars, names, and swipe actions"
569
+ Generates a compressed knowledge index inside your project's instruction files (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`).
636
570
 
637
- ### 2. Provide Context
638
- Instead of: "Fix the error"
639
- Try: "I'm getting this error when compiling: [error message]. Here's my code: [code]"
571
+ Important: This command only works inside a Titanium project (requires `tiapp.xml`). The knowledge index is project-specific. It detects your SDK version and points to the installed skill references.
640
572
 
641
- ### 3. Ask for Architecture First
642
- For complex features, start with:
643
- "How should I architect a real-time chat feature?"
644
- Then follow up with implementation details.
573
+ ```bash
574
+ titools sync [path] [options]
575
+ ```
576
+
577
+ Arguments:
578
+ | Argument | Description |
579
+ | -------- | -------------------------------------------- |
580
+ | `[path]` | Project path (defaults to current directory) |
581
+
582
+ Options:
583
+ | Option | Description |
584
+ | --------------- | ------------------------------------------ |
585
+ | `-f, --force` | Overwrite existing files without prompting |
586
+ | `-v, --verbose` | Show detailed diagnostics |
587
+
588
+ What it does:
589
+ - Verifies you're inside a Titanium project (`tiapp.xml`)
590
+ - Detects Titanium SDK version from `tiapp.xml`
591
+ - Prompts you to select which files to sync: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`
592
+ - Inserts or updates a compressed knowledge index block in selected files
593
+ - Removes knowledge blocks from unselected files
594
+ - Creates files if they don't exist
595
+
596
+ ### titools update
597
+
598
+ Updates installed skills and agents to the latest version.
599
+
600
+ ```bash
601
+ titools update [options]
602
+ ```
603
+
604
+ Options:
605
+ | Option | Description |
606
+ | ------------- | ------------------------------------------ |
607
+ | `-l, --local` | Update local skills in the current project |
608
+
609
+ Behavior depends on where you run it:
610
+
611
+ | Context | Behavior |
612
+ | --------------------------------------------------------------- | ----------------------------------------------------------- |
613
+ | Outside a Titanium project | Updates global skills in `~/.agents/skills/` (if installed) |
614
+ | Inside a Titanium project (local skills only) | Updates local skills automatically |
615
+ | Inside a Titanium project (both local and global) | Prompts you to choose: Global or Local |
616
+ | Inside a Titanium project (with existing knowledge index files) | Also refreshes `AGENTS.md`/`CLAUDE.md`/`GEMINI.md` |
617
+
618
+ What it does:
619
+ - Checks GitHub for the latest version
620
+ - Downloads and installs updated skills and agents
621
+ - Updates platform symlinks for all detected platforms
622
+ - Cleans up legacy artifacts (`alloy-expert` skill, `ti-researcher` agent)
623
+ - Auto-syncs knowledge index files if they exist in the current project
645
624
 
646
- ### 4. Mention Constraints
647
- "Build a settings screen. Must work offline and sync when connected."
625
+ Note: This updates knowledge packages and agents, not the CLI binary itself. To update the CLI, use `npm update -g @maccesar/titools`.
648
626
 
649
- ### 5. Reference Existing Code
650
- "Here's my current controller. How can I improve memory management?"
627
+ ### titools remove
628
+
629
+ Removes skills, agents, symlinks, and knowledge index blocks.
630
+
631
+ ```bash
632
+ titools remove [options]
633
+ ```
651
634
 
652
- > **More examples:** See [Example Prompts](docs/EXAMPLE-PROMPTS.md) for detailed prompts that test each skill's capabilities.
635
+ Options:
636
+ | Option | Description |
637
+ | ------------- | -------------------------------------------- |
638
+ | `-l, --local` | Remove local skills from the current project |
639
+
640
+ What it does:
641
+ - Detects all installed components (skills, agents, symlinks, knowledge blocks)
642
+ - Prompts you to select what to remove:
643
+ - ti-pro agent for Claude Code
644
+ - Knowledge index blocks from instruction files (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`)
645
+ - Skills from global (`~/.agents/skills/`) or project directory
646
+ - Platform symlinks from global or project directory
647
+ - Removes both current and legacy artifacts
648
+
649
+ ### Verify installation
650
+
651
+ Check titools version:
652
+ ```bash
653
+ titools --version
654
+ ```
655
+
656
+ Check central location (global install):
657
+ ```bash
658
+ ls ~/.agents/skills/
659
+ # Should show: ti-expert, purgetss, ti-ui, ti-howtos, ti-guides, alloy-guides, alloy-howtos
660
+ ```
661
+
662
+ Claude Code (skills):
663
+ ```bash
664
+ ls -la ~/.claude/skills/
665
+ # Should show symlinks pointing to ~/.agents/skills/
666
+ ```
667
+
668
+ Claude Code (agents):
669
+ ```bash
670
+ ls -la ~/.claude/agents/
671
+ # Should show: ti-pro.md
672
+ ```
673
+
674
+ Gemini CLI:
675
+ ```bash
676
+ gemini skills list
677
+ ```
678
+
679
+ Codex CLI:
680
+ ```bash
681
+ # Type /skills in Codex or use $ to mention a skill
682
+ ```
653
683
 
654
684
  ---
655
685
 
656
- ## Skill Contents Summary
686
+ ## Skill contents summary
657
687
 
658
688
  | Skill | SKILL.md | References |
659
689
  | ------------ | ----------------------------- | ----------------------------------------------------- |
660
- | alloy-expert | Architecture + Implementation | 14 files (patterns, testing, security, assets, etc.) |
661
- | purgetss | Setup + Critical Rules | 17 files (grid, animations, icons, class-index, etc.) |
662
- | ti-ui | UI Rules + Platform Diffs | 13 files (layouts, lists, gestures, etc.) |
663
- | ti-howtos | Integration Workflow | 12 files (location, media, maps, automation, etc.) |
664
- | ti-guides | Core Workflow | 10 files (hyperloop, distribution, etc.) |
690
+ | ti-expert | Architecture + Implementation | 19 refs + 1 asset (patterns, testing, security, etc.) |
691
+ | purgetss | Setup + Critical Rules | 21 files (grid, animations, icons, class-index, etc.) |
692
+ | ti-ui | UI Rules + Platform Diffs | 14 files (layouts, lists, gestures, etc.) |
693
+ | ti-howtos | Integration Workflow | 18 files (location, media, maps, automation, etc.) |
694
+ | ti-guides | Core Workflow | 14 files (hyperloop, distribution, etc.) |
665
695
  | alloy-guides | MVC Quick Start | 10 files (models, views, widgets, etc.) |
666
696
  | alloy-howtos | Best Practices | 6 files (CLI, config, debugging, etc.) |
667
697
 
@@ -669,7 +699,7 @@ Then follow up with implementation details.
669
699
 
670
700
  ## Troubleshooting
671
701
 
672
- ### Skill Not Activating?
702
+ ### Skill not activating?
673
703
 
674
704
  If the AI doesn't seem to use Titanium knowledge:
675
705
  1. Mention "Titanium" or "Alloy" explicitly in your prompt
@@ -677,39 +707,35 @@ If the AI doesn't seem to use Titanium knowledge:
677
707
  3. Reference the technology stack
678
708
  4. Try explicit invocation: "Use the purgetss skill for styling questions"
679
709
 
680
- ### Getting Wrong Suggestions?
710
+ ### Getting wrong suggestions?
681
711
 
682
- If the AI suggests patterns you don't use (e.g., PurgeTSS when you're not using it):
712
+ If the AI suggests patterns you don't use (for example, PurgeTSS when you're not using it):
683
713
  1. The skill may not have detected your project type correctly
684
714
  2. Explicitly mention your stack: "I'm using Classic Titanium, not Alloy"
685
715
  3. Be more specific about what you're building
686
716
 
687
- ### PurgeTSS Not Detected?
717
+ ### PurgeTSS not detected?
688
718
 
689
719
  If the purgetss skill doesn't activate for your PurgeTSS project:
690
720
  1. Verify `purgetss/` folder exists in project root
691
721
  2. Check that `purgetss/config.cjs` exists
692
722
  3. Mention "PurgeTSS" explicitly in your prompt
693
723
 
694
- ### Wrong Advice?
724
+ ### Wrong advice?
695
725
 
696
726
  If the AI suggests incorrect patterns (like flexbox):
697
727
  1. Remind it you're using PurgeTSS
698
728
  2. Reference the correct pattern from memory
699
729
  3. Ask to check the PurgeTSS rules
700
730
 
701
- ### Need More Detail?
731
+ ### Need more detail?
702
732
 
703
733
  Ask the AI to:
704
734
  ```
705
735
  "Show me the reference documentation for ListView performance"
706
- "What does the alloy-expert skill say about memory cleanup?"
736
+ "What does the ti-expert skill say about memory cleanup?"
707
737
  ```
708
738
 
709
- ---
710
-
711
- ## Troubleshooting
712
-
713
739
  ### titools command not found?
714
740
 
715
741
  If the command is not found:
@@ -721,16 +747,16 @@ npm list -g @maccesar/titools
721
747
  npm install -g @maccesar/titools
722
748
  ```
723
749
 
724
- ### AGENTS.md not working?
750
+ ### Knowledge index not working?
725
751
 
726
- If your AI doesn't use the AGENTS.md information:
727
- 1. Verify AGENTS.md/CLAUDE.md exists in your project root
728
- 2. Check that your AI supports these files (Claude Code does)
752
+ If your AI doesn't use the knowledge index information:
753
+ 1. Verify AGENTS.md/CLAUDE.md/GEMINI.md exists in your project root
754
+ 2. Check that your AI supports these files
729
755
  3. Try explicitly referencing: "Check the AGENTS.md documentation"
730
756
 
731
757
  ### Version mismatch warning?
732
758
 
733
- AGENTS.md is based on the latest documentation. Be cautious when using newer APIs in older projects.
759
+ The knowledge index is based on the latest documentation. Be cautious when using newer APIs in older projects.
734
760
 
735
761
  ---
736
762
 
@@ -740,18 +766,11 @@ AGENTS.md is based on the latest documentation. Be cautious when using newer API
740
766
  # Remove the CLI
741
767
  npm uninstall -g @maccesar/titools
742
768
 
743
- # Remove skills and agents
744
- titools uninstall
745
- ```
746
-
747
- **Note:** AGENTS.md/CLAUDE.md/GEMINI.md files in your projects are NOT removed. To remove them manually:
748
-
749
- ```bash
750
- rm -f /path/to/your/project/AGENTS.md
751
- rm -f /path/to/your/project/CLAUDE.md
752
- rm -f /path/to/your/project/GEMINI.md
769
+ # Remove knowledge packages and agent
770
+ titools remove
753
771
  ```
754
772
 
773
+ Note: `titools remove` can remove the knowledge index blocks from your project files, but it does not delete the files themselves.
755
774
 
756
775
  ---
757
776
 
@@ -770,9 +789,9 @@ rm -f /path/to/your/project/GEMINI.md
770
789
 
771
790
  ---
772
791
 
773
- ## Legacy Installation (Not Recommended)
792
+ ## Legacy installation (not recommended)
774
793
 
775
- The bash installer is maintained for backward compatibility but **NPM installation is strongly recommended**.
794
+ The bash installer is maintained for backward compatibility but NPM installation is recommended.
776
795
 
777
796
  ```bash
778
797
  curl -fsSL https://raw.githubusercontent.com/macCesar/titools/main/install.sh | bash
@@ -784,7 +803,7 @@ Use this only if you cannot use NPM for any reason.
784
803
 
785
804
  ## Credits
786
805
 
787
- Created by **César Estrada** ([@macCesar](https://github.com/macCesar)), creator of [PurgeTSS](https://github.com/macCesar/purgeTSS).
806
+ Created by César Estrada ([@macCesar](https://github.com/macCesar)), creator of [PurgeTSS](https://github.com/macCesar/purgeTSS).
788
807
 
789
808
  ## License
790
809