diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 8a5f881..5907267 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,70 +1,120 @@
name: Bug report
-description: Report a reproducible problem
-title: "[Bug]: "
+description: Report reproducible incorrect or regressed behavior
labels:
- bug
body:
- type: markdown
attributes:
value: |
- Thanks for reporting a bug. Please include enough detail to reproduce it.
+ Thanks for reporting a problem.
+
+ Do not report security vulnerabilities here. Follow `SECURITY.md` and use private vulnerability reporting.
+
+ - type: dropdown
+ id: problem_type
+ attributes:
+ label: Problem type
+ description: Select the option that best describes the problem.
+ options:
+ - Bug
+ - Regression
+ - Not sure
+ validations:
+ required: true
+
- type: textarea
id: summary
attributes:
label: Summary
- description: What is wrong?
- placeholder: Clear and short description of the bug.
+ description: Describe the incorrect behavior and its impact.
+ placeholder: A clear and concise description of the problem.
+ validations:
+ required: true
+
+ - type: input
+ id: package_version
+ attributes:
+ label: Affected package version
+ placeholder: e.g. 2.4.1 or dev-main@abc1234
validations:
required: true
+
+ - type: input
+ id: last_known_working
+ attributes:
+ label: Last known working version or commit
+ description: Complete this when reporting a regression, if known.
+ placeholder: e.g. 2.4.0 or abc1234
+
+ - type: input
+ id: first_known_broken
+ attributes:
+ label: First known broken version or commit
+ description: Complete this when known.
+ placeholder: e.g. 2.4.1 or def5678
+
- type: textarea
id: reproduce
attributes:
- label: Steps to reproduce
- description: Share exact commands, config, and steps.
+ label: Minimal reproduction
+ description: Provide the smallest code sample, command, configuration or repository that reproduces the problem.
placeholder: |
- 1. Run `composer ic:tests`
- 2. ...
+ 1. Install or configure ...
+ 2. Run ...
3. Observe ...
validations:
required: true
+
- type: textarea
id: expected
attributes:
label: Expected behavior
- placeholder: What did you expect to happen?
+ placeholder: Describe what should happen.
validations:
required: true
+
- type: textarea
id: actual
attributes:
label: Actual behavior
- placeholder: What happened instead? Include full error output if possible.
+ placeholder: Describe what happens instead.
validations:
required: true
+
+ - type: textarea
+ id: error_output
+ attributes:
+ label: Relevant output or errors
+ description: Include only the relevant, sanitized output.
+ render: shell
+
- type: input
id: php_version
attributes:
label: PHP version
- placeholder: "e.g. 8.3.8"
+ placeholder: e.g. 8.4.13
validations:
required: true
+
- type: input
id: composer_version
attributes:
label: Composer version
- placeholder: "e.g. 2.9.2"
+ placeholder: e.g. 2.9.2
validations:
required: true
+
- type: textarea
id: environment
attributes:
- label: Environment details
- description: OS, CI provider, shell, and anything else relevant.
- placeholder: Ubuntu 24.04, GitHub Actions, bash...
+ label: Environment
+ description: Include the operating system, relevant extensions, dependency mode, runtime and CI provider when applicable.
+ placeholder: Ubuntu 24.04, locked dependencies, ext-json enabled, GitHub Actions...
validations:
required: true
+
- type: textarea
id: additional
attributes:
label: Additional context
- description: Links, screenshots, logs, or related issues.
+ description: Add related issues, screenshots, logs, workarounds or other useful context.
diff --git a/.github/ISSUE_TEMPLATE/ci_failure.yml b/.github/ISSUE_TEMPLATE/ci_failure.yml
index 3dcbac9..9c3883f 100644
--- a/.github/ISSUE_TEMPLATE/ci_failure.yml
+++ b/.github/ISSUE_TEMPLATE/ci_failure.yml
@@ -1,48 +1,101 @@
name: CI failure
-description: Report a reproducible CI or workflow failure
-title: "[CI]: "
+description: Report a reproducible PHPForge or workflow failure
labels:
- ci
body:
- type: markdown
attributes:
value: |
- Use this form when CI fails unexpectedly and can be reproduced.
+ Use this form when a CI workflow or PHPForge check fails unexpectedly.
+
+ Do not report security vulnerabilities here. Follow `SECURITY.md` and use private vulnerability reporting.
+
- type: input
id: workflow
attributes:
- label: Workflow/job name
- placeholder: security-standards / phpforge
+ label: Workflow and job
+ placeholder: e.g. CI / PHP 8.4
validations:
required: true
+
- type: input
id: run_url
attributes:
label: Failing run URL
+ description: Provide a link when the run is accessible.
placeholder: https://github.com/OWNER/REPOSITORY/actions/runs/...
- validations:
- required: true
+
- type: textarea
- id: command
+ id: failing_step
attributes:
- label: Failing command
- description: Exact command or step that failed.
+ label: Failing step or command
+ description: Include the exact workflow step or command that failed.
placeholder: composer ic:ci
+ render: shell
validations:
required: true
+
- type: textarea
id: logs
attributes:
- label: Error output
- description: Paste the relevant error section.
+ label: Relevant error output
+ description: Paste the smallest useful, sanitized error section.
render: shell
validations:
required: true
- - type: textarea
- id: local_check
+
+ - type: dropdown
+ id: local_result
attributes:
label: Local reproduction
- description: Can you reproduce locally? If yes, include steps.
- placeholder: Yes/No + details
+ description: Does the same failure occur when running the relevant command locally?
+ options:
+ - Yes
+ - No
+ - Not attempted
+ validations:
+ required: true
+
+ - type: textarea
+ id: local_details
+ attributes:
+ label: Local reproduction details
+ description: Include the command, result and any differences from CI.
+ placeholder: composer ic:ci fails locally with the same error...
+
+ - type: input
+ id: php_version
+ attributes:
+ label: PHP version
+ placeholder: e.g. 8.4.13
+ validations:
+ required: true
+
+ - type: input
+ id: composer_version
+ attributes:
+ label: Composer version
+ placeholder: e.g. 2.9.2
validations:
required: true
+
+ - type: textarea
+ id: environment
+ attributes:
+ label: Runner and dependency environment
+ description: Include the runner OS, dependency mode, relevant extensions, matrix values and PHPForge version when known.
+ placeholder: ubuntu-latest, prefer-lowest, PHPForge 1.x, ext-json enabled...
+ validations:
+ required: true
+
+ - type: textarea
+ id: recent_changes
+ attributes:
+ label: Relevant recent changes
+ description: Mention dependency, configuration, workflow or source changes that may be related.
+
+ - type: textarea
+ id: additional
+ attributes:
+ label: Additional context
+ description: Add related issues, screenshots, logs or other useful context.
diff --git a/.github/ISSUE_TEMPLATE/docs_improvement.yml b/.github/ISSUE_TEMPLATE/docs_improvement.yml
index 80b9607..2ea49e9 100644
--- a/.github/ISSUE_TEMPLATE/docs_improvement.yml
+++ b/.github/ISSUE_TEMPLATE/docs_improvement.yml
@@ -1,34 +1,58 @@
-name: Docs improvement
-description: Report missing, unclear, or incorrect documentation
-title: "[Docs]: "
+name: Documentation improvement
+description: Report missing, outdated, unclear or incorrect documentation
labels:
- documentation
body:
- - type: textarea
+ - type: dropdown
+ id: problem_type
+ attributes:
+ label: Documentation problem
+ options:
+ - Incorrect
+ - Outdated
+ - Missing
+ - Unclear
+ - Example needed
+ - Other
+ validations:
+ required: true
+
+ - type: input
id: location
attributes:
label: Documentation location
- description: File path or URL.
- placeholder: README.md section "Quick Start"
+ description: Provide the file path, section, symbol or URL.
+ placeholder: README.md — Quick Start
validations:
required: true
+
- type: textarea
- id: issue
+ id: problem
attributes:
- label: What is unclear or incorrect?
- placeholder: This section says...
+ label: Problem
+ description: Explain what is missing, unclear, outdated or incorrect.
+ placeholder: The current documentation says or omits...
validations:
required: true
+
- type: textarea
- id: suggestion
+ id: expected
attributes:
- label: Suggested improvement
- description: Propose revised wording, structure, or examples.
- placeholder: It would be clearer if...
+ label: Expected documentation
+ description: Describe what readers should be able to understand or accomplish.
+ placeholder: Readers should be able to...
validations:
required: true
+
+ - type: textarea
+ id: suggestion
+ attributes:
+ label: Suggested improvement
+ description: Optionally propose wording, structure, examples or references.
+ placeholder: It may be clearer to...
+
- type: textarea
id: additional
attributes:
label: Additional context
- description: Related links, screenshots, or prior discussions.
+ description: Add related links, screenshots, discussions or examples.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index cc29614..bbee6d0 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -1,44 +1,54 @@
name: Feature request
-description: Suggest an improvement or new capability
-title: "[Feature]: "
+description: Suggest a new capability or improvement
labels:
- enhancement
body:
- type: markdown
attributes:
value: |
- Thanks for the idea. Please describe the use case first, then the proposed solution.
+ Describe the problem or use case before proposing an implementation.
+
+ For substantial public API, architectural or compatibility changes, discussion may be requested before implementation.
+
- type: textarea
id: problem
attributes:
label: Problem or use case
- description: What limitation are you hitting?
- placeholder: I need to...
+ description: Explain the limitation, repeated difficulty or capability you need.
+ placeholder: I need to... because...
validations:
required: true
+
- type: textarea
- id: proposal
+ id: proposed_behavior
attributes:
- label: Proposed solution
- description: What should happen?
- placeholder: Add a command/config/workflow option that...
+ label: Proposed behavior
+ description: Describe the expected user-facing behavior or outcome.
+ placeholder: The library should...
validations:
required: true
+
+ - type: textarea
+ id: example
+ attributes:
+ label: Example usage
+ description: Optionally show the proposed API, configuration, command or workflow.
+ render: php
+
- type: textarea
id: alternatives
attributes:
- label: Alternatives considered
- description: Any workaround or alternative approach you evaluated.
+ label: Alternatives or workarounds
+ description: Describe existing approaches you considered or currently use.
+
- type: textarea
- id: impact
+ id: compatibility
attributes:
- label: Expected impact
- description: Who benefits and what changes for users/CI?
- placeholder: This would improve...
- validations:
- required: true
+ label: Compatibility considerations
+ description: Mention possible public API, behavior, PHP-version, extension, platform or dependency implications.
+
- type: textarea
id: additional
attributes:
label: Additional context
- description: Related issues, links, examples, or prior art.
+ description: Add related issues, prior art, links, benchmarks or other supporting information.
diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml
index 2ca776f..62e91a7 100644
--- a/.github/ISSUE_TEMPLATE/question.yml
+++ b/.github/ISSUE_TEMPLATE/question.yml
@@ -1,40 +1,56 @@
name: Question
-description: Ask a usage or integration question
-title: "[Question]: "
+description: Ask about usage, behavior, integration or configuration
labels:
- question
body:
- type: markdown
attributes:
value: |
- Use this form for usage questions. For confirmed defects, use the bug report form.
+ Use this form for usage and integration questions. Use the bug form for reproducible incorrect behavior.
+
+ Do not report security vulnerabilities here. Follow `SECURITY.md` and use private vulnerability reporting.
+
- type: textarea
- id: context
+ id: goal
attributes:
label: What are you trying to do?
- description: Describe your goal and expected outcome.
+ description: Describe the goal and expected outcome.
placeholder: I want to...
validations:
required: true
+
- type: textarea
id: attempted
attributes:
label: What have you tried?
- description: Include commands, config snippets, or links you already checked.
+ description: Include relevant code, commands, configuration, documentation or approaches already checked.
placeholder: I tried...
validations:
required: true
+
+ - type: textarea
+ id: relevant_code
+ attributes:
+ label: Relevant code or configuration
+ description: Include a minimal sanitized example when applicable.
+ render: php
+
- type: textarea
id: output
attributes:
- label: Current output or behavior
- description: Include relevant command output, logs, or errors.
+ label: Relevant output or errors
+ description: Include sanitized output only when it helps explain the question.
render: shell
+
- type: textarea
id: environment
attributes:
- label: Environment details
- description: PHP version, Composer version, OS, CI provider (if relevant).
- placeholder: PHP 8.3, Composer 2.9, Ubuntu 24.04...
- validations:
- required: true
+ label: Environment
+ description: Include package, PHP, Composer, OS, extensions or CI details only when relevant.
+ placeholder: Package 2.4.1, PHP 8.4, Composer 2.9, Ubuntu 24.04...
+
+ - type: textarea
+ id: additional
+ attributes:
+ label: Additional context
+ description: Add related links, screenshots or prior discussions.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 59ae734..dcab1f5 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,33 +1,121 @@
## Summary
-Describe what changed and why.
+Describe what changed, why it was needed and the expected behavior.
-## Related Issues
+
-Link issues with `Closes #...` or `Relates #...`.
+## Change
-## Type of Change
+### Type
-- [ ] Bug fix
-- [ ] New feature
-- [ ] Refactor
-- [ ] Documentation update
-- [ ] CI or tooling update
-- [ ] Other (describe in summary)
+* [ ] Bug fix
+* [ ] New feature
+* [ ] Refactor
+* [ ] Performance
+* [ ] Security or reliability
+* [ ] Documentation or examples
+* [ ] Dependency, CI or tooling
+* [ ] Other
+
+### Behavior and Compatibility
+
+* [ ] No observable behavior changed
+* [ ] Existing behavior was corrected
+* [ ] New behavior was introduced
+* [ ] Public API or documented behavior changed
+* [ ] Backward compatibility may be affected
+* [ ] PHP, extension, platform or dependency requirements changed
+
+
## Validation
-List the commands you ran and their result.
+* [ ] `composer ic:ci`
+
+
+
+
+Focused validation
+
+
+
+* [ ] `composer ic:test:syntax`
+* [ ] `composer ic:test:code`
+* [ ] `composer ic:test:lint`
+* [ ] `composer ic:test:sniff`
+* [ ] `composer ic:test:duplicates`
+* [ ] `composer ic:test:probe`
+* [ ] `composer ic:test:comments`
+* [ ] `composer ic:test:architecture`
+* [ ] `composer ic:test:static`
+* [ ] `composer ic:test:security`
+* [ ] `composer ic:test:refactor`
+
+
+
+
+
+## Performance
+
+
+
+* [ ] Relevant benchmarks were added or updated
+* [ ] Results were compared against a relevant baseline
+* [ ] `composer ic:benchmark`
+* [ ] `composer ic:bench:quick`
+* [ ] `composer ic:bench:chart`
+
+
+
+## Implementation Notes
+
+
+
+## Review Focus
-```bash
-composer ic:tests
-```
+
## Checklist
-- [ ] I followed `CONTRIBUTING.md`.
-- [ ] I added or updated tests for behavior changes.
-- [ ] I updated docs/config/examples when needed.
-- [ ] I confirmed no security-sensitive data is exposed.
+* [ ] The change is focused and excludes unrelated modifications.
+* [ ] Tests cover new, corrected and regression-prone behavior.
+* [ ] Public API and backward-compatibility implications were considered.
+* [ ] Documentation, examples and type information were updated where required.
+* [ ] Performance claims are supported by reproducible benchmarks.
+* [ ] No credentials, secrets, personal data or sensitive debug output are included.
+* [ ] I followed `CONTRIBUTING.md` and the engineering principles.
diff --git a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md
new file mode 100644
index 0000000..66759b4
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md
@@ -0,0 +1,94 @@
+## Problem
+
+Describe the incorrect behavior, its impact and how it can be reproduced.
+
+
+
+## Root Cause
+
+
+
+## Fix
+
+Describe how the change corrects the problem and the expected behavior after the fix.
+
+## Behavior and Compatibility
+
+* [ ] Existing documented behavior was restored
+* [ ] Existing undocumented behavior was corrected
+* [ ] Public API remains compatible
+* [ ] Public API or documented behavior changed
+* [ ] Backward compatibility may be affected
+* [ ] PHP, extension, platform or dependency requirements changed
+
+
+
+## Validation
+
+* [ ] `composer ic:ci`
+* [ ] The original failure no longer reproduces
+* [ ] A regression test was added or updated
+* [ ] Relevant boundary and failure paths were tested
+
+
+
+
+Focused validation
+
+
+
+* [ ] `composer ic:test:syntax`
+* [ ] `composer ic:test:code`
+* [ ] `composer ic:test:lint`
+* [ ] `composer ic:test:sniff`
+* [ ] `composer ic:test:duplicates`
+* [ ] `composer ic:test:probe`
+* [ ] `composer ic:test:comments`
+* [ ] `composer ic:test:architecture`
+* [ ] `composer ic:test:static`
+* [ ] `composer ic:test:security`
+* [ ] `composer ic:test:refactor`
+
+
+
+
+
+## Review Focus
+
+
+
+## Checklist
+
+* [ ] The fix is focused and excludes unrelated changes.
+* [ ] The fix addresses the root cause rather than only masking symptoms.
+* [ ] Regression-prone behavior is covered by tests.
+* [ ] Public API and backward-compatibility implications were considered.
+* [ ] Documentation and examples were updated where required.
+* [ ] No credentials, secrets, personal data or sensitive debug output are included.
+* [ ] I followed `CONTRIBUTING.md` and the engineering principles.
diff --git a/.github/PULL_REQUEST_TEMPLATE/documentation.md b/.github/PULL_REQUEST_TEMPLATE/documentation.md
new file mode 100644
index 0000000..f983b85
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/documentation.md
@@ -0,0 +1,51 @@
+## Documentation Change
+
+Describe what is being added, corrected, clarified or removed and why.
+
+
+
+## Affected Content
+
+* [ ] README or getting-started guidance
+* [ ] API or reference documentation
+* [ ] Configuration documentation
+* [ ] Examples or tutorials
+* [ ] Contribution or community documentation
+* [ ] Changelog or release documentation
+* [ ] Other
+
+## Verification
+
+* [ ] Links and references were checked
+* [ ] Code examples were executed or otherwise verified
+* [ ] Commands and configuration examples match current behavior
+* [ ] Terminology is consistent with the project
+* [ ] `composer ic:ci`
+* [ ] No executable behavior changed
+
+
+
+## Review Focus
+
+
+
+## Checklist
+
+* [ ] The change is focused and excludes unrelated code changes.
+* [ ] Documentation reflects the current public behavior.
+* [ ] Examples are minimal, accurate and safe to copy.
+* [ ] Sensitive or private information is not included.
+* [ ] I followed `CONTRIBUTING.md` and the engineering principles.
diff --git a/.github/PULL_REQUEST_TEMPLATE/feature.md b/.github/PULL_REQUEST_TEMPLATE/feature.md
new file mode 100644
index 0000000..f6ce9c6
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/feature.md
@@ -0,0 +1,106 @@
+## Motivation
+
+Describe the problem, use case or capability this feature addresses.
+
+
+
+## Solution
+
+Describe the proposed behavior and how consumers are expected to use it.
+
+## API and Compatibility
+
+* [ ] No new public API
+* [ ] New backward-compatible public API
+* [ ] Existing public API or documented behavior changed
+* [ ] Backward compatibility may be affected
+* [ ] PHP, extension, platform or dependency requirements changed
+
+
+
+## Validation
+
+* [ ] `composer ic:ci`
+* [ ] Expected behavior is covered
+* [ ] Boundary and edge cases are covered
+* [ ] Failure and exception paths are covered
+* [ ] Public API usage is covered
+
+
+
+
+Focused validation
+
+
+
+* [ ] `composer ic:test:syntax`
+* [ ] `composer ic:test:code`
+* [ ] `composer ic:test:lint`
+* [ ] `composer ic:test:sniff`
+* [ ] `composer ic:test:duplicates`
+* [ ] `composer ic:test:probe`
+* [ ] `composer ic:test:comments`
+* [ ] `composer ic:test:architecture`
+* [ ] `composer ic:test:static`
+* [ ] `composer ic:test:security`
+* [ ] `composer ic:test:refactor`
+
+
+
+
+
+## Performance
+
+
+
+* [ ] Relevant benchmarks were added or updated
+* [ ] Results were compared against a relevant baseline
+* [ ] `composer ic:benchmark`
+* [ ] `composer ic:bench:quick`
+* [ ] `composer ic:bench:chart`
+
+
+
+## Review Focus
+
+
+
+## Checklist
+
+* [ ] The feature is focused and excludes unrelated changes.
+* [ ] Tests cover the public contract and failure behavior.
+* [ ] Public API and backward-compatibility implications were considered.
+* [ ] Documentation, examples and type information were updated.
+* [ ] Performance claims are supported by reproducible benchmarks.
+* [ ] No credentials, secrets, personal data or sensitive debug output are included.
+* [ ] I followed `CONTRIBUTING.md` and the engineering principles.
diff --git a/.github/PULL_REQUEST_TEMPLATE/maintenance.md b/.github/PULL_REQUEST_TEMPLATE/maintenance.md
new file mode 100644
index 0000000..a4cab0a
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/maintenance.md
@@ -0,0 +1,91 @@
+## Maintenance Change
+
+Describe what changed, why it was needed and the expected effect on development, CI or releases.
+
+
+
+## Category
+
+* [ ] Dependency update
+* [ ] CI or workflow change
+* [ ] Build or release tooling
+* [ ] PHPForge configuration
+* [ ] Development tooling
+* [ ] Repository maintenance
+* [ ] Other
+
+## Impact and Compatibility
+
+* [ ] Runtime behavior is unaffected
+* [ ] Development workflow changed
+* [ ] CI or release behavior changed
+* [ ] Supported PHP, extension, platform or dependency requirements changed
+* [ ] Generated files or configuration changed
+* [ ] Backward compatibility may be affected
+
+
+
+## Validation
+
+* [ ] `composer ic:ci`
+* [ ] Relevant workflow or job was exercised
+* [ ] Supported matrix or dependency mode was considered
+* [ ] Generated or published files were verified
+* [ ] Failure and rollback behavior was considered
+
+
+
+
+Focused validation
+
+
+
+* [ ] `composer ic:test:syntax`
+* [ ] `composer ic:test:code`
+* [ ] `composer ic:test:lint`
+* [ ] `composer ic:test:sniff`
+* [ ] `composer ic:test:duplicates`
+* [ ] `composer ic:test:probe`
+* [ ] `composer ic:test:comments`
+* [ ] `composer ic:test:architecture`
+* [ ] `composer ic:test:static`
+* [ ] `composer ic:test:security`
+* [ ] `composer ic:test:refactor`
+
+
+
+
+
+## Review Focus
+
+
+
+## Checklist
+
+* [ ] The change is focused and excludes unrelated source refactoring.
+* [ ] Dependency or workflow changes are minimal and justified.
+* [ ] Public API and backward-compatibility implications were considered.
+* [ ] Documentation and generated files were updated where required.
+* [ ] No credentials, secrets, personal data or sensitive debug output are included.
+* [ ] I followed `CONTRIBUTING.md` and the engineering principles.
diff --git a/.github/PULL_REQUEST_TEMPLATE/performance.md b/.github/PULL_REQUEST_TEMPLATE/performance.md
new file mode 100644
index 0000000..ce2d10d
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/performance.md
@@ -0,0 +1,99 @@
+## Bottleneck
+
+Describe the measured performance problem, affected execution path and practical impact.
+
+
+
+## Optimization
+
+Describe the change, why it improves the measured path and any trade-offs introduced.
+
+## Correctness and Compatibility
+
+* [ ] Observable behavior remains unchanged
+* [ ] Public API remains compatible
+* [ ] Error and exception behavior remains compatible
+* [ ] Behavior or public API changed intentionally
+* [ ] PHP, extension, platform or dependency requirements changed
+
+
+
+## Benchmark Evidence
+
+* [ ] Relevant benchmarks were added or updated
+* [ ] Results were compared against a relevant baseline
+* [ ] Multiple stable runs were considered
+* [ ] Runtime impact was measured
+* [ ] Memory or allocation impact was measured where relevant
+* [ ] `composer ic:benchmark`
+* [ ] `composer ic:bench:quick`
+* [ ] `composer ic:bench:chart`
+
+
+
+## Validation
+
+* [ ] `composer ic:ci`
+* [ ] Expected behavior remains covered
+* [ ] Boundary and failure paths remain covered
+* [ ] Performance-sensitive behavior is covered
+
+
+
+
+Focused validation
+
+
+
+* [ ] `composer ic:test:syntax`
+* [ ] `composer ic:test:code`
+* [ ] `composer ic:test:lint`
+* [ ] `composer ic:test:sniff`
+* [ ] `composer ic:test:duplicates`
+* [ ] `composer ic:test:probe`
+* [ ] `composer ic:test:comments`
+* [ ] `composer ic:test:architecture`
+* [ ] `composer ic:test:static`
+* [ ] `composer ic:test:security`
+* [ ] `composer ic:test:refactor`
+
+
+
+
+
+## Review Focus
+
+
+
+## Checklist
+
+* [ ] The optimization targets a measured bottleneck.
+* [ ] Results are reproducible in comparable environments.
+* [ ] Correctness was not traded for an unverified micro-optimization.
+* [ ] Public API and backward-compatibility implications were considered.
+* [ ] Benchmark and documentation changes are included where required.
+* [ ] No credentials, secrets, personal data or sensitive debug output are included.
+* [ ] I followed `CONTRIBUTING.md` and the engineering principles.
diff --git a/.github/PULL_REQUEST_TEMPLATE/refactor.md b/.github/PULL_REQUEST_TEMPLATE/refactor.md
new file mode 100644
index 0000000..588be4f
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/refactor.md
@@ -0,0 +1,108 @@
+## Intent and Scope
+
+Describe what was restructured, why it was necessary and what remains intentionally unchanged.
+
+
+
+## Behavioral Guarantee
+
+* [ ] No observable behavior changed
+* [ ] Public API remains unchanged
+* [ ] Existing behavior was intentionally corrected
+* [ ] Public API or documented behavior changed
+* [ ] Backward compatibility may be affected
+
+
+
+## Design Notes
+
+
+
+## Validation
+
+* [ ] `composer ic:ci`
+* [ ] Existing behavior remains covered
+* [ ] Relevant regression and edge cases are covered
+* [ ] Public API compatibility was verified
+
+
+
+
+Focused validation
+
+
+
+* [ ] `composer ic:test:syntax`
+* [ ] `composer ic:test:code`
+* [ ] `composer ic:test:lint`
+* [ ] `composer ic:test:sniff`
+* [ ] `composer ic:test:duplicates`
+* [ ] `composer ic:test:probe`
+* [ ] `composer ic:test:comments`
+* [ ] `composer ic:test:architecture`
+* [ ] `composer ic:test:static`
+* [ ] `composer ic:test:security`
+* [ ] `composer ic:test:refactor`
+
+
+
+
+
+## Performance
+
+
+
+* [ ] Results were compared against a relevant baseline
+* [ ] `composer ic:benchmark`
+* [ ] `composer ic:bench:quick`
+* [ ] `composer ic:bench:chart`
+
+
+
+## Review Focus
+
+
+
+## Checklist
+
+* [ ] The refactor is focused and excludes unrelated behavior changes.
+* [ ] Complexity was reduced without unnecessary abstraction or file growth.
+* [ ] Existing contracts and failure behavior remain covered.
+* [ ] Public API and backward-compatibility implications were considered.
+* [ ] Documentation and type information were updated where required.
+* [ ] No credentials, secrets, personal data or sensitive debug output are included.
+* [ ] I followed `CONTRIBUTING.md` and the engineering principles.
diff --git a/.github/PULL_REQUEST_TEMPLATE/security_reliability.md b/.github/PULL_REQUEST_TEMPLATE/security_reliability.md
new file mode 100644
index 0000000..ef2ca28
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE/security_reliability.md
@@ -0,0 +1,92 @@
+
+
+## Concern
+
+Describe the security weakness, reliability failure mode or defensive gap being addressed.
+
+
+
+## Mitigation
+
+Describe how the change reduces the risk and what assumptions or limitations remain.
+
+## Impact and Compatibility
+
+* [ ] Security hardening with no observable behavior change
+* [ ] Reliability improvement with no public API change
+* [ ] Failure or exception behavior changed
+* [ ] Public API or documented behavior changed
+* [ ] Backward compatibility may be affected
+* [ ] PHP, extension, platform or dependency requirements changed
+
+
+
+## Validation
+
+* [ ] `composer ic:ci`
+* [ ] Security-sensitive or failure behavior is covered
+* [ ] Abuse, malformed-input or failure paths are covered
+* [ ] Regression coverage was added or updated
+* [ ] `composer ic:test:security`
+
+
+
+
+Focused validation
+
+
+
+* [ ] `composer ic:test:syntax`
+* [ ] `composer ic:test:code`
+* [ ] `composer ic:test:lint`
+* [ ] `composer ic:test:sniff`
+* [ ] `composer ic:test:duplicates`
+* [ ] `composer ic:test:probe`
+* [ ] `composer ic:test:comments`
+* [ ] `composer ic:test:architecture`
+* [ ] `composer ic:test:static`
+* [ ] `composer ic:test:security`
+* [ ] `composer ic:test:refactor`
+
+
+
+
+
+## Review Focus
+
+
+
+## Checklist
+
+* [ ] Confidential vulnerability details are not exposed publicly.
+* [ ] The change is focused and avoids unrelated refactoring.
+* [ ] Security or reliability claims are supported by tests.
+* [ ] Failure paths and backward-compatibility implications were considered.
+* [ ] Documentation and upgrade guidance were updated where required.
+* [ ] No credentials, secrets, personal data or sensitive debug output are included.
+* [ ] I followed `SECURITY.md`, `CONTRIBUTING.md` and the engineering principles.
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 9c2638f..eff64bb 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -2,49 +2,71 @@
## Our Commitment
-We are committed to making participation in this project a harassment-free
-experience for everyone, regardless of age, body size, disability, ethnicity,
-gender identity and expression, level of experience, nationality, personal
-appearance, race, religion or sexual identity and orientation.
+We are committed to providing a welcoming, inclusive and harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity or expression, level of experience, nationality, personal appearance, race, religion, sexual identity or sexual orientation.
## Expected Behavior
-Examples of behavior that contributes to a positive environment:
+Examples of behavior that contributes to a positive environment include:
-- Be respectful and constructive.
-- Assume good intent and ask clarifying questions.
-- Give and receive feedback professionally.
-- Focus on what is best for the community and project.
+* Being respectful, constructive and considerate
+* Giving and receiving feedback professionally
+* Disagreeing with ideas without attacking individuals
+* Respecting differing viewpoints and experiences
+* Accepting responsibility, apologizing when appropriate and learning from mistakes
+* Focusing on what is best for the project and its community
## Unacceptable Behavior
Examples of unacceptable behavior include:
-- Harassment, discrimination or personal attacks.
-- Trolling, insulting or derogatory comments.
-- Publishing private information without consent.
-- Any conduct that is inappropriate in a professional setting.
-
-## Enforcement Responsibilities
-
-Project maintainers are responsible for clarifying and enforcing this code of
-conduct. They may remove, edit or reject comments, commits, code, issues, and
-other contributions that violate this policy.
+* Harassment, discrimination, intimidation or personal attacks
+* Trolling, insults, threats or derogatory comments
+* Sexualized language, imagery or unwanted attention
+* Repeated disruption of discussions or project activities
+* Publishing private or identifying information without permission
+* Retaliating against anyone who reports an incident or participates in an investigation
+* Any conduct that would reasonably be considered inappropriate in a professional setting
## Scope
This code of conduct applies in all project spaces, including:
-- Issue trackers
-- Pull requests
-- Discussions and chat related to the project
-- Any public or private communication where someone represents the project
+* Issues, pull requests and code reviews
+* Discussions and project-related chat
+* Documentation, commits and other contributions
+* Public or private communication where an individual represents the project or its community
## Reporting
-To report unacceptable behavior, contact project maintainers privately.
+Report unacceptable behavior privately to the project maintainers.
+
+Do not include sensitive incident details in a public issue, discussion or pull request. When no private contact method is available, open a public issue requesting a private communication channel without describing the incident.
+
+Reports should include, when available:
+
+* A description of what occurred
+* Relevant links, screenshots or other supporting information
+* The approximate date and location of the incident
+* Any immediate safety or confidentiality concerns
+
+All reports will be reviewed as confidentially and impartially as reasonably possible. Information will be shared only when necessary to investigate and respond to the report.
+
+## Enforcement Responsibilities
+
+Project maintainers are responsible for interpreting and enforcing this code of conduct.
+
+Maintainers may remove, edit or reject comments, commits, code, issues, pull requests and other contributions that violate this policy. Maintainers who have a conflict of interest regarding a report should not participate in its review.
## Enforcement
-Maintainers may take any action they deem appropriate, including warnings,
-temporary bans or permanent bans from community participation.
+Actions will be based on the severity, frequency and context of the behavior and may include:
+
+* A private warning
+* Removal or editing of inappropriate content
+* Temporary restrictions on project participation
+* Permanent removal from project spaces
+* Reporting serious threats or unlawful conduct to the relevant platform or authorities
+
+Enforcement decisions should be proportionate, documented privately and applied consistently.
+
+Retaliation against reporters, witnesses or participants in an investigation is prohibited.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9950065..ad81ec1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,18 +1,18 @@
# Contributing
-Thanks for contributing.
+Thanks for contributing to this project.
## Before You Start
-- Review the project code of conduct.
-- For security issues, use private reporting and avoid opening a public issue.
-- Check existing issues and pull requests first to avoid duplicates.
+* Review `CODE_OF_CONDUCT.md`.
+* Report security vulnerabilities privately according to `SECURITY.md`.
+* Search existing issues and pull requests to avoid duplicate work.
+* An issue is not required for small fixes or improvements discovered during development.
+* Discuss substantial API, architectural or compatibility changes before implementation.
## Local Setup
-Requirements:
-
-- See `README.md` for current PHP and Composer requirements.
+Review `README.md` and `composer.json` for supported PHP versions, extensions, dependencies and project-specific requirements.
Install dependencies:
@@ -20,49 +20,180 @@ Install dependencies:
composer install
```
+Inspect the detected PHPForge configuration:
+
+```bash
+composer ic:doctor
+```
+
+Do not modify files inside `vendor/`.
+
+## Engineering Standards
+
+Before changing or reviewing code, read and follow:
+
+```text
+vendor/infocyph/phpforge/resources/engineering-principles.md
+```
+
+These principles apply equally to human contributors and automated coding agents. They define the expected approach to implementation decisions, scope control, architecture, performance, security, compatibility, testing and maintainability.
+
+Project-specific requirements may extend these principles but should not silently weaken them.
+
## Development Workflow
-Typical contributor workflow:
+1. Create a branch from the repository’s default branch.
+2. Make one focused logical change.
+3. Add or update tests for changed behavior.
+4. Run relevant focused checks during development.
+5. Apply automated processing where appropriate.
+6. Review every automatically modified file.
+7. Run the complete CI suite before opening a pull request.
+8. Add reproducible benchmark evidence for performance-related changes.
+9. Complete the pull request template accurately.
+
+## Automated Processing
+
+Run all configured processors:
+
+```bash
+composer ic:process
+```
+
+Run an individual processor when only a targeted change is needed:
+
+```bash
+composer ic:process:refactor
+composer ic:process:lint
+composer ic:process:sniff
+```
+
+Automated processing may modify source files and `composer.json`. Review all resulting changes before committing.
-1. Create a branch from `main`.
-2. Make focused changes.
-3. Run quality checks locally.
-4. Open a pull request with context and verification notes.
+## Validation
-Recommended checks:
+Run the complete project validation suite before opening a pull request:
```bash
-composer ic:tests
+composer ic:ci
```
-Useful targeted commands:
+When `composer ic:ci` passes, running the same checks individually is unnecessary.
+
+Use focused commands while developing or when the complete suite cannot run:
+
+
+Focused validation commands
```bash
composer ic:test:syntax
composer ic:test:code
composer ic:test:lint
composer ic:test:sniff
+composer ic:test:duplicates
+composer ic:test:probe
+composer ic:test:comments
+composer ic:test:architecture
composer ic:test:static
composer ic:test:security
-composer ic:test:architecture
+composer ic:test:refactor
+```
+
+
+
+When `composer ic:ci` cannot complete, document:
+
+* Why it could not complete
+* Which focused checks passed
+* Relevant PHP, dependency, extension or platform limitations
+* Any remaining validation risk
+
+Do not suppress, baseline, exclude or weaken a check merely to make validation pass. Any configuration or baseline change must be intentional and explained in the pull request.
+
+## Tests
+
+Test observable behavior and public contracts rather than internal implementation details.
+
+Include relevant coverage for:
+
+* New or corrected behavior
+* Regression scenarios
+* Boundary and edge cases
+* Failure and exception paths
+* Public API compatibility
+* PHP-version, dependency, extension or platform-sensitive behavior
+
+A bug fix should normally include a regression test that fails without the fix.
+
+## Performance Changes
+
+Run benchmarks when performance is affected or claimed:
+
+```bash
+composer ic:benchmark
```
-Auto-fix and processing helpers:
+Additional benchmark commands:
```bash
-composer ic:process
+composer ic:bench:quick
+composer ic:bench:chart
+```
+
+Performance claims must include reproducible before-and-after results from comparable environments. Avoid conclusions based on a single unstable run.
+
+Add or update benchmark coverage when existing benchmarks do not represent the changed execution path.
+
+## Configuration
+
+Inspect the active PHPForge configuration sources:
+
+```bash
+composer ic:list-config
+composer ic:list-config --json
+```
+
+Publish a configuration file only when the project requires rules that differ from PHPForge defaults:
+
+```bash
+composer ic:publish-config
```
+When changing quality configuration:
+
+* Explain why the current rule is unsuitable
+* Keep exclusions narrow
+* Avoid weakening checks globally for one change
+* Document compatibility or baseline implications
+
## Pull Request Guidelines
-- Keep pull requests scoped to one logical change.
-- Include why the change is needed and what behavior changed.
-- Add or update tests when behavior changes.
-- Update docs when command behavior, config, or workflow behavior changes.
-- Ensure CI is green before requesting review.
+* Keep each pull request limited to one logical change.
+* Explain what changed, why it was needed and the expected behavior.
+* Identify public API, backward-compatibility, PHP, extension, platform or dependency impacts.
+* Select only validation and benchmark checkboxes that reflect work actually performed.
+* Add or update tests for behavior changes.
+* Update documentation, examples, types and configuration where required.
+* Exclude unrelated formatting, refactoring, dependency or generated-file changes.
+* Ensure CI passes before requesting review.
+* Address review feedback through focused follow-up changes.
+
+Draft pull requests are welcome for incomplete work or early design feedback, but validation claims and checklist items must remain accurate.
## Reporting Bugs and Requesting Features
-- Use issue templates for bugs, regressions, CI failures, documentation updates, questions, and feature requests.
-- Include reproducible steps, expected behavior, and actual behavior.
-- Share environment details (PHP version, OS, Composer version).
+Use the relevant issue template for bugs, regressions, CI failures, documentation problems, questions and feature requests.
+
+Include when relevant:
+
+* A clear description of the problem or proposed behavior
+* A minimal reproduction
+* Expected and actual behavior
+* Package and dependency versions
+* PHP and Composer versions
+* Operating system and relevant extensions
+* Logs or error output with sensitive information removed
+
+Small, self-contained fixes may be submitted directly as pull requests. Larger behavioral, architectural or compatibility changes should be discussed first.
+
+Security vulnerabilities must not be reported through public issues, discussions or pull requests.
diff --git a/SECURITY.md b/SECURITY.md
index 37a355e..ca14478 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -2,48 +2,51 @@
## Supported Versions
-The project currently supports security updates for the latest release.
+Security updates are provided for the latest stable release.
+
+Reports affecting older versions are welcome, but fixes may be released only for the latest version. Users should upgrade before confirming whether an issue remains present.
## Reporting a Vulnerability
-Please report vulnerabilities privately.
+Please report suspected vulnerabilities privately.
+
+1. Go to `Security` → `Advisories` → `Report a vulnerability`.
+2. If private vulnerability reporting is unavailable, open a public issue requesting a private security contact.
+3. Do not include vulnerability details in that issue or disclose them through public issues, discussions, pull requests or other public channels.
+
+Include when available:
-1. Use GitHub private vulnerability reporting for this repository (`Security` -> `Advisories` -> `Report a vulnerability`).
-2. If private reporting is unavailable, contact maintainers through a private channel.
-3. Do not open a public issue for security vulnerabilities.
+* Affected package version and component
+* PHP version and runtime environment
+* Relevant extensions or dependencies
+* Reproduction steps or a minimal proof of concept
+* Exploitation requirements and potential impact
+* Known workarounds or suggested remediation
-Please include:
+## Response and Disclosure
-- Affected package version(s)
-- PHP version and runtime environment
-- Reproduction steps or proof of concept
-- Impact assessment (confidentiality/integrity/availability)
-- Any known workaround
+The maintainers will make a best-effort attempt to:
-## Response Process
+* Acknowledge the report within five business days
+* Validate the report and assess its severity
+* Coordinate remediation and responsible disclosure
+* Publish a fix, mitigation or security advisory when appropriate
-- Initial acknowledgment: best effort, typically within a few days
-- Triage: best effort, based on maintainer availability
-- Fix and release timeline depends on severity and exploitability
+Resolution timelines depend on severity, exploitability, complexity and maintainer availability. These targets are not a service-level agreement.
-If a report is accepted, a patched release will be prepared and published. Credit will be provided unless you request otherwise.
+Please coordinate public disclosure with the maintainers so affected users have a reasonable opportunity to update or apply mitigations.
-## Protected by PHPForge
+Confirmed reporters will receive credit unless they request anonymity.
-This project is protected by [PHPForge](https://github.com/infocyph/PHPForge), an automated quality and security tooling layer for Infocyph PHP projects.
+## PHPForge Security Controls
-PHPForge helps keep the project reliable by running checks for:
+This project uses [PHPForge](https://github.com/infocyph/PHPForge) to automate security and quality checks, including:
-- Code style and standards
-- Tests and syntax validation
-- Static analysis and type safety
-- Security and taint analysis
-- Dependency vulnerability audit
-- Architecture boundary validation
-- Duplicate-code detection
-- API snapshot and comment-policy checks
-- Refactor safety checks
-- Benchmark and release-readiness checks
-- Git hooks and CI workflow protection
+* Test and syntax validation
+* Static and taint analysis
+* Dependency vulnerability auditing
+* Architecture validation
+* Release-readiness checks
+* Git hooks and CI enforcement
-These automated gates strengthen code quality, reduce security risk and help prevent regressions before merge or release.
+These controls help reduce security risk and prevent regressions, but they do not guarantee the absence of vulnerabilities or replace manual review and responsible reporting.