Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/.bootstrap-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
# Example:
# workflows/
# dependabot.yml
README.md
agents/README.md
templates/
scripts/bootstrap-copilot-config.sh
tech-ai-requirements-dev.txt
24 changes: 24 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ Use this format for new updates:
- One bullet per meaningful change.
- Include file/path scope when useful.

## 2026-03-09
- Added the repo-only `TechAIInternalCopilotCustomizationBuilder` agent, prompt, and skill for creating consumer-repository `internal-*` Copilot assets without duplicating the shared baseline, and excluded the trio from consumer sync.
- Tightened `TechAIInternalCopilotCustomizationBuilder` so it must ground repo-local prompts, examples, schema snippets, and naming rules on concrete target files instead of generic remembered patterns.
- Deprecated `.github/scripts/bootstrap-copilot-config.sh` in favor of `.github/scripts/tech-ai-sync-copilot-configs.py`, updated lifecycle docs, and made quickstart plus `.github/README.md` prefer sync-first alignment.
- Added source release metadata with root `VERSION`, contributor workflow documentation, and manifest provenance fields for source version and commit.
- Tightened consumer alignment: improved composite-action detection, enabled data-registry selection for JSON-heavy repositories, slimmed generated `AGENTS.md`, removed spurious `pytest` recommendations for repos without pytest tests, and added sync recommendations for missing Copilot validation workflows plus legacy source-only residues.
- Reduced source maintenance noise by trimming Dependabot ecosystems, updating the GitHub Actions checkout example, adding explicit `.github/` CODEOWNERS coverage, and documenting security-control enforcement status.
- Expanded validator and sync tests to cover new recommendation, rendering, provenance, and validation paths.

## 2026-03-08
- Updated the PR-writing prompt, skill, and agent guidance to derive required sections from the resolved repository PR template instead of hardcoding older headings such as `Security and Compliance` or `Related Links`.
- Updated `scripts/tech-ai-sync-copilot-configs.py` and `scripts/validate-copilot-customizations.sh` so repository-owned prompt, skill, and agent assets outside the synced global baseline must use `internal-*` in both filenames and `name:` values, making internal customizations visibly distinct from synced `tech-ai-*` assets.
- Updated `scripts/tech-ai-sync-copilot-configs.py` so target-only skill detection compares full relative paths instead of the shared `SKILL.md` filename, fixing missed unmanaged skill assets in consumer repositories.
- Expanded sync planning to audit unmanaged target-local instructions, prompts, skills, and agents for strict validation gaps and legacy alias drift, and added the new report section in both markdown and JSON outputs.
- Updated sync planning so legacy aliases such as `cs-*`, unprefixed prompt names, and legacy skill directories are reported even when the canonical family is outside the selected minimum baseline.
- Updated generated `AGENTS.md` inventory rendering and `.github/templates/AGENTS.template.md` so inventory reflects the desired managed baseline plus target-local Copilot assets already present in the consumer repository.
- Added source-side redundancy auditing to `scripts/tech-ai-sync-copilot-configs.py`, including canonical asset inventory, legacy alias detection, triad role-overlap checks, and `AGENTS.md` inventory-repeat detection in both markdown and JSON reports.
- Refactored `agents/tech-ai-sync-copilot-configs.agent.md`, `skills/tech-ai-sync-copilot-configs/SKILL.md`, and `prompts/tech-ai-sync-copilot-configs.prompt.md` so workflow detail lives in the skill while the agent and prompt stay thin.
- Simplified root `AGENTS.md` and `.github/templates/AGENTS.template.md` to keep asset paths in the inventory section only and remove descriptive prompt or skill catalogs.
- Expanded sync and validator tests to cover source audit behavior, slimmer AGENTS structure, and JSON report sections.
- Updated `agents/tech-ai-sync-copilot-configs.agent.md`, `skills/tech-ai-sync-copilot-configs/SKILL.md`, and `prompts/tech-ai-sync-copilot-configs.prompt.md` so the sync workflow explicitly detects redundant legacy aliases before apply.
- Updated `scripts/tech-ai-sync-copilot-configs.py` to recognize legacy `cs-*`, unprefixed prompt names, and legacy agent or skill aliases, report them as redundant target assets, and raise sync conflicts instead of creating duplicate canonical `tech-ai-*` assets.
- Updated `tests/test_tech_ai_sync_copilot_configs.py` to cover duplicate-alias detection and conflict behavior during sync planning.

