Loading...
Loading...
Optimize and structure context for agents and LLMs by reducing noise, prioritizing relevance, organizing memory, defining constraints, and managing token budgets.
npx skill4agent add gustavogutierrez/engineering-skills context-engineer| Category | Include When | Handling Rule |
|---|---|---|
| Objective | It defines the task outcome. | Always include in the first section. |
| User Intent | It explains what the user wants or values. | Preserve exact meaning; summarize only if long. |
| Hard Constraint | It limits allowed behavior or output. | Always include; never compress ambiguously. |
| Soft Preference | It influences style or tradeoffs. | Include if relevant to current task. |
| Decision | It records a chosen direction. | Include with rationale and date/context if known. |
| Fact | It describes current state or inputs. | Include only if needed for execution. |
| Dependency | It blocks or sequences work. | Include near tasks or execution plan. |
| Example | It clarifies expected pattern. | Include minimal representative examples only. |
| Memory | It comes from prior sessions or long-term context. | Include if relevant, current, and non-conflicting. |
| Noise | It does not affect the task. | Omit. |
| Score | Meaning | Action |
|---|---|---|
| 5 | Required for correctness or safety. | Include verbatim or near-verbatim. |
| 4 | Strongly affects implementation or decision quality. | Include compactly. |
| 3 | Useful background, but not decisive. | Summarize briefly or retrieve on demand. |
| 2 | Possibly useful later. | Move to deferred context or memory index. |
| 1 | Irrelevant, duplicated, stale, or distracting. | Omit. |
# <Context Package Title>
## 1. Task Objective
- Goal:
- Expected output:
- Success criteria:
## 2. Hard Constraints
- <Non-negotiable rule or limitation>
## 3. Relevant Facts
| Fact | Source/Confidence | Why It Matters |
| --- | --- | --- |
## 4. Decisions and Rationale
| Decision | Rationale | Impact |
| --- | --- | --- |
## 5. Dependencies and Blockers
| Item | Type | Blocks | Resolution |
| --- | --- | --- | --- |
## 6. Working Assumptions
- <Assumption and reason>
## 7. Open Questions
- <Question that affects correctness or execution>
## 8. Deferred Context
| Item | Why Deferred | Retrieve When |
| --- | --- | --- |
## 9. Output Contract for Downstream Agent
- Required sections:
- Forbidden actions:
- Quality bar:
- Verification method:TBD