Skip to content

Implement typical WordPress block structure following official documentation - #3

Merged
ashleyshaw merged 4 commits into
masterfrom
copilot/vscode1758120066316
Sep 17, 2025
Merged

Implement typical WordPress block structure following official documentation#3
ashleyshaw merged 4 commits into
masterfrom
copilot/vscode1758120066316

Conversation

CopilotAI commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

This PR implements a comprehensive WordPress block structure that follows the WordPress Block Editor documentation and adheres to LightSpeed coding standards.

What's Included

Complete Block Example (examples/example-block/)

  • block.json - Modern block configuration using API version 3 with support for colors, typography, and spacing
  • React Components - Separate edit.js and save.js components following WordPress best practices
  • SCSS Stylesheets - Organized editor and frontend styles with accessibility and responsive design features
  • PHP Registration - Comprehensive server-side functionality with security, internationalization, and performance optimizations
  • Build Configuration - WordPress Scripts setup with linting, formatting, and development tools

Block Patterns (examples/patterns/)

  • Hero CTA Pattern - Complex responsive hero section with gradient backgrounds and multiple call-to-action buttons
  • Simple CTA Pattern - Clean, minimal call-to-action block for general use

Both patterns use theme.json variables for consistency and include proper pattern headers for discoverability.

Key Features

WordPress Standards Compliance:

  • Uses Block API version 3 (latest)
  • Follows React component architecture
  • Implements proper asset enqueuing and dependency management
  • Includes translation support with correct text domain usage

LightSpeed Standards:

  • 4-space indentation throughout
  • Comprehensive input sanitization and output escaping
  • Performance-optimized with minimal dependencies
  • Accessible design with ARIA labels and keyboard navigation
  • Mobile-first responsive approach

Developer Experience:

  • Hot reloading development mode (npm start)
  • Production build optimization (npm run build)
  • Code linting and formatting tools
  • Comprehensive documentation with usage examples

Usage

Developers can use this as a template for creating new WordPress blocks:

cd examples/example-block
npm install
npm run start # Development mode
npm run build # Production build

The implementation demonstrates modern WordPress development practices while maintaining compatibility with LightSpeed's organizational standards and workflows.

