contextos-agents 2.0.0-beta.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/AGENTS.md +15 -49
- package/.agents/adapters/cursor/export.js +20 -3
- package/.agents/ctx.js +32 -70
- package/.agents/doctor.js +144 -23
- package/.agents/plugins.js +20 -5
- package/.agents/resolver/canonical-resolver.js +1348 -0
- package/.agents/rules/rule-catalog.js +525 -0
- package/.agents/skills-index.json +6 -166
- package/.agents/stats.js +9 -9
- package/LICENSE +201 -21
- package/NOTICE +4 -0
- package/README.md +14 -18
- package/bin/commands/update.js +7 -8
- package/package.json +83 -85
- package/benchmarks/v2/analysis/statistics.js +0 -140
- package/benchmarks/v2/analysis/stats.js +0 -69
- package/benchmarks/v2/arms/arm-definitions.js +0 -79
- package/benchmarks/v2/dataset.schema.json +0 -34
- package/benchmarks/v2/evaluators/index.js +0 -25
- package/benchmarks/v2/evaluators/verified-success.js +0 -116
- package/benchmarks/v2/harness/runner.js +0 -88
- package/benchmarks/v2/pilot-tasks.json +0 -392
|
@@ -1,200 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"skills": [
|
|
4
|
-
{
|
|
5
|
-
"name": "adapters",
|
|
6
|
-
"description": "Generates agent-specific configuration files from the unified ContextOS format.",
|
|
7
|
-
"path": ".agents/core/skills/adapters/SKILL.md"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"name": "architecture-diagrams",
|
|
11
|
-
"description": "Interactive, visual architecture and sequence diagrams as code. Generates beautiful, self-contained",
|
|
12
|
-
"path": ".agents/core/skills/architecture-diagrams/SKILL.md"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "brutalist-design",
|
|
16
|
-
"description": "Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.",
|
|
17
|
-
"path": ".agents/core/skills/brutalist-design/SKILL.md"
|
|
18
|
-
},
|
|
19
4
|
{
|
|
20
5
|
"name": "context-manager",
|
|
21
|
-
"description": "Smart context selection engine. Analyzes the current task, consults the",
|
|
6
|
+
"description": "Smart context selection engine. Analyzes the current task, consults the Project Graph, and returns only the documents and skills needed to prevent token overflow.",
|
|
22
7
|
"path": ".agents/core/skills/context-manager/SKILL.md"
|
|
23
8
|
},
|
|
24
9
|
{
|
|
25
10
|
"name": "context-os",
|
|
26
|
-
"description": "
|
|
11
|
+
"description": "Deterministic context compiler and policy engine for AI coding agents.",
|
|
27
12
|
"path": ".agents/core/skills/context-os/SKILL.md"
|
|
28
13
|
},
|
|
29
|
-
{
|
|
30
|
-
"name": "database",
|
|
31
|
-
"description": "Database architecture, schema design, Prisma, Drizzle ORM, indexing strategies, migrations, and N+1 query resolution.",
|
|
32
|
-
"path": ".agents/core/skills/database/SKILL.md"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "ddd",
|
|
36
|
-
"description": "ContextOS skill for Domain-Driven Design",
|
|
37
|
-
"path": ".agents/core/skills/ddd/SKILL.md"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "decisions",
|
|
41
|
-
"description": "Architecture Decision Records (ADR) management. Creates, tracks, and queries",
|
|
42
|
-
"path": ".agents/core/skills/decisions/SKILL.md"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "docker",
|
|
46
|
-
"description": "Docker containerization, multi-stage builds, non-root security, layer caching optimization, and docker-compose standards.",
|
|
47
|
-
"path": ".agents/core/skills/docker/SKILL.md"
|
|
48
|
-
},
|
|
49
14
|
{
|
|
50
15
|
"name": "engineering-workflow",
|
|
51
|
-
"description": "Senior engineering workflow skill. Enforces spec → plan → build → test → review → ship.",
|
|
16
|
+
"description": "Senior engineering workflow skill. Enforces the full development lifecycle: spec → plan → build → test → review → ship.",
|
|
52
17
|
"path": ".agents/core/skills/engineering-workflow/SKILL.md"
|
|
53
18
|
},
|
|
54
|
-
{
|
|
55
|
-
"name": "fastapi",
|
|
56
|
-
"description": "ContextOS skill for FastAPI",
|
|
57
|
-
"path": ".agents/core/skills/fastapi/SKILL.md"
|
|
58
|
-
},
|
|
59
19
|
{
|
|
60
20
|
"name": "gemini-precision",
|
|
61
21
|
"description": "High-precision engineering and execution guardrails optimized for Google Gemini models.",
|
|
62
22
|
"path": ".agents/core/skills/gemini-precision/SKILL.md"
|
|
63
23
|
},
|
|
64
|
-
{
|
|
65
|
-
"name": "generators",
|
|
66
|
-
"description": "Generates project documentation from a single idea. Creates PRD, Architecture,",
|
|
67
|
-
"path": ".agents/core/skills/generators/SKILL.md"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"name": "graphify",
|
|
71
|
-
"description": "Transforms entire codebases into structured knowledge graphs via Tree-sitter AST parsing.",
|
|
72
|
-
"path": ".agents/core/skills/graphify/SKILL.md"
|
|
73
|
-
},
|
|
74
24
|
{
|
|
75
25
|
"name": "gstack-roles",
|
|
76
|
-
"description": "Role-based AI specialist system. Defines
|
|
26
|
+
"description": "Role-based AI specialist system. Defines specialist roles and teaches the AI to adopt the correct role before each task phase.",
|
|
77
27
|
"path": ".agents/core/skills/gstack-roles/SKILL.md"
|
|
78
28
|
},
|
|
79
|
-
{
|
|
80
|
-
"name": "impeccable-design",
|
|
81
|
-
"description": "Visual design quality enforcement. 50 deterministic anti-pattern rules preventing",
|
|
82
|
-
"path": ".agents/core/skills/impeccable-design/SKILL.md"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "interview-me",
|
|
86
|
-
"description": "Interactive requirements elicitation skill. Interrogates ambiguous, complex, or high-blast-radius",
|
|
87
|
-
"path": ".agents/core/skills/interview-me/SKILL.md"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"name": "microservices",
|
|
91
|
-
"description": "ContextOS skill for Microservices",
|
|
92
|
-
"path": ".agents/core/skills/microservices/SKILL.md"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"name": "minimalist-design",
|
|
96
|
-
"description": "Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.",
|
|
97
|
-
"path": ".agents/core/skills/minimalist-design/SKILL.md"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"name": "nestjs",
|
|
101
|
-
"description": "ContextOS skill for NestJS",
|
|
102
|
-
"path": ".agents/core/skills/nestjs/SKILL.md"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"name": "nextjs",
|
|
106
|
-
"description": "ContextOS skill for Next.js App Router, Server Components, Server Actions, performance optimization, and Vercel best practices.",
|
|
107
|
-
"path": ".agents/core/skills/nextjs/SKILL.md"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"name": "node",
|
|
111
|
-
"description": "ContextOS skill for Node.js",
|
|
112
|
-
"path": ".agents/core/skills/node/SKILL.md"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"name": "performance",
|
|
116
|
-
"description": "ContextOS skill for Web Performance, Core Web Vitals, waterfall elimination, bundle size optimization, and caching strategies.",
|
|
117
|
-
"path": ".agents/core/skills/performance/SKILL.md"
|
|
118
|
-
},
|
|
119
29
|
{
|
|
120
30
|
"name": "ponytail-mindset",
|
|
121
|
-
"description": "Minimalist coding mindset.
|
|
31
|
+
"description": "Minimalist coding mindset. Teaches the AI to write only what is strictly necessary using the 7-rung ladder.",
|
|
122
32
|
"path": ".agents/core/skills/ponytail-mindset/SKILL.md"
|
|
123
33
|
},
|
|
124
|
-
{
|
|
125
|
-
"name": "react",
|
|
126
|
-
"description": "ContextOS skill for modern React (v18/v19), component architecture, state colocation, render optimization, and Vercel performance rules.",
|
|
127
|
-
"path": ".agents/core/skills/react/SKILL.md"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"name": "react-best-practices",
|
|
131
|
-
"description": "React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.",
|
|
132
|
-
"path": ".agents/core/skills/react-best-practices/SKILL.md"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"name": "redesign-audit",
|
|
136
|
-
"description": "Upgrades existing websites and apps to premium quality. Audits current design, identifies generic AI patterns, and applies high-end design standards without breaking functionality. Works with any CSS framework or vanilla CSS.",
|
|
137
|
-
"path": ".agents/core/skills/redesign-audit/SKILL.md"
|
|
138
|
-
},
|
|
139
34
|
{
|
|
140
35
|
"name": "security",
|
|
141
|
-
"description": "
|
|
36
|
+
"description": "ContextOS skill for Application Security.",
|
|
142
37
|
"path": ".agents/core/skills/security/SKILL.md"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"name": "soft-design",
|
|
146
|
-
"description": "Teaches the AI to design like a high-end agency. Defines the exact fonts, spacing, shadows, card structures, and animations that make a website feel expensive. Blocks all the common defaults that make AI designs look cheap or generic.",
|
|
147
|
-
"path": ".agents/core/skills/soft-design/SKILL.md"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"name": "state-management",
|
|
151
|
-
"description": "Client and server state management standards using Zustand and TanStack Query. Enforces minimal global state, optimistic updates, and clean query invalidation.",
|
|
152
|
-
"path": ".agents/core/skills/state-management/SKILL.md"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"name": "subagent-orchestrator",
|
|
156
|
-
"description": "Subagent delegation and parallel coordination skill. Implements task decomposition,",
|
|
157
|
-
"path": ".agents/core/skills/subagent-orchestrator/SKILL.md"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"name": "system-design",
|
|
161
|
-
"description": "Scalable architecture skill based on the System Design Primer.",
|
|
162
|
-
"path": ".agents/core/skills/system-design/SKILL.md"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"name": "testing",
|
|
166
|
-
"description": "Vitest, React Testing Library, and Playwright testing standards. Enforces TDD/BDD, test pyramid, zero brittle mocks, and complete assertion coverage.",
|
|
167
|
-
"path": ".agents/core/skills/testing/SKILL.md"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"name": "typescript",
|
|
171
|
-
"description": "ContextOS skill for TypeScript",
|
|
172
|
-
"path": ".agents/core/skills/typescript/SKILL.md"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"name": "ui-design",
|
|
176
|
-
"description": "ContextOS skill for UI Design",
|
|
177
|
-
"path": ".agents/core/skills/ui-design/SKILL.md"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"name": "ui-ux-pro",
|
|
181
|
-
"description": "Professional UI/UX design skill. Enforces accessibility, semantic color palettes,",
|
|
182
|
-
"path": ".agents/core/skills/ui-ux-pro/SKILL.md"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"name": "ux-design",
|
|
186
|
-
"description": "ContextOS skill for UX Design",
|
|
187
|
-
"path": ".agents/core/skills/ux-design/SKILL.md"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"name": "vercel-optimize",
|
|
191
|
-
"description": "Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps. Collect Vercel metrics, usage, project config, and code scan results first; investigate only metric-backed candidates; produce ranked recommendations grounded in verified files and version-aware Vercel/framework docs. Trigger for Vercel bill reduction, slow or expensive routes, caching opportunities, Function Invocations, Build Minutes, Fast Data Transfer, Core Web Vitals, Bot Management, Fluid compute, or cost breakdown requests.",
|
|
192
|
-
"path": ".agents/core/skills/vercel-optimize/SKILL.md"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"name": "web-accessibility",
|
|
196
|
-
"description": "ContextOS skill for Web Accessibility (WCAG 2.1 AA/AAA), ARIA dialog patterns, keyboard focus traps, and Web Interface Guidelines.",
|
|
197
|
-
"path": ".agents/core/skills/web-accessibility/SKILL.md"
|
|
198
38
|
}
|
|
199
39
|
]
|
|
200
40
|
}
|
package/.agents/stats.js
CHANGED
|
@@ -65,24 +65,24 @@ function calculateContextStats(projectDir = process.cwd()) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
// Resolved context: dynamically resolved skills for this project's stack
|
|
68
|
-
let
|
|
68
|
+
let candidateResolvedSkills = ['engineering-workflow', 'ponytail-mindset'];
|
|
69
69
|
try {
|
|
70
70
|
const resolver = require('./resolver.js');
|
|
71
71
|
const resolved = resolver.resolveSkills({ prompt: 'Implement standard feature', projectDir });
|
|
72
|
-
if (resolved && Array.isArray(resolved.skills)) {
|
|
73
|
-
|
|
72
|
+
if (resolved && Array.isArray(resolved.skills) && resolved.skills.length > 0) {
|
|
73
|
+
candidateResolvedSkills = resolved.skills;
|
|
74
74
|
}
|
|
75
75
|
} catch (_) {
|
|
76
|
-
|
|
76
|
+
candidateResolvedSkills = ['engineering-workflow', 'ponytail-mindset'];
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
// Only consider skills physically present on disk
|
|
80
|
+
const typicalResolvedSkills = candidateResolvedSkills.filter(s => skillCharMap.has(s));
|
|
81
|
+
|
|
79
82
|
let resolvedChars = agentsMdChars;
|
|
80
|
-
let resolvedSkillCount =
|
|
83
|
+
let resolvedSkillCount = typicalResolvedSkills.length;
|
|
81
84
|
for (const s of typicalResolvedSkills) {
|
|
82
|
-
|
|
83
|
-
resolvedChars += skillCharMap.get(s);
|
|
84
|
-
resolvedSkillCount++;
|
|
85
|
-
}
|
|
85
|
+
resolvedChars += skillCharMap.get(s);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
const fullTokens = estimateTokens({ length: fullChars });
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,201 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or exemplary damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 ContextOS Contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# <img src="./Frame%202.png" height="40" align="absmiddle" /> contextos-agents
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/contextos-agents)
|
|
4
|
-
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
6
|
[](https://github.com/kok-o/contextos-agents/actions/workflows/validate-skills.yml)
|
|
7
7
|
|
|
8
|
-
**One source of
|
|
8
|
+
**One version-controlled source of engineering rules for supported coding agents.**
|
|
9
9
|
|
|
10
|
-
ContextOS is a deterministic context and policy compiler for AI coding agents. It transforms your team's version-controlled engineering rules into
|
|
10
|
+
ContextOS is a deterministic context and policy compiler for AI coding agents. It transforms your team's version-controlled engineering rules into focused, verifiable context for Gemini, Claude Code, Cursor, GitHub Copilot, Aider, and Zed—and detects configuration drift in CI.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -40,8 +40,8 @@ Most AI coding assistants suffer from two extremes: they either operate in a vac
|
|
|
40
40
|
|
|
41
41
|
### The Three Pillars
|
|
42
42
|
|
|
43
|
-
1. **Portable:** Define your engineering rules once. ContextOS exports
|
|
44
|
-
2. **
|
|
43
|
+
1. **Portable:** Define your engineering rules once. ContextOS exports configurations for supported agents (Gemini, Claude Code, Cursor, Copilot, Aider, and Zed).
|
|
44
|
+
2. **Focused:** The resolver selects rules and skills relevant to a task so agents receive less unrelated context.
|
|
45
45
|
3. **Verifiable:** Lockfiles, provenance, drift detection, and CI gates make generated agent configuration reproducible and auditable.
|
|
46
46
|
|
|
47
47
|
## How it works
|
|
@@ -121,25 +121,21 @@ jobs:
|
|
|
121
121
|
runs-on: ubuntu-latest
|
|
122
122
|
steps:
|
|
123
123
|
- uses: actions/checkout@v4
|
|
124
|
-
- uses: kok-o/contextos-agents/.github/actions/contextos-gate@
|
|
124
|
+
- uses: kok-o/contextos-agents/.github/actions/contextos-gate@v2.0.0
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
##
|
|
127
|
+
## Optional MCP integration (Beta)
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
The MCP server is a separate beta package. It is not part of the stable `contextos-agents` core.
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
> **Separation of Concerns:** The MCP Bridge and experimental runtime orchestration tools are distributed separately in the `@contextos/mcp` package (Beta). The `--with-mcp` flag in the Core CLI is deprecated.
|
|
131
|
+
Install it separately if you want to try the beta integration:
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
`ash
|
|
133
|
+
```bash
|
|
137
134
|
npm install --save-dev @contextos/mcp
|
|
138
135
|
npx contextos-mcp --dir .
|
|
139
|
-
|
|
136
|
+
```
|
|
140
137
|
|
|
141
|
-
The MCP
|
|
142
|
-
the explicit --enable-runtime flag and should only be used in trusted repositories.
|
|
138
|
+
The MCP server is read-only by default. Runtime execution remains experimental and is outside the stable core scope.
|
|
143
139
|
|
|
144
140
|
## Security — Third-Party Skills
|
|
145
141
|
|
|
@@ -154,4 +150,4 @@ We are open to pull requests! See [CONTRIBUTING.md](./CONTRIBUTING.md) for a ste
|
|
|
154
150
|
|
|
155
151
|
## License
|
|
156
152
|
|
|
157
|
-
Distributed under the
|
|
153
|
+
Distributed under the Apache License, Version 2.0. See [LICENSE](./LICENSE) and [NOTICE](./NOTICE) for details.
|
package/bin/commands/update.js
CHANGED
|
@@ -32,6 +32,7 @@ const {
|
|
|
32
32
|
} = require('../lib/safe-writer.js');
|
|
33
33
|
|
|
34
34
|
const pkg = require('../../package.json');
|
|
35
|
+
const profiles = require('../../.agents/profiles.js');
|
|
35
36
|
|
|
36
37
|
/**
|
|
37
38
|
* Collect all distributable files from the source .agents directory.
|
|
@@ -112,13 +113,9 @@ function planUpdate(projectDir, sourceAgentsDir, options = {}) {
|
|
|
112
113
|
// Determine active profile exclusions if available
|
|
113
114
|
let excludedSkills = [];
|
|
114
115
|
try {
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
const active = profilesModule.getActiveProfile(projectDir);
|
|
119
|
-
if (active && Array.isArray(active.exclude_skills)) {
|
|
120
|
-
excludedSkills = active.exclude_skills;
|
|
121
|
-
}
|
|
116
|
+
const active = profiles.getActiveProfile(projectDir);
|
|
117
|
+
if (active && Array.isArray(active.exclude_skills)) {
|
|
118
|
+
excludedSkills = active.exclude_skills;
|
|
122
119
|
}
|
|
123
120
|
} catch {}
|
|
124
121
|
|
|
@@ -299,7 +296,9 @@ function runUpdate(projectDir = process.cwd(), options = {}) {
|
|
|
299
296
|
|
|
300
297
|
// Re-compile if ctx.js exists and not skipped
|
|
301
298
|
if (!options.skipCompile) {
|
|
302
|
-
|
|
299
|
+
// Run the compiler shipped with this package. The project's .agents/ctx.js
|
|
300
|
+
// is user-controlled and must never be executed implicitly during update.
|
|
301
|
+
const ctxPath = path.join(sourceAgentsDir, 'ctx.js');
|
|
303
302
|
if (fs.existsSync(ctxPath)) {
|
|
304
303
|
try {
|
|
305
304
|
const { execFileSync } = require('child_process');
|