[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DNCEA1VRG67FQ7TGZHHCN8":3,"skill-same:01M6DNCEA1VRG67FQ7TGZHHCN8":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"01M6DNCEA1VRG67FQ7TGZHHCN8","aac-context-engineering",null,"Optimizes the context the agent sees at any moment. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when configuring rules files and context for a project. Pairs with aac-generate-project-context (which writes the project context once) by keeping it current and well-curated as work happens.","msayedshokry\u002FAgileAgentCanvasExt","msayedshokry","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35009459?v=4","01M6DN5RZZ297CGWTNJ6ERZQ8W","Mohamed Sayed","01M6DN5S4XS7SVCSXZRW2XR0XF",3,"MIT","https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt\u002Fblob\u002Fmain\u002Fresources\u002F_aac\u002Fskills\u002Faac-context-engineering\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"context","aac context engineering","context engineering","engineering","new session","quality","Rules","work","generate","session","use","files","project context","project","switching","as","tasks","2026-11-10 10:12:30",false,"---\nname: aac-context-engineering\ndescription: 'Optimizes the context the agent sees at any moment. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when configuring rules files and context for a project. Pairs with aac-generate-project-context (which writes the project context once) by keeping it current and well-curated as work happens.'\n---\n\n# Context Engineering\n\nContext is the single biggest lever for agent output quality. Too little and the agent hallucinates. Too much and it loses focus. Context engineering is the practice of deliberately curating what the agent sees, when it sees it, and how it is structured.\n\n## Overview\n\nThe agent's context window is a budget. Every token loaded is a token not available for the task. Every line of the project-context.md is a line the agent has to weigh against the user's actual question. The discipline is not \"more context\" — it is *the right context*, at the right time, for the right task.\n\n`aac-generate-project-context` writes the project context once, at project initialization. This skill is the ongoing discipline: keep the context current, prune the stale, surface the right slice for the current task.\n\n## When to Use\n\n- Starting a new session on an unfamiliar project\n- Agent output quality is declining — wrong patterns, hallucinated APIs, ignoring conventions\n- Switching between different parts of a codebase (front-end, back-end, infrastructure)\n- Setting up a new project for AI-assisted development\n- The agent is not following project conventions despite them being documented\n- The context has grown past the point where the agent is reading all of it\n\n**When NOT to use:**\n\n- The project has no context yet — use `aac-generate-project-context` first\n- The task is small and self-contained (a one-line fix, a renamed variable)\n- The context is already well-tuned and the issue is elsewhere\n\n## The Context Hierarchy\n\nStructure context from most persistent to most transient. Each rung down is loaded less often and is more specific to the current task.\n\n```\n┌─────────────────────────────────────┐\n│ System prompt (always loaded)       │  ← rules the agent must follow no matter what\n├─────────────────────────────────────┤\n│ Project context (always loaded)     │  ← vocabulary, conventions, ADRs, glossaries\n├─────────────────────────────────────┤\n│ Active task context (loaded now)    │  ← the PRD, the spec, the issue being worked on\n├─────────────────────────────────────┤\n│ Working context (loaded on demand)  │  ← files the agent reads during the task\n├─────────────────────────────────────┤\n│ External reference (pointed to)     │  ← docs, websites, runbooks, fetched when needed\n└─────────────────────────────────────┘\n```\n\nEach rung has a budget. The system prompt and project context are always loaded; they are the most expensive per token and the most read. The working context is loaded for the current task; it is cheap per token but adds up fast. External reference is fetched on demand and the agent pays only for what it pulls.\n\nThe discipline is to keep the top of the hierarchy *small* and *load-bearing*, and to push everything else down the ladder.\n\n## The Process\n\n### 1. Audit the always-loaded layer\n\nThe first thing to check is the project context. Is it 50 lines or 500? Is each line a rule the agent must follow, or a paragraph the agent will skim? Cut anything that is not load-bearing. A 200-line project context that the agent reads is more useful than a 2000-line context the agent skips.\n\n### 2. Push reference down the ladder\n\nAnything that is not a rule the agent must always follow belongs lower. The vocabulary, the ADRs, the runbook — these are *reference*, not rules. Move them to a `references\u002F` folder and let the agent fetch them when the task requires it.\n\n### 3. Match the working context to the task\n\nWhen the agent starts a new task, load the slice of context that task needs. A front-end task does not need the back-end glossary. A bug fix does not need the full PRD. The active task context should be small and focused — the smallest set of files that, if the agent read only those, would let it do the task well.\n\n### 4. Surface drift, don't hide it\n\nWhen the code drifts from the documented convention, the convention is the one that should be flagged, not the code silently aligned. The agent should note: \"The existing code uses pattern X, but the project context says Y. Migrate, align, or update the context.\" Drift is a finding, not a friction.\n\n### 5. Measure the cost\n\nWatch the context budget as the task progresses. If the working context has grown past the point where the agent is reading all of it, prune. If the agent keeps re-loading the same file, it is missing from the active task context. The cost is the agent's attention, not just the tokens.\n\n## Common Rationalizations\n\n| Rationalization | Reality |\n|---|---|\n| \"More context is always better\" | More context is more tokens spent weighing irrelevant information. The right context is better than more context. |\n| \"I'll just add the whole PRD\" | The agent does not need the whole PRD to fix a one-line bug. A 200-line task context beats a 2000-line context the agent skips. |\n| \"The agent will figure it out\" | The agent figures it out with the context you give it. Bad context → bad output. Good context → good output. |\n| \"We documented it once, we're done\" | Context rots. The project changes; the context does not. Pruning is the ongoing discipline. |\n| \"References should be inlined\" | Inlined references are always loaded. Pointed-to references are loaded on demand. Pointers scale. Inlining does not. |\n| \"The agent knows the framework\" | The agent knows the framework from training. The project may be on a different version, with different patterns, with different conventions. The project context is the gap. |\n| \"Adding more rules fixes quality\" | Adding rules past a threshold hurts. The agent has a budget for rules; once exceeded, it starts dropping them. Cut the low-value ones. |\n\n## Red Flags\n\n- The project context is over 500 lines and the agent is not reading all of it\n- The always-loaded layer includes reference material (ADRs, runbooks, glossaries) instead of rules\n- Conventions documented in the project context are not followed in the code — drift is silent\n- The agent re-loads the same file multiple times in a session — it should be in the working context\n- The agent hallucinates an API or pattern that exists in the docs but not in the working context\n- The agent follows outdated patterns from old code, ignoring newer conventions in the context\n- The working context has grown past ~30% of the window without the agent explicitly pruning\n- The same context is used for tasks that need very different slices (front-end task with back-end glossary loaded)\n\n## Verification\n\nFor a well-tuned context:\n\n- [ ] The always-loaded layer (system prompt + project context) is small enough to read in full — under 500 lines\n- [ ] Each line in the always-loaded layer is a rule the agent must follow, not a paragraph to skim\n- [ ] Reference material is pushed to `references\u002F` and loaded on demand, not always loaded\n- [ ] The active task context is a focused slice — the smallest set of files for the current task\n- [ ] Drift between the documented convention and the existing code is flagged, not silently aligned\n- [ ] The agent's output quality is stable across long sessions, not degrading as the context fills\n- [ ] New team members (or new sessions) can be productive quickly because the always-loaded layer is clear\n- [ ] Pruning the context is part of the work, not a one-time setup activity\n","# Context Engineering\n\nContext is the single biggest lever for agent output quality. Too little and the agent hallucinates. Too much and it loses focus. Context engineering is the practice of deliberately curating what the agent sees, when it sees it, and how it is structured.\n\n## Overview\n\nThe agent's context window is a budget. Every token loaded is a token not available for the task. Every line of the project-context.md is a line the agent has to weigh against the user's actual question. The discipline is not \"more context\" — it is *the right context*, at the right time, for the right task.\n\n`aac-generate-project-context` writes the project context once, at project initialization. This skill is the ongoing discipline: keep the context current, prune the stale, surface the right slice for the current task.\n\n## When to Use\n\n- Starting a new session on an unfamiliar project\n- Agent output quality is declining — wrong patterns, hallucinated APIs, ignoring conventions\n- Switching between different parts of a codebase (front-end, back-end, infrastructure)\n- Setting up a new project for AI-assisted development\n- The agent is not following project conventions despite them being documented\n- The context has grown past the point where the agent is reading all of it\n\n**When NOT to use:**\n\n- The project has no context yet — use `aac-generate-project-context` first\n- The task is small and self-contained (a one-line fix, a renamed variable)\n- The context is already well-tuned and the issue is elsewhere\n\n## The Context Hierarchy\n\nStructure context from most persistent to most transient. Each rung down is loaded less often and is more specific to the current task.\n\n```\n┌─────────────────────────────────────┐\n│ System prompt (always loaded)       │  ← rules the agent must follow no matter what\n├─────────────────────────────────────┤\n│ Project context (always loaded)     │  ← vocabulary, conventions, ADRs, glossaries\n├─────────────────────────────────────┤\n│ Active task context (loaded now)    │  ← the PRD, the spec, the issue being worked on\n├─────────────────────────────────────┤\n│ Working context (loaded on demand)  │  ← files the agent reads during the task\n├─────────────────────────────────────┤\n│ External reference (pointed to)     │  ← docs, websites, runbooks, fetched when needed\n└─────────────────────────────────────┘\n```\n\nEach rung has a budget. The system prompt and project context are always loaded; they are the most expensive per token and the most read. The working context is loaded for the current task; it is cheap per token but adds up fast. External reference is fetched on demand and the agent pays only for what it pulls.\n\nThe discipline is to keep the top of the hierarchy *small* and *load-bearing*, and to push everything else down the ladder.\n\n## The Process\n\n### 1. Audit the always-loaded layer\n\nThe first thing to check is the project context. Is it 50 lines or 500? Is each line a rule the agent must follow, or a paragraph the agent will skim? Cut anything that is not load-bearing. A 200-line project context that the agent reads is more useful than a 2000-line context the agent skips.\n\n### 2. Push reference down the ladder\n\nAnything that is not a rule the agent must always follow belongs lower. The vocabulary, the ADRs, the runbook — these are *reference*, not rules. Move them to a `references\u002F` folder and let the agent fetch them when the task requires it.\n\n### 3. Match the working context to the task\n\nWhen the agent starts a new task, load the slice of context that task needs. A front-end task does not need the back-end glossary. A bug fix does not need the full PRD. The active task context should be small and focused — the smallest set of files that, if the agent read only those, would let it do the task well.\n\n### 4. Surface drift, don't hide it\n\nWhen the code drifts from the documented convention, the convention is the one that should be flagged, not the code silently aligned. The agent should note: \"The existing code uses pattern X, but the project context says Y. Migrate, align, or update the context.\" Drift is a finding, not a friction.\n\n### 5. Measure the cost\n\nWatch the context budget as the task progresses. If the working context has grown past the point where the agent is reading all of it, prune. If the agent keeps re-loading the same file, it is missing from the active task context. The cost is the agent's attention, not just the tokens.\n\n## Common Rationalizations\n\n| Rationalization | Reality |\n|---|---|\n| \"More context is always better\" | More context is more tokens spent weighing irrelevant information. The right context is better than more context. |\n| \"I'll just add the whole PRD\" | The agent does not need the whole PRD to fix a one-line bug. A 200-line task context beats a 2000-line context the agent skips. |\n| \"The agent will figure it out\" | The agent figures it out with the context you give it. Bad context → bad output. Good context → good output. |\n| \"We documented it once, we're done\" | Context rots. The project changes; the context does not. Pruning is the ongoing discipline. |\n| \"References should be inlined\" | Inlined references are always loaded. Pointed-to references are loaded on demand. Pointers scale. Inlining does not. |\n| \"The agent knows the framework\" | The agent knows the framework from training. The project may be on a different version, with different patterns, with different conventions. The project context is the gap. |\n| \"Adding more rules fixes quality\" | Adding rules past a threshold hurts. The agent has a budget for rules; once exceeded, it starts dropping them. Cut the low-value ones. |\n\n## Red Flags\n\n- The project context is over 500 lines and the agent is not reading all of it\n- The always-loaded layer includes reference material (ADRs, runbooks, glossaries) instead of rules\n- Conventions documented in the project context are not followed in the code — drift is silent\n- The agent re-loads the same file multiple times in a session — it should be in the working context\n- The agent hallucinates an API or pattern that exists in the docs but not in the working context\n- The agent follows outdated patterns from old code, ignoring newer conventions in the context\n- The working context has grown past ~30% of the window without the agent explicitly pruning\n- The same context is used for tasks that need very different slices (front-end task with back-end glossary loaded)\n\n## Verification\n\nFor a well-tuned context:\n\n- [ ] The always-loaded layer (system prompt + project context) is small enough to read in full — under 500 lines\n- [ ] Each line in the always-loaded layer is a rule the agent must follow, not a paragraph to skim\n- [ ] Reference material is pushed to `references\u002F` and loaded on demand, not always loaded\n- [ ] The active task context is a focused slice — the smallest set of files for the current task\n- [ ] Drift between the documented convention and the existing code is flagged, not silently aligned\n- [ ] The agent's output quality is stable across long sessions, not degrading as the context fills\n- [ ] New team members (or new sessions) can be productive quickly because the always-loaded layer is clear\n- [ ] Pruning the context is part of the work, not a one-time setup activity\n",{"name":5,"description":7},"main","473351382920a74eb8f353f979a06f6f05bb5f59","resources\u002F_aac\u002Fskills\u002Faac-context-engineering",0,"https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt","https:\u002F\u002Fgithub.com\u002Fmsayedshokry","2026-08-29 02:00:07",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add msayedshokry\u002FAgileAgentCanvasExt --skill aac-context-engineering",{"tool":54,"command":55},"bunx","bunx skills add msayedshokry\u002FAgileAgentCanvasExt --skill aac-context-engineering",{"tool":57,"command":58},"pnpm","pnpm dlx skills add msayedshokry\u002FAgileAgentCanvasExt --skill aac-context-engineering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt\u002Fblob\u002Fmain\u002Fresources\u002F_aac\u002Fskills\u002Faac-context-engineering\u002FSKILL.md",true,[],[63,92,109,122,145,161],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":79,"publishedAt":36},"01M6DNRTHE3M1XG3KDJTEF6BG6","bmad-teach-me-testing","Teach testing progressively through structured sessions. Use when user says \"lets learn testing\" or \"I want to study test practices\"","https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt\u002Fblob\u002Fmain\u002Fresources\u002F_aac\u002Ftea\u002Fworkflows\u002Ftestarch\u002Fbmad-teach-me-testing\u002FSKILL.md",[69,74],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":75,"categoryName":76,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000039","教师与教育","PROFESSION","适用职业",[80,81,82,83,84,85,86,87,88,89,29,90,91],"bmad","me","bmad teach me testing","teach me","teach","testing","test","sessions","learn","user","study","structured",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":99,"publishedAt":36},"01M6DNRG27V77JEGMPMJVRY0Q5","aac-testarch-trace","Generate traceability matrix and quality gate decision. Use when the user says \"lets create traceability matrix\" or \"I want to analyze test coverage\"","https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt\u002Fblob\u002Fmain\u002Fresources\u002F_aac\u002Ftea\u002Fworkflows\u002Ftestarch\u002Faac-testarch-trace\u002FSKILL.md",[98],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},[100,101,86,102,103,27,104,24,105,89,106,29,107,108],"aac testarch trace","trace","quality gate","create","analyze","decision","coverage","test coverage","gate",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":116,"publishedAt":36},"01M6DNR70G1S0DGDSHRWT1S1DD","aac-testarch-test-review","Review test quality using best practices validation. Use when user says \"lets review tests\" or \"I want to evaluate test quality\"","https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt\u002Fblob\u002Fmain\u002Fresources\u002F_aac\u002Ftea\u002Fworkflows\u002Ftestarch\u002Faac-testarch-test-review\u002FSKILL.md",[115],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},[117,118,86,119,120,24,89,29,121],"review","aac testarch test review","best practices","validation","tests",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":135,"publishedAt":36},"01M6DNQXV8F40EE78ZMWGWRPJM","aac-testarch-test-design","Create system-level or epic-level test plans. Use when the user says \"lets design test plan\" or \"I want to create test strategy\"","https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt\u002Fblob\u002Fmain\u002Fresources\u002F_aac\u002Ftea\u002Fworkflows\u002Ftestarch\u002Faac-testarch-test-design\u002FSKILL.md",[128,129,132],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},{"categoryNo":130,"categoryName":131,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":133,"categoryName":134,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000032","设计师",[136,137,86,138,89,103,139,140,141,142,29,143,144],"aac testarch test design","test design","design","test plan","plan","system","strategy","test strategy","plans",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":36},"01M6DNQNG0T7Q5DKV3C03RY35D","aac-testarch-nfr","Audit NFR evidence for performance, security, reliability, and scalability. Use when implementation evidence exists and the user says \"audit NFR evidence\", \"audit NFRs\", or \"evaluate non-functional requirements\"","https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt\u002Fblob\u002Fmain\u002Fresources\u002F_aac\u002Ftea\u002Fworkflows\u002Ftestarch\u002Faac-testarch-nfr\u002FSKILL.md",[],[152,153,154,155,156,157,89,158,159,29,160],"aac testarch nfr","reliability","evidence","implementation","scalability","requirements","audit","performance","security",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":168,"publishedAt":36},"01M6DNQDPTGB49D8AAJV4GN2H8","aac-testarch-framework","Initialize test framework with Playwright or Cypress. Use when the user says \"lets setup test framework\" or \"I want to initialize testing framework\"","https:\u002F\u002Fgithub.com\u002Fmsayedshokry\u002FAgileAgentCanvasExt\u002Fblob\u002Fmain\u002Fresources\u002F_aac\u002Ftea\u002Fworkflows\u002Ftestarch\u002Faac-testarch-framework\u002FSKILL.md",[167],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},[169,170,171,89,29,172,173,174,86,175,85,176],"aac testarch framework","framework","initialize","testing framework","setup","test framework","playwright","cypress"]