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,68 +1,36 @@
1
- # Context Loading Rules
1
+ # Context selection and budgeting
2
2
 
3
- ## Task Type → Document Mapping
3
+ ## Inspect actual evidence
4
4
 
5
- | Task Type | Level 1 (Always) | Level 2 (If exists) | Level 3 (Per task) |
6
- | --- | --- | --- | --- |
7
- | **New project** | PRD, ROADMAP | ARCHITECTURE, DATABASE, API | UI, TASKS, all relevant skills |
8
- | **New feature** | PRD | ARCHITECTURE, API | PROJECT_GRAPH, relevant skills |
9
- | **Frontend** | — | ARCHITECTURE, API | UI, frontend skills |
10
- | **Backend** | — | ARCHITECTURE, DATABASE, API | backend skills |
11
- | **Database** | — | ARCHITECTURE, DATABASE | — |
12
- | **Bugfix** | — | — | PROJECT_GRAPH (affected module only) |
13
- | **Refactor** | — | ARCHITECTURE | PROJECT_GRAPH, affected skills |
14
- | **Review** | PRD | ARCHITECTURE | TASKS, all loaded skills |
15
- | **Deploy** | — | ARCHITECTURE | DEPLOYMENT, infrastructure skills |
5
+ Supply a concrete task and affected paths to resolve. Inspect selected skills,
6
+ reasons, risk, excluded candidates, and warnings. Select source files, callers,
7
+ tests, relevant contracts, and active decisions manually as the task requires.
8
+ Do not require a PRD, API document, database document, or module graph to exist.
9
+ An absent schema change does not make database semantics irrelevant.
16
10
 
17
- ## Skill Category → Document Mapping
11
+ ## Budget contract
18
12
 
19
- | Skill Category | Required Documents | Optional Documents |
20
- | --- | --- | --- |
21
- | `frontend` | UI.md, API.md | ARCHITECTURE.md |
22
- | `backend` | API.md, DATABASE.md | ARCHITECTURE.md |
23
- | `design` | UI.md | PRD.md |
24
- | `architecture` | ARCHITECTURE.md, DATABASE.md | PRD.md, API.md |
25
- | `infrastructure` | ARCHITECTURE.md | — |
26
- | `security` | ARCHITECTURE.md, API.md | DATABASE.md |
27
- | `testing` | API.md | ARCHITECTURE.md |
13
+ The resolver estimates skill entrypoint length divided by 3.8, rounded up. It
14
+ uses the requested positive --budget value or its current risk-tier default.
15
+ References, tool output, system instructions, documents, and chat history are
16
+ outside that estimate. Required safety guidance can exceed a soft budget and
17
+ must produce an explicit overflow warning. No fixed 8000-token total or measured
18
+ model token saving is promised.
28
19
 
29
- ## Context Budget
20
+ Trim irrelevant documents and select relevant sections first. Preserve user
21
+ constraints and safety guidance. Inspect code dependencies and callers rather
22
+ than limiting all investigations to exactly one import hop.
30
23
 
31
- To prevent context window overflow, apply these limits:
24
+ ## Aliases and unavailable skills
32
25
 
33
- | Priority | Max tokens | Content |
34
- | --- | --- | --- |
35
- | 1 (Critical) | 2000 | Current task description + relevant skill instructions |
36
- | 2 (Important) | 3000 | Architecture + API contracts for affected modules |
37
- | 3 (Context) | 2000 | Decision records + project graph (affected branch) |
38
- | 4 (Background) | 1000 | PRD summary + coding rules |
26
+ context-manager resolves to context-os; gstack-roles resolves to
27
+ engineering-workflow. The resolver avoids duplicate bodies and reports alias
28
+ warnings. Installation and export still retain compatibility identifiers.
29
+ Catalog skills are installed on demand; inspect unavailable-skill warnings.
39
30
 
40
- **Total budget: ~8000 tokens of context per task.**
31
+ ## Verification boundaries
41
32
 