Created from VS Code via the GitHub Pull Request extension.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…tion
Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
CopilotAI changed the title [WIP] Implementing a Typical Block Structure in WordPressImplement typical WordPress block structure following official documentationSep 17, 2025
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
@coderabbitai

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@ashleyshaw
ashleyshaw marked this pull request as ready for review September 17, 2025 16:00
@ashleyshaw
ashleyshaw merged commit e98b681 into masterSep 17, 2025
2 of 3 checks passed
@ashleyshaw
ashleyshaw deleted the copilot/vscode1758120066316 branch October 10, 2025 05:23
ashleyshaw pushed a commit that referenced this pull request Nov 17, 2025
Implements all critical release automation components to fix blocking issues.
## Changes
### Release Agent (✅ Implemented)
- Implement `.github/agents/release.agent.cjs` - Complete release automation
- Validates VERSION and CHANGELOG.md
- Bumps semantic versions (major/minor/patch)
- Updates changelog with release date
- Creates git tags
- Publishes GitHub releases
- Supports dry-run mode for testing
- Handles both GitHub Actions and standalone execution
### Validation Scripts (✅ Implemented)
- Implement `scripts/validate-version.cjs` - Semantic version validation
- Validates VERSION file format
- Parses version components (major.minor.patch[-prerelease][+build])
- Comprehensive error reporting
- Implement `scripts/validate-changelog.cjs` - Changelog validation
- Validates Keep a Changelog format
- Checks version and date formats
- Validates section structure
- Reports detailed errors
### Utilities (✅ Implemented)
- Implement `.github/agents/includes/changelogUtils.cjs` - Changelog parser
- Parses Keep a Changelog format
- Validates changelog structure
- Extracts releases and sections
- CLI tool with --validate, --parse, --latest, --unreleased modes
### Schemas (✅ Created)
- Create `automation/schemas/changelog.schema.json` - Changelog validation
- Create `automation/schemas/version.schema.json` - Version validation
- Create `automation/schemas/frontmatter.schema.json` - Frontmatter validation
### Workflow Updates (✅ Updated)
- Update `.github/workflows/release.yml` - Enable release agent
- Update `.github/workflows/release-prep.yml` - Fix script references
- Update `.github/workflows/changelog.yml` - Enable validation, add Node setup
## Issues Resolved
- ✅ Critical Issue #1: Release agent not implemented (was placeholder)
- ✅ Critical Issue #2: validate-changelog.js was placeholder (exit code 1)
- ✅ Critical Issue #3: validate-version.js was empty
- ✅ Critical Issue #4: changelogUtils.js missing
- ✅ Critical Issue #5: Schema files missing
## Testing
All components tested and working:
- ✅ validate-version.cjs validates current VERSION file
- ✅ validate-changelog.cjs validates current CHANGELOG.md
- ✅ changelogUtils.cjs parses and validates changelog
- ✅ release.agent.cjs runs successfully in dry-run mode
## Notes
- All scripts renamed from .js to .cjs for CommonJS compatibility
- Package.json contains "type": "module", so .cjs extension required
- Release agent supports --scope=major|minor|patch and --dry-run flags
- Follows LightSpeed coding standards and documentation requirements
Refs: G-1, G-2 (release agent and changelog utils implementation)
ashleyshaw pushed a commit that referenced this pull request Nov 17, 2025
Completes the remaining medium-priority items from the release agent review.
Adds PR automation, Release Notes Manager agent, and comprehensive scope
parameter documentation.
## Changes
### 1. PR Automation for release-prep.yml (✅ Complete)
**Created: `scripts/create-release-pr.cjs`**
- Automatically creates release PRs from develop to main
- Computes next version based on merged PR labels
- Updates VERSION and CHANGELOG.md files
- Creates release branch (release/vX.Y.Z)
- Generates comprehensive PR description with:
- Changelog summary
- Release checklist
- Version bump information
- Uses gh CLI for PR creation
**Updated: `.github/workflows/release-prep.yml`**
- Added "Create Release PR" step
- Calls create-release-pr.cjs script
- Passes GITHUB_TOKEN for authentication
- Removes TODO comment (now implemented)
**Features:**
- Validates unreleased changes exist before creating PR
- Detects if release branch already exists
- Computes semantic version bumps (major/minor/patch)
- Commits and pushes changes automatically
- Comprehensive error handling and logging
### 2. Release Notes Manager Agent (✅ Complete)
**Created: `.github/agents/release-notes-manager.agent.cjs`**
Comprehensive release notes generation agent that:
- Compiles clean release notes from changelog
- Generates highlights from key sections (Added, Changed, Security)
- Detects and flags breaking changes automatically
- Lists contributors with PR counts
- Groups changes by type with emojis (✨ Added, 🐛 Fixed, etc.)
- Formats output suitable for GitHub releases
- Includes installation instructions
- Links to full changelog comparison
**CLI Usage:**
```bash
# Generate notes for specific version
node .github/agents/release-notes-manager.agent.cjs --version=1.0.0
# Generate notes for latest version
node .github/agents/release-notes-manager.agent.cjs --latest
# Output to file
node .github/agents/release-notes-manager.agent.cjs --version=1.0.0 --output=RELEASE_NOTES.md
```
**Features:**
- ✅ Highlights (top 5 important changes)
- ✅ Breaking changes detection and warnings
- ✅ Grouped sections with emojis
- ✅ Contributor attribution
- ✅ Installation instructions
- ✅ Full changelog links
- ✅ Graceful error handling for missing tags
**Implements spec:** `.github/agents/TODO/release-notes-manager.agents.md`
### 3. Scope Parameter Documentation (✅ Complete)
**Created: `docs/RELEASE-SCOPE-GUIDE.md`**
Comprehensive 400+ line guide covering:
**Overview:**
- What the --scope parameter does
- Semantic versioning primer
- How it affects version bumping
**Detailed Sections:**
- When to use each scope (patch/minor/major)
- Real-world examples for each scope type
- Decision flowchart for scope selection
- Release label system integration
**Examples:**
- Bug fix release (patch)
- New feature release (minor)
- Breaking change release (major)
- Dry-run testing examples
**Best Practices:**
- Validation before release
- Documentation requirements
- Testing procedures
- Communication guidelines
**FAQ:**
- Common questions and answers
- Edge cases and troubleshooting
- Pre-release versions
- Reverting releases
- Monorepo considerations
**Related Documentation:**
- Links to release process guide
- Agent specifications
- External SemVer reference
- Support channels
## Testing
All components tested and working:
✅ **create-release-pr.cjs**
- Script executes without errors
- Validates unreleased changes
- Handles missing tags gracefully
✅ **release-notes-manager.agent.cjs**
- Generates comprehensive release notes for 0.1.0
- Handles missing git tags gracefully
- Formats output with proper markdown
- Includes highlights, breaking changes, grouped sections
- Lists contributors (when available)
✅ **RELEASE-SCOPE-GUIDE.md**
- Well-structured and comprehensive
- Clear examples and use cases
- Proper YAML frontmatter
- Links to related documentation
## Benefits
1. **Automated PR Creation**
- Reduces manual work for maintainers
- Ensures consistent PR format
- Validates changelog before PR creation
- Integrates with existing workflows
2. **Professional Release Notes**
- User-friendly format
- Highlights key changes
- Warns about breaking changes
- Credits contributors
3. **Clear Documentation**
- Removes ambiguity about version bumping
- Provides decision framework
- Real-world examples
- Answers common questions
## Standards Compliance
- ✅ UK English throughout
- ✅ LightSpeed coding standards
- ✅ Comprehensive JSDoc comments
- ✅ YAML frontmatter in documentation
- ✅ Error handling and logging
- ✅ CommonJS compatibility (.cjs extension)
## Related Issues
- Addresses medium-priority item #1: PR automation
- Addresses medium-priority item #2: Release Notes Manager
- Addresses medium-priority item #3: Scope documentation
- Completes TODO in release-prep.yml (line 25)
## Next Steps
The release automation is now feature-complete for MVP:
- ✅ All critical issues resolved
- ✅ All medium-priority items completed
- ⏳ Low-priority polish items remain (optional)
---
**Dependencies:** Requires .cjs scripts from previous commit
**Breaking Changes:** None
**Migration Required:** None
ashleyshaw pushed a commit that referenced this pull request May 31, 2026
- Remove ', duplicated' from Overlap 4 section (template selection not duplicated)
- Remove unmatched backtick in heading for critical gap #3
- Clarify duplication finding: Section 3 of second half duplicates Section 4, not Section 3
https://claude.ai/code/session_01FE3JyySQTzgzVkdiZsy1pZ
ashleyshaw added a commit that referenced this pull request May 31, 2026
* Wave 5.3 (#662): Audit issue creation documentation consolidation
- Identified duplication in instructions/issues.instructions.md (content repeats twice)
- Found missing docs/ISSUE_LABELS.md (referenced but doesn't exist)
- Created consolidation matrix mapping current files to proposed locations
- Documented 4 key overlap areas and 3 critical gaps
- Recommended 3-phase consolidation plan (fix duplication → align links → update automation)
Audit report ready for implementation in Wave 5.3 child issues.
https://claude.ai/code/session_01FE3JyySQTzgzVkdiZsy1pZ
* Fix frontmatter validation in Wave 5.3 audit report
- Added required file_type field (documentation)
- Added description field
- Updated version to v1.0 format
- Added author and maintainer fields
- Added tags and domain fields for schema compliance
- Changed created_date to last_updated to match schema requirements
This fixes CI validation failures for frontmatter compliance.
* Fix audit report inaccuracies per code review
- Remove ', duplicated' from Overlap 4 section (template selection not duplicated)
- Remove unmatched backtick in heading for critical gap #3
- Clarify duplication finding: Section 3 of second half duplicates Section 4, not Section 3
https://claude.ai/code/session_01FE3JyySQTzgzVkdiZsy1pZ
* Fix frontmatter validation: change status from 'complete' to 'active'
Schema only allows: active, deprecated, draft, experimental
https://claude.ai/code/session_01FE3JyySQTzgzVkdiZsy1pZ
---------
Co-authored-by: Claude <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request May 31, 2026
* Wave 5.3 (#662): Audit issue creation documentation consolidation
- Identified duplication in instructions/issues.instructions.md (content repeats twice)
- Found missing docs/ISSUE_LABELS.md (referenced but doesn't exist)
- Created consolidation matrix mapping current files to proposed locations
- Documented 4 key overlap areas and 3 critical gaps
- Recommended 3-phase consolidation plan (fix duplication → align links → update automation)
Audit report ready for implementation in Wave 5.3 child issues.
https://claude.ai/code/session_01FE3JyySQTzgzVkdiZsy1pZ
* Fix frontmatter validation in Wave 5.3 audit report
- Added required file_type field (documentation)
- Added description field
- Updated version to v1.0 format
- Added author and maintainer fields
- Added tags and domain fields for schema compliance
- Changed created_date to last_updated to match schema requirements
This fixes CI validation failures for frontmatter compliance.
* Fix audit report inaccuracies per code review
- Remove ', duplicated' from Overlap 4 section (template selection not duplicated)
- Remove unmatched backtick in heading for critical gap #3
- Clarify duplication finding: Section 3 of second half duplicates Section 4, not Section 3
https://claude.ai/code/session_01FE3JyySQTzgzVkdiZsy1pZ
* Fix frontmatter validation: change status from 'complete' to 'active'
Schema only allows: active, deprecated, draft, experimental
https://claude.ai/code/session_01FE3JyySQTzgzVkdiZsy1pZ
---------
Co-authored-by: Claude <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Jul 24, 2026
- Create PHASE_3_EXECUTION.md: detailed step-by-step implementation guide
- Create PHASE_3_ISSUES.md: GitHub issue templates for Phase 3 work items (#3.1-#3.4)
- Create PHASE_3_KICKOFF.md: ready-to-execute prompt with context and next steps
- Create PHASE_3_READINESS.md: comprehensive readiness report
- Update README.md: Phase 3 readiness status and document navigation
Phase 3 consolidates 4 labeling workflows into 2 streamlined workflows:
- labeling.yml (250 lines) + dependabot-security-label.yml (85 lines) + issue-close-label-hygiene.yml (95 lines) → labeling-governance.yml
- metadata-governance.yml (140 lines) unchanged
Expected outcomes:
- 33-50% workflow reduction (3-4 → 2)
- ~180 lines of duplication eliminated
- ~20 GHA minutes/week savings
- All labeling behavior preserved
Timeline: Weeks 9-10 (starts 2026-07-26 upon Phase 2.3 completion)
Effort: 6-8 hours (simpler than Phase 2)
Status: READY TO START
Follows same consolidation pattern as Phase 2, with proven testing and review approach.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Jul 24, 2026
* docs(phase-2b): Update frontmatter status to reflect Phase A completion
Change status from 'in-progress'/'draft'/'active' to 'complete' across:
- README.md: Project overview (in-progress → complete)
- PHASE-2B-SKILLS-AUDIT.md: Audit report (draft → complete)
- IMPLEMENTATION_NOTES.md: Methodology (active → complete)
Phase A (Audit & Evaluation) is 100% complete:
- ✅ Batch 1: 5 agents, 125 skills
- ✅ Batch 2-3: 11 agents, 252 skills
- ✅ Total: 16 agents, 377 skills
- ✅ Conflict matrix documented
- ✅ Root skills classified (123 → 70 active)
Phase B (Planning) and Phase C (Implementation) are upcoming.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* feat: Phase 3 labeling consolidation — preparation and kickoff
- Create PHASE_3_EXECUTION.md: detailed step-by-step implementation guide
- Create PHASE_3_ISSUES.md: GitHub issue templates for Phase 3 work items (#3.1-#3.4)
- Create PHASE_3_KICKOFF.md: ready-to-execute prompt with context and next steps
- Create PHASE_3_READINESS.md: comprehensive readiness report
- Update README.md: Phase 3 readiness status and document navigation
Phase 3 consolidates 4 labeling workflows into 2 streamlined workflows:
- labeling.yml (250 lines) + dependabot-security-label.yml (85 lines) + issue-close-label-hygiene.yml (95 lines) → labeling-governance.yml
- metadata-governance.yml (140 lines) unchanged
Expected outcomes:
- 33-50% workflow reduction (3-4 → 2)
- ~180 lines of duplication eliminated
- ~20 GHA minutes/week savings
- All labeling behavior preserved
Timeline: Weeks 9-10 (starts 2026-07-26 upon Phase 2.3 completion)
Effort: 6-8 hours (simpler than Phase 2)
Status: READY TO START
Follows same consolidation pattern as Phase 2, with proven testing and review approach.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* docs: Add Phase 2.2 integration test results reference
- Document 13 integration test scenarios for Phase 2
- Reference for Mermaid validation testing
- Reference for README validation testing
- Reference for maintenance workflows testing
- Provides testing methodology baseline for future phases
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* auto: .remember 19:22
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Jul 29, 2026
* docs(phase-2b): Update frontmatter status to reflect Phase A completion
Change status from 'in-progress'/'draft'/'active' to 'complete' across:
- README.md: Project overview (in-progress → complete)
- PHASE-2B-SKILLS-AUDIT.md: Audit report (draft → complete)
- IMPLEMENTATION_NOTES.md: Methodology (active → complete)
Phase A (Audit & Evaluation) is 100% complete:
- ✅ Batch 1: 5 agents, 125 skills
- ✅ Batch 2-3: 11 agents, 252 skills
- ✅ Total: 16 agents, 377 skills
- ✅ Conflict matrix documented
- ✅ Root skills classified (123 → 70 active)
Phase B (Planning) and Phase C (Implementation) are upcoming.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* feat: Phase 3 labeling consolidation — preparation and kickoff
- Create PHASE_3_EXECUTION.md: detailed step-by-step implementation guide
- Create PHASE_3_ISSUES.md: GitHub issue templates for Phase 3 work items (#3.1-#3.4)
- Create PHASE_3_KICKOFF.md: ready-to-execute prompt with context and next steps
- Create PHASE_3_READINESS.md: comprehensive readiness report
- Update README.md: Phase 3 readiness status and document navigation
Phase 3 consolidates 4 labeling workflows into 2 streamlined workflows:
- labeling.yml (250 lines) + dependabot-security-label.yml (85 lines) + issue-close-label-hygiene.yml (95 lines) → labeling-governance.yml
- metadata-governance.yml (140 lines) unchanged
Expected outcomes:
- 33-50% workflow reduction (3-4 → 2)
- ~180 lines of duplication eliminated
- ~20 GHA minutes/week savings
- All labeling behavior preserved
Timeline: Weeks 9-10 (starts 2026-07-26 upon Phase 2.3 completion)
Effort: 6-8 hours (simpler than Phase 2)
Status: READY TO START
Follows same consolidation pattern as Phase 2, with proven testing and review approach.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* docs: Add Phase 2.2 integration test results reference
- Document 13 integration test scenarios for Phase 2
- Reference for Mermaid validation testing
- Reference for README validation testing
- Reference for maintenance workflows testing
- Provides testing methodology baseline for future phases
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* auto: .remember 19:25
* auto: .remember 19:41
* auto: .remember 19:57
* auto: .remember 20:37
* auto: .remember 21:20
* feat(issue-triage): add milestone assignment + remediation automation
- Create MilestoneAssignmentAgent for intelligent milestone assignment (scripts/agents/includes/milestone-assignment.js)
- Create RemediationChecklistGenerator for per-issue DoR/DoD remediation (scripts/agents/includes/remediation-checklist-generator.js)
- Add issue-create-enhanced.yml workflow with:
* Template-based issue creation
* Auto milestone assignment
* Parent issue linking
* PR linking
* Remediation checklist posting
- Add issue-remediation-bulk.yml workflow for bulk remediation of non-compliant issues
These workflows address the 250-issue compliance gap discovered in recent audit.
* docs: add comprehensive issue triage automation guide
Covers:
- Workflow usage (enhanced issue creation, bulk remediation, labeling)
- Milestone assignment rules and confidence scoring
- Remediation checklist generation per issue type
- Audit results and 250-issue remediation plan
- Template enforcement and validation
- Agent API documentation
- Troubleshooting guide
* docs(projects): add issue-triage-automation-system project documentation
- Add README.md with role-based navigation (executive, technical lead, contributor)
- Add PROJECT_INDEX.md with full project structure and status
- Add IMPLEMENTATION_PLAN.md with 2-phase delivery plan and technical details
- Add EXECUTION_CHECKLIST.md with step-by-step execution guide (7 steps)
- Add AUDIT_RESULTS.md with detailed findings and remediation plan
This project tracks the implementation and execution of the issue triage
automation system to fix 250 non-compliant issues (100% missing type labels,
milestones, DoR/DoD sections).
* docs(projects): add CONTINUATION_PROMPT.md for next chat sessions
Adds comprehensive continuation prompt to active project folder for use in
new chat sessions when continuing work on PR #1377 and Phase 2 execution.
Includes:
- Current project status and branch references (feat/issue-triage-automation-enhancements)
- Epic #1376 and child issues #1378-#1385
- Phase 2 execution steps with exact commands
- All relevant documentation locations
- Success criteria and verification checklists
- Quick reference commands
This file allows seamless handoff between chat sessions while maintaining
full context of the implementation and execution plan.
* chore(changelog): add entry for issue triage automation system (#1377)
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Aug 11, 2026
- Fix#1: Positional mode validation — reject unsupported modes like 'typo'
- Fix#2: Days input validation — reject NaN, non-integer, and non-positive values
- Fix#3: Script validation — reject unknown scripts and mode-incompatible selections
- Fix#4: Output file reporting — stop claiming output was saved when handlers don't write
- Fix#5: Exit status — exit with code 1 when any handler fails
- Fix#6: Dry-run consistency — honor --dry-run flag in apply mode (was hardcoded false)
- Fix#7: Test quality — replace literal assertions with logic tests for orchestrator behaviour
Test coverage expanded from 29 to 33 tests covering all fixes.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Aug 11, 2026
- Fix#1: Positional mode validation — reject unsupported modes like 'typo'
- Fix#2: Days input validation — reject NaN, non-integer, and non-positive values
- Fix#3: Script validation — reject unknown scripts and mode-incompatible selections
- Fix#4: Output file reporting — stop claiming output was saved when handlers don't write
- Fix#5: Exit status — exit with code 1 when any handler fails
- Fix#6: Dry-run consistency — honor --dry-run flag in apply mode (was hardcoded false)
- Fix#7: Test quality — replace literal assertions with logic tests for orchestrator behaviour
Test coverage expanded from 29 to 33 tests covering all fixes.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Aug 11, 2026
* docs: Add Phase 2 Label Orchestrator changelog entry
Added comprehensive changelog entry documenting Phase 2 label-orchestrator CLI
implementation, including three operating modes (audit, sync, apply), input
validation, mode-specific constraints, dry-run defaults, and test coverage.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* feat: Phase 2 - Unified label orchestrator CLI
- Add label-orchestrator.js: unified CLI for all label management scripts
- Support modes: audit (analyse), sync (synchronise dry-run), apply (live changes)
- Unified reporting, progress tracking, and error handling
- 29 unit tests for argument parsing, validation, and mode dispatch
- Orchestrates manage-stale-issues, review-meta-labels, review-status-labels, sync-pr-labels
Resolves#1720 (Create Shared Utilities - Phase 2 expansion)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix: Address 7 CodeRabbit review issues in Phase 2 orchestrator
- Fix#1: Positional mode validation — reject unsupported modes like 'typo'
- Fix#2: Days input validation — reject NaN, non-integer, and non-positive values
- Fix#3: Script validation — reject unknown scripts and mode-incompatible selections
- Fix#4: Output file reporting — stop claiming output was saved when handlers don't write
- Fix#5: Exit status — exit with code 1 when any handler fails
- Fix#6: Dry-run consistency — honor --dry-run flag in apply mode (was hardcoded false)
- Fix#7: Test quality — replace literal assertions with logic tests for orchestrator behaviour
Test coverage expanded from 29 to 33 tests covering all fixes.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix: Eliminate trivial test conditions from exit status tests
- Line 217: Replace always-false condition with direct exitCode = 0
- Line 223: Replace always-true condition with realistic error array
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix: Use errorCount in success test to eliminate unused variable
Restore the ternary condition in the success test to match the error test pattern,
making both tests consistent and eliminating the unused errorCount variable.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix: Remove unused errorCount variable from success test
Removed unused errorCount declaration that was causing ESLint warning.
The success test now directly asserts exitCode = 0 without intermediate variable.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Aug 12, 2026
…rovements
Phase 1: Comprehensive fixes to project-docs-update.sh automation suite
Security Fixes:
- Fixed sed injection vulnerability (CVE prevention) on lines 92, 161
- Use safe delimiter (|) instead of / for sed patterns
- Properly escape special characters in project names using parameter expansion
- Prevents injection from project names containing /, &, \, etc.
Logic Fixes:
- Fixed project detection logic (Issue #2): removed overly restrictive pre-existence checks
- Fixed find command filtering (Issue #3): corrected directory traversal for proper project discovery
- Fixed return value convention (Issue #5): align with bash standards (0=success, 1=failure)
- Fixed stats format consistency (Issue #4): standardized on colon-separated format
Quality Improvements:
- Added --help/-h support (Issue #6) with comprehensive usage information
- Created docs/SCRIPT_USAGE.md (3,500+ lines) covering quick-start, integration, troubleshooting
- Enhanced test suite with 4 new edge-case tests:
* Special characters in project names (/, &, \)
* Return value convention validation
* Statistics format consistency
* Symlink and permission handling
Files Modified:
- scripts/automation/project-docs-update.sh: All 7 fixes implemented
- scripts/automation/test-project-docs-update.sh: New test coverage added
- docs/SCRIPT_USAGE.md: NEW comprehensive documentation
- CHANGELOG.md: Phase 1 entry added
Test Results:
- All special character injection tests passing ✓
- Script help text working correctly ✓
- Return value convention tests passing ✓
- Validation logic working as expected ✓
Addresses: Issue #1862
Relates to: Issue #1720 (Issue Maintenance Scripts)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Aug 12, 2026
…rovements
Phase 1: Comprehensive fixes to project-docs-update.sh automation suite
Security Fixes:
- Fixed sed injection vulnerability (CVE prevention) on lines 92, 161
- Use safe delimiter (|) instead of / for sed patterns
- Properly escape special characters in project names using parameter expansion
- Prevents injection from project names containing /, &, \, etc.
Logic Fixes:
- Fixed project detection logic (Issue #2): removed overly restrictive pre-existence checks
- Fixed find command filtering (Issue #3): corrected directory traversal for proper project discovery
- Fixed return value convention (Issue #5): align with bash standards (0=success, 1=failure)
- Fixed stats format consistency (Issue #4): standardized on colon-separated format
Quality Improvements:
- Added --help/-h support (Issue #6) with comprehensive usage information
- Created docs/SCRIPT_USAGE.md (3,500+ lines) covering quick-start, integration, troubleshooting
- Enhanced test suite with 4 new edge-case tests:
* Special characters in project names (/, &, \)
* Return value convention validation
* Statistics format consistency
* Symlink and permission handling
Files Modified:
- scripts/automation/project-docs-update.sh: All 7 fixes implemented
- scripts/automation/test-project-docs-update.sh: New test coverage added
- docs/SCRIPT_USAGE.md: NEW comprehensive documentation
- CHANGELOG.md: Phase 1 entry added
Test Results:
- All special character injection tests passing ✓
- Script help text working correctly ✓
- Return value convention tests passing ✓
- Validation logic working as expected ✓
Addresses: Issue #1862
Relates to: Issue #1720 (Issue Maintenance Scripts)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Aug 18, 2026
…rovements (#1993)
Phase 1: Comprehensive fixes to project-docs-update.sh automation suite
Security Fixes:
- Fixed sed injection vulnerability (CVE prevention) on lines 92, 161
- Use safe delimiter (|) instead of / for sed patterns
- Properly escape special characters in project names using parameter expansion
- Prevents injection from project names containing /, &, \, etc.
Logic Fixes:
- Fixed project detection logic (Issue #2): removed overly restrictive pre-existence checks
- Fixed find command filtering (Issue #3): corrected directory traversal for proper project discovery
- Fixed return value convention (Issue #5): align with bash standards (0=success, 1=failure)
- Fixed stats format consistency (Issue #4): standardized on colon-separated format
Quality Improvements:
- Added --help/-h support (Issue #6) with comprehensive usage information
- Created docs/SCRIPT_USAGE.md (3,500+ lines) covering quick-start, integration, troubleshooting
- Enhanced test suite with 4 new edge-case tests:
* Special characters in project names (/, &, \)
* Return value convention validation
* Statistics format consistency
* Symlink and permission handling
Files Modified:
- scripts/automation/project-docs-update.sh: All 7 fixes implemented
- scripts/automation/test-project-docs-update.sh: New test coverage added
- docs/SCRIPT_USAGE.md: NEW comprehensive documentation
- CHANGELOG.md: Phase 1 entry added
Test Results:
- All special character injection tests passing ✓
- Script help text working correctly ✓
- Return value convention tests passing ✓
- Validation logic working as expected ✓
Addresses: Issue #1862
Relates to: Issue #1720 (Issue Maintenance Scripts)
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Aug 18, 2026
* fix: Project documentation scripts — security, logic, and testing improvements
Phase 1: Comprehensive fixes to project-docs-update.sh automation suite
Security Fixes:
- Fixed sed injection vulnerability (CVE prevention) on lines 92, 161
- Use safe delimiter (|) instead of / for sed patterns
- Properly escape special characters in project names using parameter expansion
- Prevents injection from project names containing /, &, \, etc.
Logic Fixes:
- Fixed project detection logic (Issue #2): removed overly restrictive pre-existence checks
- Fixed find command filtering (Issue #3): corrected directory traversal for proper project discovery
- Fixed return value convention (Issue #5): align with bash standards (0=success, 1=failure)
- Fixed stats format consistency (Issue #4): standardized on colon-separated format
Quality Improvements:
- Added --help/-h support (Issue #6) with comprehensive usage information
- Created docs/SCRIPT_USAGE.md (3,500+ lines) covering quick-start, integration, troubleshooting
- Enhanced test suite with 4 new edge-case tests:
* Special characters in project names (/, &, \)
* Return value convention validation
* Statistics format consistency
* Symlink and permission handling
Files Modified:
- scripts/automation/project-docs-update.sh: All 7 fixes implemented
- scripts/automation/test-project-docs-update.sh: New test coverage added
- docs/SCRIPT_USAGE.md: NEW comprehensive documentation
- CHANGELOG.md: Phase 1 entry added
Test Results:
- All special character injection tests passing ✓
- Script help text working correctly ✓
- Return value convention tests passing ✓
- Validation logic working as expected ✓
Addresses: Issue #1862
Relates to: Issue #1720 (Issue Maintenance Scripts)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* docs: Project Maintenance Agent — Phase 1 & 2 Documentation
Create comprehensive project documentation for the Project Maintenance Agent initiative:
**Files Created:**
- README.md (project overview, phases, timelines, deliverables)
- PLANNING.md (detailed phase breakdown, requirements, success criteria)
- OPENSPEC.md (formal technical specification, API contracts, architecture)
**Content Summary:**
README.md (11.5 KB):
- Project overview and goals
- Phase 1 ✅ COMPLETE status (merged PR #1867)
- Phase 2 (READY TO START) with 2-week timeline
- Phase 3 (PLANNED) for team integration
- Architecture overview and design decisions
- Risk mitigation and next steps
PLANNING.md (16 KB):
- Executive summary and scope
- Phase 1 completion status with test results
- Phase 2 detailed requirements:
* Agent specification (multi-provider support)
* Three portable skills with interfaces
* Provider implementations (Claude, Copilot, OpenAI)
* Configuration files and testing strategy
- Phase 3 GitHub Actions workflows
- Success criteria and risk analysis
- Open questions and dependencies
OPENSPEC.md (18 KB):
- Formal technical specification
- Functional requirements (FR-1 through FR-5)
- Non-functional requirements (NF-1 through NF-5)
- Architecture diagrams and data flows
- Complete API specification (input/output contracts)
- Operational modes (scheduled, on-demand, integration)
- Error handling and recovery strategies
- Security specifications and injection prevention
- Testing strategy (unit, integration, e2e, provider tests)
- Configuration for different project types
- Performance requirements and deployment stages
- Success criteria and monitoring requirements
**Key Features:**
- Comprehensive Phase 2 timeline (2 weeks, ~50 hours)
- 3 portable skills specification (docs-updater, validator, sync)
- Multi-provider support (Claude, Copilot, OpenAI)
- Both proactive (nightly audit) and reactive (on-demand) modes
- Complete API contracts for integration
- Security requirements and injection prevention
- >80 code coverage target
**Related Work:**
- Phase 1 PR: #1867 (merged)
- Parent Epic: #1862
- Builds on: scripts/automation/project-docs-update.sh
**Project Status:**
- ✅ Phase 1: Scripts fixed and tested (merged)
- 🔄 Phase 2: Ready to start immediately (this documentation)
- 📋 Phase 3: Planned for week 4
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ashleyshaw