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.
Files changed (128) hide show
  1. package/.agents/adapters/cursor/export.js +3 -27
  2. package/.agents/adapters/gemini/export.js +5 -7
  3. package/.agents/adapters/shared.js +14 -1
  4. package/.agents/adapters/zed/export.js +4 -16
  5. package/.agents/compiled/registry.v2.json +33 -33
  6. package/.agents/compiled/registry.v2.sha256 +1 -1
  7. package/.agents/compiler/manifest-compiler.js +8 -5
  8. package/.agents/core/skills/context-manager/EXAMPLES.md +5 -17
  9. package/.agents/core/skills/context-manager/SKILL.md +10 -100
  10. package/.agents/core/skills/context-manager/TROUBLESHOOTING.md +6 -6
  11. package/.agents/core/skills/context-manager/VALIDATION.json +115 -4
  12. package/.agents/core/skills/context-manager/references/context-rules.md +3 -57
  13. package/.agents/core/skills/context-manager/skill.yaml +1 -3
  14. package/.agents/core/skills/context-os/EXAMPLES.md +25 -15
  15. package/.agents/core/skills/context-os/SKILL.md +12 -135
  16. package/.agents/core/skills/context-os/TROUBLESHOOTING.md +11 -6
  17. package/.agents/core/skills/context-os/VALIDATION.json +115 -4
  18. package/.agents/core/skills/context-os/packs.yaml +10 -59
  19. package/.agents/core/skills/context-os/references/context-rules.md +27 -59
  20. package/.agents/core/skills/context-os/references/pipeline.md +14 -119
  21. package/.agents/core/skills/context-os/references/project-graph.md +11 -100
  22. package/.agents/core/skills/context-os/rules.yaml +8 -135
  23. package/.agents/core/skills/engineering-workflow/EXAMPLES.md +15 -50
  24. package/.agents/core/skills/engineering-workflow/SKILL.md +10 -10
  25. package/.agents/core/skills/engineering-workflow/TROUBLESHOOTING.md +11 -19
  26. package/.agents/core/skills/engineering-workflow/VALIDATION.json +115 -4
  27. package/.agents/core/skills/engineering-workflow/references/workflow.md +55 -317
  28. package/.agents/core/skills/gemini-precision/EXAMPLES.md +33 -53
  29. package/.agents/core/skills/gemini-precision/SKILL.md +11 -147
  30. package/.agents/core/skills/gemini-precision/TROUBLESHOOTING.md +12 -25
  31. package/.agents/core/skills/gemini-precision/VALIDATION.json +115 -4
  32. package/.agents/core/skills/gemini-precision/skill.yaml +1 -1
  33. package/.agents/core/skills/gstack-roles/EXAMPLES.md +5 -21
  34. package/.agents/core/skills/gstack-roles/SKILL.md +10 -12
  35. package/.agents/core/skills/gstack-roles/TROUBLESHOOTING.md +6 -12
  36. package/.agents/core/skills/gstack-roles/VALIDATION.json +115 -4
  37. package/.agents/core/skills/gstack-roles/references/roles.md +3 -147
  38. package/.agents/core/skills/ponytail-mindset/EXAMPLES.md +12 -45
  39. package/.agents/core/skills/ponytail-mindset/SKILL.md +10 -13
  40. package/.agents/core/skills/ponytail-mindset/TROUBLESHOOTING.md +10 -19
  41. package/.agents/core/skills/ponytail-mindset/VALIDATION.json +115 -4
  42. package/.agents/core/skills/ponytail-mindset/references/minimalism.md +58 -174
  43. package/.agents/core/skills/security/EXAMPLES.md +19 -55
  44. package/.agents/core/skills/security/SKILL.md +61 -137
  45. package/.agents/core/skills/security/TROUBLESHOOTING.md +13 -19
  46. package/.agents/core/skills/security/VALIDATION.json +115 -4
  47. package/.agents/core/skills/security/skill.yaml +1 -1
  48. package/.agents/generated/claude/skills/context-manager/EXAMPLES.md +5 -17
  49. package/.agents/generated/claude/skills/context-manager/SKILL.md +9 -96
  50. package/.agents/generated/claude/skills/context-manager/TROUBLESHOOTING.md +6 -6
  51. package/.agents/generated/claude/skills/context-manager/VALIDATION.json +115 -4
  52. package/.agents/generated/claude/skills/context-manager/references/context-rules.md +3 -57
  53. package/.agents/generated/claude/skills/context-os/EXAMPLES.md +25 -15
  54. package/.agents/generated/claude/skills/context-os/SKILL.md +11 -133
  55. package/.agents/generated/claude/skills/context-os/TROUBLESHOOTING.md +11 -6
  56. package/.agents/generated/claude/skills/context-os/VALIDATION.json +115 -4
  57. package/.agents/generated/claude/skills/context-os/packs.yaml +10 -59
  58. package/.agents/generated/claude/skills/context-os/references/context-rules.md +27 -59
  59. package/.agents/generated/claude/skills/context-os/references/pipeline.md +14 -119
  60. package/.agents/generated/claude/skills/context-os/references/project-graph.md +11 -100
  61. package/.agents/generated/claude/skills/context-os/rules.yaml +8 -135
  62. package/.agents/generated/claude/skills/engineering-workflow/EXAMPLES.md +15 -50
  63. package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +9 -9
  64. package/.agents/generated/claude/skills/engineering-workflow/TROUBLESHOOTING.md +11 -19
  65. package/.agents/generated/claude/skills/engineering-workflow/VALIDATION.json +115 -4
  66. package/.agents/generated/claude/skills/engineering-workflow/references/workflow.md +55 -317
  67. package/.agents/generated/claude/skills/gemini-precision/EXAMPLES.md +33 -53
  68. package/.agents/generated/claude/skills/gemini-precision/SKILL.md +10 -143
  69. package/.agents/generated/claude/skills/gemini-precision/TROUBLESHOOTING.md +12 -25
  70. package/.agents/generated/claude/skills/gemini-precision/VALIDATION.json +115 -4
  71. package/.agents/generated/claude/skills/gstack-roles/EXAMPLES.md +5 -21
  72. package/.agents/generated/claude/skills/gstack-roles/SKILL.md +9 -11
  73. package/.agents/generated/claude/skills/gstack-roles/TROUBLESHOOTING.md +6 -12
  74. package/.agents/generated/claude/skills/gstack-roles/VALIDATION.json +115 -4
  75. package/.agents/generated/claude/skills/gstack-roles/references/roles.md +3 -147
  76. package/.agents/generated/claude/skills/ponytail-mindset/EXAMPLES.md +12 -45
  77. package/.agents/generated/claude/skills/ponytail-mindset/SKILL.md +9 -12
  78. package/.agents/generated/claude/skills/ponytail-mindset/TROUBLESHOOTING.md +10 -19
  79. package/.agents/generated/claude/skills/ponytail-mindset/VALIDATION.json +115 -4
  80. package/.agents/generated/claude/skills/ponytail-mindset/references/minimalism.md +58 -174
  81. package/.agents/generated/claude/skills/security/EXAMPLES.md +19 -55
  82. package/.agents/generated/claude/skills/security/SKILL.md +60 -134
  83. package/.agents/generated/claude/skills/security/TROUBLESHOOTING.md +13 -19
  84. package/.agents/generated/claude/skills/security/VALIDATION.json +115 -4
  85. package/.agents/generated/gemini/skills/context-manager/EXAMPLES.md +5 -17
  86. package/.agents/generated/gemini/skills/context-manager/SKILL.md +10 -99
  87. package/.agents/generated/gemini/skills/context-manager/TROUBLESHOOTING.md +6 -6
  88. package/.agents/generated/gemini/skills/context-manager/VALIDATION.json +115 -4
  89. package/.agents/generated/gemini/skills/context-manager/references/context-rules.md +3 -57
  90. package/.agents/generated/gemini/skills/context-os/EXAMPLES.md +25 -15
  91. package/.agents/generated/gemini/skills/context-os/SKILL.md +12 -135
  92. package/.agents/generated/gemini/skills/context-os/TROUBLESHOOTING.md +11 -6
  93. package/.agents/generated/gemini/skills/context-os/VALIDATION.json +115 -4
  94. package/.agents/generated/gemini/skills/context-os/packs.yaml +10 -59
  95. package/.agents/generated/gemini/skills/context-os/references/context-rules.md +27 -59
  96. package/.agents/generated/gemini/skills/context-os/references/pipeline.md +14 -119
  97. package/.agents/generated/gemini/skills/context-os/references/project-graph.md +11 -100
  98. package/.agents/generated/gemini/skills/context-os/rules.yaml +8 -135
  99. package/.agents/generated/gemini/skills/engineering-workflow/EXAMPLES.md +15 -50
  100. package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +10 -11
  101. package/.agents/generated/gemini/skills/engineering-workflow/TROUBLESHOOTING.md +11 -19
  102. package/.agents/generated/gemini/skills/engineering-workflow/VALIDATION.json +115 -4
  103. package/.agents/generated/gemini/skills/engineering-workflow/references/workflow.md +55 -317
  104. package/.agents/generated/gemini/skills/gemini-precision/EXAMPLES.md +33 -53
  105. package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +11 -145
  106. package/.agents/generated/gemini/skills/gemini-precision/TROUBLESHOOTING.md +12 -25
  107. package/.agents/generated/gemini/skills/gemini-precision/VALIDATION.json +115 -4
  108. package/.agents/generated/gemini/skills/gstack-roles/EXAMPLES.md +5 -21
  109. package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +10 -13
  110. package/.agents/generated/gemini/skills/gstack-roles/TROUBLESHOOTING.md +6 -12
  111. package/.agents/generated/gemini/skills/gstack-roles/VALIDATION.json +115 -4
  112. package/.agents/generated/gemini/skills/gstack-roles/references/roles.md +3 -147
  113. package/.agents/generated/gemini/skills/ponytail-mindset/EXAMPLES.md +12 -45
  114. package/.agents/generated/gemini/skills/ponytail-mindset/SKILL.md +10 -14
  115. package/.agents/generated/gemini/skills/ponytail-mindset/TROUBLESHOOTING.md +10 -19
  116. package/.agents/generated/gemini/skills/ponytail-mindset/VALIDATION.json +115 -4
  117. package/.agents/generated/gemini/skills/ponytail-mindset/references/minimalism.md +58 -174
  118. package/.agents/generated/gemini/skills/security/EXAMPLES.md +19 -55
  119. package/.agents/generated/gemini/skills/security/SKILL.md +61 -136
  120. package/.agents/generated/gemini/skills/security/TROUBLESHOOTING.md +13 -19
  121. package/.agents/generated/gemini/skills/security/VALIDATION.json +115 -4
  122. package/.agents/resolver/canonical-resolver.js +34 -21
  123. package/.agents/rules/rule-catalog.js +5 -5
  124. package/.agents/validate.js +9 -2
  125. package/.agents/validation-evidence.js +89 -0
  126. package/README.md +132 -207
  127. package/catalog/skills/typescript/SKILL.md +16 -2
  128. 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