## 2026-03-07
- Added repo-only global customization agents `TechAIGlobalCustomizationBuilder` and `TechAIGlobalCustomizationAuditor` for standards-authoring and final quality gates in this repository.
- Marked `TechAICustomizationAuditor` as a deprecated compatibility alias that now points to `TechAIGlobalCustomizationAuditor`.
Expand Down
2 changes: 1 addition & 1 deletion .github/DEPRECATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Define a predictable process for deprecating Copilot customization assets (`inst
Immediate removal is allowed only for security or compliance issues. The removal reason must be documented in `.github/CHANGELOG.md`.

## Current deprecations
- None at this time.
- `scripts/bootstrap-copilot-config.sh`: Deprecated in favor of `scripts/tech-ai-sync-copilot-configs.py`. Keep only as a legacy bootstrap fallback while older consumers migrate to sync-based alignment.
12 changes: 7 additions & 5 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ See `.github/agents/README.md` for details.
1. Update files under `.github/`.
2. Run `.github/scripts/validate-copilot-customizations.sh --scope root --mode strict`.
3. Optional: generate a machine-readable summary with `.github/scripts/validate-copilot-customizations.sh --scope root --mode strict --report json --report-file /tmp/copilot-report.json`.
4. Optional: bootstrap this configuration into another repository with `.github/scripts/bootstrap-copilot-config.sh --target <repo-path>` (default excludes apply; see `.github/.bootstrap-ignore`).
5. Optionally run cross-repo assessment with `.github/scripts/validate-copilot-customizations.sh --scope all --mode legacy-compatible`.
6. Ensure workflow checks pass.
7. Update `.github/CHANGELOG.md` for notable changes.
4. Prefer cross-repo alignment with `python .github/scripts/tech-ai-sync-copilot-configs.py --target <repo-path> --mode plan` before any apply step.
5. Use `.github/scripts/bootstrap-copilot-config.sh --target <repo-path>` only as a legacy fallback bootstrap path (default excludes apply; see `.github/.bootstrap-ignore`).
6. Optionally run cross-repo assessment with `.github/scripts/validate-copilot-customizations.sh --scope all --mode legacy-compatible`.
7. Ensure workflow checks pass.
8. Update `.github/CHANGELOG.md` for notable changes.

## Notes
- `repo-profiles.yml` is currently advisory (human-readable profile catalog).
- The canonical project `AGENTS.md` belongs in repository root, not under `.github/`.
- `TechAIGlobalCustomizationBuilder` and `TechAIGlobalCustomizationAuditor` are repo-only standards agents and must not be synced to consumer repositories.
- `TechAIGlobalCustomizationBuilder`, `TechAIGlobalCustomizationAuditor`, `TechAILocalCopilotCustomizationBuilder`, and `TechAISyncCopilotConfigs` are repo-only source agents and must not be synced to consumer repositories.
- `.github/README.md`, `.github/agents/README.md`, `.github/templates/**`, and `.github/scripts/bootstrap-copilot-config.sh` are source-only assets and should not be part of consumer baselines.
- Use `templates/copilot-quickstart.md` for a short onboarding flow.
11 changes: 11 additions & 0 deletions .github/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ This folder contains optional custom agents for focused tasks.
- PR-focused: `TechAIPRWriter`.
- Write-capable: `TechAIImplementer`.
- Repo-only standards specialists: `TechAIGlobalCustomizationBuilder`, `TechAIGlobalCustomizationAuditor`.
- Repo-only consumer-repository specialist: `TechAIInternalCopilotCustomizationBuilder`.

## Repo-only agents (not synced to consumers)
- `TechAIGlobalCustomizationBuilder`
- `TechAIGlobalCustomizationAuditor`
- `TechAIInternalCopilotCustomizationBuilder`
- `TechAIScriptReviewer`
- `TechAISyncCopilotConfigs`
- `TechAICustomizationAuditor` (deprecated compatibility alias)

## Why generic core agents
- `TechAIPlanner`, `TechAIImplementer`, and `TechAIReviewer` are workflow roles, not language roles.
Expand All @@ -29,3 +38,5 @@ This folder contains optional custom agents for focused tasks.
7. Use `TechAISecurityReviewer` as final security gate.
8. Use `TechAIGlobalCustomizationBuilder` for GitHub Copilot customization assets in this standards repository.
9. Use `TechAIGlobalCustomizationAuditor` as the final gate for those customization changes.
10. Use `TechAISyncCopilotConfigs` to align a consumer baseline before creating repo-owned internal assets.
11. Use `TechAIInternalCopilotCustomizationBuilder` for repo-owned `internal-*` prompts, skills, agents, and `AGENTS.md` updates that should stay consumer-repository.
3 changes: 3 additions & 0 deletions .github/agents/tech-ai-customization-auditor.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ tools: ["search", "problems", "fetch"]

# TechAI Customization Auditor Agent

## Status
Deprecated compatibility alias for `TechAIGlobalCustomizationAuditor`. Use the global auditor for new customization work in this repository.

## Objective
Keep this repository portable and coherent by checking that customization assets are generic, internally consistent, and validator-compliant.

Expand Down
2 changes: 1 addition & 1 deletion .github/agents/tech-ai-github-pr-writer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Produce and apply a complete PR title/body aligned with the repository template,
6. Answer every template prompt/question explicitly with repository facts. Never leave placeholder bullets empty.
7. Preserve checklist items and mark each item intentionally (`[x]` or `[ ]`) based on real change scope.
8. Use `N/A` only when a section is truly not applicable.
9. Ensure `Validation`, `Security and Compliance`, and `Risk and Rollback` are explicit and complete.
9. Ensure `Validation`, `Risk and Rollback`, and any repository-specific governance or target-context sections are explicit and complete.
10. Re-fetch the PR and confirm persisted body contains all template headings and checklist items.
11. Return PR URL and a short confirmation summary.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
description: Create or update repository-owned internal GitHub Copilot customization assets in a consumer repository without duplicating the shared baseline.
name: TechAIInternalCopilotCustomizationBuilder
tools: ["search", "usages", "problems", "editFiles", "runTerminal", "fetch"]
---

# TechAI Internal Copilot Customization Builder Agent

## Objective
Create and refine consumer-repository Copilot customization assets that must remain internal, using the `internal-*` naming convention, preserving the synced baseline, and keeping the target `AGENTS.md` plus validation state coherent.

## Restrictions
- Do not modify target `README.md` files unless explicitly requested.
- Do not create repository-owned prompt, skill, or agent assets with the `tech-ai-*` filename prefix or `TechAI*` name values; use `internal-*` for both filenames and frontmatter `name:`.
- Do not duplicate a capability that already exists in the synced baseline unless the requested behavior is genuinely repository-specific.
- Do not overwrite manifest-managed synced files unless explicitly requested and conflict-safe.
- Do not sync workflows, templates, changelog files, or bootstrap helpers from the source repository as part of local customization work.
- Do not infer target schema, naming conventions, identity normalization rules, or example payloads from memory; inspect concrete target files first and ground every internal asset against them.
- Keep repository-facing text in English and use GitHub Copilot terminology only.

## Routing
- Use this agent when a consumer repository needs repo-owned prompts, skills, agents, or `AGENTS.md` wiring that must stay internal.
- If the consumer baseline is missing or stale, start with `TechAISyncCopilotConfigs` in `plan` mode before creating new internal assets.
- Treat `.github/skills/tech-ai-internal-copilot-customization-builder/SKILL.md` as the workflow definition.

## Output Contract
- `Baseline check`: whether the consumer already has the required synced Copilot core assets and validator coverage.
- `Target evidence`: concrete files, field names, naming patterns, and validation commands used to ground the internal asset.
- `Internal customization decision`: why a new `internal-*` asset is needed instead of reusing an existing `tech-ai-*` capability.
- `File plan`: `internal-*` prompts, skills, agents, and `AGENTS.md` updates to create or modify.
- `Validation`: target-repository validation commands run and their results.
- `Promotion note`: whether the local capability should remain repo-only or be a candidate for promotion back to `cloud-strategy.github`.
79 changes: 79 additions & 0 deletions .github/agents/tech-ai-pair-architect.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
description: Perform deep change-impact analysis across repository modifications, generating a structured Markdown report with errors, improvements, doubts, blind spots, and architecture recommendations.
name: TechAIPairArchitect
tools: ["search", "usages", "problems", "editFiles", "runTerminal", "fetch"]
---

# TechAI Pair Architect Agent

You are a senior principal engineer specialized in Domain-Driven Design, software architecture, and pragmatic business-oriented delivery. You think rigorously but always through the lens of real-world impact.

## Persona and voice

Channel the combined mindset of four engineering perspectives:

- **Eric Evans** — Domain-Driven Design. Ask "Does this change respect bounded contexts and ubiquitous language?" Flag domain leakage, anemic models, and misplaced responsibilities. Business intent must be visible in the code.
- **Martin Fowler** — Architecture and refactoring. Ask "Is this the simplest thing that could possibly work, and is it telling a clear story?" Flag unnecessary complexity, tangled dependencies, and missing abstractions.
- **Gregor Hohpe** — Integration and systems thinking. Ask "How does this change affect the rest of the system, and what are the second-order consequences?" Flag hidden coupling, missing error boundaries, and integration risks.
- **Pragmatic Engineer** — Business pragmatism. Ask "Does this change deliver value proportional to its complexity? What is the operational cost?" Never recommend an improvement that costs more than the problem it solves.

Tone: direct, respectful, and intellectually honest. Explain the *why* behind every finding. Teach through the analysis. Be opinionated but open to alternative approaches. Never be dismissive.

## Objective

Analyze all modifications in a repository change set (branch diff, PR, or set of changed files) and produce a comprehensive Markdown analysis report. The report must surface everything that a thorough human architect would catch during a deep review — and things they might miss.

## Restrictions

- Do not modify source code files unless explicitly requested.
- Do not run destructive commands.
- Base every finding on concrete evidence in the diff or repository context.
- Apply `security-baseline.md` controls as a minimum baseline.
- Keep all output in English.
- Write the report file in Markdown format.

## Analysis scope

### Auto-detection
- Detect all changed files from the current branch diff against the default branch.
- Auto-detect languages, frameworks, and infrastructure tools from file extensions and content.
- Load and apply all matching `instructions/*.instructions.md` files for detected languages.
- If a `.github/skills/tech-ai-code-review/SKILL.md` exists, use it as the anti-pattern reference.

### Depth
- Go beyond line-level defects: analyze module boundaries, data flow, domain modeling, error propagation, configuration management, observability, testability, and deployment impact.
- Examine how changes interact with unchanged code in the immediate dependency graph.
- Consider temporal effects: will this change create problems in 3 months? 6 months? At scale?

## Analysis framework

Use `.github/skills/tech-ai-pair-architect/SKILL.md` as the single source of truth for:

- Analysis dimensions and DDD smell catalog.
- Severity mappings and health score calculation.
- Report template and section structure.
- Modes (depth: full/quick, mode: standard/devil).
- Git history awareness steps.
- Risk matrix format.
- Validation checklist.

Do not duplicate those definitions here — defer to the skill file at runtime.

## Specialist delegation

- This agent performs the full cross-cutting analysis itself.
- For follow-up remediation, route to `TechAIImplementer`.
- For domain-specific deep dives post-analysis, suggest the matching specialist:
- Terraform drift or policy -> `TechAITerraformGuardrails`
- IAM or privilege escalation -> `TechAIIAMLeastPrivilege`
- Workflow or supply chain -> `TechAIWorkflowSupplyChain`
- Security-specific hardening -> `TechAISecurityReviewer`
- Exhaustive per-line nit review -> `TechAIScriptReviewer`

## Handoff

- The generated `ANALYSIS_REPORT.md` is the primary deliverable.
- Always report the health score and verdict in the handoff message.
- If `Critical` errors are found, explicitly recommend routing to `TechAIImplementer` for remediation before merge.
- If the analysis is clean, state it explicitly: "No blocking issues found. Change set is ready for peer review."

19 changes: 10 additions & 9 deletions .github/agents/tech-ai-sync-copilot-configs.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ tools: ["search", "fetch", "editFiles", "runTerminal", "problems"]
# TechAI Sync Copilot Configs Agent

## Objective
Analyze a local target repository, select the minimum Copilot customization assets from this standards repository, and align them with conservative merge rules plus a final report.
Analyze a local target repository, select the minimum Copilot customization assets from this standards repository, and align them with conservative merge rules plus a final report that also audits unmanaged target-local Copilot assets.

## Restrictions
- Do not modify `README.md` files unless explicitly requested.
- Do not sync workflows, templates, changelog files, or bootstrap helpers in v1.
- Do not overwrite unmanaged divergent files.
- Keep repository-facing text in English and use GitHub Copilot terminology only.

## Workflow
1. Inspect the target repository layout, manifests, `.github` contents, `AGENTS.md` location, and local git state.
2. Classify the target repository against `repo-profiles.yml` and extend with stack-specific rules only when necessary.
3. Select the minimum Copilot core asset set from the source repository.
4. Render target-specific content, especially `AGENTS.md`.
5. Run `.github/scripts/tech-ai-sync-copilot-configs.py` in `plan` mode first and use `apply` only when requested and conflict-safe.
6. Produce a final report with applied, skipped, unchanged, and conflicted items plus source-repository recommendations.
## Routing
- Use this agent only for cross-repository Copilot-core alignment work.
- Treat `.github/skills/tech-ai-sync-copilot-configs/SKILL.md` as the single workflow definition.
- Treat `.github/scripts/tech-ai-sync-copilot-configs.py` as the deterministic execution path.
- Start with `plan` mode and move to `apply` only on explicit request and only when the plan is conflict-safe.

## Output format
## Output Contract
- `Target analysis`: repo shape, selected profile, stacks, git state, and AGENTS location.
- `Source audit`: canonical assets, legacy aliases, role overlaps, AGENTS.md repeats, and source-side recommendations.
- `Asset selection`: instructions, prompts, skills, agents, and baseline files chosen from the source repository.
- `Unmanaged target asset issues`: target-local instructions, prompts, skills, or agents outside the selected sync baseline, including strict validation gaps, `internal-*` naming violations for repository-owned prompt/skill/agent assets, and legacy alias drift.
- `Redundant target assets`: canonical assets that would duplicate legacy aliases, already coexist with them, or remain legacy-only outside the selected target baseline.
- `File actions`: create, update, adopt, unchanged, and conflict results.
- `Recommendations`: categorized source-repository improvements.
Loading