claude-code-orchestrator-kit 1.4.0 → 1.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/business/workers/lead-research-assistant.md +199 -0
- package/.claude/agents/database/workers/database-architect.md +3 -3
- package/.claude/agents/database/workers/supabase-auditor.md +7 -7
- package/.claude/agents/development/workers/code-reviewer.md +17 -2
- package/.claude/agents/frontend/workers/nextjs-ui-designer.md +30 -0
- package/.claude/agents/health/workers/bug-fixer.md +31 -2
- package/.claude/agents/health/workers/bug-hunter.md +0 -1
- package/.claude/agents/health/workers/dead-code-hunter.md +167 -75
- package/.claude/agents/health/workers/dead-code-remover.md +217 -66
- package/.claude/agents/health/workers/dependency-auditor.md +83 -24
- package/.claude/agents/health/workers/dependency-updater.md +0 -1
- package/.claude/agents/health/workers/security-scanner.md +0 -1
- package/.claude/agents/infrastructure/workers/deployment-engineer.md +446 -0
- package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +2 -2
- package/.claude/agents/meta/workers/meta-agent-v3.md +22 -0
- package/.claude/agents/testing/workers/integration-tester.md +1 -1
- package/.claude/agents/testing/workers/test-writer.md +16 -0
- package/.claude/commands/health-bugs.md +14 -281
- package/.claude/commands/health-cleanup.md +14 -281
- package/.claude/commands/health-deps.md +14 -281
- package/.claude/commands/health-metrics.md +51 -709
- package/.claude/commands/health-reuse.md +14 -311
- package/.claude/commands/health-security.md +14 -281
- package/.claude/commands/push.md +17 -3
- package/.claude/commands/speckit.implement.md +0 -11
- package/.claude/commands/speckit.taskstoissues.md +95 -5
- package/.claude/commands/worktree.md +150 -0
- package/.claude/scripts/gates/check-bundle-size.sh +0 -0
- package/.claude/scripts/gates/check-coverage.sh +0 -0
- package/.claude/scripts/gates/check-security.sh +0 -0
- package/.claude/scripts/release.sh +469 -94
- package/.claude/skills/algorithmic-art/LICENSE.txt +202 -0
- package/.claude/skills/algorithmic-art/SKILL.md +405 -0
- package/.claude/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/.claude/skills/algorithmic-art/templates/viewer.html +599 -0
- package/.claude/skills/artifacts-builder/LICENSE.txt +202 -0
- package/.claude/skills/artifacts-builder/SKILL.md +74 -0
- package/.claude/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/.claude/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
- package/.claude/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/.claude/skills/bug-health-inline/SKILL.md +221 -0
- package/.claude/skills/bug-health-inline/references/worker-prompts.md +182 -0
- package/.claude/skills/canvas-design/LICENSE.txt +202 -0
- package/.claude/skills/canvas-design/SKILL.md +130 -0
- package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/.claude/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/.claude/skills/changelog-generator/SKILL.md +104 -0
- package/.claude/skills/cleanup-health-inline/SKILL.md +224 -0
- package/.claude/skills/code-reviewer/SKILL.md +209 -0
- package/.claude/skills/code-reviewer/references/code_review_checklist.md +103 -0
- package/.claude/skills/code-reviewer/references/coding_standards.md +103 -0
- package/.claude/skills/code-reviewer/references/common_antipatterns.md +103 -0
- package/.claude/skills/code-reviewer/scripts/code_quality_checker.py +114 -0
- package/.claude/skills/code-reviewer/scripts/pr_analyzer.py +114 -0
- package/.claude/skills/code-reviewer/scripts/review_report_generator.py +114 -0
- package/.claude/skills/content-research-writer/SKILL.md +538 -0
- package/.claude/skills/deps-health-inline/SKILL.md +227 -0
- package/.claude/skills/frontend-aesthetics/SKILL.md +51 -396
- package/.claude/skills/git-commit-helper/SKILL.md +203 -0
- package/.claude/skills/lead-research-assistant/SKILL.md +199 -0
- package/.claude/skills/reuse-health-inline/SKILL.md +248 -0
- package/.claude/skills/rollback-changes/SKILL.md +50 -524
- package/.claude/skills/run-quality-gate/SKILL.md +36 -346
- package/.claude/skills/security-health-inline/SKILL.md +224 -0
- package/.claude/skills/senior-devops/SKILL.md +209 -0
- package/.claude/skills/senior-devops/references/cicd_pipeline_guide.md +103 -0
- package/.claude/skills/senior-devops/references/deployment_strategies.md +103 -0
- package/.claude/skills/senior-devops/references/infrastructure_as_code.md +103 -0
- package/.claude/skills/senior-devops/scripts/deployment_manager.py +114 -0
- package/.claude/skills/senior-devops/scripts/pipeline_generator.py +114 -0
- package/.claude/skills/senior-devops/scripts/terraform_scaffolder.py +114 -0
- package/.claude/skills/senior-prompt-engineer/SKILL.md +226 -0
- package/.claude/skills/senior-prompt-engineer/references/agentic_system_design.md +80 -0
- package/.claude/skills/senior-prompt-engineer/references/llm_evaluation_frameworks.md +80 -0
- package/.claude/skills/senior-prompt-engineer/references/prompt_engineering_patterns.md +80 -0
- package/.claude/skills/senior-prompt-engineer/scripts/agent_orchestrator.py +100 -0
- package/.claude/skills/senior-prompt-engineer/scripts/prompt_optimizer.py +100 -0
- package/.claude/skills/senior-prompt-engineer/scripts/rag_evaluator.py +100 -0
- package/.claude/skills/setup-knip/SKILL.md +372 -0
- package/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/.claude/skills/systematic-debugging/SKILL.md +296 -0
- package/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
- package/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/.claude/skills/systematic-debugging/test-academic.md +14 -0
- package/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/.claude/skills/theme-factory/LICENSE.txt +202 -0
- package/.claude/skills/theme-factory/SKILL.md +59 -0
- package/.claude/skills/theme-factory/theme-showcase.pdf +0 -0
- package/.claude/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/.claude/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/.claude/skills/theme-factory/themes/desert-rose.md +19 -0
- package/.claude/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/.claude/skills/theme-factory/themes/golden-hour.md +19 -0
- package/.claude/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/.claude/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/.claude/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/.claude/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/.claude/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/.claude/skills/ui-design-system/SKILL.md +32 -0
- package/.claude/skills/ui-design-system/scripts/design_token_generator.py +529 -0
- package/.claude/skills/ux-researcher-designer/SKILL.md +30 -0
- package/.claude/skills/ux-researcher-designer/scripts/persona_generator.py +508 -0
- package/.claude/skills/webapp-testing/LICENSE.txt +202 -0
- package/.claude/skills/webapp-testing/SKILL.md +96 -0
- package/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
- package/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
- package/.gitignore +4 -0
- package/README.md +492 -1093
- package/README.ru.md +719 -0
- package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +2 -2
- package/docs/{SPECKIT-GUIDE.md → COMMANDS-GUIDE.md} +252 -20
- package/docs/reports/skills/new-skills-analysis-2025-12.md +331 -0
- package/package.json +11 -3
- package/.claude/agents/health/orchestrators/bug-orchestrator.md +0 -1084
- package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +0 -1064
- package/.claude/agents/health/orchestrators/dependency-orchestrator.md +0 -1064
- package/.claude/agents/health/orchestrators/reuse-orchestrator.md +0 -1112
- package/.claude/agents/health/orchestrators/security-orchestrator.md +0 -1064
- package/.claude/commands/worktree-cleanup.md +0 -382
- package/.claude/commands/worktree-create.md +0 -287
- package/.claude/commands/worktree-list.md +0 -239
- package/.claude/commands/worktree-remove.md +0 -339
- package/.claude/project-index.md +0 -75
- package/.claude/skills/load-project-context/SKILL.md +0 -89
- package/.claude/skills/resume-session/SKILL.md +0 -164
- package/.claude/skills/save-session-context/SKILL.md +0 -123
- package/.claude/templates/project-index.template.md +0 -67
- package/.claude/templates/session/context.template.md +0 -40
- package/.claude/templates/session/log.template.md +0 -72
- package/.github/BRANCH_PROTECTION.md +0 -137
- package/.github/workflows/build.yml +0 -70
- package/.github/workflows/deploy-staging.yml +0 -90
- package/.github/workflows/test.yml +0 -104
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: load-project-context
|
|
3
|
-
description: Load project structure and navigation for complex tasks. Use when exploring unfamiliar parts of codebase or starting complex multi-file tasks.
|
|
4
|
-
trigger: When exploring unfamiliar code areas, planning complex features, or needing project structure overview
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Load Project Context
|
|
8
|
-
|
|
9
|
-
Loads the project index file to understand project structure without reading the entire codebase.
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
- Before exploring unfamiliar parts of the codebase
|
|
14
|
-
- When planning complex multi-file changes
|
|
15
|
-
- When you need to understand where specific functionality lives
|
|
16
|
-
- At the start of complex orchestrator workflows
|
|
17
|
-
|
|
18
|
-
## When NOT to Use
|
|
19
|
-
|
|
20
|
-
- For simple, single-file tasks
|
|
21
|
-
- When you already know the file locations
|
|
22
|
-
- For trivial bug fixes
|
|
23
|
-
|
|
24
|
-
## Algorithm
|
|
25
|
-
|
|
26
|
-
1. Check if `.claude/project-index.md` exists
|
|
27
|
-
2. If exists:
|
|
28
|
-
- Read the file
|
|
29
|
-
- Return the content for agent consumption
|
|
30
|
-
3. If not exists:
|
|
31
|
-
- Inform that project index is not configured
|
|
32
|
-
- Suggest creating one from template
|
|
33
|
-
|
|
34
|
-
## Implementation
|
|
35
|
-
|
|
36
|
-
```markdown
|
|
37
|
-
### Step 1: Check for project index
|
|
38
|
-
|
|
39
|
-
Read the file `.claude/project-index.md`
|
|
40
|
-
|
|
41
|
-
### Step 2: If file exists
|
|
42
|
-
|
|
43
|
-
Return the full content. The agent should use this to:
|
|
44
|
-
- Understand project structure
|
|
45
|
-
- Identify key directories for the task
|
|
46
|
-
- Find relevant patterns and conventions
|
|
47
|
-
|
|
48
|
-
### Step 3: If file does not exist
|
|
49
|
-
|
|
50
|
-
Return this message:
|
|
51
|
-
"Project index not found. To create one:
|
|
52
|
-
1. Copy `.claude/templates/project-index.template.md` to `.claude/project-index.md`
|
|
53
|
-
2. Customize for your project structure
|
|
54
|
-
3. Keep under 150 lines for token efficiency"
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Output Format
|
|
58
|
-
|
|
59
|
-
The skill returns the project index content directly, which includes:
|
|
60
|
-
- Architecture overview with links
|
|
61
|
-
- Core domains with key directories
|
|
62
|
-
- Patterns and conventions
|
|
63
|
-
- Recent changes
|
|
64
|
-
|
|
65
|
-
## Token Cost
|
|
66
|
-
|
|
67
|
-
- File read: ~100-200 tokens (if index is well-maintained at <150 lines)
|
|
68
|
-
- No additional processing overhead
|
|
69
|
-
|
|
70
|
-
## Example Usage
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
Agent: I need to understand where authentication is handled in this project.
|
|
74
|
-
|
|
75
|
-
[Invokes load-project-context skill]
|
|
76
|
-
|
|
77
|
-
Skill returns project-index.md content showing:
|
|
78
|
-
- Auth pattern: "Supabase Auth + RLS policies"
|
|
79
|
-
- Key directory: "packages/api/src/middleware/" for auth middleware
|
|
80
|
-
|
|
81
|
-
Agent now knows exactly where to look without scanning entire codebase.
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Maintenance
|
|
85
|
-
|
|
86
|
-
The project index should be updated:
|
|
87
|
-
- When major architectural changes occur
|
|
88
|
-
- Weekly for "Recent Changes" section
|
|
89
|
-
- When new domains/packages are added
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: resume-session
|
|
3
|
-
description: Resume a previously saved session by loading context and recent log entries. Use at start of orchestrator workflows to check for existing sessions.
|
|
4
|
-
trigger: At the start of health workflows, or when user asks to continue previous work
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Resume Session
|
|
8
|
-
|
|
9
|
-
Checks for and loads a previously saved session context, enabling seamless workflow continuation.
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
- At the start of health orchestrator workflows (automatic)
|
|
14
|
-
- When user explicitly asks to continue previous work
|
|
15
|
-
- After session restart or context switch
|
|
16
|
-
|
|
17
|
-
## When NOT to Use
|
|
18
|
-
|
|
19
|
-
- For new workflows with no prior context
|
|
20
|
-
- When user explicitly wants to start fresh
|
|
21
|
-
|
|
22
|
-
## Algorithm
|
|
23
|
-
|
|
24
|
-
### Step 1: Check for Existing Session
|
|
25
|
-
|
|
26
|
-
Check if `.tmp/current/session/context.md` exists.
|
|
27
|
-
|
|
28
|
-
### Step 2: Validate Freshness
|
|
29
|
-
|
|
30
|
-
If file exists, check the "Updated" timestamp:
|
|
31
|
-
- If < 24 hours old: Session is valid
|
|
32
|
-
- If > 24 hours old: Session is stale, ask user
|
|
33
|
-
|
|
34
|
-
### Step 3: Load Context
|
|
35
|
-
|
|
36
|
-
Read `.tmp/current/session/context.md` and extract:
|
|
37
|
-
- Current workflow and phase
|
|
38
|
-
- Last action and next steps
|
|
39
|
-
- Git state
|
|
40
|
-
- Quality gate status
|
|
41
|
-
|
|
42
|
-
### Step 4: Load Recent Log Entries
|
|
43
|
-
|
|
44
|
-
Read last 10 entries from `.tmp/current/session/log.md`:
|
|
45
|
-
- Recent decisions
|
|
46
|
-
- Issues encountered
|
|
47
|
-
- Learnings
|
|
48
|
-
|
|
49
|
-
### Step 5: Present Resume Option
|
|
50
|
-
|
|
51
|
-
If valid session found, present to user:
|
|
52
|
-
```
|
|
53
|
-
Found previous session:
|
|
54
|
-
- Workflow: health-bugs
|
|
55
|
-
- Phase: 3/7 (Staged Fixing)
|
|
56
|
-
- Last action: Fixed auth validation
|
|
57
|
-
- Age: 2 hours ago
|
|
58
|
-
|
|
59
|
-
Options:
|
|
60
|
-
1. Resume from where you left off
|
|
61
|
-
2. Start fresh (archive current session)
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Step 6: On Resume
|
|
65
|
-
|
|
66
|
-
Return combined context for orchestrator to continue:
|
|
67
|
-
```markdown
|
|
68
|
-
## Resuming Session
|
|
69
|
-
|
|
70
|
-
### Current State
|
|
71
|
-
[Content from context.md]
|
|
72
|
-
|
|
73
|
-
### Recent Decisions
|
|
74
|
-
[Last 5 entries from log.md]
|
|
75
|
-
|
|
76
|
-
### Next Actions
|
|
77
|
-
[From context.md Next Steps section]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Step 7: On Start Fresh
|
|
81
|
-
|
|
82
|
-
If user chooses fresh start:
|
|
83
|
-
1. Move current session files to `.tmp/archive/session-[timestamp]/`
|
|
84
|
-
2. Return empty context
|
|
85
|
-
3. Orchestrator starts Phase 1
|
|
86
|
-
|
|
87
|
-
## Implementation
|
|
88
|
-
|
|
89
|
-
```markdown
|
|
90
|
-
### Check session exists
|
|
91
|
-
|
|
92
|
-
Read `.tmp/current/session/context.md`
|
|
93
|
-
|
|
94
|
-
If not found:
|
|
95
|
-
Return "No previous session found. Starting fresh."
|
|
96
|
-
|
|
97
|
-
### Validate timestamp
|
|
98
|
-
|
|
99
|
-
Extract "Updated: YYYY-MM-DDTHH:MM:SS" from file
|
|
100
|
-
Calculate age in hours
|
|
101
|
-
|
|
102
|
-
If age > 24:
|
|
103
|
-
Ask user: "Session is [X] hours old. Resume or start fresh?"
|
|
104
|
-
|
|
105
|
-
### Load and return
|
|
106
|
-
|
|
107
|
-
Read context.md fully
|
|
108
|
-
Read last 500 lines of log.md (covers ~10 entries)
|
|
109
|
-
Return combined content
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Output Format
|
|
113
|
-
|
|
114
|
-
### When session found:
|
|
115
|
-
```
|
|
116
|
-
Previous session found:
|
|
117
|
-
- Workflow: health-bugs
|
|
118
|
-
- Phase: 3/7 (Staged Fixing)
|
|
119
|
-
- Age: 2h 15m
|
|
120
|
-
- Last: Fixed auth validation in src/auth.ts
|
|
121
|
-
|
|
122
|
-
Resume? [Y/n]
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### When no session:
|
|
126
|
-
```
|
|
127
|
-
No previous session found. Starting fresh workflow.
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### When stale:
|
|
131
|
-
```
|
|
132
|
-
Found stale session (26 hours old):
|
|
133
|
-
- Workflow: health-security
|
|
134
|
-
- Phase: 2/5
|
|
135
|
-
|
|
136
|
-
[R]esume anyway, [A]rchive and start fresh, or [C]ancel?
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Token Cost
|
|
140
|
-
|
|
141
|
-
- Context read: ~100-150 tokens
|
|
142
|
-
- Log read (last 10 entries): ~200-300 tokens
|
|
143
|
-
- Total: ~300-450 tokens (only when resuming)
|
|
144
|
-
|
|
145
|
-
## Related Skills
|
|
146
|
-
|
|
147
|
-
- `save-session-context` — Save current state for later
|
|
148
|
-
- `load-project-context` — Load project structure
|
|
149
|
-
|
|
150
|
-
## Integration with Orchestrators
|
|
151
|
-
|
|
152
|
-
Health orchestrators should call this skill in Phase 0:
|
|
153
|
-
|
|
154
|
-
```markdown
|
|
155
|
-
## Phase 0: Session Check
|
|
156
|
-
|
|
157
|
-
1. Invoke `resume-session` skill
|
|
158
|
-
2. If valid session:
|
|
159
|
-
- Ask user: Resume or fresh?
|
|
160
|
-
- If resume: Jump to saved phase
|
|
161
|
-
3. If no session:
|
|
162
|
-
- Proceed to Phase 1
|
|
163
|
-
4. Create new session context
|
|
164
|
-
```
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: save-session-context
|
|
3
|
-
description: Save current session state for later resumption. Use after completing workflow phases or before ending a session.
|
|
4
|
-
trigger: After completing a workflow phase, before session end, or when switching to different task
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Save Session Context
|
|
8
|
-
|
|
9
|
-
Saves the current workflow state to enable seamless session resumption.
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
- After completing each phase in health orchestrator workflows
|
|
14
|
-
- Before ending a long-running session
|
|
15
|
-
- When switching context to a different task
|
|
16
|
-
- After significant progress that should be preserved
|
|
17
|
-
|
|
18
|
-
## When NOT to Use
|
|
19
|
-
|
|
20
|
-
- For simple, quick tasks that don't need resumption
|
|
21
|
-
- When workflow is fully complete (clean up instead)
|
|
22
|
-
|
|
23
|
-
## Algorithm
|
|
24
|
-
|
|
25
|
-
### Step 1: Gather Current State
|
|
26
|
-
|
|
27
|
-
Collect the following information:
|
|
28
|
-
- Current workflow name and phase
|
|
29
|
-
- Priority level and completion counts
|
|
30
|
-
- Last completed action
|
|
31
|
-
- List of modified files (from git status)
|
|
32
|
-
|
|
33
|
-
### Step 2: Get Git State
|
|
34
|
-
|
|
35
|
-
Run `git status` and `git log -1` to capture:
|
|
36
|
-
- Current branch
|
|
37
|
-
- Uncommitted files count
|
|
38
|
-
- Last commit hash and message
|
|
39
|
-
|
|
40
|
-
### Step 3: Determine Next Steps
|
|
41
|
-
|
|
42
|
-
Based on current phase and workflow, identify:
|
|
43
|
-
- Immediate next action
|
|
44
|
-
- Following 2-3 actions
|
|
45
|
-
|
|
46
|
-
### Step 4: Write Context File
|
|
47
|
-
|
|
48
|
-
Write to `.tmp/current/session/context.md`:
|
|
49
|
-
|
|
50
|
-
```markdown
|
|
51
|
-
# Session Context
|
|
52
|
-
|
|
53
|
-
> Auto-generated by save-session-context skill. Updated: [ISO timestamp]
|
|
54
|
-
|
|
55
|
-
## Current State
|
|
56
|
-
|
|
57
|
-
- **Workflow:** [workflow-name]
|
|
58
|
-
- **Phase:** [current]/[total] ([phase-name])
|
|
59
|
-
- **Priority:** [priority-level] ([completed] of [total] fixed)
|
|
60
|
-
- **Last Action:** [description]
|
|
61
|
-
|
|
62
|
-
## Active Files
|
|
63
|
-
|
|
64
|
-
[List from git status]
|
|
65
|
-
|
|
66
|
-
## Next Steps
|
|
67
|
-
|
|
68
|
-
1. [Next action]
|
|
69
|
-
2. [Following action]
|
|
70
|
-
3. [Third action]
|
|
71
|
-
|
|
72
|
-
## Git State
|
|
73
|
-
|
|
74
|
-
- **Branch:** [branch-name]
|
|
75
|
-
- **Uncommitted:** [count] files
|
|
76
|
-
- **Last Commit:** [hash] "[message]"
|
|
77
|
-
|
|
78
|
-
## Quality Gate Status
|
|
79
|
-
|
|
80
|
-
- **Type-check:** [status]
|
|
81
|
-
- **Build:** [status]
|
|
82
|
-
- **Tests:** [status]
|
|
83
|
-
|
|
84
|
-
## Resume Instructions
|
|
85
|
-
|
|
86
|
-
To continue this session:
|
|
87
|
-
1. Read this file to understand current state
|
|
88
|
-
2. Read `session-log.md` for recent decisions
|
|
89
|
-
3. Continue from "Next Steps" section
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Step 5: Confirm Save
|
|
93
|
-
|
|
94
|
-
Output confirmation message with file path.
|
|
95
|
-
|
|
96
|
-
## Implementation Notes
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
# Get git state
|
|
100
|
-
git status --porcelain | wc -l # Uncommitted count
|
|
101
|
-
git log -1 --format="%h %s" # Last commit
|
|
102
|
-
git branch --show-current # Current branch
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Output
|
|
106
|
-
|
|
107
|
-
Confirmation message:
|
|
108
|
-
```
|
|
109
|
-
Session context saved to .tmp/current/session/context.md
|
|
110
|
-
- Workflow: health-bugs
|
|
111
|
-
- Phase: 3/7 (Staged Fixing)
|
|
112
|
-
- Uncommitted: 2 files
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Token Cost
|
|
116
|
-
|
|
117
|
-
- Execution: ~50 tokens for git commands
|
|
118
|
-
- Output: 0 (write-only operation)
|
|
119
|
-
|
|
120
|
-
## Related Skills
|
|
121
|
-
|
|
122
|
-
- `resume-session` — Read saved context to continue
|
|
123
|
-
- `run-quality-gate` — Update quality gate status in context
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Project Index
|
|
2
|
-
|
|
3
|
-
> Quick navigation for AI agents. Updated: YYYY-MM-DD
|
|
4
|
-
>
|
|
5
|
-
> **Purpose:** This file helps agents understand project structure without reading entire codebase.
|
|
6
|
-
> **Usage:** Read by `load-project-context` skill when exploring unfamiliar areas.
|
|
7
|
-
|
|
8
|
-
## Architecture
|
|
9
|
-
|
|
10
|
-
- **[ARCHITECTURE.md](docs/ARCHITECTURE.md)** — System design, diagrams, data flow
|
|
11
|
-
- **[CLAUDE.md](CLAUDE.md)** — Behavioral rules, orchestration patterns
|
|
12
|
-
|
|
13
|
-
## Core Domains
|
|
14
|
-
|
|
15
|
-
### [Domain 1 Name]
|
|
16
|
-
- **[path/to/domain/](path/to/domain/)** — Brief description of what this domain does
|
|
17
|
-
- Key: `src/` — Main source code
|
|
18
|
-
- Key: `types/` — TypeScript types and interfaces
|
|
19
|
-
- Pattern: [Describe the main pattern used, e.g., "Repository pattern", "MVC"]
|
|
20
|
-
|
|
21
|
-
### [Domain 2 Name]
|
|
22
|
-
- **[path/to/domain/](path/to/domain/)** — Brief description
|
|
23
|
-
- Key: `components/` — UI components
|
|
24
|
-
- Key: `hooks/` — Custom React hooks
|
|
25
|
-
|
|
26
|
-
## Shared Code
|
|
27
|
-
|
|
28
|
-
- **[packages/shared/](packages/shared/)** — Shared utilities, types, constants
|
|
29
|
-
- Key: `utils/` — Helper functions
|
|
30
|
-
- Key: `types/` — Shared TypeScript types
|
|
31
|
-
|
|
32
|
-
## Configuration
|
|
33
|
-
|
|
34
|
-
- **[.env.example](.env.example)** — Environment variables template
|
|
35
|
-
- **[tsconfig.json](tsconfig.json)** — TypeScript configuration
|
|
36
|
-
- **[package.json](package.json)** — Dependencies and scripts
|
|
37
|
-
|
|
38
|
-
## Patterns & Conventions
|
|
39
|
-
|
|
40
|
-
- **Auth:** [How authentication is implemented]
|
|
41
|
-
- **State:** [State management approach]
|
|
42
|
-
- **Styling:** [CSS/styling approach]
|
|
43
|
-
- **Testing:** [Testing framework and patterns]
|
|
44
|
-
- **Error Handling:** [How errors are handled]
|
|
45
|
-
|
|
46
|
-
## Key Entry Points
|
|
47
|
-
|
|
48
|
-
| Purpose | File | Description |
|
|
49
|
-
|---------|------|-------------|
|
|
50
|
-
| App entry | `src/index.ts` | Main application entry point |
|
|
51
|
-
| API routes | `src/routes/` | All API endpoints |
|
|
52
|
-
| Database | `src/db/` | Database connection and queries |
|
|
53
|
-
|
|
54
|
-
## Recent Changes (last 7 days)
|
|
55
|
-
|
|
56
|
-
- YYYY-MM-DD: [Brief description of change]
|
|
57
|
-
- YYYY-MM-DD: [Brief description of change]
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Usage Notes
|
|
62
|
-
|
|
63
|
-
1. Keep this file under 150 lines
|
|
64
|
-
2. Update "Recent Changes" weekly
|
|
65
|
-
3. Only include KEY directories and files
|
|
66
|
-
4. Annotations should be 1 line max
|
|
67
|
-
5. Link to detailed docs, don't duplicate content
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Session Context
|
|
2
|
-
|
|
3
|
-
> Auto-generated by save-session-context skill. Updated: YYYY-MM-DDTHH:MM:SS
|
|
4
|
-
|
|
5
|
-
## Current State
|
|
6
|
-
|
|
7
|
-
- **Workflow:** [workflow-name]
|
|
8
|
-
- **Phase:** [current]/[total] ([phase-name])
|
|
9
|
-
- **Priority:** [priority-level] ([completed] of [total] [type])
|
|
10
|
-
- **Last Action:** [brief description of last completed action]
|
|
11
|
-
|
|
12
|
-
## Active Files
|
|
13
|
-
|
|
14
|
-
- `path/to/file1.ts` — [status: Modified/Created/Deleted], [not committed/committed]
|
|
15
|
-
- `path/to/file2.ts` — [status], [commit status]
|
|
16
|
-
|
|
17
|
-
## Next Steps
|
|
18
|
-
|
|
19
|
-
1. [Next immediate action]
|
|
20
|
-
2. [Following action]
|
|
21
|
-
3. [Action after that]
|
|
22
|
-
|
|
23
|
-
## Git State
|
|
24
|
-
|
|
25
|
-
- **Branch:** [current-branch-name]
|
|
26
|
-
- **Uncommitted:** [count] files
|
|
27
|
-
- **Last Commit:** [short-hash] "[commit-message]"
|
|
28
|
-
|
|
29
|
-
## Quality Gate Status
|
|
30
|
-
|
|
31
|
-
- **Type-check:** [PASS/FAIL/NOT_RUN]
|
|
32
|
-
- **Build:** [PASS/FAIL/NOT_RUN]
|
|
33
|
-
- **Tests:** [PASS/FAIL/NOT_RUN]
|
|
34
|
-
|
|
35
|
-
## Resume Instructions
|
|
36
|
-
|
|
37
|
-
To continue this session:
|
|
38
|
-
1. Read this file to understand current state
|
|
39
|
-
2. Read `session-log.md` for recent decisions and issues
|
|
40
|
-
3. Continue from "Next Steps" section
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Session Log
|
|
2
|
-
|
|
3
|
-
> Decisions, issues, and learnings from this session.
|
|
4
|
-
> Newest entries at the top.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## YYYY-MM-DDTHH:MM:SS
|
|
9
|
-
|
|
10
|
-
### [Category]: [Brief Title]
|
|
11
|
-
|
|
12
|
-
**Context:** [What were you trying to do]
|
|
13
|
-
|
|
14
|
-
**Issue/Decision:** [What happened or what decision was made]
|
|
15
|
-
|
|
16
|
-
**Resolution:** [How it was resolved or why this decision was made]
|
|
17
|
-
|
|
18
|
-
**Learning:** [Optional - what to remember for future]
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Entry Categories
|
|
23
|
-
|
|
24
|
-
Use these categories for consistency:
|
|
25
|
-
|
|
26
|
-
- **Decision** — Architectural or implementation choice made
|
|
27
|
-
- **Issue** — Problem encountered and how it was solved
|
|
28
|
-
- **Discovery** — Something learned about the codebase
|
|
29
|
-
- **Blocker** — Something that stopped progress (and resolution)
|
|
30
|
-
- **Rollback** — Change that was reverted and why
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Example Entries
|
|
35
|
-
|
|
36
|
-
### 2025-11-27T14:30:00
|
|
37
|
-
|
|
38
|
-
### Decision: Auth validation approach
|
|
39
|
-
|
|
40
|
-
**Context:** Multiple auth checks scattered across codebase
|
|
41
|
-
|
|
42
|
-
**Issue/Decision:** Chose middleware-based approach over per-route validation
|
|
43
|
-
|
|
44
|
-
**Resolution:** Created `authMiddleware.ts` in `src/middleware/`
|
|
45
|
-
|
|
46
|
-
**Learning:** Check existing patterns in `middleware/` before adding new auth logic
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
### 2025-11-27T15:00:00
|
|
51
|
-
|
|
52
|
-
### Issue: TypeScript error after fix
|
|
53
|
-
|
|
54
|
-
**Context:** Fixed auth validation, but broke type inference
|
|
55
|
-
|
|
56
|
-
**Issue/Decision:** Type 'string | undefined' not assignable to 'string'
|
|
57
|
-
|
|
58
|
-
**Resolution:** Added nullish coalescing `?? ''` fallback
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
### 2025-11-27T15:30:00
|
|
63
|
-
|
|
64
|
-
### Blocker: Missing dependency
|
|
65
|
-
|
|
66
|
-
**Context:** Tried to use zod validation
|
|
67
|
-
|
|
68
|
-
**Issue/Decision:** zod not installed in this package
|
|
69
|
-
|
|
70
|
-
**Resolution:** Added to package.json, ran pnpm install
|
|
71
|
-
|
|
72
|
-
**Learning:** Check package.json before using external libraries
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# Branch Protection Rules Configuration
|
|
2
|
-
|
|
3
|
-
**Task**: T088 - Configure branch protection rules for main branch
|
|
4
|
-
**Status**: Configuration instructions (requires GitHub admin access)
|
|
5
|
-
|
|
6
|
-
## Required Configuration
|
|
7
|
-
|
|
8
|
-
Branch protection rules must be configured in GitHub repository settings for the `main` branch.
|
|
9
|
-
|
|
10
|
-
### Access Path
|
|
11
|
-
1. Go to repository Settings
|
|
12
|
-
2. Navigate to Branches → Branch protection rules
|
|
13
|
-
3. Click "Add rule" or edit existing rule for `main`
|
|
14
|
-
|
|
15
|
-
### Required Settings
|
|
16
|
-
|
|
17
|
-
#### 1. Branch Name Pattern
|
|
18
|
-
- Pattern: `main`
|
|
19
|
-
|
|
20
|
-
#### 2. Protect Matching Branches
|
|
21
|
-
Enable the following protections:
|
|
22
|
-
|
|
23
|
-
**Require status checks to pass before merging**
|
|
24
|
-
- ✅ Require status checks to pass before merging
|
|
25
|
-
- ✅ Require branches to be up to date before merging
|
|
26
|
-
- Required status checks:
|
|
27
|
-
- `test / test (20.x)` - Test workflow must pass
|
|
28
|
-
- `build / build (20.x)` - Build workflow must pass
|
|
29
|
-
|
|
30
|
-
**Require pull request reviews before merging**
|
|
31
|
-
- ✅ Require pull request reviews before merging
|
|
32
|
-
- Required number of approvals: 1
|
|
33
|
-
- ✅ Dismiss stale pull request approvals when new commits are pushed
|
|
34
|
-
- ✅ Require review from Code Owners (if CODEOWNERS file exists)
|
|
35
|
-
|
|
36
|
-
**Restrict who can push to matching branches**
|
|
37
|
-
- ✅ Restrict pushes that create matching branches
|
|
38
|
-
- Allowed to push: Repository administrators only
|
|
39
|
-
|
|
40
|
-
**Additional Protections**
|
|
41
|
-
- ✅ Require linear history (prevent merge commits)
|
|
42
|
-
- ✅ Require deployments to succeed before merging (when staging is configured)
|
|
43
|
-
- ❌ Allow force pushes (disabled)
|
|
44
|
-
- ❌ Allow deletions (disabled)
|
|
45
|
-
|
|
46
|
-
#### 3. Rules Applied to Administrators
|
|
47
|
-
- ✅ Include administrators (recommended for consistency)
|
|
48
|
-
|
|
49
|
-
## Validation Checklist
|
|
50
|
-
|
|
51
|
-
After configuration, verify:
|
|
52
|
-
|
|
53
|
-
- [ ] Push to `main` without PR is blocked
|
|
54
|
-
- [ ] PR cannot be merged with failing tests
|
|
55
|
-
- [ ] PR cannot be merged with failing build
|
|
56
|
-
- [ ] PR requires at least 1 approval
|
|
57
|
-
- [ ] Force push to `main` is blocked
|
|
58
|
-
- [ ] Branch deletion is blocked
|
|
59
|
-
|
|
60
|
-
## Testing Branch Protection
|
|
61
|
-
|
|
62
|
-
### Test 1: Direct Push (Should Fail)
|
|
63
|
-
```bash
|
|
64
|
-
# Try to push directly to main (should be blocked)
|
|
65
|
-
git checkout main
|
|
66
|
-
git commit --allow-empty -m "test: direct push"
|
|
67
|
-
git push origin main
|
|
68
|
-
# Expected: Error - branch protection rules prevent direct push
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Test 2: PR Without Approval (Should Block)
|
|
72
|
-
```bash
|
|
73
|
-
# Create feature branch and PR
|
|
74
|
-
git checkout -b test/branch-protection
|
|
75
|
-
git commit --allow-empty -m "test: pr without approval"
|
|
76
|
-
git push origin test/branch-protection
|
|
77
|
-
# Create PR via GitHub UI
|
|
78
|
-
# Try to merge without approval
|
|
79
|
-
# Expected: Merge button disabled until approved
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Test 3: PR With Failing Tests (Should Block)
|
|
83
|
-
```bash
|
|
84
|
-
# Create branch with failing test
|
|
85
|
-
git checkout -b test/failing-tests
|
|
86
|
-
# Modify code to break tests
|
|
87
|
-
git add . && git commit -m "test: failing tests"
|
|
88
|
-
git push origin test/failing-tests
|
|
89
|
-
# Create PR
|
|
90
|
-
# Expected: Status checks fail, merge blocked
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Test 4: Valid PR Flow (Should Succeed)
|
|
94
|
-
```bash
|
|
95
|
-
# Create valid feature branch
|
|
96
|
-
git checkout -b feature/valid-change
|
|
97
|
-
# Make valid changes
|
|
98
|
-
git add . && git commit -m "feat: valid change"
|
|
99
|
-
git push origin feature/valid-change
|
|
100
|
-
# Create PR, wait for tests to pass, get approval
|
|
101
|
-
# Expected: Can merge after all checks pass and approval received
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Automation via GitHub CLI (Alternative)
|
|
105
|
-
|
|
106
|
-
If you prefer to configure via CLI instead of UI:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
# Install GitHub CLI if not already installed
|
|
110
|
-
# https://cli.github.com/
|
|
111
|
-
|
|
112
|
-
# Enable branch protection
|
|
113
|
-
gh api repos/{owner}/{repo}/branches/main/protection \
|
|
114
|
-
--method PUT \
|
|
115
|
-
--field required_status_checks[strict]=true \
|
|
116
|
-
--field required_status_checks[contexts][]=test \
|
|
117
|
-
--field required_status_checks[contexts][]=build \
|
|
118
|
-
--field required_pull_request_reviews[required_approving_review_count]=1 \
|
|
119
|
-
--field required_pull_request_reviews[dismiss_stale_reviews]=true \
|
|
120
|
-
--field restrictions=null \
|
|
121
|
-
--field enforce_admins=true \
|
|
122
|
-
--field allow_force_pushes=false \
|
|
123
|
-
--field allow_deletions=false \
|
|
124
|
-
--field required_linear_history=true
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Notes
|
|
128
|
-
|
|
129
|
-
- **Stage 0 Scope**: Branch protection configuration is documented but may be applied later when repository is actively developed
|
|
130
|
-
- **Production Readiness**: Enable all protections before deploying to production
|
|
131
|
-
- **Team Size**: Adjust approval count based on team size (1 for small teams, 2+ for larger teams)
|
|
132
|
-
|
|
133
|
-
## Status
|
|
134
|
-
|
|
135
|
-
**Implementation Status**: ✅ Documented
|
|
136
|
-
**Configuration Status**: ⏳ Pending (requires repository admin to apply settings)
|
|
137
|
-
**Validation Status**: ⏳ Pending (test after configuration applied)
|