42
- If context exceeds budget:
43
-
44
- 1. Trim Level 1 docs to summaries only
45
- 2. Load only affected sections of Level 2 docs
46
- 3. Keep Level 3 (skills) at full detail — they contain the actual instructions
47
-
48
- ## Module-Based Filtering
49
-
50
- When the Project Graph is available, use it to filter context:
51
-
52
- ```
53
- Task: "Fix appointment reminder bug"
54
- ↓
55
- Project Graph lookup: "reminder" → module: appointments
56
- ↓
57
- Appointments depends_on: [patients, auth]
58
- ↓
59
- Load only:
60
- - appointments module docs
61
- - auth module docs (dependency)
62
- - API.md (appointments section only)
63
- ↓
64
- Skip:
65
- - patients module docs (not a dependency for this task)
66
- - DATABASE.md (no schema change expected)
67
- - UI.md (backend task)
68
- ```
33
+ compile validates manifests and builds the registry. validate checks source
34
+ structure and sync. export --check inspects generated drift. Example tests run
35
+ specific scenarios. None of these by itself proves live client instruction
36
+ loading or improved model decisions.
@@ -1,119 +1,14 @@
1
- # Development Pipeline
2
-
3
- ## The ContextOS Lifecycle
4
-
5
- ```
6
- ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
7
- │ DEFINE │ ──▶ │ PLAN │ ──▶ │ BUILD │ ──▶ │ VERIFY │ ──▶ │ REVIEW │ ──▶ │ SHIP │
8
- │ │ │ │ │ │ │ │ │ │ │ │
9
- │ What to │ │ How to │ │ Write │ │ Test & │ │ Quality │ │ Deploy & │
10
- │ build │ │ build it │ │ code │ │ validate │ │ gates │ │ document │
11
- └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
12
- │ │ │ │ │ │
13
- PRD.md ARCHITECTURE.md source code tests code review DECISION.md
14
- UI.md DATABASE.md components coverage self-review changelog
15
- ROADMAP.md API.md API routes edge cases security scan deploy
16
- PROJECT_GRAPH TASKS.md migrations performance a11y audit release notes
17
- ```
18
-
19
- ## Stage Details
20
-
21
- ### 1. DEFINE — "What are we building?"
22
-
23
- **Input:** User idea or feature request
24
- **Output:** PRD.md, UI.md, ROADMAP.md, PROJECT_GRAPH.md
25
-
26
- Process:
27
-
28
- 1. Intent Analysis — parse the user's request
29
- 2. Clarifying questions — fill gaps
30
- 3. Generate PRD with clear requirements
31
- 4. Generate UI spec if frontend is involved
32
- 5. Create initial Project Graph
33
-
34
- **Context loaded:** None (this is the starting point)
35
-
36
- ### 2. PLAN — "How will we build it?"
37
-
38
- **Input:** PRD.md
39
- **Output:** ARCHITECTURE.md, DATABASE.md, API.md, TASKS.md
40
-
41
- Process:
42
-
43
- 1. Choose architecture based on profile + requirements
44
- 2. Design database schema
45
- 3. Define API contracts
46
- 4. Break work into atomic tasks
47
- 5. Update Project Graph with modules and features
48
-
49
- **Context loaded:** PRD.md, profiles/
50
-
51
- ### 3. BUILD — "Write the code"
52
-
53
- **Input:** TASKS.md + relevant architecture docs
54
- **Output:** Source code, migrations, configurations
55
-
56
- Process:
57
-
58
- 1. Pick next task from TASKS.md
59
- 2. Context Compiler loads only relevant skills and docs
60
- 3. Write code following loaded skill instructions
61
- 4. Commit after each completed task
62
- 5. Update Project Graph if structure changes
63
-
64
- **Context loaded:** Task-specific (via Context Manager)
65
-
66
- ### 4. VERIFY — "Prove it works"
67
-
68
- **Input:** Source code
69
- **Output:** Tests, coverage reports
70
-
71
- Process:
72
-
73
- 1. Write tests for new code
74
- 2. Run existing tests — ensure nothing broke
75
- 3. Check edge cases
76
- 4. Verify performance (if applicable)
77
-
78
- **Context loaded:** Testing skills + API.md
79
-
80
- ### 5. REVIEW — "Quality check"
81
-
82
- **Input:** Code changes (diff)
83
- **Output:** Review comments, approved changes
84
-
85
- Process:
86
-
87
- 1. Self-review against coding standards
88
- 2. Security scan (if security skill loaded)
89
- 3. Accessibility audit (if frontend)
90
- 4. Check against ARCHITECTURE.md — does this align?
91
- 5. Check against Decision Records — does this contradict anything?
92
-
93
- **Context loaded:** ARCHITECTURE.md + relevant skills + decisions/
94
-
95
- ### 6. SHIP — "Deploy and document"
96
-
97
- **Input:** Reviewed, tested code
98
- **Output:** Deployment, decision records, release notes
99
-
100
- Process:
101
-
102
- 1. Record any architectural decisions made (ADR)
103
- 2. Update ROADMAP.md — mark completed items
104
- 3. Update TASKS.md — close completed tasks
105
- 4. Deploy (if deployment skill loaded)
106
- 5. Update Project Graph
107
-
108
- **Context loaded:** ROADMAP.md, TASKS.md, deployment skills
109
-
110
- ## Profiles and Pipeline
111
-
112
- Different profiles customize the pipeline:
113
-
114
- | Profile | Skips | Adds |
115
- | --- | --- | --- |
116
- | **Hackathon** | REVIEW, detailed PLAN | Speed shortcuts |
117
- | **MVP** | Detailed REVIEW, DEPLOY | Quick iterations |
118
- | **Startup** | Heavy docs | Balance of speed and quality |
119
- | **Enterprise** | Nothing | ADR enforcement, security gates, full testing |
1
+ # Compiler and engineering boundaries
2
+
3
+ 1. Inspect source manifests, declared entrypoints, overrides, and resources.
4
+ 2. Run compile to build the deterministic registry.
5
+ 3. Resolve the task with affected files and inspect risk, reasons, and warnings.
6
+ 4. Load selected entrypoints and relevant references on demand.
7
+ 5. Export supported agent projections and check drift.
8
+ 6. Run structural, example, and behavioral checks at their actual scope.
9
+
10
+ For implementation use engineering-workflow's proportional lifecycle. Do not
11
+ create a full suite of product documents or skip security review merely because
12
+ a generic profile illustration says to do so. Profiles are runtime configuration
13
+ from the supported profile commands and manifests, not rules interpreted from
14
+ this skill's reference YAML files.
@@ -1,103 +1,14 @@
1
- # Project Graph
1
+ # Workspace evidence graph
2
2
 
3
- The Project Graph is the **central nervous system** of ContextOS. It maps the entire project as a hierarchy:
3
+ WorkspaceGraphBuilder discovers package manifests, dependency names, internal
4
+ package links, language ecosystems, and known configuration files. The resolver
5
+ uses nearest-package evidence to avoid unrelated monorepo stack signals. The
6
+ graph is bounded and can report partial discovery.
4
7
 
5
- ```
6
- Project
7
- └── Module
8
- └── Feature
9
- └── Task
10
- └── File
11
- └── Skill
12
- ```
8
+ This graph is not a source-symbol AST, a feature/task map, or an automatic loader
9
+ of sections from docs/PROJECT_GRAPH.md. Inspect source imports, callers, tests,
10
+ and existing project documents explicitly for code impact analysis. A supplied
11
+ Project Graph can help, but confirm its freshness against the current checkout.
13
12
 
14
- ## Why Project Graph?
15
-
16
- Without a Project Graph, an AI agent sees a flat list of files. With it, the agent understands:
17
-
18
- 1. **Impact analysis** — changing `calendar.ts` affects the Appointments module, which affects Patients
19
- 2. **Scope detection** — a task touching `api/patients/` only needs Patient-related context
20
- 3. **Skill selection** — files in `components/` need React skills, files in `api/` need backend skills
21
- 4. **Dependency tracking** — the Calendar feature depends on the Auth module
22
-
23
- ## Structure
24
-
25
- The Project Graph lives in `docs/PROJECT_GRAPH.md` and follows this format:
26
-
27
- ```yaml
28
- project:
29
- name: "DentalCRM"
30
- type: crm
31
-
32
- modules:
33
- patients:
34
- description: "Patient management"
35
- features:
36
- - patient-list
37
- - patient-profile
38
- - medical-history
39
- files:
40
- - src/modules/patients/**
41
- skills: [react, typescript, postgres]
42
- depends_on: [auth]
43
-
44
- appointments:
45
- description: "Appointment scheduling"
46
- features:
47
- - appointment-calendar
48
- - appointment-booking
49
- - notifications
50
- files:
51
- - src/modules/appointments/**
52
- skills: [react, typescript, postgres]
53
- depends_on: [patients, auth]
54
-
55
- auth:
56
- description: "Authentication and authorization"
57
- features:
58
- - login
59
- - registration
60
- - role-management
61
- files:
62
- - src/modules/auth/**
63
- skills: [security, typescript, jwt]
64
- depends_on: []
65
- ```
66
-
67
- ## How the Context Compiler Uses It
68
-
69
- ### Task: "Add a reminder notification for appointments"
70
-
71
- 1. **Locate module**: `appointments`
72
- 2. **Check dependencies**: `appointments` → `patients`, `auth`
73
- 3. **Load relevant files**: `src/modules/appointments/**`, `src/modules/notifications/**`
74
- 4. **Load relevant skills**: `react`, `typescript`, notification patterns
75
- 5. **Load relevant docs**: `ARCHITECTURE.md` (notifications section), `API.md` (endpoints)
76
- 6. **Skip irrelevant**: `DATABASE.md` (no schema change), `UI.md` (if backend-only)
77
-
78
- ### Task: "Refactor the database schema"
79
-
80
- 1. **Affected modules**: ALL (schema change is cross-cutting)
81
- 2. **Load**: `DATABASE.md`, `ARCHITECTURE.md`, `PROJECT_GRAPH.md`
82
- 3. **Show impact**: which modules/features are affected by each table change
83
- 4. **Load skills**: `postgres` (or relevant DB skill)
84
-
85
- ## Automatic Updates
86
-
87
- The Project Graph should be updated when:
88
-
89
- - New modules are added
90
- - Features are completed
91
- - File structure changes significantly
92
- - Dependencies between modules change
93
-
94
- Use `ctx graph` to regenerate the Project Graph from the current codebase.
95
-
96
- ## Graph Queries
97
-
98
- The Context Compiler can answer questions like:
99
-
100
- - "What modules does this file belong to?"
101
- - "What skills are needed for this module?"
102
- - "What other modules will be affected if I change this?"
103
- - "Show me the dependency chain from here"
13
+ Use resolve --json to inspect workspaceGraph evidence. There is no ctx graph
14
+ command. Do not promise automatic module-graph updates or a context YAML cache.
@@ -1,135 +1,8 @@
1
- # Rule Engine
2
- # Conditional logic for context compilation based on project profile and task type
3
-
4
- rules:
5
- # ═══════════════════════════════════════
6
- # Profile-based rules
7
- # ═══════════════════════════════════════
8
-
9
- - name: mvp-minimal
10
- description: MVP projects skip heavy infrastructure
11
- if:
12
- profile: mvp
13
- then:
14
- exclude_skills: [microservices, ddd, kubernetes, monitoring, cicd]
15
- exclude_docs: [DEPLOYMENT.md]
16
- prefer_skills: [sqlite, simple-auth, minimal-architecture]
17
- max_doc_depth: 2 # Only Level 1 + Level 2
18
-
19
- - name: enterprise-strict
20
- description: Enterprise projects require full documentation and rigor
21
- if:
22
- profile: enterprise
23
- then:
24
- require_skills: [ddd, security, testing, cicd]
25
- require_docs: [ARCHITECTURE.md, DATABASE.md, API.md, DECISIONS]
26
- enforce_adr: true # Every architectural decision must be recorded
27
- enforce_testing: true
28
- min_doc_depth: 3 # All levels required
29
-
30
- - name: hackathon-speed
31
- description: Hackathon mode — maximum speed, minimum ceremony
32
- if:
33
- profile: hackathon
34
- then:
35
- exclude_skills: [kubernetes, monitoring, cicd, ddd, microservices]
36
- exclude_docs: [DEPLOYMENT.md, ROADMAP.md]
37
- prefer_skills: [sqlite, simple-auth]
38
- skip_review: true
39
- max_doc_depth: 1 # Vision only
40
-
41
- - name: startup-balanced
42
- description: Startup balance between speed and quality
43
- if:
44
- profile: startup
45
- then:
46
- exclude_skills: [kubernetes, ddd]
47
- prefer_skills: [postgres, jwt-auth, docker]
48
- enforce_adr: false
49
- max_doc_depth: 2
50
-
51
- # ═══════════════════════════════════════
52
- # Task-based rules
53
- # ═══════════════════════════════════════
54
-
55
- - name: frontend-task
56
- description: Frontend tasks don't need database or deployment docs
57
- if:
58
- task_type: frontend
59
- then:
60
- load_docs: [UI.md, ARCHITECTURE.md, API.md]
61
- skip_docs: [DATABASE.md, DEPLOYMENT.md]
62
- load_skill_categories: [frontend, design]
63
- skip_skill_categories: [backend, infrastructure]
64
-
65
- - name: backend-task
66
- description: Backend tasks don't need UI docs
67
- if:
68
- task_type: backend
69
- then:
70
- load_docs: [ARCHITECTURE.md, DATABASE.md, API.md]
71
- skip_docs: [UI.md]
72
- load_skill_categories: [backend, architecture]
73
- skip_skill_categories: [design]
74
-
75
- - name: architecture-task
76
- description: Architecture tasks load everything at high level
77
- if:
78
- task_type: architecture
79
- then:
80
- load_docs: [PRD.md, ARCHITECTURE.md, DATABASE.md, API.md, PROJECT_GRAPH.md]
81
- load_skill_categories: [architecture]
82
- skip_skill_categories: [design]
83
-
84
- - name: bugfix-task
85
- description: Bugfixes need minimal context — focus on affected module
86
- if:
87
- task_type: bugfix
88
- then:
89
- load_docs: [PROJECT_GRAPH.md] # Find affected module
90
- max_doc_depth: 1
91
- skip_docs: [PRD.md, ROADMAP.md]
92
-
93
- - name: refactor-task
94
- description: Refactoring needs architecture context
95
- if:
96
- task_type: refactor
97
- then:
98
- load_docs: [ARCHITECTURE.md, PROJECT_GRAPH.md]
99
- load_skill_categories: [architecture]
100
-
101
- # ═══════════════════════════════════════
102
- # Stack-based rules
103
- # ═══════════════════════════════════════
104
-
105
- - name: react-ecosystem
106
- description: React projects auto-load TypeScript
107
- if:
108
- skill_loaded: react
109
- then:
110
- auto_load: [typescript]
111
- suggest: [tailwind, react-query]
112
-
113
- - name: nextjs-ecosystem
114
- description: Next.js implies React + TypeScript + SSR patterns
115
- if:
116
- skill_loaded: nextjs
117
- then:
118
- auto_load: [react, typescript]
119
- suggest: [prisma, next-auth, tailwind]
120
-
121
- - name: fastapi-ecosystem
122
- description: FastAPI implies Python + Pydantic
123
- if:
124
- skill_loaded: fastapi
125
- then:
126
- auto_load: [python, pydantic]
127
- suggest: [postgres, docker, testing]
128
-
129
- - name: no-conflicts
130
- description: Prevent incompatible frameworks
131
- if:
132
- any_loaded: [react, vue, angular, svelte]
133
- then:
134
- conflict_check: true
135
- max_frontend_frameworks: 1
1
+ # Reference-only illustration. The CLI does not interpret this file as policy.
2
+ status: reference-only
3
+ purpose: Document proportional context selection; use supported profile commands.
4
+ principles:
5
+ - select relevant installed skills
6
+ - preserve mandatory safety guidance
7
+ - inspect missing-skill and budget warnings
8
+ - verify behavior separately from document structure
@@ -1,57 +1,22 @@
1
- # engineering-workflow Examples — Anti-patterns vs ContextOS Standard
1
+ # Workflow examples
2
2
 
