contextos-agents 2.3.1 → 2.3.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/.agents/adapters/cursor/export.js +3 -27
- package/.agents/adapters/gemini/export.js +5 -7
- package/.agents/adapters/shared.js +14 -1
- package/.agents/adapters/zed/export.js +4 -16
- package/.agents/compiled/registry.v2.json +33 -33
- package/.agents/compiled/registry.v2.sha256 +1 -1
- package/.agents/compiler/manifest-compiler.js +8 -5
- package/.agents/core/skills/context-manager/EXAMPLES.md +5 -17
- package/.agents/core/skills/context-manager/SKILL.md +10 -100
- package/.agents/core/skills/context-manager/TROUBLESHOOTING.md +6 -6
- package/.agents/core/skills/context-manager/VALIDATION.json +115 -4
- package/.agents/core/skills/context-manager/references/context-rules.md +3 -57
- package/.agents/core/skills/context-manager/skill.yaml +1 -3
- package/.agents/core/skills/context-os/EXAMPLES.md +25 -15
- package/.agents/core/skills/context-os/SKILL.md +12 -135
- package/.agents/core/skills/context-os/TROUBLESHOOTING.md +11 -6
- package/.agents/core/skills/context-os/VALIDATION.json +115 -4
- package/.agents/core/skills/context-os/packs.yaml +10 -59
- package/.agents/core/skills/context-os/references/context-rules.md +27 -59
- package/.agents/core/skills/context-os/references/pipeline.md +14 -119
- package/.agents/core/skills/context-os/references/project-graph.md +11 -100
- package/.agents/core/skills/context-os/rules.yaml +8 -135
- package/.agents/core/skills/engineering-workflow/EXAMPLES.md +15 -50
- package/.agents/core/skills/engineering-workflow/SKILL.md +10 -10
- package/.agents/core/skills/engineering-workflow/TROUBLESHOOTING.md +11 -19
- package/.agents/core/skills/engineering-workflow/VALIDATION.json +115 -4
- package/.agents/core/skills/engineering-workflow/references/workflow.md +55 -317
- package/.agents/core/skills/gemini-precision/EXAMPLES.md +33 -53
- package/.agents/core/skills/gemini-precision/SKILL.md +11 -147
- package/.agents/core/skills/gemini-precision/TROUBLESHOOTING.md +12 -25
- package/.agents/core/skills/gemini-precision/VALIDATION.json +115 -4
- package/.agents/core/skills/gemini-precision/skill.yaml +1 -1
- package/.agents/core/skills/gstack-roles/EXAMPLES.md +5 -21
- package/.agents/core/skills/gstack-roles/SKILL.md +10 -12
- package/.agents/core/skills/gstack-roles/TROUBLESHOOTING.md +6 -12
- package/.agents/core/skills/gstack-roles/VALIDATION.json +115 -4
- package/.agents/core/skills/gstack-roles/references/roles.md +3 -147
- package/.agents/core/skills/ponytail-mindset/EXAMPLES.md +12 -45
- package/.agents/core/skills/ponytail-mindset/SKILL.md +10 -13
- package/.agents/core/skills/ponytail-mindset/TROUBLESHOOTING.md +10 -19
- package/.agents/core/skills/ponytail-mindset/VALIDATION.json +115 -4
- package/.agents/core/skills/ponytail-mindset/references/minimalism.md +58 -174
- package/.agents/core/skills/security/EXAMPLES.md +19 -55
- package/.agents/core/skills/security/SKILL.md +61 -137
- package/.agents/core/skills/security/TROUBLESHOOTING.md +13 -19
- package/.agents/core/skills/security/VALIDATION.json +115 -4
- package/.agents/core/skills/security/skill.yaml +1 -1
- package/.agents/generated/claude/skills/context-manager/EXAMPLES.md +5 -17
- package/.agents/generated/claude/skills/context-manager/SKILL.md +9 -96
- package/.agents/generated/claude/skills/context-manager/TROUBLESHOOTING.md +6 -6
- package/.agents/generated/claude/skills/context-manager/VALIDATION.json +115 -4
- package/.agents/generated/claude/skills/context-manager/references/context-rules.md +3 -57
- package/.agents/generated/claude/skills/context-os/EXAMPLES.md +25 -15
- package/.agents/generated/claude/skills/context-os/SKILL.md +11 -133
- package/.agents/generated/claude/skills/context-os/TROUBLESHOOTING.md +11 -6
- package/.agents/generated/claude/skills/context-os/VALIDATION.json +115 -4
- package/.agents/generated/claude/skills/context-os/packs.yaml +10 -59
- package/.agents/generated/claude/skills/context-os/references/context-rules.md +27 -59
- package/.agents/generated/claude/skills/context-os/references/pipeline.md +14 -119
- package/.agents/generated/claude/skills/context-os/references/project-graph.md +11 -100
- package/.agents/generated/claude/skills/context-os/rules.yaml +8 -135
- package/.agents/generated/claude/skills/engineering-workflow/EXAMPLES.md +15 -50
- package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +9 -9
- package/.agents/generated/claude/skills/engineering-workflow/TROUBLESHOOTING.md +11 -19
- package/.agents/generated/claude/skills/engineering-workflow/VALIDATION.json +115 -4
- package/.agents/generated/claude/skills/engineering-workflow/references/workflow.md +55 -317
- package/.agents/generated/claude/skills/gemini-precision/EXAMPLES.md +33 -53
- package/.agents/generated/claude/skills/gemini-precision/SKILL.md +10 -143
- package/.agents/generated/claude/skills/gemini-precision/TROUBLESHOOTING.md +12 -25
- package/.agents/generated/claude/skills/gemini-precision/VALIDATION.json +115 -4
- package/.agents/generated/claude/skills/gstack-roles/EXAMPLES.md +5 -21
- package/.agents/generated/claude/skills/gstack-roles/SKILL.md +9 -11
- package/.agents/generated/claude/skills/gstack-roles/TROUBLESHOOTING.md +6 -12
- package/.agents/generated/claude/skills/gstack-roles/VALIDATION.json +115 -4
- package/.agents/generated/claude/skills/gstack-roles/references/roles.md +3 -147
- package/.agents/generated/claude/skills/ponytail-mindset/EXAMPLES.md +12 -45
- package/.agents/generated/claude/skills/ponytail-mindset/SKILL.md +9 -12
- package/.agents/generated/claude/skills/ponytail-mindset/TROUBLESHOOTING.md +10 -19
- package/.agents/generated/claude/skills/ponytail-mindset/VALIDATION.json +115 -4
- package/.agents/generated/claude/skills/ponytail-mindset/references/minimalism.md +58 -174
- package/.agents/generated/claude/skills/security/EXAMPLES.md +19 -55
- package/.agents/generated/claude/skills/security/SKILL.md +60 -134
- package/.agents/generated/claude/skills/security/TROUBLESHOOTING.md +13 -19
- package/.agents/generated/claude/skills/security/VALIDATION.json +115 -4
- package/.agents/generated/gemini/skills/context-manager/EXAMPLES.md +5 -17
- package/.agents/generated/gemini/skills/context-manager/SKILL.md +10 -99
- package/.agents/generated/gemini/skills/context-manager/TROUBLESHOOTING.md +6 -6
- package/.agents/generated/gemini/skills/context-manager/VALIDATION.json +115 -4
- package/.agents/generated/gemini/skills/context-manager/references/context-rules.md +3 -57
- package/.agents/generated/gemini/skills/context-os/EXAMPLES.md +25 -15
- package/.agents/generated/gemini/skills/context-os/SKILL.md +12 -135
- package/.agents/generated/gemini/skills/context-os/TROUBLESHOOTING.md +11 -6
- package/.agents/generated/gemini/skills/context-os/VALIDATION.json +115 -4
- package/.agents/generated/gemini/skills/context-os/packs.yaml +10 -59
- package/.agents/generated/gemini/skills/context-os/references/context-rules.md +27 -59
- package/.agents/generated/gemini/skills/context-os/references/pipeline.md +14 -119
- package/.agents/generated/gemini/skills/context-os/references/project-graph.md +11 -100
- package/.agents/generated/gemini/skills/context-os/rules.yaml +8 -135
- package/.agents/generated/gemini/skills/engineering-workflow/EXAMPLES.md +15 -50
- package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +10 -11
- package/.agents/generated/gemini/skills/engineering-workflow/TROUBLESHOOTING.md +11 -19
- package/.agents/generated/gemini/skills/engineering-workflow/VALIDATION.json +115 -4
- package/.agents/generated/gemini/skills/engineering-workflow/references/workflow.md +55 -317
- package/.agents/generated/gemini/skills/gemini-precision/EXAMPLES.md +33 -53
- package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +11 -145
- package/.agents/generated/gemini/skills/gemini-precision/TROUBLESHOOTING.md +12 -25
- package/.agents/generated/gemini/skills/gemini-precision/VALIDATION.json +115 -4
- package/.agents/generated/gemini/skills/gstack-roles/EXAMPLES.md +5 -21
- package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +10 -13
- package/.agents/generated/gemini/skills/gstack-roles/TROUBLESHOOTING.md +6 -12
- package/.agents/generated/gemini/skills/gstack-roles/VALIDATION.json +115 -4
- package/.agents/generated/gemini/skills/gstack-roles/references/roles.md +3 -147
- package/.agents/generated/gemini/skills/ponytail-mindset/EXAMPLES.md +12 -45
- package/.agents/generated/gemini/skills/ponytail-mindset/SKILL.md +10 -14
- package/.agents/generated/gemini/skills/ponytail-mindset/TROUBLESHOOTING.md +10 -19
- package/.agents/generated/gemini/skills/ponytail-mindset/VALIDATION.json +115 -4
- package/.agents/generated/gemini/skills/ponytail-mindset/references/minimalism.md +58 -174
- package/.agents/generated/gemini/skills/security/EXAMPLES.md +19 -55
- package/.agents/generated/gemini/skills/security/SKILL.md +61 -136
- package/.agents/generated/gemini/skills/security/TROUBLESHOOTING.md +13 -19
- package/.agents/generated/gemini/skills/security/VALIDATION.json +115 -4
- package/.agents/resolver/canonical-resolver.js +34 -21
- package/.agents/rules/rule-catalog.js +5 -5
- package/.agents/validate.js +9 -2
- package/.agents/validation-evidence.js +89 -0
- package/README.md +132 -207
- package/catalog/skills/typescript/SKILL.md +16 -2
- package/package.json +3 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
const fs = require('fs');
|
|
7
7
|
const path = require('path');
|
|
8
|
-
const { getSkillEntrypointPath, AGENTS_MD_PATH, collectSkillDirectories,
|
|
8
|
+
const { getSkillEntrypointPath, readSkillMetadata, AGENTS_MD_PATH, collectSkillDirectories, stripFrontmatter } = require('../shared.js');
|
|
9
9
|
const { registerAdapter, applyArtifacts, createProvenanceHeader } = require('../pure-compiler.js');
|
|
10
10
|
|
|
11
11
|
const GENERATOR_ID = 'cursor@2';
|
|
@@ -74,25 +74,9 @@ function getSkillGlobsAndFlags(skillName, skillDir = null) {
|
|
|
74
74
|
function buildSkillSection(skillDir) {
|
|
75
75
|
const skillName = path.basename(skillDir);
|
|
76
76
|
const skillMdPath = getSkillEntrypointPath(skillDir);
|
|
77
|
-
const yamlPath = path.join(skillDir, 'skill.yaml');
|
|
78
|
-
|
|
79
|
-
let title = skillName;
|
|
80
|
-
let description = '';
|
|
81
|
-
if (fs.existsSync(yamlPath)) {
|
|
82
|
-
const yaml = fs.readFileSync(yamlPath, 'utf8');
|
|
83
|
-
title = extractYamlField(yaml, 'name') || skillName;
|
|
84
|
-
description = extractYamlField(yaml, 'description') || '';
|
|
85
|
-
}
|
|
86
77
|
|
|
87
78
|
if (!fs.existsSync(skillMdPath)) return null;
|
|
88
|
-
|
|
89
|
-
const raw = fs.readFileSync(skillMdPath, 'utf8');
|
|
90
|
-
const body = stripFrontmatter(raw).trimEnd();
|
|
91
|
-
|
|
92
|
-
if (!description) {
|
|
93
|
-
const firstLine = body.split(/\r?\n/).map(l => l.trim()).find(l => l && !l.startsWith('#'));
|
|
94
|
-
description = firstLine || '';
|
|
95
|
-
}
|
|
79
|
+
const { name: title, description } = readSkillMetadata(skillDir);
|
|
96
80
|
|
|
97
81
|
const descLine = description ? `> ${description.replace(/\r?\n+/g, ' ').trim()}\n` : '';
|
|
98
82
|
return `\n## Skill: ${title}\n${descLine}*Rule file: \`.cursor/rules/${skillName}.mdc\` (load on demand)*\n`;
|
|
@@ -101,18 +85,10 @@ function buildSkillSection(skillDir) {
|
|
|
101
85
|
function generateCursorMdc(skillDir, context) {
|
|
102
86
|
const skillName = path.basename(skillDir);
|
|
103
87
|
const skillMdPath = getSkillEntrypointPath(skillDir);
|
|
104
|
-
const yamlPath = path.join(skillDir, 'skill.yaml');
|
|
105
88
|
|
|
106
89
|
if (!fs.existsSync(skillMdPath)) return null;
|
|
107
90
|
|
|
108
|
-
|
|
109
|
-
let description = `ContextOS rules for ${skillName}`;
|
|
110
|
-
if (fs.existsSync(yamlPath)) {
|
|
111
|
-
const yaml = fs.readFileSync(yamlPath, 'utf8');
|
|
112
|
-
title = extractYamlField(yaml, 'name') || skillName;
|
|
113
|
-
const desc = extractYamlField(yaml, 'description');
|
|
114
|
-
if (desc) description = desc;
|
|
115
|
-
}
|
|
91
|
+
const { name: title, description } = readSkillMetadata(skillDir);
|
|
116
92
|
|
|
117
93
|
let raw = fs.readFileSync(skillMdPath, 'utf8');
|
|
118
94
|
const body = stripFrontmatter(raw).trimEnd();
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
const fs = require('fs');
|
|
7
7
|
const path = require('path');
|
|
8
|
-
const { getSkillEntrypointPath,
|
|
8
|
+
const { getSkillEntrypointPath, readSkillMetadata, stripFrontmatter, collectSkillDirectories, renderSkillResources } = require('../shared.js');
|
|
9
9
|
const { registerAdapter, applyArtifacts } = require('../pure-compiler.js');
|
|
10
10
|
|
|
11
11
|
const GENERATOR_ID = 'gemini@2';
|
|
@@ -14,14 +14,13 @@ function describe() {
|
|
|
14
14
|
return {
|
|
15
15
|
name: 'gemini',
|
|
16
16
|
version: '2.0.0',
|
|
17
|
-
description: 'Compiles
|
|
17
|
+
description: 'Compiles shared native skills and supporting resources for documented client discovery paths',
|
|
18
18
|
targetPattern: '.agents/generated/gemini/skills/**/SKILL.md',
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function renderGeminiSkill(skillDir, context) {
|
|
23
23
|
const skillName = path.basename(skillDir);
|
|
24
|
-
const manifest = readSkillManifest(skillDir);
|
|
25
24
|
const existingSkillMdPath = getSkillEntrypointPath(skillDir);
|
|
26
25
|
|
|
27
26
|
if (!fs.existsSync(existingSkillMdPath)) {
|
|
@@ -29,13 +28,12 @@ function renderGeminiSkill(skillDir, context) {
|
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
const name = skillName;
|
|
32
|
-
const
|
|
33
|
-
const mergedContent = fs.readFileSync(existingSkillMdPath, 'utf8')
|
|
31
|
+
const { description } = readSkillMetadata(skillDir);
|
|
32
|
+
const mergedContent = stripFrontmatter(fs.readFileSync(existingSkillMdPath, 'utf8'));
|
|
34
33
|
|
|
35
34
|
const outputContent = `---
|
|
36
35
|
name: ${name}
|
|
37
|
-
description:
|
|
38
|
-
${description}
|
|
36
|
+
description: ${JSON.stringify(description)}
|
|
39
37
|
---
|
|
40
38
|
${mergedContent.trim()}
|
|
41
39
|
`.replace(/\r\n/g, '\n');
|
|
@@ -53,7 +53,7 @@ function resetDirectory(directory) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
function stripFrontmatter(content) {
|
|
56
|
-
return content.replace(
|
|
56
|
+
return content.replace(/^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/, '').trimStart();
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
function extractYamlField(yamlText, field) {
|
|
@@ -126,6 +126,18 @@ function getSkillEntrypointPath(skillDir) {
|
|
|
126
126
|
return require('../filesystem/index.js').resolveManagedPath(skillDir, manifest?.entrypoint || 'SKILL.md').resolvedPath;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
/** Routing metadata follows the declared manifest, then the real entrypoint. */
|
|
130
|
+
function readSkillMetadata(skillDir, { fallbackDescription } = {}) {
|
|
131
|
+
const manifest = readSkillManifest(skillDir);
|
|
132
|
+
const entrypoint = getSkillEntrypointPath(skillDir);
|
|
133
|
+
const raw = fs.existsSync(entrypoint) ? fs.readFileSync(entrypoint, 'utf8') : '';
|
|
134
|
+
const match = raw.match(/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);
|
|
135
|
+
const frontmatter = match ? require('../compiler/vendor/yaml.js').parse(match[1]) : {};
|
|
136
|
+
const name = manifest?.displayName || manifest?.name || frontmatter?.name || path.basename(skillDir);
|
|
137
|
+
const description = manifest?.description || frontmatter?.description || fallbackDescription || `ContextOS skill for ${name}`;
|
|
138
|
+
return { name, description: typeof description === 'string' ? description.trim() : description };
|
|
139
|
+
}
|
|
140
|
+
|
|
129
141
|
/** Copy declared resources beside exported entrypoints without inlining them. */
|
|
130
142
|
function renderSkillResources(skillDir, destinations, metadata) {
|
|
131
143
|
const manifest = readSkillManifest(skillDir);
|
|
@@ -158,5 +170,6 @@ module.exports = {
|
|
|
158
170
|
stripFrontmatter,
|
|
159
171
|
renderSkillResources,
|
|
160
172
|
readSkillManifest,
|
|
173
|
+
readSkillMetadata,
|
|
161
174
|
getSkillEntrypointPath,
|
|
162
175
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
const fs = require('fs');
|
|
7
7
|
const path = require('path');
|
|
8
|
-
const { getSkillEntrypointPath, AGENTS_MD_PATH, collectSkillDirectories,
|
|
8
|
+
const { getSkillEntrypointPath, readSkillMetadata, AGENTS_MD_PATH, collectSkillDirectories, stripFrontmatter } = require('../shared.js');
|
|
9
9
|
const { registerAdapter, applyArtifacts, createProvenanceHeader } = require('../pure-compiler.js');
|
|
10
10
|
|
|
11
11
|
const GENERATOR_ID = 'zed@2';
|
|
@@ -22,25 +22,13 @@ function describe() {
|
|
|
22
22
|
function buildSkillSection(skillDir) {
|
|
23
23
|
const skillName = path.basename(skillDir);
|
|
24
24
|
const skillMdPath = getSkillEntrypointPath(skillDir);
|
|
25
|
-
const yamlPath = path.join(skillDir, 'skill.yaml');
|
|
26
|
-
|
|
27
|
-
let title = skillName;
|
|
28
|
-
let description = '';
|
|
29
|
-
if (fs.existsSync(yamlPath)) {
|
|
30
|
-
const yaml = fs.readFileSync(yamlPath, 'utf8');
|
|
31
|
-
title = extractYamlField(yaml, 'name') || skillName;
|
|
32
|
-
description = extractYamlField(yaml, 'description') || '';
|
|
33
|
-
}
|
|
34
25
|
|
|
35
26
|
if (!fs.existsSync(skillMdPath)) return null;
|
|
36
|
-
|
|
37
27
|
const raw = fs.readFileSync(skillMdPath, 'utf8');
|
|
38
28
|
const body = stripFrontmatter(raw);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
description = firstLine || '';
|
|
43
|
-
}
|
|
29
|
+
// Preserve the existing body preview for skills without routing metadata.
|
|
30
|
+
const fallbackDescription = body.split(/\r?\n/).map(line => line.trim()).find(line => line && !line.startsWith('#'));
|
|
31
|
+
const { name: title, description } = readSkillMetadata(skillDir, { fallbackDescription });
|
|
44
32
|
|
|
45
33
|
const descLine = description ? `> ${description.replace(/\r?\n+/g, ' ').trim()}\n` : '';
|
|
46
34
|
const promptRef = `*Prompt template: \`.zed/prompts/${skillName}.md\` (Use via /${skillName})*\n`;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"compilerVersion": "2.0.0",
|
|
4
|
-
"sourceGraphHash": "sha256:
|
|
4
|
+
"sourceGraphHash": "sha256:1b5d0e2b86f8dc023ed48da798410c82c6d2855db15d6af500b575cb60234bd6",
|
|
5
5
|
"skills": {
|
|
6
6
|
"context-manager": {
|
|
7
7
|
"id": "context-manager",
|
|
8
8
|
"displayName": "context-manager",
|
|
9
9
|
"version": "1.0.0",
|
|
10
|
-
"description": "
|
|
10
|
+
"description": "Compatibility alias for context-os context selection and budgeting.",
|
|
11
11
|
"category": "general",
|
|
12
12
|
"type": "instruction-only",
|
|
13
13
|
"entrypoint": "SKILL.md",
|
|
14
|
-
"entrypointHash": "sha256:
|
|
15
|
-
"resourceTreeHash": "sha256:
|
|
16
|
-
"estimatedTokens":
|
|
14
|
+
"entrypointHash": "sha256:68da81d3dc530bd37260f61923c6dd4a3bc862a96500129fefd61cfa2021323b",
|
|
15
|
+
"resourceTreeHash": "sha256:c3a338efabd770e57bcaec7a127bc281cb718626f6a84a904f850164984aa5fe",
|
|
16
|
+
"estimatedTokens": 304,
|
|
17
17
|
"source": ".agents/core/skills/context-manager/skill.yaml",
|
|
18
18
|
"signals": {
|
|
19
19
|
"aliases": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"context": {
|
|
32
32
|
"priority": 50,
|
|
33
|
-
"estimatedTokens":
|
|
33
|
+
"estimatedTokens": 304
|
|
34
34
|
},
|
|
35
35
|
"resources": [
|
|
36
36
|
{
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"category": "general",
|
|
67
67
|
"type": "compiler",
|
|
68
68
|
"entrypoint": "SKILL.md",
|
|
69
|
-
"entrypointHash": "sha256:
|
|
70
|
-
"resourceTreeHash": "sha256:
|
|
71
|
-
"estimatedTokens":
|
|
69
|
+
"entrypointHash": "sha256:3d333bd492b24f62f4a5314bbbddd4a08014a8867645bedebbe9329a8d76e2d5",
|
|
70
|
+
"resourceTreeHash": "sha256:75f2c5ef977ad763b1bd84f5b2934fb317c9cc853760fa76a38f713aa422fddd",
|
|
71
|
+
"estimatedTokens": 562,
|
|
72
72
|
"source": ".agents/core/skills/context-os/skill.yaml",
|
|
73
73
|
"signals": {
|
|
74
74
|
"aliases": [
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
"context": {
|
|
87
87
|
"priority": 50,
|
|
88
|
-
"estimatedTokens":
|
|
88
|
+
"estimatedTokens": 562
|
|
89
89
|
},
|
|
90
90
|
"resources": [
|
|
91
91
|
{
|
|
@@ -137,9 +137,9 @@
|
|
|
137
137
|
"category": "general",
|
|
138
138
|
"type": "instruction-only",
|
|
139
139
|
"entrypoint": "SKILL.md",
|
|
140
|
-
"entrypointHash": "sha256:
|
|
141
|
-
"resourceTreeHash": "sha256:
|
|
142
|
-
"estimatedTokens":
|
|
140
|
+
"entrypointHash": "sha256:a36e56bf2b8ad3711e1209f9d7ee68de1a1e3d6fbf864eed423bdf4527474a5e",
|
|
141
|
+
"resourceTreeHash": "sha256:db770f6c0fe81ab7a4952ebf6391e36f4e0b53571ff09c9a3d36af770185ea77",
|
|
142
|
+
"estimatedTokens": 430,
|
|
143
143
|
"source": ".agents/core/skills/engineering-workflow/skill.yaml",
|
|
144
144
|
"signals": {
|
|
145
145
|
"aliases": [
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
},
|
|
157
157
|
"context": {
|
|
158
158
|
"priority": 50,
|
|
159
|
-
"estimatedTokens":
|
|
159
|
+
"estimatedTokens": 430
|
|
160
160
|
},
|
|
161
161
|
"resources": [
|
|
162
162
|
{
|
|
@@ -188,13 +188,13 @@
|
|
|
188
188
|
"id": "gemini-precision",
|
|
189
189
|
"displayName": "gemini-precision",
|
|
190
190
|
"version": "1.0.0",
|
|
191
|
-
"description": "
|
|
191
|
+
"description": "Execution guidance for Gemini: inspect code, preserve scope, and report relevant verification evidence.",
|
|
192
192
|
"category": "general",
|
|
193
193
|
"type": "instruction-only",
|
|
194
194
|
"entrypoint": "SKILL.md",
|
|
195
|
-
"entrypointHash": "sha256:
|
|
196
|
-
"resourceTreeHash": "sha256:
|
|
197
|
-
"estimatedTokens":
|
|
195
|
+
"entrypointHash": "sha256:d0e1c8331b25d663c153a88ed7e88d349f2e8662f919a6d390f5e94cfee81093",
|
|
196
|
+
"resourceTreeHash": "sha256:343b58798199f697e8c547963e41f3160793e69a43ffa9feb5109450368d55e0",
|
|
197
|
+
"estimatedTokens": 444,
|
|
198
198
|
"source": ".agents/core/skills/gemini-precision/skill.yaml",
|
|
199
199
|
"signals": {
|
|
200
200
|
"aliases": [
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
},
|
|
212
212
|
"context": {
|
|
213
213
|
"priority": 50,
|
|
214
|
-
"estimatedTokens":
|
|
214
|
+
"estimatedTokens": 444
|
|
215
215
|
},
|
|
216
216
|
"resources": [
|
|
217
217
|
{
|
|
@@ -243,9 +243,9 @@
|
|
|
243
243
|
"category": "general",
|
|
244
244
|
"type": "instruction-only",
|
|
245
245
|
"entrypoint": "SKILL.md",
|
|
246
|
-
"entrypointHash": "sha256:
|
|
247
|
-
"resourceTreeHash": "sha256:
|
|
248
|
-
"estimatedTokens":
|
|
246
|
+
"entrypointHash": "sha256:60eb7b902ae8faf4c4205cf99abad4401ee2ec528b9c8490f909aa7db95fb5f2",
|
|
247
|
+
"resourceTreeHash": "sha256:4afcb9bffe3b4d6912d3d6c35b1a197b6471c9789f277295a2de6c56727eae34",
|
|
248
|
+
"estimatedTokens": 310,
|
|
249
249
|
"source": ".agents/core/skills/gstack-roles/skill.yaml",
|
|
250
250
|
"signals": {
|
|
251
251
|
"aliases": [
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
},
|
|
263
263
|
"context": {
|
|
264
264
|
"priority": 50,
|
|
265
|
-
"estimatedTokens":
|
|
265
|
+
"estimatedTokens": 310
|
|
266
266
|
},
|
|
267
267
|
"resources": [
|
|
268
268
|
{
|
|
@@ -298,9 +298,9 @@
|
|
|
298
298
|
"category": "general",
|
|
299
299
|
"type": "instruction-only",
|
|
300
300
|
"entrypoint": "SKILL.md",
|
|
301
|
-
"entrypointHash": "sha256:
|
|
302
|
-
"resourceTreeHash": "sha256:
|
|
303
|
-
"estimatedTokens":
|
|
301
|
+
"entrypointHash": "sha256:d1d70efd4fec48ff5209c93bb18ce52039abc92c83f04d9aa691d0d147ed1b44",
|
|
302
|
+
"resourceTreeHash": "sha256:b760eceafd9d0e88df852029a262078b3089040edbf947d71a32fad6845be32b",
|
|
303
|
+
"estimatedTokens": 402,
|
|
304
304
|
"source": ".agents/core/skills/ponytail-mindset/skill.yaml",
|
|
305
305
|
"signals": {
|
|
306
306
|
"aliases": [
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
},
|
|
318
318
|
"context": {
|
|
319
319
|
"priority": 50,
|
|
320
|
-
"estimatedTokens":
|
|
320
|
+
"estimatedTokens": 402
|
|
321
321
|
},
|
|
322
322
|
"resources": [
|
|
323
323
|
{
|
|
@@ -353,9 +353,9 @@
|
|
|
353
353
|
"category": "backend",
|
|
354
354
|
"type": "instruction-only",
|
|
355
355
|
"entrypoint": "SKILL.md",
|
|
356
|
-
"entrypointHash": "sha256:
|
|
357
|
-
"resourceTreeHash": "sha256:
|
|
358
|
-
"estimatedTokens":
|
|
356
|
+
"entrypointHash": "sha256:7d73d176ef08f6ae6210db12ecf0088e0177d12d4e365a626cfbb3d7236ccdad",
|
|
357
|
+
"resourceTreeHash": "sha256:a4e2b342b27a7c4532977f4788d8a406273ab1008c1a06bb4941da5a96752aa3",
|
|
358
|
+
"estimatedTokens": 1351,
|
|
359
359
|
"source": ".agents/core/skills/security/skill.yaml",
|
|
360
360
|
"signals": {
|
|
361
361
|
"aliases": [
|
|
@@ -423,7 +423,7 @@
|
|
|
423
423
|
},
|
|
424
424
|
"context": {
|
|
425
425
|
"priority": 90,
|
|
426
|
-
"estimatedTokens":
|
|
426
|
+
"estimatedTokens": 1351
|
|
427
427
|
},
|
|
428
428
|
"resources": [
|
|
429
429
|
{
|
|
@@ -457,7 +457,7 @@
|
|
|
457
457
|
"level": "must",
|
|
458
458
|
"enforcement": "runtime",
|
|
459
459
|
"checker": "secret-scanner",
|
|
460
|
-
"summary": "
|
|
460
|
+
"summary": "Scan configured inputs for supported credential patterns; report input scope, exclusions, and scanner results"
|
|
461
461
|
},
|
|
462
462
|
{
|
|
463
463
|
"id": "SEC-003",
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
"level": "must",
|
|
507
507
|
"enforcement": "runtime",
|
|
508
508
|
"checker": "secret-scanner",
|
|
509
|
-
"summary": "
|
|
509
|
+
"summary": "Scan configured inputs for supported credential patterns; report input scope, exclusions, and scanner results",
|
|
510
510
|
"sourceSkill": "security"
|
|
511
511
|
},
|
|
512
512
|
"SEC-003": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
sha256:
|
|
1
|
+
sha256:1b5d0e2b86f8dc023ed48da798410c82c6d2855db15d6af500b575cb60234bd6 registry.v2.json
|
|
@@ -277,14 +277,14 @@ class ManifestCompiler {
|
|
|
277
277
|
if (!fs.existsSync(filePath)) return null;
|
|
278
278
|
const content = fs.readFileSync(filePath, 'utf8');
|
|
279
279
|
if (!content.startsWith('---')) return null;
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
282
|
-
const rawYaml =
|
|
280
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)([\s\S]*)/);
|
|
281
|
+
if (!match) return { malformed: true };
|
|
282
|
+
const rawYaml = match[1].trim();
|
|
283
283
|
const parsed = parseYaml(rawYaml);
|
|
284
284
|
return {
|
|
285
285
|
raw: rawYaml,
|
|
286
286
|
parsed,
|
|
287
|
-
contentWithoutFrontmatter:
|
|
287
|
+
contentWithoutFrontmatter: match[2].trim(),
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
290
|
|
|
@@ -299,7 +299,7 @@ class ManifestCompiler {
|
|
|
299
299
|
|
|
300
300
|
const entrypoint = parsed.entrypoint || 'SKILL.md';
|
|
301
301
|
const version = parsed.version ? String(parsed.version) : '1.0.0';
|
|
302
|
-
|
|
302
|
+
let description = parsed.description || `ContextOS skill for ${displayName}`;
|
|
303
303
|
const type = parsed.type || 'instruction-only';
|
|
304
304
|
const category = parsed.category || 'general';
|
|
305
305
|
|
|
@@ -319,6 +319,9 @@ class ManifestCompiler {
|
|
|
319
319
|
const entrypointFile = path.join(skillDir, entrypoint);
|
|
320
320
|
if (fs.existsSync(entrypointFile)) {
|
|
321
321
|
const fm = this.readFrontmatter(entrypointFile);
|
|
322
|
+
if (!parsed.description && typeof fm?.parsed?.description === 'string' && fm.parsed.description.trim()) {
|
|
323
|
+
description = fm.parsed.description.trim();
|
|
324
|
+
}
|
|
322
325
|
if (fm && fm.parsed && fm.parsed.name) {
|
|
323
326
|
const fmSlug = String(fm.parsed.name).trim().toLowerCase().replace(/\s+/g, '-');
|
|
324
327
|
discoveredAliases.push(fmSlug);
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
# context-manager
|
|
1
|
+
# context-manager compatibility examples
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use the canonical [context-os](../context-os/SKILL.md). An explicit resolver
|
|
4
|
+
request for context-manager redirects to context-os; the warning explains the mapping.
|
|
5
|
+
A directly loaded alias should follow the same canonical instructions.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
Agent reads all 180 files in src/ into context to debug a single button click handler.
|
|
9
|
-
Result: Exhausts 150k tokens, reaches rate limits, and forgets user instructions.
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
### Best practice: ContextOS Standard (Targeted AST Traversal)
|
|
13
|
-
|
|
14
|
-
```text
|
|
15
|
-
1. Inspect package.json and AGENTS.md.
|
|
16
|
-
2. Grep for target symbol: grep_search for 'SubmitButton'.
|
|
17
|
-
3. Read ONLY components/SubmitButton.tsx and its direct import types/button.ts.
|
|
18
|
-
Total tokens used: <1,500 tokens. Fast, accurate, zero hallucinations.
|
|
19
|
-
```
|
|
7
|
+
Inspect relevant files, callers, and resolver warnings. Package evidence does not guarantee a complete symbol graph or total prompt budget.
|
|
@@ -1,126 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-manager
|
|
3
|
-
description:
|
|
4
|
-
Smart context selection engine. Analyzes the current task, consults the
|
|
5
|
-
Project Graph, and returns only the documents and skills needed.
|
|
6
|
-
Prevents context window overflow by loading minimum relevant information.
|
|
3
|
+
description: "Compatibility alias for context-os context selection and budgeting."
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# context-manager
|
|
10
7
|
|
|
11
8
|
## Overview
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
Deprecated compatibility identifier. Use [context-os](../context-os/SKILL.md) for the canonical instructions.
|
|
14
11
|
|
|
15
12
|
## When to Use
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
An existing configuration or user explicitly names context-manager.
|
|
18
15
|
|
|
19
16
|
## Rules & Patterns
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## How It Works
|
|
24
|
-
|
|
25
|
-
When given a task:
|
|
26
|
-
|
|
27
|
-
### Step 1: Classify the task
|
|
28
|
-
|
|
29
|
-
```yaml
|
|
30
|
-
task:
|
|
31
|
-
type: [frontend | backend | fullstack | architecture | bugfix | refactor | deploy | review]
|
|
32
|
-
scope: [module | feature | file | project-wide]
|
|
33
|
-
module: {{module_name from Project Graph}}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Step 2: Consult the Project Graph
|
|
37
|
-
|
|
38
|
-
If `docs/PROJECT_GRAPH.md` or `.graphify/graph.json` exists (or activate `graphify` skill to extract AST dependencies):
|
|
39
|
-
|
|
40
|
-
1. Find the module this task belongs to
|
|
41
|
-
2. Get the module's dependencies
|
|
42
|
-
3. Get the module's required skills
|
|
43
|
-
4. Get the files this task will likely touch
|
|
44
|
-
|
|
45
|
-
### Step 3: Apply Context Rules
|
|
46
|
-
|
|
47
|
-
Load `references/context-rules.md` and apply the task type → document mapping.
|
|
48
|
-
|
|
49
|
-
### Step 4: Return Context Package
|
|
50
|
-
|
|
51
|
-
Output a context package:
|
|
52
|
-
|
|
53
|
-
```yaml
|
|
54
|
-
context:
|
|
55
|
-
documents:
|
|
56
|
-
required:
|
|
57
|
-
- docs/API.md # sections: [appointments]
|
|
58
|
-
- docs/ARCHITECTURE.md # sections: [backend, api-layer]
|
|
59
|
-
optional:
|
|
60
|
-
- docs/decisions/0003-postgres.md
|
|
61
|
-
skipped:
|
|
62
|
-
- docs/UI.md # reason: backend task
|
|
63
|
-
- docs/DATABASE.md # reason: no schema change
|
|
64
|
-
|
|
65
|
-
skills:
|
|
66
|
-
loaded: [typescript, node, postgres, testing]
|
|
67
|
-
skipped: [react, tailwind] # reason: backend task
|
|
68
|
-
|
|
69
|
-
project_graph:
|
|
70
|
-
module: appointments
|
|
71
|
-
dependencies: [auth, patients]
|
|
72
|
-
affected_files:
|
|
73
|
-
- src/modules/appointments/api/**
|
|
74
|
-
- src/modules/appointments/services/**
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Step 5: Validate Budget
|
|
78
|
-
|
|
79
|
-
Check total token count. If over budget (see context-rules.md):
|
|
80
|
-
|
|
81
|
-
1. Trim Level 1 docs to summaries
|
|
82
|
-
2. Load only affected sections of Level 2 docs
|
|
83
|
-
3. Keep Level 3 (skills) at full detail
|
|
84
|
-
|
|
85
|
-
## Context Caching
|
|
86
|
-
|
|
87
|
-
After first compilation for a module, cache the result:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
.cache/
|
|
91
|
-
frontend.context.yaml
|
|
92
|
-
backend.context.yaml
|
|
93
|
-
appointments.context.yaml
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Invalidate cache when:
|
|
97
|
-
|
|
98
|
-
- A document is updated
|
|
99
|
-
- A skill is added/removed
|
|
100
|
-
- The Project Graph changes
|
|
101
|
-
- A Decision Record is added
|
|
102
|
-
|
|
103
|
-
## Questions the Context Manager Can Answer
|
|
104
|
-
|
|
105
|
-
- "What documents do I need for this task?"
|
|
106
|
-
- "Which skills should be loaded?"
|
|
107
|
-
- "What modules are affected by this change?"
|
|
108
|
-
- "Is this context package within budget?"
|
|
109
|
-
- "Why was this document skipped?"
|
|
110
|
-
|
|
18
|
+
Apply the canonical skill without loading a duplicate process. Existing authorization, proportional verification, and optional role declarations carry forward. The resolver redirects this identifier and reports an alias warning.
|
|
111
19
|
|
|
112
20
|
## Code Examples
|
|
113
21
|
|
|
114
|
-
|
|
22
|
+
Explicit context-manager selection resolves to context-os; inspect the resolver result rather than assuming both bodies were loaded.
|
|
115
23
|
|
|
116
24
|
## Validation Checklist
|
|
117
25
|
|
|
118
|
-
|
|
26
|
+
- [ ] Canonical guidance is used.
|
|
27
|
+
- [ ] Alias resolution adds no duplicate body.
|
|
28
|
+
- [ ] Evidence scope and limitations are stated.
|
|
119
29
|
|
|
120
30
|
## Common Mistakes
|
|
121
31
|
|
|
122
|
-
|
|
32
|
+
Treating this compatibility name as an independent engine or a mandatory ceremony.
|
|
123
33
|
|
|
124
34
|
## Integration Notes
|
|
125
35
|
|
|
126
|
-
|
|
36
|
+
Keep legacy links available. Read [references/context-rules.md](references/context-rules.md) only for compatibility details.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# context-manager
|
|
1
|
+
# context-manager compatibility troubleshooting
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
|
|
3
|
+
- Duplicate process: load the canonical context-os instructions once.
|
|
4
|
+
- Repeated approval or banners: preserve existing authorization and optional roles.
|
|
5
|
+
- Conflicting legacy guidance: use the canonical skill and update the stale link.
|
|
6
|
+
- Claimed automation: inspect actual CLI results and distinguish instructions
|
|
7
|
+
from runtime enforcement.
|