@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.
- package/AGENTS-VERCEL-RESEARCH.md +172 -0
- package/README.md +408 -389
- package/agents/{ti-researcher.md → ti-pro.md} +14 -13
- package/bin/titools.js +16 -12
- package/lib/cleanup.js +95 -0
- package/lib/commands/agents.js +146 -70
- package/lib/commands/skills.js +349 -0
- package/lib/commands/uninstall.js +189 -154
- package/lib/commands/update.js +104 -21
- package/lib/config.js +26 -20
- package/lib/downloader.js +1 -1
- package/lib/installer.js +37 -97
- package/lib/platform.js +9 -5
- package/lib/prompts/checkboxCancel.js +264 -0
- package/lib/prompts/selectCancel.js +204 -0
- package/lib/symlink.js +19 -7
- package/lib/utils.js +17 -17
- package/package.json +10 -10
- package/skills/alloy-guides/SKILL.md +8 -30
- package/skills/alloy-guides/references/CLI_TASKS.md +14 -24
- package/skills/alloy-guides/references/CONCEPTS.md +5 -25
- package/skills/alloy-guides/references/CONTROLLERS.md +2 -19
- package/skills/alloy-guides/references/MODELS.md +40 -10
- package/skills/alloy-guides/references/PURGETSS.md +1 -11
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +8 -14
- package/skills/alloy-guides/references/VIEWS_STYLES.md +14 -25
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +2 -8
- package/skills/alloy-guides/references/VIEWS_XML.md +29 -40
- package/skills/alloy-guides/references/WIDGETS.md +1 -17
- package/skills/alloy-howtos/SKILL.md +1 -22
- package/skills/alloy-howtos/references/best_practices.md +0 -17
- package/skills/alloy-howtos/references/cli_reference.md +1 -23
- package/skills/alloy-howtos/references/config_files.md +86 -15
- package/skills/alloy-howtos/references/custom_tags.md +14 -13
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +3 -22
- package/skills/alloy-howtos/references/samples.md +4 -14
- package/skills/purgetss/SKILL.md +11 -37
- package/skills/purgetss/references/EXAMPLES.md +106 -17
- package/skills/purgetss/references/animation-system.md +0 -67
- package/skills/purgetss/references/apply-directive.md +0 -18
- package/skills/purgetss/references/arbitrary-values.md +0 -25
- package/skills/purgetss/references/class-index.md +0 -46
- package/skills/purgetss/references/cli-commands.md +0 -41
- package/skills/purgetss/references/configurable-properties.md +0 -55
- package/skills/purgetss/references/custom-rules.md +0 -14
- package/skills/purgetss/references/customization-deep-dive.md +0 -49
- package/skills/purgetss/references/dynamic-component-creation.md +56 -37
- package/skills/purgetss/references/grid-layout.md +0 -32
- package/skills/purgetss/references/icon-fonts.md +0 -50
- package/skills/purgetss/references/installation-setup.md +61 -32
- package/skills/purgetss/references/migration-guide.md +127 -0
- package/skills/purgetss/references/opacity-modifier.md +0 -34
- package/skills/purgetss/references/performance-tips.md +261 -0
- package/skills/purgetss/references/platform-modifiers.md +0 -46
- package/skills/purgetss/references/smart-mappings.md +0 -12
- package/skills/purgetss/references/tikit-components.md +393 -0
- package/skills/purgetss/references/titanium-resets.md +1 -27
- package/skills/purgetss/references/ui-ux-design.md +467 -117
- package/skills/{alloy-expert → ti-expert}/SKILL.md +45 -54
- package/skills/ti-expert/references/alloy-builtins.md +387 -0
- package/skills/{alloy-expert → ti-expert}/references/alloy-structure.md +147 -40
- package/skills/ti-expert/references/anti-patterns.md +90 -0
- package/skills/ti-expert/references/cli-expert.md +109 -0
- package/skills/{alloy-expert → ti-expert}/references/code-conventions.md +182 -49
- package/skills/{alloy-expert → ti-expert}/references/controller-patterns.md +103 -93
- package/skills/{alloy-expert → ti-expert}/references/error-handling.md +12 -12
- package/skills/{alloy-expert → ti-expert}/references/examples.md +144 -85
- package/skills/{alloy-expert → ti-expert}/references/migration-patterns.md +38 -36
- package/skills/{alloy-expert → ti-expert}/references/patterns.md +8 -8
- package/skills/ti-expert/references/performance-listview.md +251 -0
- package/skills/{alloy-expert/references/performance-patterns.md → ti-expert/references/performance-optimization.md} +67 -283
- package/skills/{alloy-expert/references/security-patterns.md → ti-expert/references/security-device.md} +12 -295
- package/skills/ti-expert/references/security-fundamentals.md +284 -0
- package/skills/{alloy-expert → ti-expert}/references/state-management.md +10 -10
- package/skills/ti-expert/references/testing-e2e-ci.md +432 -0
- package/skills/ti-expert/references/testing-unit.md +433 -0
- package/skills/ti-expert/references/theming.md +394 -0
- package/skills/ti-guides/SKILL.md +1 -14
- package/skills/ti-guides/references/advanced-data-and-images.md +126 -10
- package/skills/ti-guides/references/app-distribution.md +48 -10
- package/skills/ti-guides/references/application-frameworks.md +9 -2
- package/skills/ti-guides/references/cli-reference.md +338 -82
- package/skills/ti-guides/references/coding-best-practices.md +14 -4
- package/skills/ti-guides/references/commonjs-advanced.md +103 -6
- package/skills/ti-guides/references/hello-world.md +5 -2
- package/skills/ti-guides/references/hyperloop-native-access.md +439 -46
- package/skills/ti-guides/references/javascript-primer.md +4 -3
- package/skills/ti-guides/references/resources.md +0 -1
- package/skills/ti-guides/references/style-and-conventions.md +57 -9
- package/skills/ti-guides/references/tiapp-config.md +48 -6
- package/skills/ti-howtos/SKILL.md +2 -27
- package/skills/ti-howtos/references/android-platform-deep-dives.md +41 -90
- package/skills/ti-howtos/references/automation-fastlane-appium.md +15 -14
- package/skills/ti-howtos/references/buffer-codec-streams.md +22 -22
- package/skills/ti-howtos/references/cross-platform-development.md +68 -37
- package/skills/ti-howtos/references/debugging-profiling.md +8 -53
- package/skills/ti-howtos/references/extending-titanium.md +12 -51
- package/skills/ti-howtos/references/google-maps-v2.md +30 -29
- package/skills/ti-howtos/references/ios-map-kit.md +19 -25
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +95 -283
- package/skills/ti-howtos/references/local-data-sources.md +45 -37
- package/skills/ti-howtos/references/location-and-maps.md +47 -28
- package/skills/ti-howtos/references/media-apis.md +84 -27
- package/skills/ti-howtos/references/notification-services.md +40 -89
- package/skills/ti-howtos/references/remote-data-sources.md +21 -36
- package/skills/ti-howtos/references/tutorials.md +79 -39
- package/skills/ti-howtos/references/using-modules.md +4 -30
- package/skills/ti-howtos/references/web-content-integration.md +28 -45
- package/skills/ti-howtos/references/webpack-build-pipeline.md +54 -18
- package/skills/ti-ui/SKILL.md +1 -21
- package/skills/ti-ui/references/accessibility-deep-dive.md +71 -25
- package/skills/ti-ui/references/animation-and-matrices.md +0 -47
- package/skills/ti-ui/references/application-structures.md +0 -46
- package/skills/ti-ui/references/custom-fonts-styling.md +9 -57
- package/skills/ti-ui/references/event-handling.md +32 -40
- package/skills/ti-ui/references/gestures.md +0 -40
- package/skills/ti-ui/references/icons-and-splash-screens.md +21 -44
- package/skills/ti-ui/references/layouts-and-positioning.md +47 -39
- package/skills/ti-ui/references/listviews-and-performance.md +187 -73
- package/skills/ti-ui/references/orientation.md +57 -71
- package/skills/ti-ui/references/platform-ui-android.md +114 -48
- package/skills/ti-ui/references/platform-ui-ios.md +63 -38
- package/skills/ti-ui/references/scrolling-views.md +14 -23
- package/skills/ti-ui/references/tableviews.md +6 -56
- package/AGENTS-TEMPLATE.md +0 -174
- package/lib/commands/install.js +0 -188
- package/skills/alloy-expert/references/anti-patterns.md +0 -133
- package/skills/alloy-expert/references/testing.md +0 -872
- package/skills/ti-guides/references/alloy-cli-advanced.md +0 -84
- package/skills/ti-guides/references/alloy-data-mastery.md +0 -29
- package/skills/ti-guides/references/alloy-widgets-and-themes.md +0 -19
- /package/skills/{alloy-expert → ti-expert}/assets/ControllerAutoCleanup.js +0 -0
- /package/skills/{alloy-expert → ti-expert}/references/contracts.md +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Why AGENTS.md? (Based on Vercel's research)
|
|
2
|
+
|
|
3
|
+
This explains why we use AGENTS.md or CLAUDE.md with a compressed docs index instead of relying only on skills.
|
|
4
|
+
|
|
5
|
+
## The problem: skills alone underperform
|
|
6
|
+
|
|
7
|
+
Vercel reports that skills-only setups hit a **53-79% pass rate** on coding tasks.
|
|
8
|
+
|
|
9
|
+
### Why skills underperform
|
|
10
|
+
|
|
11
|
+
| Issue | Description |
|
|
12
|
+
| ------------------- | ----------------------------------------------------- |
|
|
13
|
+
| **Decision point** | The model has to decide when to invoke a skill |
|
|
14
|
+
| **Async loading** | Skills load on-demand, so they are not always present |
|
|
15
|
+
| **Ordering issues** | "Explore first" vs "read docs first" tradeoff |
|
|
16
|
+
| **Fragile prompts** | Results depend on exact prompt wording |
|
|
17
|
+
|
|
18
|
+
## The fix: AGENTS.md with a compressed index
|
|
19
|
+
|
|
20
|
+
Vercel reports that AGENTS.md plus a compressed documentation index hit a **100% pass rate** in their evals.
|
|
21
|
+
|
|
22
|
+
### Why it works
|
|
23
|
+
|
|
24
|
+
1. **No decision point**: the info is already there
|
|
25
|
+
2. **Consistent availability**: present every turn, not async
|
|
26
|
+
3. **No ordering issues**: no docs vs project exploration dilemma
|
|
27
|
+
4. **Passive context**: not dependent on the prompt
|
|
28
|
+
|
|
29
|
+
### Performance comparison
|
|
30
|
+
|
|
31
|
+
| Approach | Pass rate |
|
|
32
|
+
| ------------------- | --------- |
|
|
33
|
+
| No documentation | 53% |
|
|
34
|
+
| Skills only | 53-79% |
|
|
35
|
+
| **AGENTS.md index** | **100%** |
|
|
36
|
+
|
|
37
|
+
## Implementation for Titanium SDK
|
|
38
|
+
|
|
39
|
+
### Compressed index format
|
|
40
|
+
|
|
41
|
+
The index maps skills to their reference docs:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
[Titanium SDK Docs Index]|root: ~/.agents/skills
|
|
45
|
+
|ti-expert/references:{alloy-structure.md,anti-patterns.md,...}
|
|
46
|
+
|purgetss/references:{animation-system.md,apply-directive.md,...}
|
|
47
|
+
|ti-ui/references:{listviews-and-performance.md,layouts-and-positioning.md,...}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
How the assistant should use it:
|
|
51
|
+
- Need Backbone.Models patterns? Read `~/.agents/skills/alloy-guides/references/MODELS.md`
|
|
52
|
+
- Need the PurgeTSS grid system? Read `~/.agents/skills/purgetss/references/grid-layout.md`
|
|
53
|
+
- Need ListView performance tips? Read `~/.agents/skills/ti-ui/references/listviews-and-performance.md`
|
|
54
|
+
|
|
55
|
+
### Skill overview
|
|
56
|
+
|
|
57
|
+
| Skill | Purpose | Best for |
|
|
58
|
+
| ---------------- | ----------------------------- | --------------------------------------------- |
|
|
59
|
+
| **alloy-guides** | Alloy MVC reference | Models, views, controllers, widgets |
|
|
60
|
+
| **alloy-howtos** | Alloy CLI and debugging | Project setup, CLI commands, errors |
|
|
61
|
+
| **purgetss** | Utility-first styling | UI styling, animations, grid layouts |
|
|
62
|
+
| **ti-expert** | Architecture + implementation | Starting point for most Alloy tasks |
|
|
63
|
+
| **ti-guides** | SDK fundamentals | Hyperloop, distribution, tiapp.xml, CLI |
|
|
64
|
+
| **ti-howtos** | Native feature integration | Location, push, media, platform-specific APIs |
|
|
65
|
+
| **ti-ui** | UI/UX patterns | Layouts, ListViews, gestures, platform UI |
|
|
66
|
+
|
|
67
|
+
### For complex workflows
|
|
68
|
+
|
|
69
|
+
The **ti-pro** agent (installed in `~/.claude/agents/`) handles:
|
|
70
|
+
- Codebase architecture analysis
|
|
71
|
+
- Multi-feature research across Titanium APIs
|
|
72
|
+
- Cross-referencing framework patterns
|
|
73
|
+
- Platform-specific differences
|
|
74
|
+
|
|
75
|
+
It preloads all 7 titanium-* skills for broader coverage.
|
|
76
|
+
|
|
77
|
+
## How to use
|
|
78
|
+
|
|
79
|
+
### For Titanium projects
|
|
80
|
+
|
|
81
|
+
Run `titools sync` from your project root:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
cd /path/to/your/titanium/project
|
|
85
|
+
titools sync
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This creates or updates:
|
|
89
|
+
- `AGENTS.md` (Codex CLI and others)
|
|
90
|
+
- `CLAUDE.md` (Claude Code)
|
|
91
|
+
- `GEMINI.md` (Gemini CLI)
|
|
92
|
+
|
|
93
|
+
### What gets generated
|
|
94
|
+
|
|
95
|
+
The generated file includes:
|
|
96
|
+
|
|
97
|
+
1. **Version marker**: tracks docs version
|
|
98
|
+
2. **Block boundaries**: support automatic updates
|
|
99
|
+
3. **Compressed index**: maps skills to reference files
|
|
100
|
+
|
|
101
|
+
Example output:
|
|
102
|
+
|
|
103
|
+
```html
|
|
104
|
+
<!-- TITANIUM-KNOWLEDGE-START -->
|
|
105
|
+
<!-- Version: vX.X.X -->
|
|
106
|
+
## Titanium SDK Knowledge Index
|
|
107
|
+
|
|
108
|
+
Generated by `titools` based on Vercel's research on AGENTS.md effectiveness.
|
|
109
|
+
|
|
110
|
+
**IMPORTANT**: Prefer retrieval-led reasoning over pre-training-led reasoning when working with Titanium SDK.
|
|
111
|
+
Always consult the documentation files below rather than relying on training data, which may be outdated.
|
|
112
|
+
|
|
113
|
+
This knowledge index is based on the latest Titanium SDK documentation.
|
|
114
|
+
|
|
115
|
+
### Compressed Documentation Index
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
[Titanium SDK Docs Index]|root: ~/.agents/skills
|
|
119
|
+
|ti-expert/references:{alloy-structure.md,anti-patterns.md,code-conventions.md,contracts.md,controller-patterns.md,error-handling.md,examples.md,...}
|
|
120
|
+
|alloy-guides/references:{CLI_TASKS.md,CONCEPTS.md,CONTROLLERS.md,MODELS.md,PURGETSS.md,VIEWS_DYNAMIC.md,VIEWS_STYLES.md,VIEWS_WITHOUT_CONTROLLERS.md,...}
|
|
121
|
+
...
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
<!-- END-TITANIUM-KNOWLEDGE -->
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Updating the index
|
|
128
|
+
|
|
129
|
+
When you update titools, re-run:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
titools update # Update skills and docs
|
|
133
|
+
titools sync # Regenerate index in your project
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The block is replaced automatically.
|
|
137
|
+
|
|
138
|
+
## Version notice
|
|
139
|
+
|
|
140
|
+
The index is based on the **latest Titanium SDK docs**.
|
|
141
|
+
|
|
142
|
+
To check your project's version:
|
|
143
|
+
```bash
|
|
144
|
+
grep -A 1 "<sdk-version>" tiapp.xml
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
If there's a mismatch:
|
|
148
|
+
- Newer APIs may not exist in your version
|
|
149
|
+
- Older deprecated patterns may still be valid
|
|
150
|
+
- Verify against your version's official docs: https://titaniumsdk.com/guide
|
|
151
|
+
|
|
152
|
+
## Key takeaways from Vercel's research
|
|
153
|
+
|
|
154
|
+
1. **Passive context beats active retrieval**: always-present info performs better than info that must be loaded
|
|
155
|
+
2. **No activation needed**: the model does not need to decide when to use a skill
|
|
156
|
+
3. **Consistent behavior**: same inputs every time, regardless of prompt wording
|
|
157
|
+
4. **100% pass rate**: AGENTS.md approach achieved perfect performance in their evals
|
|
158
|
+
|
|
159
|
+
## References
|
|
160
|
+
|
|
161
|
+
- [Vercel's blog: AGENTS.md outperforms skills in our agent evals](https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals)
|
|
162
|
+
- [Repository: macCesar/titools](https://github.com/macCesar/titools)
|
|
163
|
+
|
|
164
|
+
## Maintenance
|
|
165
|
+
|
|
166
|
+
This approach is maintained in [titools](https://github.com/macCesar/titools).
|
|
167
|
+
|
|
168
|
+
To update your installation:
|
|
169
|
+
```bash
|
|
170
|
+
npm update -g @maccesar/titools
|
|
171
|
+
titools update
|
|
172
|
+
```
|