3
- ## Example 1: Handling a New Feature Request
3
+ ## Routine change
4
4
 
5
- ### Anti-pattern: Jumping Straight to Code
5
+ Correct a README typo, inspect the diff, and run the relevant Markdown check.
6
+ A spec, role banner, synthetic unit test, or repeated approval adds no evidence.
6
7
 
7
- ```text
8
- User: "Add a user referral system."
9
- Agent: Immediately creates src/referral.js, starts writing database queries, guesses schema,
10
- and misses requirements like rate limiting, expiry dates, and fraud prevention.
11
- ```
8
+ ## Feature slices
12
9
 
13
- ### Best practice: ContextOS Standard (DEFINE -> PLAN -> BUILD)
10
+ 1. Create a minimal referral claim path through storage, service, API, and UI.
11
+ Verify one valid claim and one rejected claim.
12
+ 2. Add expiry and repeated-claim handling through the same path. Verify both.
13
+ 3. Add the required abuse controls and relevant integration checks.
14
14
 
15
- ```markdown
16
- [DOMAIN: Full-Stack] [PHASE: Define] [ROLE: Product Manager]
17
- Skills loaded: engineering-workflow, interview-me
15
+ Do not split every feature into all storage first, all routes second, and all UI
16
+ last unless the architecture or dependencies actually require that order.
18
17
 
19
- ## Feature Spec: User Referral System
20
- ### Why (Problem)
21
- Increase user acquisition through organic word-of-mouth incentives.
18
+ ## Review request
22
19
 
23
- ### Scope
24
- In-Scope:
25
- - Unique referral code generation per registered user
26
- - Referral code attribution on signup
27
- - Credit reward trigger after first completed purchase
28
- Out-of-Scope:
29
- - Multi-tier MLM rewards
30
- - Cash payout integrations
31
-
32
- ### Acceptance Criteria
33
- - [ ] Given a registered user, when visiting /referrals, then unique code is displayed.
34
- - [ ] Given a new user with code, when signing up, then referrer_id is stored with status 'pending'.
35
- ```
36
-
37
- ---
38
-
39
- ## Example 2: Atomic Task Execution in PLAN Phase
40
-
41
- ### Anti-pattern: Monolithic Mega-Task
42
-
43
- ```text
44
- Task: "Implement entire referral system end-to-end in one shot."
45
- Result: 15 files modified simultaneously, uncompilable intermediate state, untestable diff.
46
- ```
47
-
48
- ### Best practice: ContextOS Standard (Atomic Tasks with Test Gate)
49
-
50
- ```markdown
51
- [DOMAIN: Full-Stack] [PHASE: Plan] [ROLE: Architect]
52
- Atomic Tasks:
53
- 1. Database migration: referrals and referral_rewards tables + indexes. (Test: Migration rollback & apply)
54
- 2. Domain service: ReferralService.createCode() and ReferralService.claimCode(). (Test: Unit tests)
55
- 3. API route: POST /api/referrals/claim with Zod validation. (Test: Supertest integration)
56
- 4. UI component: <ReferralCard /> with copy button. (Test: RTL component test)
57
- ```
20
+ Inspect the code and callers, reproduce a failure when feasible, report an
21
+ exploit or incorrect-result scenario and its scope. A review request by itself
22
+ is not a request to publish, message others, or rewrite the feature.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: engineering-workflow
3
- description: Scope implementation work, verify behavior, and report evidence using a proportional lifecycle.
3
+ description: "Scope implementation work, verify behavior, and report evidence using a proportional lifecycle."
4
4
  ---
