Skip to content

weslleycapelari/github-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Patterns Marketplace

Production-grade marketplace for repository governance assets, Copilot agents, issue strategy templates, and CI baselines.

Designed to bootstrap and evolve repositories with the GitHub 100% governance model—from collaboration setup to security and AI-assisted operations.

Table of Contents

Overview

GitHub Patterns Marketplace provides reusable, composable assets to standardize repository operations.

Primary goals:

  • Accelerate onboarding with consistent governance defaults.
  • Improve maintainability through structured templates and machine-readable metadata.
  • Enable AI-assisted repository management using specialized Copilot agents.
  • Keep the system language-agnostic while supporting stack-aware recommendations.

Quick Start

New here? Start with Option 1 for fastest onboarding, then use Option 2 for fine-grained customization.

Option 1: Copilot Chat Bootstrap

Use this prompt in Copilot Chat:

Act as Repo Architect (setup-orchestrator).
Use:
- https://raw.githubusercontent.com/weslleycapelari/github-patterns/main/agents/setup-orchestrator.agent.md
- https://raw.githubusercontent.com/weslleycapelari/github-patterns/main/registry.json
Start onboarding and ask the intake form.

Option 2: Manual Asset Installation

  1. Inspect desired assets in registry.json.
  2. Resolve source paths using endpoint_base + path.
  3. Copy files to target destinations in your repository.
  4. Commit with a setup-oriented message, for example:
chore(setup): apply github-patterns baseline

Core Concepts

The marketplace is driven by two source-of-truth files:

  • registry.json: catalog of assets, stacks, governance phases, and paths.
  • docs/schemas/registry.schema.json: JSON Schema used to validate registry structure.

Automation agents should resolve assets from registry metadata and avoid hardcoded paths.

What Is Included

Agents

  • Repo Architect: orchestrates phase-by-phase repository setup.
  • Agent Factory: generates high-quality specialist agents.
  • Issue Ops Architect: maps team maturity to issue template strategy.

Baseline Assets

  • Copilot instruction baseline.
  • CONTRIBUTING baseline.
  • CI workflow baseline.

Issue Template Strategies

  • minimalist
  • open-source
  • agile-scrum
  • kanban-devops
  • enterprise-safe
  • shape-up

Governance Phases (A–E)

The GitHub 100% governance model is represented in registry core phases:

  • Phase A, Collaboration Base: contribution baseline and issue operations foundation.
  • Phase B, Merge Governance: repository-level governance orchestration.
  • Phase C, CI/CD and Quality: workflow baseline with linting and conditional tests.
  • Phase D, Advanced Security: governance-ready foundation for security controls.
  • Phase E, Intelligence and MCP: Copilot instructions and agent-driven operations.

Issue Strategy Catalog

Each strategy is optimized for a different operating model:

  • minimalist: fast, low-friction issue flow for solo or MVP projects.
  • open-source: stronger triage and duplicate prevention for communities.
  • agile-scrum: stories, tasks, epics, and definition-of-done discipline.
  • kanban-devops: continuous delivery with incident and RFC support.
  • enterprise-safe: compliance, auditability, and security remediation workflows.
  • shape-up: appetite-based planning with pitches, scopes, and rabbit-hole handling.

Registry and Schema

Files

  • registry.json
  • docs/schemas/registry.schema.json

Validation

Use a JSON Schema validator compatible with draft 2020-12.

Example using Python:

python - <<'PY'
import json
from jsonschema import Draft202012Validator

with open('registry.json', encoding='utf-8') as f:
    data = json.load(f)
with open('docs/schemas/registry.schema.json', encoding='utf-8') as f:
    schema = json.load(f)

Draft202012Validator(schema).validate(data)
print('VALID')
PY

Validation and Quality Checks

Recommended checks before release:

  1. Validate registry against schema.
  2. Verify YAML syntax for all issue templates and workflows.
  3. Confirm each registry path maps to an existing file.
  4. Ensure all agents and user-facing docs are internally consistent.

Real-World Scenarios

Use the scenario indexes below for quick access:

Scenario 1: High-Performance E-Commerce (Laravel + Vue.js 3)

Description: Marketplace with shopping cart, inventory management, and secure checkout.

Technical context: Modular monolith with Laravel 11, Service Layer, Vue 3 Composition API, PostgreSQL with query-level optimization via specialist subagents.

Requirements: Sanctum auth, Pinia state management, FormRequest validation, Pest + Vitest test coverage, N+1 and XSS protection.

Step-by-step documentation:

Extended MVP prompt pack (Laravel 13.8 + Blade/Alpine variant):

Note: Scenario 1 base context remains Laravel + Vue.js 3. The extended pack documents an alternate Blade-first storefront execution track.

Scenario 2: Hotel Reservation System (Python + FastAPI)

Description: Room booking platform with real-time availability and payment integration.

Technical context: Python 3.11, FastAPI, SQLAlchemy, Alembic migrations, OpenAPI documentation.

Requirements: Layered architecture (Schemas, Models, CRUD, Endpoints), 100% type hints, transaction-safe concurrency, CI quality gates.

Step-by-step documentation:

Extended prompt pack:

Note: the original Scenario 2 centers on onboarding, branch protection, and audit. The extended pack adds an implementation-and-quality track.

Scenario 3: Enterprise Admin Panel (React + TypeScript)

Description: Corporate data dashboard with multi-level access control and data compliance.

Technical context: React 18, TypeScript, Tailwind CSS Design System, React Query, performance monitoring.

Requirements: Phase D (Advanced Security) for PII protection, WCAG 2.2 accessibility, ADR documentation, conventional commit enforcement.

Step-by-step documentation:

Extended prompt pack:

Note: the original Scenario 3 centers on onboarding, specialist-agent creation, and performance-aware component development. The extended pack adds design-system, security, accessibility, and operational-quality tracks.

AI Operating Model

This repository uses a mandatory AI-first workflow for non-trivial changes.

  • Core instructions: .github/copilot-instructions.md
  • Specialized governance agents: .github/agents/
  • Operational prompts: .github/prompts/
  • Error and observability standards: .github/standards/

Required cycle:

  1. Develop with a specialist subagent.
  2. Review with an independent subagent.
  3. Improve and re-validate.

No substantial artifact change should skip the review phase.

Extending the Marketplace

How to add assets and issue strategies

When adding a new asset:

  1. Add the file under the correct folder.
  2. Register it in registry.json under the appropriate assets section.
  3. Update stack recommendations and/or phase mappings if applicable.
  4. Update schema only if structure changes.
  5. Re-run validation checks.

When adding a new issue strategy:

  1. Create strategy folder and config.yml.
  2. Add templates with consistent field semantics.
  3. Register strategy metadata in assets.issue_strategies.
  4. Document expected use case in docs.

Repository Structure

Reference tree
.github/
agents/
docs/
  en/
  pt-br/
  schemas/
library/
  github-baseline/
    issue-templates/
    workflows/
registry.json
README.md

Contributing

Contributions are welcome for:

  • New governance assets.
  • Improved templates for better human and AI usability.
  • Additional stack recommendations.
  • Registry/schema hardening and automation.

Please open issues and pull requests with clear scope, rationale, and validation evidence.

Roadmap

Planned improvements
  • Expanded Phase D security asset catalog.
  • Optional CD deployment baselines.
  • Automated registry path integrity checks in CI.
  • Additional language-specific setup playbooks.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors