@maccesar/titools 2.0.4 → 2.0.6
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 +2 -1
- package/README.md +20 -58
- package/lib/config.js +2 -2
- package/lib/utils.js +20 -20
- package/package.json +1 -1
package/AGENTS-TEMPLATE.md
CHANGED
package/README.md
CHANGED
|
@@ -60,22 +60,11 @@ Installs Titanium skills and agents globally:
|
|
|
60
60
|
- ✅ ti-researcher agent
|
|
61
61
|
- ✅ AGENTS-TEMPLATE.md (template for documentation generation)
|
|
62
62
|
|
|
63
|
-
### Using npx skills (Skills Only)
|
|
64
|
-
|
|
65
|
-
You can also install **only the skills** using the `skills` CLI:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npx skills add macCesar/titools
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Note:** This installs only skills (no agents, no `titools agents` command). For the complete experience, use the full NPM installation above.
|
|
72
|
-
|
|
73
63
|
### Verify Installation
|
|
74
64
|
|
|
75
65
|
**Check titools version:**
|
|
76
66
|
```bash
|
|
77
67
|
titools --version
|
|
78
|
-
# Should show: v2.0.0
|
|
79
68
|
```
|
|
80
69
|
|
|
81
70
|
**Check central location:**
|
|
@@ -170,7 +159,6 @@ The `titools agents` command will:
|
|
|
170
159
|
|
|
171
160
|
```
|
|
172
161
|
[Titanium SDK Docs Index]|root: ~/.agents/skills
|
|
173
|
-
|IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning
|
|
174
162
|
|alloy-expert/references:{alloy-structure.md,anti-patterns.md,...}
|
|
175
163
|
|purgetss/references:{animation-system.md,class-index.md,...}
|
|
176
164
|
|ti-ui/references:{layouts-and-positioning.md,listviews-and-performance.md,...}
|
|
@@ -720,76 +708,50 @@ Ask the AI to:
|
|
|
720
708
|
|
|
721
709
|
---
|
|
722
710
|
|
|
723
|
-
##
|
|
724
|
-
|
|
725
|
-
### AGENTS.md Not Working?
|
|
726
|
-
|
|
727
|
-
If your AI assistant doesn't seem to use the AGENTS.md information:
|
|
728
|
-
1. Verify AGENTS.md exists in your project root
|
|
729
|
-
2. Check that your AI assistant supports AGENTS.md (Claude Code does)
|
|
730
|
-
3. Try explicitly referencing it: "Check the AGENTS.md documentation for this"
|
|
711
|
+
## Troubleshooting
|
|
731
712
|
|
|
732
|
-
###
|
|
713
|
+
### titools command not found?
|
|
733
714
|
|
|
734
715
|
If the command is not found:
|
|
716
|
+
```bash
|
|
717
|
+
# Verify installation
|
|
718
|
+
npm list -g @maccesar/titools
|
|
719
|
+
|
|
720
|
+
# Re-install
|
|
721
|
+
npm install -g @maccesar/titools
|
|
722
|
+
```
|
|
735
723
|
|
|
736
|
-
|
|
737
|
-
1. Verify NPM installation: `npm list -g @maccesar/titanium-skills`
|
|
738
|
-
2. Check if command exists: `which titools`
|
|
739
|
-
3. Re-run: `npm install -g @maccesar/titanium-skills`
|
|
724
|
+
### AGENTS.md not working?
|
|
740
725
|
|
|
741
|
-
|
|
742
|
-
1. Verify
|
|
743
|
-
2. Check
|
|
744
|
-
3.
|
|
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)
|
|
729
|
+
3. Try explicitly referencing: "Check the AGENTS.md documentation"
|
|
745
730
|
|
|
746
|
-
### Version
|
|
731
|
+
### Version mismatch warning?
|
|
747
732
|
|
|
748
|
-
|
|
749
|
-
1. Check your Titanium SDK version: `grep -A 1 "<sdk-version>" tiapp.xml`
|
|
750
|
-
2. AGENTS.md is based on the latest documentation
|
|
751
|
-
3. Be cautious when using newer APIs in older projects
|
|
752
|
-
4. Consult official docs for your version: https://titaniumsdk.com/guide
|
|
733
|
+
AGENTS.md is based on the latest documentation. Be cautious when using newer APIs in older projects.
|
|
753
734
|
|
|
754
735
|
---
|
|
755
736
|
|
|
756
737
|
## Uninstall
|
|
757
738
|
|
|
758
739
|
```bash
|
|
740
|
+
# Remove the CLI
|
|
759
741
|
npm uninstall -g @maccesar/titools
|
|
760
|
-
```
|
|
761
|
-
|
|
762
|
-
Then manually remove the installed files:
|
|
763
|
-
|
|
764
|
-
```bash
|
|
765
|
-
# Remove skill symlinks from all platforms
|
|
766
|
-
rm -rf ~/.claude/skills/{alloy-expert,purgetss,ti-ui,ti-howtos,ti-guides,alloy-guides,alloy-howtos}
|
|
767
|
-
rm -rf ~/.gemini/skills/{alloy-expert,purgetss,ti-ui,ti-howtos,ti-guides,alloy-guides,alloy-howtos}
|
|
768
|
-
rm -rf ~/.codex/skills/{alloy-expert,purgetss,ti-ui,ti-howtos,ti-guides,alloy-guides,alloy-howtos}
|
|
769
|
-
|
|
770
|
-
# Remove agent from Claude Code
|
|
771
|
-
rm -f ~/.claude/agents/ti-researcher.md
|
|
772
742
|
|
|
773
|
-
# Remove
|
|
774
|
-
|
|
743
|
+
# Remove skills and agents
|
|
744
|
+
titools uninstall
|
|
775
745
|
```
|
|
776
746
|
|
|
777
|
-
**Note:** AGENTS.md/CLAUDE.md/GEMINI.md files in your projects are NOT removed
|
|
747
|
+
**Note:** AGENTS.md/CLAUDE.md/GEMINI.md files in your projects are NOT removed. To remove them manually:
|
|
778
748
|
|
|
779
749
|
```bash
|
|
780
750
|
rm -f /path/to/your/project/AGENTS.md
|
|
781
751
|
rm -f /path/to/your/project/CLAUDE.md
|
|
782
752
|
rm -f /path/to/your/project/GEMINI.md
|
|
783
753
|
```
|
|
784
|
-
```
|
|
785
754
|
|
|
786
|
-
**Note:** AGENTS.md/CLAUDE.md/GEMINI.md files in your projects are NOT removed automatically. To remove them from a specific project:
|
|
787
|
-
|
|
788
|
-
```bash
|
|
789
|
-
rm -f /path/to/your/project/AGENTS.md
|
|
790
|
-
rm -f /path/to/your/project/CLAUDE.md
|
|
791
|
-
rm -f /path/to/your/project/GEMINI.md
|
|
792
|
-
```
|
|
793
755
|
|
|
794
756
|
---
|
|
795
757
|
|
package/lib/config.js
CHANGED
|
@@ -20,8 +20,8 @@ try {
|
|
|
20
20
|
// Version management
|
|
21
21
|
export const PACKAGE_VERSION = packageVersion;
|
|
22
22
|
export const TITANIUM_KNOWLEDGE_VERSION = `v${PACKAGE_VERSION}`;
|
|
23
|
-
export const BLOCK_START =
|
|
24
|
-
export const BLOCK_END = '<!--
|
|
23
|
+
export const BLOCK_START = '<!-- TITANIUM-KNOWLEDGE-START -->';
|
|
24
|
+
export const BLOCK_END = '<!-- TITANIUM-KNOWLEDGE-END -->';
|
|
25
25
|
|
|
26
26
|
// Repository configuration
|
|
27
27
|
export const REPO_URL = 'https://github.com/macCesar/titools';
|
package/lib/utils.js
CHANGED
|
@@ -25,7 +25,8 @@ export function blockExists(filePath) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const content = readFileSync(filePath, 'utf8');
|
|
28
|
-
|
|
28
|
+
// Match both old versioned blocks and new static blocks
|
|
29
|
+
return /<!-- TITANIUM-KNOWLEDGE-(v[\d.]+|START) -->/.test(content);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/**
|
|
@@ -39,10 +40,8 @@ export function removeOldBlock(filePath) {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
const content = readFileSync(filePath, 'utf8');
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'g'
|
|
45
|
-
);
|
|
43
|
+
// Regex to match any Titanium knowledge block (old or new)
|
|
44
|
+
const regex = /[\s\S]*?<!-- TITANIUM-KNOWLEDGE-(v[\d.]+|START) -->[\s\S]*?<!-- (END-TITANIUM-KNOWLEDGE|TITANIUM-KNOWLEDGE-END) -->[\s\S]*?\n*/g;
|
|
46
45
|
|
|
47
46
|
const newContent = content.replace(regex, '\n\n');
|
|
48
47
|
|
|
@@ -99,7 +98,7 @@ export function createKnowledgeBlock() {
|
|
|
99
98
|
const compressedIndex = buildKnowledgeIndex();
|
|
100
99
|
|
|
101
100
|
// Build the knowledge block using template literals
|
|
102
|
-
const
|
|
101
|
+
const blockHeader = `${BLOCK_START}\n<!-- Version: ${TITANIUM_KNOWLEDGE_VERSION} -->`;
|
|
103
102
|
const commentContent = `## Titanium SDK Knowledge Index
|
|
104
103
|
|
|
105
104
|
Generated by \`titools\` based on Vercel's research on AGENTS.md effectiveness.
|
|
@@ -109,7 +108,7 @@ Always consult the documentation files below rather than relying on training dat
|
|
|
109
108
|
|
|
110
109
|
This knowledge index is based on the latest Titanium SDK documentation.`;
|
|
111
110
|
|
|
112
|
-
return `\n\n${
|
|
111
|
+
return `\n\n${blockHeader}\n${commentContent}\n\n${compressedIndex}\n${BLOCK_END}\n`;
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
/**
|
|
@@ -126,19 +125,20 @@ export function addOrUpdateBlock(filePath) {
|
|
|
126
125
|
|
|
127
126
|
const block = createKnowledgeBlock();
|
|
128
127
|
|
|
129
|
-
//
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
// Regex to find any existing block (old versioned or new static)
|
|
129
|
+
// Group 1 matches the version/START, Group 2 matches the END marker
|
|
130
|
+
const blockRegex = /<!-- TITANIUM-KNOWLEDGE-(v[\d.]+|START) -->[\s\S]*?<!-- (END-TITANIUM-KNOWLEDGE|TITANIUM-KNOWLEDGE-END) -->/;
|
|
131
|
+
const match = content.match(blockRegex);
|
|
132
|
+
|
|
133
|
+
if (match) {
|
|
134
|
+
const startIndex = match.index;
|
|
135
|
+
const matchText = match[0];
|
|
136
|
+
const endIndex = startIndex + matchText.length;
|
|
137
|
+
|
|
138
|
+
// Remove the entire block and handle trailing newlines
|
|
139
|
+
const afterBlock = content.substring(endIndex);
|
|
140
|
+
const trimmedAfter = afterBlock.replace(/^\n+/, '');
|
|
141
|
+
content = content.substring(0, startIndex) + '\n\n' + trimmedAfter;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
// Add new block at the end (preserve existing content)
|