5
5
 
6
6
  # engineering-workflow
@@ -11,28 +11,28 @@ Define the outcome, plan substantial changes, implement, verify, review, and rep
11
11
 
12
12
  ## When to Use
13
13
 
14
- Implementation, debugging, reviews, and release preparation. Routine maintenance and diagnostics can proceed directly with relevant checks.
14
+ Implementation, debugging, reviews, and release preparation. Routine maintenance and diagnostics use targeted checks.
15
15
 
16
16
  ## Rules & Patterns
17
17
 
18
- Establish acceptance criteria for substantial or ambiguous features. Ask only for missing decisions that affect scope or safety. An explicit implementation request authorizes ordinary reversible work. Preserve unrelated changes. Verify behavior before reporting completion. Publishing and external messages need authorization for that action.
18
+ Establish acceptance criteria for substantial or ambiguous work. Ask only for missing decisions affecting scope, safety, or external actions. An implementation request authorizes ordinary reversible work. Inspect affected code and callers, preserve unrelated changes, and verify behavior before reporting completion. Roles are optional.
19
19
 
20
- Read [references/workflow.md](references/workflow.md) for detailed procedures and examples only when needed.
20
+ Read [references/workflow.md](references/workflow.md) for procedures when needed.
21
21
 
22
22
  ## Code Examples