- "rules_followed": {
6
- "type": "boolean"
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
- "required": [
10
- "rules_followed"
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
- # Context Loading Rules
1
+ # context-manager compatibility reference
2
2
 
3
- Guidelines and deterministic decision tables for selecting, prioritizing, and budgeting context during AI agent execution.
3
+ Canonical guidance: [context-os](../../context-os/SKILL.md).
4
4
 
5
- ## Task Type to Document Mapping
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,9 +1,7 @@
1
1
  schemaVersion: 2
2
2
  name: context-manager
3
3
  type: instruction-only
4
- description: >
5
- Smart context selection engine. Analyzes the current task, consults the
6
- Project Graph, and returns only the documents and skills needed to prevent token overflow.
4
+ description: "Compatibility alias for context-os context selection and budgeting."
7
5
  version: 1.0.0
8
6
  deprecated: true
9
7
  canonical: context-os
@@ -1,21 +1,31 @@
1
- # context-os Examples — Anti-patterns vs ContextOS Standard
1
+ # ContextOS command examples
2
2
 
3
- ## Example 1: Project Lifecycle Management
3
+ ## Source checkout
4
4
 
5
- ### Anti-pattern: Ad-hoc Unstructured Development
5
+ These commands run in the ContextOS source repository:
6
6
 
7
- ```text
8
- Coding -> Modifying DB -> Debugging -> Redesigning UI -> Changing Architecture
9
- All in one unstructured stream of consciousness.
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
- ### Best practice: ContextOS Standard (Phase-Gated Development)
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
- ```text
15
- Phase 1: DEFINE (PRD & Requirements)
16
- Phase 2: PLAN (Atomic Tasks & ADRs)
17
- Phase 3: BUILD (TDD & Minimalist Implementation)
18
- Phase 4: VERIFY (Automated Test Proof)
19
- Phase 5: REVIEW (Design QA & Code Review)
20
- Phase 6: SHIP (Production Release)
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,163 +1,40 @@
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
 
7
6
  # context-os
8
7
 
9
8
  ## Overview
10
9
 
11
- Deterministic context compiler and policy engine for AI coding agents. Governs repository policy configuration, skill dependency graphs, profile management, and multi-agent configuration export.
10
+ Guide configuration of the ContextOS compiler, resolver, profiles, and agent exports. Executable behavior lives in the CLI and modules; this Markdown entrypoint is guidance.
12
11
 
13
12
  ## When to Use
14
13
 
15
- Activate when managing project configuration, resolving skill dependencies, compiling rules for editors, or defining repository-level agent standards. (For task-specific file and context budgeting, use `context-manager`).
14
+ Skill selection, context budgets, manifests, project overrides, profiles, exports, and configuration drift.
16
15
 
17
16
  ## Rules & Patterns
18
17
 
19
- You are the **Context Compiler**. Your job is NOT to know everything. Your job is to **assemble the minimum context** needed for the current task.
18
+ 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.
20
19
 
21
- ## Pipeline
22
-
23
- When a user gives you a task, follow this pipeline:
24
-
25
- ### Stage 1: Intent Analysis
26
-
27
- Analyze the user's prompt and determine:
28
-
29
- ```yaml
30
- intent:
31
- project_type: [webapp, api, mobile, cli, library, saas, crm, ecommerce]
32
- industry: [healthcare, fintech, education, social, general]
33
- layers:
34
- frontend: true/false
35
- backend: true/false
36
- database: true/false
37
- auth: true/false
38
- ai: true/false
39
- payments: true/false
40
- realtime: true/false
41
- scope: [new_project, feature, bugfix, refactor, architecture]
42
- ```
43
-
44
- ### Stage 2: Dependency Resolution
45
-
46
- For each required layer, load the skill graph:
47
-
48
- 1. Read `skill.yaml` from each relevant skill directory
49
- 2. Resolve `requires` - load mandatory dependencies
50
- 3. Check `conflicts` - ensure no incompatible skills are loaded
51
- 4. Apply `optional` - suggest but don't force
52
- 5. Respect project profile (if set) - apply rules from `profiles/`
53
-
54
- **Dependency resolution example:**
55
-
56
- ```
57
- Need: nextjs
58
- → requires: react, typescript
59
- → react requires: typescript (already loaded)
60
- → optional: tailwind, prisma, next-auth
61
-
62
- Loaded: [nextjs, react, typescript]
63
- Suggested: [tailwind, prisma, next-auth]
64
- ```
65
-
66
- ### Stage 3: Context Compilation
67
-
68
- Assemble context from three levels:
69
-
70
- **Level 1 - Vision (always available):**
71
-
72
- - `docs/PRD.md` - what are we building
73
- - `docs/ROADMAP.md` - where are we going
74
- - `docs/PROJECT_GRAPH.md` - project structure
75
- - `docs/API.md` - API specification (optional, when backend API layer is present)
76
- - `docs/UI.md` - UI/UX specification (optional, when UI layer is present)
77
-
78
- **Level 2 - Architecture (load when needed):**
79
-
80
- - `docs/ARCHITECTURE.md` - system design and boundaries
81
- - `docs/decisions/` - architecture decision records (ADRs)
82
- - `docs/PRODUCT_BOUNDARIES.md` - maturity boundaries and non-promises
83
- - `references/context-rules.md` - dynamic context selection and compilation rules
84
-
85
- **Level 3 - Task-Specific Context (load per task):**
86
-
87
- - Relevant skill documents from `.agents/skills/`
88
- - Target code and test files within planned blast radius
89
-
90
- ### Stage 4: Focused Context Selection
91
-
92
- Before sending context to the AI coding assistant:
93
-
94
- 1. Select only skills relevant to the task domain and touched files
95
- 2. Prioritize: task goal > architectural constraints > project conventions
96
- 3. Include active Decision Records that affect the target component
97
- 4. Enforce quality guardrails and verification criteria
98
-
99
- ## Core CLI Commands
100
-
101
- | Command | Action |
102
- | --- | --- |
103
- | `contextos init` | Initialize `.agents/` folder and bootstrap profiles |
104
- | `contextos export <agent>` | Compile skills for target agent (`gemini`, `claude`, `cursor`, `copilot`, `aider`, `zed`, `all`) |
105
- | `contextos resolve "<task>"` | Dynamically resolve relevant skills, rules, and risk level for task |
106
- | `contextos validate` | Validate skill schemas, dependencies, and detect configuration drift |
107
- | `contextos doctor` | Pre-flight diagnostics for skills, profiles, and compiler synchronization |
108
- | `contextos watch` | Background file watcher for continuous auto-compilation |
109
-
110
- ## Project Initialization Flow
111
-
112
- When user says something like "Сделай CRM для стоматологии" or "Build a Trello clone":
113
-
114
- 1. **Analyze intent** (Stage 1)
115
- 2. **Ask clarifying questions:**
116
- - Users and roles?
117
- - Tech stack preference?
118
- - Mobile app needed?
119
- - AI features?
120
- - Authentication type?
121
- - Expected load?
122
- - MVP or Production?
123
- 3. **Select profile** (startup/enterprise/mvp/hackathon)
124
- 4. **Resolve skills** (Stage 2)
125
- 5. **Generate all documents** using `generators/` skill
126
- 6. **Create Project Graph** - the master map of modules -> features -> tasks -> files -> skills
127
- 7. **Output agent config** using `adapters/` skill
128
-
129
- ## Skill Discovery
130
-
131
- Skills are discovered by scanning `.agents/skills/*/skill.yaml`. Each `skill.yaml` defines:
132
-
133
- ```yaml
134
- id: react
135
- name: React
136
- category: frontend
137
- tags: [frontend, spa, jsx, components]
138
- requires: [typescript]
139
- optional: [tailwind, next-auth, react-query]
140
- conflicts: [vue, angular, svelte]
141
- weight: 8
142
- documents:
143
- - react.md
144
- ```
145
-
146
- The compiler builds a dependency graph from all discovered skills and resolves it for each task.
20
+ 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.
147
21
 
22
+ Read [references/context-rules.md](references/context-rules.md) for budgeting and [references/project-graph.md](references/project-graph.md) for graph limits.
148
23
 
149
24
  ## Code Examples
150
25
 
151
- See `EXAMPLES.md` for detailed code examples.
26
+ 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.
152
27
 
153
28
  ## Validation Checklist
154
29
 
155
- What to verify during the review phase before completing the task.
30
+ - [ ] The requested outcome and applicable failure cases are checked.
31
+ - [ ] Evidence names commands, results, scope, and limitations.
32
+ - [ ] Unrelated changes and existing authorization are preserved.
156
33
 
157
34
  ## Common Mistakes
158
35
 
159
- Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
36
+ 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.
160
37
 
161
38
  ## Integration Notes
162
39
 
163
- How this skill interacts with other skills.
40
+ 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
- # context-os Troubleshooting & Common Mistakes
1
+ # ContextOS troubleshooting
2
2
 
3
- ## 1. Stale Compiled Artifacts
4
-
5
- - **Symptom**: Editor rules don't reflect newly updated skills.
6
- - **Root Cause**: Modifying .agents/core/skills/ without recompiling exports.
7
- - **Fix**: Run node .agents/ctx.js export all whenever source skills are updated.
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
- "rules_followed": {
6
- "type": "boolean"
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
- "required": [
10
- "rules_followed"
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
- # Skill Packs — pre-configured skill bundles
2
- # Users select a pack instead of individual skills
3
-
4
- packs:
5
- fullstack-next:
6
- name: "Next.js Full-Stack"
7
- description: "Full-stack web app with Next.js, React, TypeScript, Tailwind, Prisma"
8
- skills: [nextjs, react, typescript, tailwind, prisma, testing, security]
9
- profile: startup
10
- generates: [PRD, ARCHITECTURE, DATABASE, API, UI, TASKS, PROJECT_GRAPH]
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]