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
|
@@ -1,12 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"x-contextos-evidence-contract": 1,
|
|
4
|
+
"title": "Scoped verification evidence",
|
|
5
|
+
"description": "Report shape and outcome consistency only; command execution and agent behavior require separate evidence.",
|
|
3
6
|
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"status",
|
|
10
|
+
"checks",
|
|
11
|
+
"limitations"
|
|
12
|
+
],
|
|
4
13
|
"properties": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
14
|
+
"status": {
|
|
15
|
+
"enum": [
|
|
16
|
+
"verified",
|
|
17
|
+
"partial",
|
|
18
|
+
"not_run"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"checks": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": [
|
|
27
|
+
"command",
|
|
28
|
+
"exitCode",
|
|
29
|
+
"scope"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"command": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
},
|
|
36
|
+
"exitCode": {
|
|
37
|
+
"type": [
|
|
38
|
+
"integer",
|
|
39
|
+
"null"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"scope": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"limitations": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"minLength": 1
|
|
54
|
+
}
|
|
7
55
|
}
|
|
8
56
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
57
|
+
"allOf": [
|
|
58
|
+
{
|
|
59
|
+
"if": {
|
|
60
|
+
"properties": {
|
|
61
|
+
"status": {
|
|
62
|
+
"const": "verified"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"then": {
|
|
67
|
+
"properties": {
|
|
68
|
+
"checks": {
|
|
69
|
+
"minItems": 1,
|
|
70
|
+
"items": {
|
|
71
|
+
"properties": {
|
|
72
|
+
"exitCode": {
|
|
73
|
+
"const": 0
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"if": {
|
|
83
|
+
"properties": {
|
|
84
|
+
"status": {
|
|
85
|
+
"enum": [
|
|
86
|
+
"partial",
|
|
87
|
+
"not_run"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"then": {
|
|
93
|
+
"properties": {
|
|
94
|
+
"limitations": {
|
|
95
|
+
"minItems": 1
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"if": {
|
|
102
|
+
"properties": {
|
|
103
|
+
"status": {
|
|
104
|
+
"const": "not_run"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"then": {
|
|
109
|
+
"properties": {
|
|
110
|
+
"checks": {
|
|
111
|
+
"items": {
|
|
112
|
+
"properties": {
|
|
113
|
+
"exitCode": {
|
|
114
|
+
"type": "null"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
11
122
|
]
|
|
12
123
|
}
|
|
@@ -1,59 +1,5 @@
|
|
|
1
|
-
#
|
|
1
|
+
# context-manager compatibility reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Canonical guidance: [context-os](../../context-os/SKILL.md).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
| Task Type | Level 1 (Always) | Level 2 (If exists) | Level 3 (Per task) |
|
|
8
|
-
| --- | --- | --- | --- |
|
|
9
|
-
| **New project** | PRD, ROADMAP | ARCHITECTURE, DATABASE, API | UI, TASKS, all relevant skills |
|
|
10
|
-
| **New feature** | PRD | ARCHITECTURE, API | PROJECT_GRAPH, relevant skills |
|
|
11
|
-
| **Frontend** | — | ARCHITECTURE, API | UI, frontend skills |
|
|
12
|
-
| **Backend** | — | ARCHITECTURE, DATABASE, API | backend skills |
|
|
13
|
-
| **Database** | — | ARCHITECTURE, DATABASE | — |
|
|
14
|
-
| **Bugfix** | — | — | PROJECT_GRAPH (affected module only) |
|
|
15
|
-
| **Refactor** | — | ARCHITECTURE | PROJECT_GRAPH, affected skills |
|
|
16
|
-
| **Review** | PRD | ARCHITECTURE | TASKS, all loaded skills |
|
|
17
|
-
| **Deploy** | — | ARCHITECTURE | DEPLOYMENT, infrastructure skills |
|
|
18
|
-
|
|
19
|
-
## Skill Category to Document Mapping
|
|
20
|
-
|
|
21
|
-
| Skill Category | Required Documents | Optional Documents |
|
|
22
|
-
| --- | --- | --- |
|
|
23
|
-
| `frontend` | UI.md, API.md | ARCHITECTURE.md |
|
|
24
|
-
| `backend` | API.md, DATABASE.md | ARCHITECTURE.md |
|
|
25
|
-
| `design` | UI.md | PRD.md |
|
|
26
|
-
| `architecture` | ARCHITECTURE.md, DATABASE.md | PRD.md, API.md |
|
|
27
|
-
| `infrastructure` | ARCHITECTURE.md | — |
|
|
28
|
-
| `security` | ARCHITECTURE.md, API.md | DATABASE.md |
|
|
29
|
-
| `testing` | API.md | ARCHITECTURE.md |
|
|
30
|
-
|
|
31
|
-
## Context Budgeting
|
|
32
|
-
|
|
33
|
-
To prevent context window saturation and retain maximum LLM reasoning capacity, adhere strictly to the following 4-tier token budget:
|
|
34
|
-
|
|
35
|
-
| Priority Level | Max Tokens | Contents |
|
|
36
|
-
| --- | --- | --- |
|
|
37
|
-
| 1 (Critical) | 2,000 | Current task description, active brief, and primary skill rules |
|
|
38
|
-
| 2 (Important) | 3,000 | System architecture and API contracts for affected modules |
|
|
39
|
-
| 3 (Context) | 2,000 | Architectural Decision Records (ADRs) and relevant graph nodes |
|
|
40
|
-
| 4 (Background) | 1,000 | PRD summary and global project conventions |
|
|
41
|
-
|
|
42
|
-
**Total target context budget: ~8,000 tokens per subtask.**
|
|
43
|
-
|
|
44
|
-
### Degradation Strategy When Over Budget
|
|
45
|
-
|
|
46
|
-
If accumulated context exceeds the 8,000 token limit:
|
|
47
|
-
|
|
48
|
-
1. **Trim Level 1 documents** to high-level executive summaries.
|
|
49
|
-
2. **Slice Level 2 documents** to extract only sections matching touched module signatures.
|
|
50
|
-
3. **Preserve Level 3 skills** at full fidelity, as they contain non-negotiable operational instructions and validation guardrails.
|
|
51
|
-
|
|
52
|
-
## Module-Based Filtering via Dependency Graph
|
|
53
|
-
|
|
54
|
-
When `PROJECT_GRAPH.md` or `.graphify/graph.json` is present, traverse dependency edges to filter candidate documents:
|
|
55
|
-
|
|
56
|
-
1. Identify the primary module for the task from the symbol/path mapping.
|
|
57
|
-
2. Resolve immediate inbound and outbound dependencies (`dependencies` and `dependents`).
|
|
58
|
-
3. Include documents solely for the identified module and its immediate dependencies.
|
|
59
|
-
4. Exclude orthogonal domain documents (for example, omit database schemas during purely presentation-layer CSS/layout tasks).
|
|
5
|
+
Use the canonical resolver budget contract and workspace evidence boundaries. Load only relevant documents and source, including callers/tests when necessary. Read lockfiles or generated outputs when dependency, installation, provenance, or build investigations require them. Do not create a separate cache or promise a fixed token saving.
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ContextOS command examples
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Source checkout
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
These commands run in the ContextOS source repository:
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```powershell
|
|
8
|
+
node .agents/ctx.js resolve "Fix IDOR in document deletion" --files src/auth.ts --json
|
|
9
|
+
node .agents/ctx.js compile --check
|
|
10
|
+
node .agents/ctx.js validate
|
|
11
|
+
node .agents/ctx.js export all --check --json
|
|
10
12
|
```
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
After authorized edits to canonical sources, compile then export before checking
|
|
15
|
+
sync. export --check is read-only; export without --check writes managed outputs.
|
|
16
|
+
The resolver returns skills and package evidence, not an automatic code-file
|
|
17
|
+
context package.
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
## Consumer project
|
|
20
|
+
|
|
21
|
+
Use the installed local ContextOS executable, for example through npx when the
|
|
22
|
+
package is already installed. Do not assume a consumer has this repository's bin
|
|
23
|
+
or scripts directories. Inspect its installation and project-specific checks.
|
|
24
|
+
Create overrides through skill override, inspect skill diff, then compile/export.
|
|
25
|
+
Preserve unmanaged user files and existing overrides.
|
|
26
|
+
|
|
27
|
+
## Evidence interpretation
|
|
28
|
+
|
|
29
|
+
A validator pass means source/configuration checks passed. A scanner pass means
|
|
30
|
+
its specified staged checks passed. Neither result proves a live client loaded
|
|
31
|
+
instructions or a model followed them.
|
|
@@ -1,162 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-os
|
|
3
|
-
description:
|
|
4
|
-
Deterministic context compiler and policy engine for AI coding agents.
|
|
3
|
+
description: "Deterministic context compiler and policy engine for AI coding agents."
|
|
5
4
|
---
|
|
6
5
|
# context-os
|
|
7
6
|
|
|
8
7
|
## Overview
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Guide configuration of the ContextOS compiler, resolver, profiles, and agent exports. Executable behavior lives in the CLI and modules; this Markdown entrypoint is guidance.
|
|
11
10
|
|
|
12
11
|
## When to Use
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
Skill selection, context budgets, manifests, project overrides, profiles, exports, and configuration drift.
|
|
15
14
|
|
|
16
15
|
## Rules & Patterns
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
Inspect the active project and installed skills. Canonical sources live in .agents/core/skills; project overrides in .agents/project/skills; plugins provide additional sources. Native .agents/skills contains generated projections. Entrypoint precedence is skill.v2.yaml, skill.yaml, then manifestless SKILL.md. Respect the declared entrypoint and resolve contained resource paths relative to its skill directory.
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
When a user gives you a task, follow this pipeline:
|
|
23
|
-
|
|
24
|
-
### Stage 1: Intent Analysis
|
|
25
|
-
|
|
26
|
-
Analyze the user's prompt and determine:
|
|
27
|
-
|
|
28
|
-
```yaml
|
|
29
|
-
intent:
|
|
30
|
-
project_type: [webapp, api, mobile, cli, library, saas, crm, ecommerce]
|
|
31
|
-
industry: [healthcare, fintech, education, social, general]
|
|
32
|
-
layers:
|
|
33
|
-
frontend: true/false
|
|
34
|
-
backend: true/false
|
|
35
|
-
database: true/false
|
|
36
|
-
auth: true/false
|
|
37
|
-
ai: true/false
|
|
38
|
-
payments: true/false
|
|
39
|
-
realtime: true/false
|
|
40
|
-
scope: [new_project, feature, bugfix, refactor, architecture]
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Stage 2: Dependency Resolution
|
|
44
|
-
|
|
45
|
-
For each required layer, load the skill graph:
|
|
46
|
-
|
|
47
|
-
1. Read `skill.yaml` from each relevant skill directory
|
|
48
|
-
2. Resolve `requires` - load mandatory dependencies
|
|
49
|
-
3. Check `conflicts` - ensure no incompatible skills are loaded
|
|
50
|
-
4. Apply `optional` - suggest but don't force
|
|
51
|
-
5. Respect project profile (if set) - apply rules from `profiles/`
|
|
52
|
-
|
|
53
|
-
**Dependency resolution example:**
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
Need: nextjs
|
|
57
|
-
→ requires: react, typescript
|
|
58
|
-
→ react requires: typescript (already loaded)
|
|
59
|
-
→ optional: tailwind, prisma, next-auth
|
|
60
|
-
|
|
61
|
-
Loaded: [nextjs, react, typescript]
|
|
62
|
-
Suggested: [tailwind, prisma, next-auth]
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Stage 3: Context Compilation
|
|
66
|
-
|
|
67
|
-
Assemble context from three levels:
|
|
68
|
-
|
|
69
|
-
**Level 1 - Vision (always available):**
|
|
70
|
-
|
|
71
|
-
- `docs/PRD.md` - what are we building
|
|
72
|
-
- `docs/ROADMAP.md` - where are we going
|
|
73
|
-
- `docs/PROJECT_GRAPH.md` - project structure
|
|
74
|
-
- `docs/API.md` - API specification (optional, when backend API layer is present)
|
|
75
|
-
- `docs/UI.md` - UI/UX specification (optional, when UI layer is present)
|
|
76
|
-
|
|
77
|
-
**Level 2 - Architecture (load when needed):**
|
|
78
|
-
|
|
79
|
-
- `docs/ARCHITECTURE.md` - system design and boundaries
|
|
80
|
-
- `docs/decisions/` - architecture decision records (ADRs)
|
|
81
|
-
- `docs/PRODUCT_BOUNDARIES.md` - maturity boundaries and non-promises
|
|
82
|
-
- `references/context-rules.md` - dynamic context selection and compilation rules
|
|
83
|
-
|
|
84
|
-
**Level 3 - Task-Specific Context (load per task):**
|
|
85
|
-
|
|
86
|
-
- Relevant skill documents from `.agents/skills/`
|
|
87
|
-
- Target code and test files within planned blast radius
|
|
88
|
-
|
|
89
|
-
### Stage 4: Focused Context Selection
|
|
90
|
-
|
|
91
|
-
Before sending context to the AI coding assistant:
|
|
92
|
-
|
|
93
|
-
1. Select only skills relevant to the task domain and touched files
|
|
94
|
-
2. Prioritize: task goal > architectural constraints > project conventions
|
|
95
|
-
3. Include active Decision Records that affect the target component
|
|
96
|
-
4. Enforce quality guardrails and verification criteria
|
|
97
|
-
|
|
98
|
-
## Core CLI Commands
|
|
99
|
-
|
|
100
|
-
| Command | Action |
|
|
101
|
-
| --- | --- |
|
|
102
|
-
| `contextos init` | Initialize `.agents/` folder and bootstrap profiles |
|
|
103
|
-
| `contextos export <agent>` | Compile skills for target agent (`gemini`, `claude`, `cursor`, `copilot`, `aider`, `zed`, `all`) |
|
|
104
|
-
| `contextos resolve "<task>"` | Dynamically resolve relevant skills, rules, and risk level for task |
|
|
105
|
-
| `contextos validate` | Validate skill schemas, dependencies, and detect configuration drift |
|
|
106
|
-
| `contextos doctor` | Pre-flight diagnostics for skills, profiles, and compiler synchronization |
|
|
107
|
-
| `contextos watch` | Background file watcher for continuous auto-compilation |
|
|
108
|
-
|
|
109
|
-
## Project Initialization Flow
|
|
110
|
-
|
|
111
|
-
When user says something like "Сделай CRM для стоматологии" or "Build a Trello clone":
|
|
112
|
-
|
|
113
|
-
1. **Analyze intent** (Stage 1)
|
|
114
|
-
2. **Ask clarifying questions:**
|
|
115
|
-
- Users and roles?
|
|
116
|
-
- Tech stack preference?
|
|
117
|
-
- Mobile app needed?
|
|
118
|
-
- AI features?
|
|
119
|
-
- Authentication type?
|
|
120
|
-
- Expected load?
|
|
121
|
-
- MVP or Production?
|
|
122
|
-
3. **Select profile** (startup/enterprise/mvp/hackathon)
|
|
123
|
-
4. **Resolve skills** (Stage 2)
|
|
124
|
-
5. **Generate all documents** using `generators/` skill
|
|
125
|
-
6. **Create Project Graph** - the master map of modules -> features -> tasks -> files -> skills
|
|
126
|
-
7. **Output agent config** using `adapters/` skill
|
|
127
|
-
|
|
128
|
-
## Skill Discovery
|
|
129
|
-
|
|
130
|
-
Skills are discovered by scanning `.agents/skills/*/skill.yaml`. Each `skill.yaml` defines:
|
|
131
|
-
|
|
132
|
-
```yaml
|
|
133
|
-
id: react
|
|
134
|
-
name: React
|
|
135
|
-
category: frontend
|
|
136
|
-
tags: [frontend, spa, jsx, components]
|
|
137
|
-
requires: [typescript]
|
|
138
|
-
optional: [tailwind, next-auth, react-query]
|
|
139
|
-
conflicts: [vue, angular, svelte]
|
|
140
|
-
weight: 8
|
|
141
|
-
documents:
|
|
142
|
-
- react.md
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
The compiler builds a dependency graph from all discovered skills and resolves it for each task.
|
|
19
|
+
Use the resolver with the task and affected files; inspect reasons, risk, warnings, missing skills, and soft-budget overflow. Load references only when needed. Existing authorization and proportional engineering-workflow apply.
|
|
146
20
|
|
|
21
|
+
Read [references/context-rules.md](references/context-rules.md) for budgeting and [references/project-graph.md](references/project-graph.md) for graph limits.
|
|
147
22
|
|
|
148
23
|
## Code Examples
|
|
149
24
|
|
|
150
|
-
See
|
|
25
|
+
In this source checkout: node .agents/ctx.js resolve "Fix IDOR" --files src/auth.ts --json. See EXAMPLES.md for source and consumer command boundaries.
|
|
151
26
|
|
|
152
27
|
## Validation Checklist
|
|
153
28
|
|
|
154
|
-
|
|
29
|
+
- [ ] The requested outcome and applicable failure cases are checked.
|
|
30
|
+
- [ ] Evidence names commands, results, scope, and limitations.
|
|
31
|
+
- [ ] Unrelated changes and existing authorization are preserved.
|
|
155
32
|
|
|
156
33
|
## Common Mistakes
|
|
157
34
|
|
|
158
|
-
|
|
35
|
+
Editing generated projections; assuming catalog skills are installed; treating an estimated budget as total prompt size; expecting AST or document selection from the package graph; claiming schema validation proves agent behavior.
|
|
159
36
|
|
|
160
37
|
## Integration Notes
|
|
161
38
|
|
|
162
|
-
|
|
39
|
+
context-manager is a deprecated compatibility alias. engineering-workflow owns the lifecycle; security owns protected boundaries. packs.yaml and rules.yaml are reference data, not executable policy.
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ContextOS troubleshooting
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
-
|
|
3
|
+
- Stale projection: inspect edits in core/project sources, compile, export, and
|
|
4
|
+
verify export --check. Do not hand-edit generated artifacts.
|
|
5
|
+
- Missing skill: inspect installed manifests and resolver warnings; install only
|
|
6
|
+
the required catalog skill through supported tooling.
|
|
7
|
+
- Budget overflow: preserve mandatory safety guidance and reduce irrelevant
|
|
8
|
+
context; the budget is soft and entrypoint-only.
|
|
9
|
+
- Wrong risk or selection: supply relevant paths, inspect the actual operation,
|
|
10
|
+
and report a reproducible routing case. A resolver label is not an authority.
|
|
11
|
+
- Missing graph command: use resolve --json for workspace package evidence;
|
|
12
|
+
inspect source callers separately for symbol-level impact.
|
|
@@ -1,12 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"x-contextos-evidence-contract": 1,
|
|
4
|
+
"title": "Scoped verification evidence",
|
|
5
|
+
"description": "Report shape and outcome consistency only; command execution and agent behavior require separate evidence.",
|
|
3
6
|
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"status",
|
|
10
|
+
"checks",
|
|
11
|
+
"limitations"
|
|
12
|
+
],
|
|
4
13
|
"properties": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
14
|
+
"status": {
|
|
15
|
+
"enum": [
|
|
16
|
+
"verified",
|
|
17
|
+
"partial",
|
|
18
|
+
"not_run"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"checks": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": [
|
|
27
|
+
"command",
|
|
28
|
+
"exitCode",
|
|
29
|
+
"scope"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"command": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1
|
|
35
|
+
},
|
|
36
|
+
"exitCode": {
|
|
37
|
+
"type": [
|
|
38
|
+
"integer",
|
|
39
|
+
"null"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"scope": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"limitations": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"minLength": 1
|
|
54
|
+
}
|
|
7
55
|
}
|
|
8
56
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
57
|
+
"allOf": [
|
|
58
|
+
{
|
|
59
|
+
"if": {
|
|
60
|
+
"properties": {
|
|
61
|
+
"status": {
|
|
62
|
+
"const": "verified"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"then": {
|
|
67
|
+
"properties": {
|
|
68
|
+
"checks": {
|
|
69
|
+
"minItems": 1,
|
|
70
|
+
"items": {
|
|
71
|
+
"properties": {
|
|
72
|
+
"exitCode": {
|
|
73
|
+
"const": 0
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"if": {
|
|
83
|
+
"properties": {
|
|
84
|
+
"status": {
|
|
85
|
+
"enum": [
|
|
86
|
+
"partial",
|
|
87
|
+
"not_run"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"then": {
|
|
93
|
+
"properties": {
|
|
94
|
+
"limitations": {
|
|
95
|
+
"minItems": 1
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"if": {
|
|
102
|
+
"properties": {
|
|
103
|
+
"status": {
|
|
104
|
+
"const": "not_run"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"then": {
|
|
109
|
+
"properties": {
|
|
110
|
+
"checks": {
|
|
111
|
+
"items": {
|
|
112
|
+
"properties": {
|
|
113
|
+
"exitCode": {
|
|
114
|
+
"type": "null"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
11
122
|
]
|
|
12
123
|
}
|
|
@@ -1,59 +1,10 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fastapi-backend:
|
|
13
|
-
name: "FastAPI Backend"
|
|
14
|
-
description: "Python backend with FastAPI, PostgreSQL, Docker"
|
|
15
|
-
skills: [fastapi, python, pydantic, postgres, docker, testing, security, rest]
|
|
16
|
-
profile: startup
|
|
17
|
-
generates: [PRD, ARCHITECTURE, DATABASE, API, TASKS, PROJECT_GRAPH]
|
|
18
|
-
|
|
19
|
-
react-spa:
|
|
20
|
-
name: "React SPA"
|
|
21
|
-
description: "Single Page Application with React, TypeScript, Tailwind"
|
|
22
|
-
skills: [react, typescript, tailwind, performance, web-accessibility, testing]
|
|
23
|
-
profile: startup
|
|
24
|
-
generates: [PRD, ARCHITECTURE, API, UI, TASKS, PROJECT_GRAPH]
|
|
25
|
-
|
|
26
|
-
nestjs-enterprise:
|
|
27
|
-
name: "NestJS Enterprise"
|
|
28
|
-
description: "Enterprise-grade Node.js backend with NestJS, DDD, full testing"
|
|
29
|
-
skills: [nestjs, typescript, node, postgres, ddd, security, testing, cicd, docker]
|
|
30
|
-
profile: enterprise
|
|
31
|
-
generates: [PRD, ARCHITECTURE, DATABASE, API, TASKS, ROADMAP, PROJECT_GRAPH]
|
|
32
|
-
|
|
33
|
-
design-system:
|
|
34
|
-
name: "Design System"
|
|
35
|
-
description: "UI/UX design system with accessibility and performance"
|
|
36
|
-
skills: [ui-design, ux-design, web-accessibility, performance]
|
|
37
|
-
profile: startup
|
|
38
|
-
generates: [PRD, UI, TASKS]
|
|
39
|
-
|
|
40
|
-
mobile-react-native:
|
|
41
|
-
name: "React Native Mobile"
|
|
42
|
-
description: "Cross-platform mobile app with React Native"
|
|
43
|
-
skills: [react, typescript, react-native, performance, web-accessibility]
|
|
44
|
-
profile: startup
|
|
45
|
-
generates: [PRD, ARCHITECTURE, API, UI, TASKS, PROJECT_GRAPH]
|
|
46
|
-
|
|
47
|
-
hackathon-fast:
|
|
48
|
-
name: "Hackathon Quick Start"
|
|
49
|
-
description: "Fastest possible setup — SQLite, minimal architecture"
|
|
50
|
-
skills: [react, typescript, node, sqlite]
|
|
51
|
-
profile: hackathon
|
|
52
|
-
generates: [TASKS, PROJECT_GRAPH]
|
|
53
|
-
|
|
54
|
-
ai-saas:
|
|
55
|
-
name: "AI SaaS Platform"
|
|
56
|
-
description: "SaaS with AI features, auth, payments, analytics"
|
|
57
|
-
skills: [nextjs, react, typescript, tailwind, prisma, security, stripe, openai]
|
|
58
|
-
profile: startup
|
|
59
|
-
generates: [PRD, ARCHITECTURE, DATABASE, API, UI, ROADMAP, TASKS, PROJECT_GRAPH]
|
|
1
|
+
# Reference-only illustration. This file does not install skills or generate docs.
|
|
2
|
+
status: reference-only
|
|
3
|
+
purpose: Illustrate task-focused grouping; inspect available catalog skills first.
|
|
4
|
+
examples:
|
|
5
|
+
protected-api:
|
|
6
|
+
primary: [engineering-workflow, security]
|
|
7
|
+
compiler-maintenance:
|
|
8
|
+
primary: [engineering-workflow, context-os]
|
|
9
|
+
substantive-build:
|
|
10
|
+
primary: [engineering-workflow, ponytail-mindset]
|