@maccesar/titools 2.2.0 → 2.2.2

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