Skip to content

Commit 40a5342

Browse files
committed
refactor: move permanent documentation to docs/ folder and clarify organization policy
BREAKING: Documentation organization has been restructured to enforce a core policy: All permanent documentation is now in docs/ folder, not in .github/ subdirectories. Changes: - Move FILE_ORGANIZATION.md to docs/ (now the central organization reference) - Move COPILOT_TASKS.md to docs/COPILOT_TASKS.md - Move custom-instructions.md to docs/CUSTOM_INSTRUCTIONS.md - Create scripts/README.md documenting build and automation scripts - Update .github/README.md to clarify that permanent docs are in docs/ folder - Update docs/FILE_ORGANIZATION.md with core policy statement and examples Organization principle: .github/ = Infrastructure, configuration, transient work (projects, reports) docs/ = All permanent, versioned documentation tmp/ = Temporary files (no README.md) logs/ = Log files (no README.md) Root folders = Should have README.md describing their purpose Every .github/ subdirectory already has a README.md. Only scripts/ folder in root was missing one - now created. This improves discoverability and ensures documentation is properly versioned with the codebase.
1 parent cab69ad commit 40a5342

File tree

5 files changed

+99
-5
lines changed

5 files changed

+99
-5
lines changed

.github/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,21 @@ This directory contains GitHub-specific configuration files for the {{theme_name
1414
## Contents
1515

1616
- **agents/** - AI agent configurations for automated development tasks
17-
- **chatmodes/** - Custom chat mode configurations for AI assistants
1817
- **instructions/** - Development instructions and guidelines for AI tools
18+
- **projects/** - Active Copilot projects and in-progress work
1919
- **prompts/** - Reusable prompt templates for AI-assisted development
20+
- **reports/** - Completed task reports and validation outcomes
21+
- **schemas/** - JSON schemas and configuration templates
2022
- **workflows/** - GitHub Actions CI/CD workflow definitions
2123

24+
## Documentation
25+
26+
Permanent documentation is stored in the [docs/](../docs/) folder, not here. See:
27+
28+
- [docs/FILE_ORGANIZATION.md](../docs/FILE_ORGANIZATION.md) - File organization guide
29+
- [docs/COPILOT_TASKS.md](../docs/COPILOT_TASKS.md) - Copilot task definitions
30+
- [docs/CUSTOM_INSTRUCTIONS.md](../docs/CUSTOM_INSTRUCTIONS.md) - Custom AI instructions
31+
2232
## Workflows
2333

2434
| Workflow | Description |
File renamed without changes.
File renamed without changes.
Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ date: 2025-12-09
1111

1212
This document explains where different types of files are stored in the block-theme-scaffold repository and the rationale for each location.
1313

14+
## Core Policy: Documentation Location
15+
16+
**🔑 Key Rule:** All permanent documentation must be stored in the `docs/` folder, not in `.github/` subdirectories.
17+
18+
- `.github/` is for infrastructure, configuration, and transient work (projects, reports)
19+
- `docs/` is for permanent, versioned documentation
20+
- `tmp/` and `logs/` do NOT include README.md files
21+
22+
This separation ensures:
23+
24+
- Clear distinction between infrastructure and documentation
25+
- Permanent docs are discoverable and grouped together
26+
- Easier navigation for developers and AI agents
27+
- Reduces cognitive overhead
28+
1429
### Directory Structure Overview
1530

1631
```bash
@@ -23,16 +38,19 @@ block-theme-scaffold/
2338
│ ├── agents/ # Agent specifications and code
2439
│ ├── workflows/ # GitHub Actions CI/CD
2540
│ └── prompts/ # Prompt templates for AI generation
26-
├── docs/ # Permanent documentation
41+
├── docs/ # ⭐ ALL permanent documentation here
42+
│ ├── GOVERNANCE-START-HERE.md # Navigation hub
2743
│ ├── GOVERNANCE.md # Core policies & standards
2844
│ ├── ARCHITECTURE.md # Project structure
29-
│ ├── GOVERNANCE-START-HERE.md # Navigation hub
30-
│ └── [other docs]/ # Comprehensive guides
45+
│ ├── FILE_ORGANIZATION.md # This file
46+
│ ├── CUSTOM_INSTRUCTIONS.md # Custom AI instructions
47+
│ ├── COPILOT_TASKS.md # Copilot task definitions
48+
│ └── [other comprehensive guides]/
3149
├── src/ # Source code (JS, CSS)
3250
├── inc/ # PHP includes
3351
├── tests/ # Test files
3452
├── bin/ # Build & utility scripts
35-
└── [other theme files]/
53+
└── [other theme folders]/
3654
```
3755

3856
## File Categories & Locations

scripts/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Build & Automation Scripts
3+
description: Utility scripts for theme building, generation, and automation
4+
category: Project
5+
type: Index
6+
audience: Developers, Build Tools
7+
date: 2025-12-09
8+
---
9+
10+
## Build & Automation Scripts
11+
12+
This directory contains utility scripts for building, generating, and automating theme-related tasks.
13+
14+
## Scripts
15+
16+
### `agent-script.js`
17+
18+
Orchestrates AI agent execution and coordination. Used by the build system to run agents for theme generation and validation.
19+
20+
### `audit-frontmatter.js`
21+
22+
Audits frontmatter metadata in documentation files. Ensures all markdown files have proper YAML frontmatter with required fields (title, description, category, type, audience, date).
23+
24+
### `block-theme-build.agent.js`
25+
26+
The primary build agent for the block theme. Handles:
27+
28+
- Theme compilation and validation
29+
- Block registration
30+
- Style processing
31+
- Configuration generation
32+
- Pre-commit linting validation in scaffold mode
33+
34+
See [.github/agents/block-theme-build.agent.md](.github/agents/block-theme-build.agent.md) for full documentation.
35+
36+
### `scaffold-generator.agent.js`
37+
38+
Generates new block theme instances from the scaffold template. Used to create production themes from this scaffold with mustache variable replacement.
39+
40+
**Usage:** Run as part of the generation workflow to:
41+
42+
- Replace template variables ({{theme_slug}}, {{version}}, etc.)
43+
- Generate theme configuration
44+
- Create custom block and pattern files
45+
46+
## Running Scripts
47+
48+
Scripts are typically invoked through npm:
49+
50+
```bash
51+
npm run build # Uses block-theme-build.agent.js
52+
npm run generate # Uses scaffold-generator.agent.js
53+
npm run lint:dry-run # Uses lint-dry-run.js (in bin/)
54+
```
55+
56+
For direct execution:
57+
58+
```bash
59+
node scripts/script-name.js [options]
60+
```
61+
62+
## Related
63+
64+
- [bin/](../bin/) - Main build and utility scripts
65+
- [.github/agents/](.github/agents/) - Agent specifications and documentation
66+
- [docs/BUILD_PROCESS.md](../docs/BUILD_PROCESS.md) - Build workflow documentation

0 commit comments

Comments
 (0)