23
23
 
24
- A README typo needs an edit and relevant formatting check. An authentication feature needs access boundaries, failure cases, implementation, and behavioral verification.
24
+ A README typo needs a small edit and formatting check. An authorization fix needs an allowed-user case and a denied-user regression.
25
25
 
26
26
  ## Validation Checklist
27
27
 
28
- - [ ] The requested outcome is handled.
29
- - [ ] Relevant verification and safety boundaries are preserved.
30
- - [ ] Limitations are stated.
28
+ - [ ] The requested outcome and applicable failure cases are checked.
29
+ - [ ] Evidence names commands, results, scope, and limitations.
30
+ - [ ] Unrelated changes and existing authorization are preserved.
31
31
 
32
32
  ## Common Mistakes
33
33
 
34
- Repeated approval after authorization; unnecessary ceremonies for routine edits; treating role labels or string checks as behavioral proof.
34
+ Repeated approval after authorization; full ceremonies for routine edits; treating headings, role labels, or schema checks as behavioral proof.
35
35
 
36
36
  ## Integration Notes
37
37
 
38
- Load relevant domain skills and supporting resources on demand. Compatibility identifiers remain available.
38
+ Use security for sensitive boundaries, ponytail-mindset for implementation complexity, and context-os for compiler/configuration work. gstack-roles is a compatibility alias.
@@ -1,19 +1,11 @@
1
- # engineering-workflow Troubleshooting & Common Mistakes
2
-
3
- ## 1. Premature Code Generation
4
-
5
- - **Symptom**: Agent starts spitting out code blocks while the user is still clarifying requirements.
6
- - **Root Cause**: Failure to enforce the IRON RULE of Phase 1 (DEFINE) and Phase 2 (PLAN).
7
- - **Fix**: Halt code output immediately. Announce `[PHASE: Define]` or `[PHASE: Plan]` and provide the structured spec or task breakdown for user sign-off.
8
-
9
- ## 2. Blast Radius Creep
10
-
11
- - **Symptom**: A simple bugfix in one module modifies 8 unrelated configuration and styling files.
12
- - **Root Cause**: Missing isolation boundaries and speculative cleanup.
13
- - **Fix**: Restrict edits strictly to files explicitly declared in the current atomic task's plan.
14
-
15
- ## 3. Unverified Claims of Completion
16
-
17
- - **Symptom**: Agent reports "Task complete! Everything is working" without running tests or builds.
18
- - **Root Cause**: Skipping Phase 4 (VERIFY).
19
- - **Fix**: Always execute tests (`npm test`, validator, compiler) and quote actual terminal exit codes and outputs before declaring completion.
1
+ # Workflow troubleshooting
2
+
3
+ - Missing material requirement: inspect existing conventions, then ask for the
4
+ remaining decision. Existing implementation authorization remains valid.
5
+ - Scope growth: inspect why the caller must change, update the scoped plan, and
6
+ preserve unrelated edits. Do not restrict a necessary fix to an obsolete list.
7
+ - Unverified completion: run relevant behavior checks or report what remains
8
+ unverified. A passing document validator is not implementation evidence.
9
+ - Excess ceremony: use the routine fast track for a typo, formatter, or diagnostic.
10
+ - Failed gate: read the actual failure; distinguish introduced regressions from
11
+ pre-existing failures instead of silently dropping the gate.