Skip to content

Add comprehensive documentation for PowerShell architecture, security, and development#27714

Open
TravisEz13 wants to merge 4 commits into
PowerShell:masterfrom
TravisEz13:gen-agenc-docs
Open

Add comprehensive documentation for PowerShell architecture, security, and development#27714
TravisEz13 wants to merge 4 commits into
PowerShell:masterfrom
TravisEz13:gen-agenc-docs

Conversation

@TravisEz13

Copy link
Copy Markdown
Member
  • Introduced AGENTS.md for an overview of the PowerShell service and repo.
  • Added API_SURFACE.md detailing cmdlet and .NET hosting API surfaces.
  • Created ARCHITECTURE.md to explain PowerShell's internal structure and components.
  • Documented BUSINESS_LOGIC.md outlining command execution models and language semantics.
  • Added DEPENDENCIES.md listing .NET runtime, NuGet packages, and native components.
  • Created DEV_GUIDE.md for building, testing, and contributing to PowerShell.
  • Introduced ERROR_HANDLING.md to describe the error model and handling practices.
  • Added SECURITY.md detailing security concerns, boundaries, and reporting vulnerabilities.
  • Updated existing SECURITY.md to reflect new security guidelines and reporting processes.

PR Summary

This pull request introduces a comprehensive set of engineering documentation for PowerShell, focusing on system architecture, API surface, business logic, dependencies, and security boundaries. The new documentation provides clear, organized references for developers and contributors, clarifies security reporting procedures, and centralizes technical details about the codebase and its modules.

New and Updated Documentation:

  • Added a high-level engineering overview in AGENTS.md, including a quick reference, documentation index, and descriptions of key engineering documents.
  • Introduced docs/ARCHITECTURE.md to describe overall system context, internal architecture, and project-to-layer mapping for the PowerShell codebase.
  • Added docs/API_SURFACE.md detailing the cmdlet/command surface by module and the .NET hosting API, with references to source locations and module purposes.
  • Added docs/BUSINESS_LOGIC.md to explain the core execution model, command types, provider/drive abstraction, pipeline semantics, language modes, extensibility points, and domain glossary.
  • Added docs/DEPENDENCIES.md documenting .NET, NuGet, native, and script module dependencies, as well as runtime external systems and ownership/escalation procedures.

Security and Reporting Clarifications:

  • Updated .github/SECURITY.md with guidance on PowerShell security boundaries, emphasizing the distinction between security boundaries and defense-in-depth features, and referencing the new security documentation.

These changes significantly improve developer onboarding, clarify project structure and boundaries, and provide a single source of truth for engineering and security practices.

PR Context

PR Checklist

…, and development

- Introduced AGENTS.md for an overview of the PowerShell service and repo.
- Added API_SURFACE.md detailing cmdlet and .NET hosting API surfaces.
- Created ARCHITECTURE.md to explain PowerShell's internal structure and components.
- Documented BUSINESS_LOGIC.md outlining command execution models and language semantics.
- Added DEPENDENCIES.md listing .NET runtime, NuGet packages, and native components.
- Created DEV_GUIDE.md for building, testing, and contributing to PowerShell.
- Introduced ERROR_HANDLING.md to describe the error model and handling practices.
- Added SECURITY.md detailing security concerns, boundaries, and reporting vulnerabilities.
- Updated existing SECURITY.md to reflect new security guidelines and reporting processes.
Copilot AI review requested due to automatic review settings July 22, 2026 19:33
@TravisEz13
TravisEz13 requested a review from a team as a code owner July 22, 2026 19:33
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@TravisEz13 TravisEz13 added the CL-Docs Indicates that a PR should be marked as a documentation change in the Change Log label Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new set of engineering-focused documentation intended to centralize architectural, API-surface, dependency, development, error-handling, and security-boundary information for the PowerShell codebase, and links it from the repository security reporting page.

Changes:

  • Introduces a top-level documentation index (AGENTS.md) and several new docs/*.md engineering reference documents (architecture, API surface, business logic, dependencies, dev guide, error model, security).
  • Expands .github/SECURITY.md with PowerShell-specific guidance to help reporters distinguish security boundaries from defense-in-depth features.
  • Cross-links the new documentation set to improve discoverability and onboarding for contributors.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/SECURITY.md New security-focused engineering doc covering boundaries, mechanisms, ownership, and vuln reporting.
docs/ERROR_HANDLING.md New doc describing the ErrorRecord model and terminating vs non-terminating errors.
docs/DEV_GUIDE.md New contributor guide for bootstrapping, building, testing, and conventions.
docs/DEPENDENCIES.md New doc summarizing platform, NuGet, native, and optional external dependencies.
docs/BUSINESS_LOGIC.md New doc explaining command execution model, pipeline semantics, and language modes.
docs/ARCHITECTURE.md New doc mapping major components and projects to architecture layers.
docs/API_SURFACE.md New doc describing cmdlet/module surface and the .NET hosting API surface.
AGENTS.md New entrypoint/index tying together the engineering documentation set.
.github/SECURITY.md Updated to reference the new security-boundary documentation before reporting issues.

Comment thread docs/SECURITY.md Outdated
Comment thread docs/SECURITY.md
Comment on lines +14 to +17
security descriptors**, and **remote session secrets**. Code touching these must avoid logging
or persisting plaintext secrets. See [OBSERVABILITY / logging] guidance in
[DEV_GUIDE.md](DEV_GUIDE.md) - never write secret values into telemetry, error records, or
transcripts.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Address this issue

Comment thread docs/BUSINESS_LOGIC.md
| `RestrictedLanguage` | Data-only; used by data sections / manifests. |
| `NoLanguage` | Only pre-defined commands, no script text (e.g. JEA endpoints). |

These are security boundaries — see [SECURITY.md](SECURITY.md).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot address this issue

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

docs/SECURITY.md:17

  • The bracketed text "[OBSERVABILITY / logging]" isn’t a valid link and renders as literal brackets. Consider linking directly to the relevant section or rephrasing so the sentence reads cleanly.
or persisting plaintext secrets. See [OBSERVABILITY / logging] guidance in
[DEV_GUIDE.md](DEV_GUIDE.md) - never write secret values into telemetry, error records, or
transcripts.

docs/BUSINESS_LOGIC.md:80

  • This sentence states that language/execution modes are security boundaries, but elsewhere in this PR (docs/SECURITY.md and .github/SECURITY.md) language modes are explicitly described as enforcement mechanisms that only become a boundary when anchored to an OS-enforced trust decision (for example ACfB/WDAC). This should be aligned to avoid misleading threat models.
These are security boundaries — see [SECURITY.md](SECURITY.md).

Comment thread docs/DEPENDENCIES.md Outdated
Comment thread docs/DEPENDENCIES.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Docs Indicates that a PR should be marked as a documentation change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants