Skip to content

Commit 493cb30

Browse files
chore(docs): update README and add Instruction Architecture document for AI guidance
1 parent e3e82e3 commit 493cb30

3 files changed

Lines changed: 111 additions & 3 deletions

File tree

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1-
# Template-Docs
1+
# PSModule Documentation
22

3-
A template repo for documentation repositories
3+
This repository contains the comprehensive documentation for the PSModule development framework - a GitHub & PowerShell development framework that empowers PowerShell-savvy developers to effortlessly transform their ideas into impactful solutions.
4+
5+
## 🌟 Overview
6+
7+
PSModule provides a development framework that allows developers to focus on delivering value through their code by leveraging the GitHub platform and PowerShell to automate repetitive tasks. Whether you're a consumer or contributor, our framework enables you to concentrate on coding without distractions.
8+
9+
## 📖 Documentation Structure
10+
11+
- **[PowerShell Modules](docs/PowerShell-Modules/)** - Guidelines for module development, testing specifications, and versioning
12+
- **[GitHub Actions](docs/GitHub-Actions/)** - Best practices and implementations for CI/CD workflows
13+
- **[Solutions](docs/Solutions/)** - Real-world examples and problem-solving approaches
14+
- **[Blog](docs/Blog/)** - Latest updates, insights, and community contributions
15+
- **[About](docs/About/)** - More information about the PSModule project
16+
17+
## 🛠️ Platform Support
18+
19+
The PSModule framework prioritizes supporting the latest Long-Term Servicing (LTS) version of PowerShell to leverage the most recent features and capabilities. While we don't actively pursue Windows PowerShell 5.1 compatibility, users can still benefit from our tools by installing PowerShell 7 alongside legacy systems.
20+
21+
## 🤝 Contributing
22+
23+
We welcome contributions to improve our documentation! Please feel free to:
24+
25+
- Submit issues for documentation improvements
26+
- Create pull requests with corrections or enhancements
27+
- Share feedback on existing content
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# PSModule Instruction Architecture
2+
3+
This document describes the Copilot instruction system used across PSModule repositories to provide consistent guidance to AI coding agents.
4+
5+
## Overview
6+
7+
The PSModule ecosystem uses a structured instruction system that guides AI agents in making consistent changes across multiple repositories while allowing for project-specific customization.
8+
9+
## Architecture
10+
11+
### Two-Tier Hierarchy
12+
13+
The instruction system follows a two-tier hierarchy:
14+
15+
```
16+
.github/instructions/
17+
├── framework/ # Generic, reusable patterns (automation-managed)
18+
│ ├── main.instructions.md # Universal cross-language guidelines
19+
│ └── {Language}/ # Language-specific framework patterns
20+
│ ├── main.instructions.md
21+
│ ├── tests.instructions.md
22+
│ └── classes.instructions.md
23+
└── repo/ # Project-specific patterns (manually curated)
24+
├── main.instructions.md # Repository context and rules
25+
└── {Language}/ # Project-specific language patterns
26+
└── main.instructions.md
27+
```
28+
29+
### Content Hierarchy and Precedence
30+
31+
Instructions are applied in precedence order, with more specific rules taking precedence:
32+
33+
1. **Framework instructions** provide foundation and universal patterns
34+
2. **Repository instructions** override and extend framework instructions
35+
3. **Language-specific instructions** inherit from their main instruction files
36+
4. **Repository language instructions** take precedence over framework language instructions
37+
38+
## Usage
39+
40+
### For AI Agents
41+
42+
When editing files, agents should:
43+
44+
1. Locate the file you intend to edit and note its extension and repository segment (code, docs, workflows, etc.)
45+
2. Load all matching framework instructions under `/.github/instructions/framework/`, then load the corresponding repository overrides under `/.github/instructions/repo/`
46+
3. Respect the precedence order: framework → framework language → repository → repository language, applying the most specific rule last
47+
4. If gaps appear, record them as enhancements and avoid unverified assumptions
48+
5. After completing work, confirm that updates continue to fit the documented architecture and that any new patterns are captured in the appropriate instruction file
49+
50+
### For Contributors
51+
52+
- Always consult both framework and repo instructions before editing
53+
- Follow the `applyTo` glob when determining relevancy; do not assume coverage
54+
- Document new patterns promptly so they can be promoted to framework guidance when reusable
55+
56+
## File Format
57+
58+
All instruction files must follow this format:
59+
60+
```yaml
61+
---
62+
applyTo: "<glob pattern targeting specific file types>"
63+
description: "Brief, actionable description of the instruction's purpose"
64+
---
65+
```
66+
67+
Content structure: Context lead, Goal, Execution steps, Behavior rules, Output format, Error handling, Definitions
68+
69+
## Key Principles
70+
71+
- Honor convention over configuration, context awareness, pipeline friendliness, and cross-platform compatibility
72+
- Maintain strong typing, clear documentation, robust authentication abstractions, and enterprise GitHub support throughout the ecosystem
73+
- Expect tight coupling with GitHub Actions, PSModule authentication helpers, structured logging (`LogGroup`), and cross-repo dependencies
74+
- Validate changes against both local tooling and CI automation
75+
76+
## Definitions
77+
78+
| Term | Description |
79+
| --- | --- |
80+
| **Framework instructions** | Canonical, reusable rules under `/.github/instructions/framework/` that apply across PSModule repositories |
81+
| **Repository instructions** | Overrides located under `/.github/instructions/repo/` describing project-specific expectations |
82+
| **Precedence order** | Evaluation order where the most specific applicable instruction file governs the final decision |

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ nav:
8989
- Solutions/index.md
9090
- Blog:
9191
- Blog/index.md
92-
- About: About/index.md
92+
- About:
93+
- About/index.md
94+
- Instruction Architecture: About/Instruction-Architecture.md
9395

9496
repo_name: PSModule/docs
9597
repo_url: https://github.com/PSModule/docs

0 commit comments

Comments
 (0)