@maccesar/titools 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS-TEMPLATE.md +173 -0
- package/README.md +867 -0
- package/agents/ti-researcher.md +108 -0
- package/bin/titools.js +53 -0
- package/lib/commands/agents.js +126 -0
- package/lib/commands/install.js +188 -0
- package/lib/commands/uninstall.js +215 -0
- package/lib/commands/update.js +159 -0
- package/lib/config.js +119 -0
- package/lib/downloader.js +153 -0
- package/lib/installer.js +253 -0
- package/lib/platform.js +108 -0
- package/lib/symlink.js +142 -0
- package/lib/utils.js +270 -0
- package/package.json +67 -0
- package/skills/alloy-expert/SKILL.md +247 -0
- package/skills/alloy-expert/assets/ControllerAutoCleanup.js +182 -0
- package/skills/alloy-expert/references/alloy-structure.md +381 -0
- package/skills/alloy-expert/references/anti-patterns.md +133 -0
- package/skills/alloy-expert/references/code-conventions.md +469 -0
- package/skills/alloy-expert/references/contracts.md +280 -0
- package/skills/alloy-expert/references/controller-patterns.md +520 -0
- package/skills/alloy-expert/references/error-handling.md +484 -0
- package/skills/alloy-expert/references/examples.md +735 -0
- package/skills/alloy-expert/references/migration-patterns.md +298 -0
- package/skills/alloy-expert/references/patterns.md +448 -0
- package/skills/alloy-expert/references/performance-patterns.md +855 -0
- package/skills/alloy-expert/references/security-patterns.md +847 -0
- package/skills/alloy-expert/references/state-management.md +779 -0
- package/skills/alloy-expert/references/testing.md +872 -0
- package/skills/alloy-guides/SKILL.md +214 -0
- package/skills/alloy-guides/references/CLI_TASKS.md +243 -0
- package/skills/alloy-guides/references/CONCEPTS.md +191 -0
- package/skills/alloy-guides/references/CONTROLLERS.md +298 -0
- package/skills/alloy-guides/references/MODELS.md +1028 -0
- package/skills/alloy-guides/references/PURGETSS.md +56 -0
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +242 -0
- package/skills/alloy-guides/references/VIEWS_STYLES.md +388 -0
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +109 -0
- package/skills/alloy-guides/references/VIEWS_XML.md +558 -0
- package/skills/alloy-guides/references/WIDGETS.md +176 -0
- package/skills/alloy-howtos/SKILL.md +203 -0
- package/skills/alloy-howtos/references/best_practices.md +138 -0
- package/skills/alloy-howtos/references/cli_reference.md +253 -0
- package/skills/alloy-howtos/references/config_files.md +87 -0
- package/skills/alloy-howtos/references/custom_tags.md +147 -0
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +101 -0
- package/skills/alloy-howtos/references/samples.md +167 -0
- package/skills/purgetss/SKILL.md +442 -0
- package/skills/purgetss/assets/purgetss.config.cjs +17 -0
- package/skills/purgetss/references/EXAMPLES.md +247 -0
- package/skills/purgetss/references/animation-system.md +1294 -0
- package/skills/purgetss/references/apply-directive.md +375 -0
- package/skills/purgetss/references/arbitrary-values.md +612 -0
- package/skills/purgetss/references/class-index.md +1350 -0
- package/skills/purgetss/references/cli-commands.md +948 -0
- package/skills/purgetss/references/configurable-properties.md +654 -0
- package/skills/purgetss/references/custom-rules.md +161 -0
- package/skills/purgetss/references/customization-deep-dive.md +722 -0
- package/skills/purgetss/references/dynamic-component-creation.md +489 -0
- package/skills/purgetss/references/grid-layout.md +455 -0
- package/skills/purgetss/references/icon-fonts.md +609 -0
- package/skills/purgetss/references/installation-setup.md +366 -0
- package/skills/purgetss/references/opacity-modifier.md +291 -0
- package/skills/purgetss/references/platform-modifiers.md +479 -0
- package/skills/purgetss/references/smart-mappings.md +42 -0
- package/skills/purgetss/references/titanium-resets.md +359 -0
- package/skills/purgetss/references/ui-ux-design.md +1526 -0
- package/skills/ti-guides/SKILL.md +94 -0
- package/skills/ti-guides/references/advanced-data-and-images.md +19 -0
- package/skills/ti-guides/references/alloy-cli-advanced.md +84 -0
- package/skills/ti-guides/references/alloy-data-mastery.md +29 -0
- package/skills/ti-guides/references/alloy-widgets-and-themes.md +19 -0
- package/skills/ti-guides/references/android-manifest.md +97 -0
- package/skills/ti-guides/references/app-distribution.md +258 -0
- package/skills/ti-guides/references/application-frameworks.md +377 -0
- package/skills/ti-guides/references/cli-reference.md +402 -0
- package/skills/ti-guides/references/coding-best-practices.md +102 -0
- package/skills/ti-guides/references/commonjs-advanced.md +134 -0
- package/skills/ti-guides/references/hello-world.md +100 -0
- package/skills/ti-guides/references/hyperloop-native-access.md +62 -0
- package/skills/ti-guides/references/javascript-primer.md +411 -0
- package/skills/ti-guides/references/reserved-words.md +36 -0
- package/skills/ti-guides/references/resources.md +183 -0
- package/skills/ti-guides/references/style-and-conventions.md +48 -0
- package/skills/ti-guides/references/tiapp-config.md +609 -0
- package/skills/ti-howtos/SKILL.md +174 -0
- package/skills/ti-howtos/references/android-platform-deep-dives.md +658 -0
- package/skills/ti-howtos/references/automation-fastlane-appium.md +95 -0
- package/skills/ti-howtos/references/buffer-codec-streams.md +140 -0
- package/skills/ti-howtos/references/cross-platform-development.md +348 -0
- package/skills/ti-howtos/references/debugging-profiling.md +543 -0
- package/skills/ti-howtos/references/extending-titanium.md +723 -0
- package/skills/ti-howtos/references/google-maps-v2.md +169 -0
- package/skills/ti-howtos/references/ios-map-kit.md +143 -0
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +783 -0
- package/skills/ti-howtos/references/local-data-sources.md +301 -0
- package/skills/ti-howtos/references/location-and-maps.md +252 -0
- package/skills/ti-howtos/references/media-apis.md +210 -0
- package/skills/ti-howtos/references/notification-services.md +599 -0
- package/skills/ti-howtos/references/remote-data-sources.md +349 -0
- package/skills/ti-howtos/references/tutorials.md +502 -0
- package/skills/ti-howtos/references/using-modules.md +237 -0
- package/skills/ti-howtos/references/web-content-integration.md +307 -0
- package/skills/ti-howtos/references/webpack-build-pipeline.md +78 -0
- package/skills/ti-ui/SKILL.md +179 -0
- package/skills/ti-ui/references/accessibility-deep-dive.md +242 -0
- package/skills/ti-ui/references/animation-and-matrices.md +599 -0
- package/skills/ti-ui/references/application-structures.md +655 -0
- package/skills/ti-ui/references/custom-fonts-styling.md +579 -0
- package/skills/ti-ui/references/event-handling.md +393 -0
- package/skills/ti-ui/references/gestures.md +473 -0
- package/skills/ti-ui/references/icons-and-splash-screens.md +409 -0
- package/skills/ti-ui/references/layouts-and-positioning.md +462 -0
- package/skills/ti-ui/references/listviews-and-performance.md +619 -0
- package/skills/ti-ui/references/orientation.md +362 -0
- package/skills/ti-ui/references/platform-ui-android.md +635 -0
- package/skills/ti-ui/references/platform-ui-ios.md +469 -0
- package/skills/ti-ui/references/scrolling-views.md +252 -0
- package/skills/ti-ui/references/tableviews.md +568 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Why AGENTS.md? (Based on Vercel's Research)
|
|
2
|
+
|
|
3
|
+
This document explains why we use AGENTS.md/CLAUDE.md with compressed documentation indexes instead of relying solely on skills for AI coding assistants.
|
|
4
|
+
|
|
5
|
+
## The Problem: Skills Alone Underperform
|
|
6
|
+
|
|
7
|
+
Based on [Vercel's research](https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals), using skills alone achieves only a **53-79% pass rate** on coding tasks.
|
|
8
|
+
|
|
9
|
+
### Why Skills Underperform
|
|
10
|
+
|
|
11
|
+
| Issue | Description |
|
|
12
|
+
| ------------------- | ----------------------------------------------------- |
|
|
13
|
+
| **Decision point** | AI must decide WHEN to invoke a skill (often doesn't) |
|
|
14
|
+
| **Async loading** | Skills loaded on-demand, not always available |
|
|
15
|
+
| **Ordering issues** | "Explore first vs read docs first" dilemma |
|
|
16
|
+
| **Fragile prompts** | Performance depends on exact prompt wording |
|
|
17
|
+
|
|
18
|
+
## The Solution: AGENTS.md with Compressed Index
|
|
19
|
+
|
|
20
|
+
Vercel found that using AGENTS.md with a compressed documentation index achieves **100% pass rate**.
|
|
21
|
+
|
|
22
|
+
### Why It Works
|
|
23
|
+
|
|
24
|
+
1. **No decision point** - Information is always present, no need to invoke skills
|
|
25
|
+
2. **Consistent availability** - Available in every turn, not async-loaded
|
|
26
|
+
3. **No ordering issues** - No "read docs first vs explore project first" dilemma
|
|
27
|
+
4. **Passive context** - Already in context, doesn't depend on prompt wording
|
|
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
|
+
### The Compressed Index Format
|
|
40
|
+
|
|
41
|
+
The index uses a compressed format that maps skills to their reference documentation:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
[Titanium SDK Docs Index]|root: ~/.agents/skills
|
|
45
|
+
|alloy-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 AI uses it:**
|
|
51
|
+
- Need ListView performance tips? Read `~/.agents/skills/ti-ui/references/listviews-and-performance.md`
|
|
52
|
+
- Need PurgeTSS grid system? Read `~/.agents/skills/purgetss/references/grid-layout.md`
|
|
53
|
+
- Need Backbone.Models patterns? Read `~/.agents/skills/alloy-guides/references/MODELS.md`
|
|
54
|
+
|
|
55
|
+
### Skill Overview
|
|
56
|
+
|
|
57
|
+
| Skill | Purpose | Best For |
|
|
58
|
+
| ---------------- | ----------------------------- | --------------------------------------------- |
|
|
59
|
+
| **alloy-expert** | Architecture + Implementation | Starting point for most Alloy tasks |
|
|
60
|
+
| **purgetss** | Utility-first styling | UI styling, animations, grid layouts |
|
|
61
|
+
| **ti-ui** | UI/UX patterns | Layouts, ListViews, gestures, platform UI |
|
|
62
|
+
| **ti-howtos** | Native feature integration | Location, Push, Media, platform-specific APIs |
|
|
63
|
+
| **ti-guides** | SDK fundamentals | Hyperloop, distribution, tiapp.xml, CLI |
|
|
64
|
+
| **alloy-guides** | Alloy MVC reference | Models, Views, Controllers, Widgets |
|
|
65
|
+
| **alloy-howtos** | Alloy CLI & debugging | Project setup, CLI commands, errors |
|
|
66
|
+
|
|
67
|
+
### For Complex Workflows
|
|
68
|
+
|
|
69
|
+
The **ti-researcher** 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 investigation
|
|
74
|
+
|
|
75
|
+
It preloads all 7 titanium-* skills for comprehensive analysis.
|
|
76
|
+
|
|
77
|
+
## How to Use
|
|
78
|
+
|
|
79
|
+
### For Titanium Projects
|
|
80
|
+
|
|
81
|
+
Run the `titools agents` command in your Titanium project root:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
cd /path/to/your/titanium/project
|
|
85
|
+
titools agents
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This creates/updates:
|
|
89
|
+
- `CLAUDE.md` (for Claude Code)
|
|
90
|
+
- `GEMINI.md` (for Gemini CLI)
|
|
91
|
+
- `AGENTS.md` (for Cursor/Copilot)
|
|
92
|
+
|
|
93
|
+
### What Gets Generated
|
|
94
|
+
|
|
95
|
+
The generated file contains:
|
|
96
|
+
|
|
97
|
+
1. **Version marker** - Tracks which version of the docs
|
|
98
|
+
2. **Compressed index** - Maps all skills to their reference files
|
|
99
|
+
3. **Block boundaries** - For automatic updates
|
|
100
|
+
|
|
101
|
+
Example output:
|
|
102
|
+
|
|
103
|
+
```html
|
|
104
|
+
<!-- TITANIUM-KNOWLEDGE-v2.0.0 -->
|
|
105
|
+
<!--
|
|
106
|
+
Titanium SDK Knowledge Index
|
|
107
|
+
Generated by titools -->
|
|
108
|
+
Based on Vercel's research: https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals
|
|
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
|
+
|
|
116
|
+
## Compressed Documentation Index
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
[Titanium SDK Docs Index]|root: ~/.agents/skills
|
|
120
|
+
|IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning when working with Titanium SDK...
|
|
121
|
+
|alloy-expert/references:{alloy-structure.md,anti-patterns.md,code-conventions.md,...}
|
|
122
|
+
...
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
<!-- END-TITANIUM-KNOWLEDGE -->
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Updating the Index
|
|
129
|
+
|
|
130
|
+
When you update titools, simply re-run the command:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
titools update # Update skills and docs
|
|
134
|
+
titools agents # Regenerate index in your project
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The old block is automatically replaced with the new version.
|
|
138
|
+
|
|
139
|
+
## Version Notice
|
|
140
|
+
|
|
141
|
+
The knowledge index is based on the **latest Titanium SDK documentation**.
|
|
142
|
+
|
|
143
|
+
**To check your project's version:**
|
|
144
|
+
```bash
|
|
145
|
+
grep -A 1 "<sdk-version>" tiapp.xml
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**If there's a version mismatch:**
|
|
149
|
+
- Newer APIs may not exist in your version
|
|
150
|
+
- Older deprecated patterns may still be valid for you
|
|
151
|
+
- Always verify against your version's official docs: https://titaniumsdk.com/guide
|
|
152
|
+
|
|
153
|
+
## Key Takeaways from Vercel's Research
|
|
154
|
+
|
|
155
|
+
1. **Passive context > Active retrieval** - Information that's always present outperforms information that must be actively loaded
|
|
156
|
+
2. **No activation needed** - The AI doesn't need to decide when to use a skill
|
|
157
|
+
3. **Consistent behavior** - Same information every time, regardless of prompt wording
|
|
158
|
+
4. **100% pass rate** - AGENTS.md approach achieves perfect performance on evaluated tasks
|
|
159
|
+
|
|
160
|
+
## References
|
|
161
|
+
|
|
162
|
+
- [Vercel's Blog: agents.md Outperforms Skills in Our Agent Evals](https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals)
|
|
163
|
+
- [Repository: macCesar/titools](https://github.com/macCesar/titools)
|
|
164
|
+
|
|
165
|
+
## Maintenance
|
|
166
|
+
|
|
167
|
+
This approach is maintained in the [titools](https://github.com/macCesar/titools) project.
|
|
168
|
+
|
|
169
|
+
To update your installation:
|
|
170
|
+
```bash
|
|
171
|
+
npm update -g @maccesar/titools
|
|
172
|
+
titools update
|
|
173
|
+
```
|