al-context-create
Skill115 starsChanged 11 days agoMITView on GitHub
Generate or update context.md file documenting project structure, architecture, and key patterns for AI assistants and developers. ALDC workflow (Copilot prompt al-context.create); invoke explicitly.
In this repository55 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- claude-plugin/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- instructions/copilot-instructions.mdCopilot instructions
- agent-builderSkill
- al-agent-build-instructionsSkill
- al-agent-createSkill
- al-agent-instructionsSkill
- al-agent-taskSkill
- al-agent-testSkill
- al-buildSkill
- al-initializeSkill
- al-memory-createSkill
- al-pr-prepareSkill
- al-spec-createSkill
- architectSkill
- auditSkill
- conductSkill
- developSkill
- presalesSkill
- reviewSkill
- skill-agent-instructionsSkill
- skill-agent-task-patternsSkill
- skill-agent-toolkitSkill
- skill-al-review-pipelineSkill
- skill-apiSkill
- skill-contribution-assistantSkill
- skill-copilotSkill
- skill-debugSkill
- skill-estimationSkill
- skill-eventsSkill
- skill-migrateSkill
- skill-pagesSkill
- skill-performanceSkill
- skill-permissionsSkill
- skill-testingSkill
- skill-translateSkill
- specSkill
- triageSkill
- skill-agent-instructionsSkill
- skill-agent-task-patternsSkill
- skill-agent-toolkitSkill
- skill-al-review-pipelineSkill
- skill-apiSkill
- skill-contribution-assistantSkill
- skill-copilotSkill
- skill-debugSkill
- skill-estimationSkill
- skill-eventsSkill
- skill-migrateSkill
- skill-pagesSkill
- skill-performanceSkill
- skill-permissionsSkill
- skill-testingSkill
- skill-translateSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 90
Read README.md if exists
- Distinctive: line 92
Check codeunit names for business processes
- Distinctive: line 133
Create the file at project root with this structure:
- Very specific: line 365
Place context.md at project root (next to app.json)
- Distinctive: line 366
If multiple projects, create in each project root
- Distinctive: line 375
Update README.md to reference context.md:
- Distinctive: line 395
Self-Contained: Should make sense without external docs
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Code adapter — generated by
scripts/sync-plugin-support.js, do not edit. Canonical source:prompts/al-context.create.prompt.md(sha2564fc888854e259401fcdc12f182116ae8376da9abf1330b60dc298c59ed4e3304). This workflow was written for@workspace use …in GitHub Copilot Chat. Apply these harness mappings and treat everything else as binding:
Copilot surface in the contract Claude Code equivalent #runSubagent/runSubagent/agents:The Tasktool withsubagent_type: "aldc:<agent>"; one invocation carries everything inline (subagents are stateless)#askQuestions/vscode/askQuestionsAskUserQuestion(main session only; a subagent returns its questions in its structured output)handoffs:entries, andsend: falseon oneNo equivalent — the gate is yours to keep. In Copilot a handoff is a button the human clicks, and send: falseadditionally hands them the prompt to review before it is sent; the host supplies the approval. Claude Code delegates through theTasktool, with no click and no review step. So never auto-delegate: present your output, get explicit approval, and only then delegate or route to another role. The handoff's routing is carried by the plugin's role entry skills; its human gate is carried by this rule@al-architect,@al-spec-agent,@al-conductor,@al-developer,@al-developer-reviewer,@al-triage,@al-presales,@al-agent-builder,@dredd/aldc:architect,/aldc:spec,/aldc:conduct,/aldc:develop,/aldc:review,/aldc:triage,/aldc:presales,/aldc:agent-builder,/aldc:audit(orclaude --agent aldc:<agent>)@workspace use <workflow>/aldc:<workflow>with dots replaced by dashes (al-spec.create->/aldc:al-spec-create); already rewritten below${input:Name}prompt variablesTake the value from $ARGUMENTS; ask throughAskUserQuestionwhen missing. Already rewritten below as<Name from $ARGUMENTS>execute/runInTerminal, AL compilation or symbol restoreDeveloper/Implementer: discovered official AL MCP mcp__al__al_compile/mcp__al__al_build/mcp__al__al_downloadsymbols, or an installed ALTool/AL-Go runner throughBash. Use the correct App/Test project; unavailable capabilities are never simulated. Publishing retains its separate human/CI gate and is not granted by this adapteredit,read/readFile,search,#codebaseEdit/Write,Read,Grep/Glob#changes,changes,search/changesRead-only git status/git diffthroughBashonly where granted; otherwise read the caller-supplied diff artifact or return the missing evidence requestread/problems,al_get_diagnostics,#testFailureDiscovered mcp__al__al_getdiagnosticsfor the explicit project, or actual compiler/test output. Diagnostics are not evidence of a fresh compile or executed tests. No result: recordnot-run/unavailableal-symbols-mcp/*,upstash/context7/*,microsoft-learn/*,microsoft-docs/*Tools named mcp__al-symbols-mcp__*,mcp__context7__*,mcp__microsoft-docs__*(or themcp__plugin_aldc_…form). A server that is not loaded isunavailable; do not simulate itsshadowsdk.al-lsp-for-agents/*,#usages, semantic definition/reference queriesClaude LSPwith the existing AL LSP for Agents companion; discover the actual operations and project context first. VS Code tool identifiers are not Claude tool namesms-dynamics-smb.al/*,vscode.mermaid-chat-features/*VS Code tool identifiers do not exist here. Use only a separately discovered Claude capability; never rename community tools as Microsoft tools vscode/memory,vscode/*Not available; keep state in the canonical .claude/plans/artifacts of the projecttodoTodoWritefor in-session tracking; durable state stays in.claude/plans/"load skill-x"The Skilltool (aldc:<skill-name>) or read${CLAUDE_PROJECT_DIR}/.claude/skills/<skill-name>/SKILL.md.github/instructions/*.instructions.md(applyTo)${CLAUDE_PROJECT_DIR}/.claude/rules/*.md(paths:);/aldc:al-initializecopies them to the project's.claude/rules/for auto-apply in the main session; inject inline for subagents exactly as the contract says.github/skills/,.github/plans/…,docs/templates/${CLAUDE_PROJECT_DIR}/.claude/skills/,.claude/plans/…(project-owned,aldc.yaml -> plans.root),${CLAUDE_PROJECT_DIR}/claude-plugin/docs/templates/; already rewritten belowpython …runtime helpers,--aldc-rootPaths already point at ${CLAUDE_PLUGIN_ROOT}; usepythonorpython3, whichever exists (stdlib only)aldc.yaml${CLAUDE_PROJECT_DIR}/aldc.yamlwhen the project has one, otherwise${CLAUDE_PROJECT_DIR}/claude-plugin/aldc.yamlRead
${CLAUDE_PROJECT_DIR}/claude-plugin/docs/claude-al-tooling.mdfor this surface’s LSP/MCP bindings, then${CLAUDE_PROJECT_DIR}/.claude/skills/skill-migrate/references/cli-al-tools.mdfor the shared role/evidence contract. The Claude guide supersedes older capability-availability examples, never role responsibilities or human gates.
AL Context File Generator
Generate a comprehensive context.md file that serves as the master context document for AI assistants and developers working on this AL/Business Central project.
Purpose
The context.md file provides:
- Project Overview: What this extension does and its business purpose
- Architecture Snapshot: How the code is organized and key patterns used
- Critical Decisions: Important architectural choices and their rationale
- Integration Points: Dependencies, events, APIs exposed/consumed
- Quick Navigation: Where to find specific functionality
This enables AI assistants to load complete project context quickly and make informed suggestions.
Execution Steps
1. Analyze Project Structure
Load project metadata:
# Get app.json configuration
@read_file app.json
# Understand dependencies
@al_get_package_dependencies
# Map directory structure
@list_dir src/Identify key patterns:
# Find all table extensions
@search "tableextension" *.al
# Find all page extensions
@search "pageextension" *.al
# Find event subscribers
@search "EventSubscriber" *.al
# Find published integration events
@search "IntegrationEvent" *.al
# Find API pages
@search "APIPublisher\|APIVersion" *.al2. Analyze Business Domain
Understand what the extension does:
- Read README.md if exists
- Analyze table/page names to understand business entities
- Check codeunit names for business processes
- Review comments and XML docs for business rules
Key questions to answer:
- What business problem does this solve?
- Who are the end users?
- What standard BC functionality does it extend?
- What industry/vertical is this for (if applicable)?
3. Document Architecture Patterns
Identify and document:
- Organization Strategy: Feature-based vs object-type folders?
- Naming Conventions: Prefixes, suffixes, patterns used
- Extension Patterns: How are standard objects extended?
- Event Usage: Subscriber patterns, custom events published
- Data Model: Key tables and their relationships
- Processing Logic: Main codeunits and their responsibilities
- UI Structure: Page organization and user flows
4. Map Integration Points
Document:
- Dependencies: What other extensions are required?
- Events Subscribed: Which standard BC events are hooked?
- Events Published: What integration events does this extension provide?
- APIs: REST/OData endpoints exposed
- External Integrations: External systems connected (if any)
- Web Services: SOAP services published (if any)
5. Capture Critical Decisions
Document key architectural choices:
- Why certain tables are structured in specific ways
- Why specific event patterns were chosen
- Performance optimization decisions
- Security/permission design rationale
- Any constraints or limitations to be aware of
6. Generate context.md
Create the file at project root with this structure:
# Project Context - [Extension Name]
> **Auto-generated**: [Date]
> **Purpose**: Master context document for AI assistants and developers
## 1. Project Overview
### Business Purpose
[What business problem does this extension solve?]
### Target Users
- [User role 1]: [What they do with this extension]
- [User role 2]: [What they do with this extension]
### Extension Metadata
- **App ID**: [from app.json]
- **Version**: [current version]
- **Publisher**: [publisher name]
- **Platform**: [Business Central version target]
- **License**: [if applicable]
## 2. Architecture Overview
### Organization Strategy
[Describe how code is organized - feature-based folders, naming patterns, etc.]
src/ ├── [Feature1]/ │ ├── Data/ # Tables, table extensions │ ├── Processing/ # Codeunits, business logic │ └── UI/ # Pages, page extensions └── [Feature2]/ └── ...
### Key Design Patterns
- **[Pattern 1]**: [Description and rationale]
- **[Pattern 2]**: [Description and rationale]
### Naming Conventions
- **Tables**: [Pattern, e.g., "Prefix_EntityName"]
- **Pages**: [Pattern]
- **Codeunits**: [Pattern]
- **Fields**: [Pattern]
- **Variables**: [Pattern]
## 3. Data Model
### Core Tables
| Table | Object ID | Purpose | Key Relationships |
|-------|-----------|---------|-------------------|
| [Table 1] | [ID] | [Purpose] | → [Related tables] |
| [Table 2] | [ID] | [Purpose] | → [Related tables] |
### Table Extensions
| Extends | New Fields | Purpose |
|---------|------------|---------|
| [Standard Table] | [Field 1, Field 2] | [Why extended] |
### Key FlowFields
- **[Table].[FlowField]**: [What it calculates and why]
## 4. Processing Logic
### Main Codeunits
| Codeunit | Purpose | Key Methods |
|----------|---------|-------------|
| [Name] | [Responsibility] | [Method1(), Method2()] |
### Business Flows
1. **[Flow Name]** (e.g., "Order Approval Flow")
- Entry point: [Where it starts]
- Steps: [Key processing steps]
- Events: [Events published/subscribed]
- Output: [What it produces]
## 5. UI Structure
### Main Pages
| Page | Type | Purpose | Extends |
|------|------|---------|---------|
| [Page Name] | Card/List/Document | [Purpose] | [Base page if extension] |
### User Flows
1. **[User Task]**: [Navigation path and steps]
## 6. Integration Points
### Dependencies
```json
[List key dependencies from app.json]Event Subscribers
| Event | Publisher | Purpose |
| OnBefore[Action] | [Standard Codeunit] | [Why subscribed] |
Published Events
| Event | Purpose | When to Subscribe |
| OnBefore[CustomAction] | [Purpose] | [Use cases for consumers] |
APIs / Web Services
- [API Name]: [Endpoint, purpose, auth method]
External Systems
- [System Name]: [Integration type, data exchanged]
7. Critical Decisions & Rationale
Decision 1: [Title]
Problem: [What problem was being solved]
Decision: [What was decided]
Rationale: [Why this approach]
Trade-offs: [What was given up]
Decision 2: [Title]
[Same structure]
8. Performance Considerations
- [Optimization 1]: [Description, where implemented]
- [Optimization 2]: [Description, where implemented]
Known Bottlenecks
- [Area]: [Description and mitigation strategy]
9. Security & Permissions
Permission Sets
- [Permission Set]: [Purpose, scope]
Data Security
- [How sensitive data is protected]
10. Testing Strategy
Test Coverage
- Unit tests: [Scope]
- Integration tests: [Scope]
- UI tests: [Scope if any]
Test Data
- [How test data is generated/managed]
11. Quick Navigation Guide
To Find...
- Customer-related logic:
src/[FeatureFolder]/ - Posting logic:
src/[ProcessingFolder]/ - API endpoints:
src/[APIFolder]/ - Event subscribers: Search for
[EventSubscriber]
Common Tasks
- Adding a new field: [Process/pattern to follow]
- Subscribing to events: [Pattern/location]
- Creating API endpoint: [Pattern/location]
12. Known Limitations
- [Limitation 1]: [Description and workaround if any]
- [Limitation 2]: [Description and workaround if any]
13. Future Roadmap
- Planned Features: [If documented]
- Deprecations: [Anything being phased out]
14. Development Guidelines
Before Making Changes
- [Guideline 1]
- [Guideline 2]
Code Review Checklist
- Follows naming conventions
- XML documentation added
- Events used instead of modifications
- Permission sets updated
- Tests added/updated
15. Useful Commands
# Build project
al_build
# Download symbols
al_downloadsymbols
# Run tests
@workspace /al-test
# Generate permissions
al_generatepermissionset16. References
- Documentation: [Link to detailed docs if exists]
- Wiki: [Link to wiki if exists]
- Related Extensions: [Dependencies or companion extensions]
Maintenance: Update this file when:
- Major architectural changes occur
- New features/modules are added
- Integration points change
- Critical decisions are made
Usage: AI assistants should load this file first when providing assistance on this project.
### 7. Validation Gates
**Before finalizing:**
- ✅ File is under 500 lines for quick loading
- ✅ All sections have actual content (remove empty sections)
- ✅ Links to code examples are accurate
- ✅ Metadata from app.json is correct
- ✅ Architecture diagrams are clear
- ✅ Navigation paths are tested
### 8. Placement & Integration
**Where to create:**
- Place `context.md` at project root (next to app.json)
- If multiple projects, create in each project root
**Git configuration:**
```gitignore
# Add to .gitignore if context contains sensitive info:
# context.mdREADME integration: Update README.md to reference context.md:
## For AI Assistants
See [context.md](./context.md) for complete project context.Output Format
Deliver:
- ✅ Complete
context.mdfile at project root - ✅ Summary of what was documented
- ✅ List of any sections that need manual review/input
- ✅ Recommendation on update frequency
Key Principles
- Concise but Complete: Include everything AI needs, nothing it doesn't
- Code-Focused: Link to actual code, not just describe
- Living Document: Easy to update as project evolves
- Quick Load: Optimized for AI context window efficiency
- Self-Contained: Should make sense without external docs
Success Criteria
A successful context.md enables:
- ✅ New AI assistant can understand project in <2 minutes
- ✅ Developers can orient themselves quickly
- ✅ Architectural decisions are clear and justified
- ✅ Navigation to specific functionality is straightforward
- ✅ Integration points are well-documented
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.

