context-engineer
Skill0 starsChanged 4 months agoMITView on GitHub
Initialize project infrastructure, generate context files, maintain project memory, and track decisions. Covers Project Bible generation, tiered context loading, bug-solution tracking, architectural decision records, and cross-session memory. Use when setting up projects, auditing environments, generating context documentation, maintaining project memory, or tracking decisions. DO NOT USE FOR: high-level system architecture design, such as defining module boundaries and selecting technologies (use architect), wiki knowledge persistence (use llm-mem), feature implementation tasks, such as writing code for specific features (use implementer), or debugging runtime errors (use systematic-debugging).
9 other projects use a version of this.
Adopted by
Most recently taken up by
- Tcuzzo/backs-aios-skillstheir own version, first seen Nov 3, 2026
- koukekoukej-glitch/context-engineertheir own version, first seen Oct 20, 2026
- karim-bhalwani/agent-skills-collectiontheir own version, first seen Oct 20, 2026
- kasoob/context-engineertheir own version, first seen Aug 23, 2026
- GustavoGutierrez/engineering-skillstheir own version, first seen Jun 16, 2026
- nihao555-hub/claude-code-agent-skillstheir own version, first seen Apr 1, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- cacheforge-ai/cacheforge-skills★ 10same name
- joonchungpersonal-dev/veracity-skills★ 4same name
- nihao555-hub/claude-code-agent-skills★ 4same name
- Tcuzzo/backs-aios-skills★ 2same name
- joonchungpersonal-dev/claude-skills★ 1same name
- kasoob/context-engineer★ 1same name
- GustavoGutierrez/engineering-skills★ 0same name
- karim-bhalwani/agent-skills-collection★ 0same name
- koukekoukej-glitch/context-engineer★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- architectSkill
- brainstormingSkill
- concise-planningSkill
- data-analystSkill
- data-deprecation-analysisSkill
- data-engineeringSkill
- analystSkill
- detectiveSkill
- editorSkill
- inspectorSkill
- data-narrativeSkill
- data-scienceSkill
- excalidraw-diagramSkill
- genai-securitySkill
- guardianSkill
- holdout-validationSkill
- implementerSkill
- llm-app-patternsSkill
- llm-memSkill
- opsSkill
- prompt-librarySkill
- security-boundariesSkill
- story-masterSkill
- story-plannerSkill
- subagent-executionSkill
- systematic-debuggingSkill
- task-routingSkill
- thinkerSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 80
Verify build/test commands actually work
- Distinctive: line 97
All write operations to context files follow this ordered priority list:
- Distinctive: line 99
Read before write: always read existing context before any update.
- Distinctive: line 120
Does NOT write application code or tests
- Distinctive: line 121
Does NOT generate speculative documentation (everything must have a source)
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context Engineer Skill - Project Context & Memory
Version: 9.0 | Updated: 01-July-2026 | Architect: Karim Bhalwani | Tiered: core (~150 lines) + on-demand references
Unified reference for project initialization, context management, and persistent memory.
Project Bible Structure
.copilot/context/
PROJECT_CONTEXT.md -- Tier 1: always loaded (< 200 lines)
ORIENTATION.md -- Tier 1: 5-minute quick-start summary
ARCHITECTURE.md -- Tier 2: loaded by task match
CODEBASE_PATTERNS.md -- Tier 2: loaded by task match
AGENT_GUIDE.md -- Tier 2: loaded by task match
DECISIONS.md -- Tier 3: loaded on reference
.copilot/state/
SESSION_STATE.md -- Pipeline checkpoint for cross-session resume
.copilot/specs/
SPEC.md -- Written by Architect; consumed by Developer and Guardian
.copilot/holdout/ -- Written by Architect; read only by Guardian
.copilot/artifacts/
review-report.md -- Written by Guardian; consumed by Release ManagerArtifact Directory Convention
| Path | Producer | Consumer(s) | Overwrite Policy |
.copilot/specs/SPEC.md | Architect | Developer, Guardian | Overwritten per spec cycle |
.copilot/specs/SPEC-<feature-name>.md | Architect | Developer, Guardian | Parallel workstream convention |
.copilot/holdout/ | Architect | Guardian | Per Architect convention |
.copilot/artifacts/review-report.md | Guardian | Release Manager | Overwritten per review |
Producers create directories if needed. Files always reflect "latest" (no versioning).
Tiered Loading
- Tier 1 (< 200 lines): Identity, tech stack, critical rules. Loaded at session start.
- Tier 2: Architecture, patterns, agent guide. Load per these explicit triggers:
ARCHITECTURE.md: load when the task involves adding, removing, or evaluating components or dependenciesCODEBASE_PATTERNS.md: load when the task involves writing, reviewing, or refactoring codeAGENT_GUIDE.md: load when the task involves coordinating between agents or reviewing agent output
- Tier 3: Decision log, historical context. Loaded only when referenced.
Smart Project Initialization
Scan Phase
- Detect frameworks:
pyproject.toml,package.json,requirements.txt,Cargo.toml - Detect test runners: pytest, jest, go test
- Detect CI:
.github/workflows/,Jenkinsfile,azure-pipelines.yml - Detect infrastructure:
Dockerfile,docker-compose.yml,terraform/,bicep/
Draft Phase
- Generate Tier 1 context from scan results
- Mark items as
[CONFIRMED],[INFERRED], or[UNKNOWN]
Validate Phase
- Cross-reference context with actual code
- Verify build/test commands actually work
- Flag stale or contradictory information
Session State Management
Agents persist pipeline progress to .copilot/state/SESSION_STATE.md for cross-session resume. Follow the Session Resume Protocol from core-behavior.instructions.md §9 for startup/checkpoint/completion procedures.
Load session_state_schema.md for the full schema. Keep under 60 lines.
Context Evolution Rules
Update Protocol
See Context File Write Rules for the authoritative ordered protocol.
Context File Write Rules
All write operations to context files follow this ordered priority list:
- Read before write: always read existing context before any update; never overwrite blindly
- Mark changes: annotate changes with date and reason
- Confidence override hierarchy (highest to lowest):
[CONFIRMED]>[DECLARED]>[INFERRED]- A new
[CONFIRMED]entry replaces an existing[DECLARED]or[INFERRED]entry for the same field - A
[DECLARED]entry replaces an existing[INFERRED]entry for the same field - An existing
[CONFIRMED]entry is never replaced by[DECLARED]or[INFERRED]evidence; only newer[CONFIRMED]evidence may update a[CONFIRMED]entry
- A new
- Supersede, don't delete: move deprecated decisions to
[SUPERSEDED]with a link to the replacement - Surface unknowns:
[UNKNOWN]items are always surfaced to the user
Definition of Done
Apply Context File Write Rules when producing or updating any context file. All of the following must be true:
- Tier 1
PROJECT_CONTEXT.mdexists and is under 200 lines - All detected items marked
[CONFIRMED],[INFERRED], or[UNKNOWN] - Build and test commands verified (actually run, not assumed)
- No
[UNKNOWN]items remain without an inline note inPROJECT_CONTEXT.mdexplaining why the value could not be determined (e.g.,[UNKNOWN] - no package manifest found) - Context files are consistent with actual codebase state
Constraints
- Does NOT write application code or tests
- Does NOT generate speculative documentation (everything must have a source)
- For confidence-level override rules, see Context File Write Rules above
Integration Points
- brownfield-discovery: Produces
[CONFIRMED]findings for the Project Bible - greenfield-interview: Produces
[DECLARED]founding documents - architect: Consumes the Project Bible as primary input
- holdout-validation: Evaluation reports feed into retrospective tracking
- memory tool: Cross-session facts stored via Copilot Memory
Scripts
Missing script fallback: If a referenced script does not exist at the expected path, stop and notify the user with the exact missing path before proceeding. Do not attempt to recreate the script.
- scripts/scaffold_bible.py - Create stub files for all 6 Project Bible documents. Run at the start of the documentation phase. Mode:
--mode greenfieldor--mode brownfield. - scripts/verify_bible.py - Verification gate for the Project Bible. Exits 1 if any of the 6 files is still a stub or missing.
- scripts/scaffold_session_state.py - Create
.copilot/state/SESSION_STATE.mdfrom the schema template. Idempotent; does not overwrite existing files. - scripts/verify_session_state.py - Verify
SESSION_STATE.mdexists and contains all required schema sections and a validStatus:value. - scripts/context_cache.py - Manage the
## Context Cachesection inSESSION_STATE.md. Agents query this before reading shared files (SPEC.md,STORIES.md,PROJECT_CONTEXT.md) and add entries after reading. Commands:add,query,list,clear.
References
Load on demand for specific sub-tasks:
- templates-and-retrospectives.md - Memory system templates (bug log, ADR, key facts, work history), retrospective workflow, rework tracking, workflow effectiveness audit, environment auditing, 5-minute orientation details. Load for retrospectives or project memory work.
- context_snippet.md - Context snippet template for consistent format and tiered citations.
- orientation_template.md - 5-Minute Orientation template.
- session_state_schema.md - Session State schema for cross-session resume.
- entropy_audit.md - Entropy Audit checklist for quarterly audits.
- pipeline-loop.md - Cross-session iteration tracking and 3-strike circuit breaker for the Release Manager / Senior Developer / Guardian review cycle.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

