Skip to content

docs: consolidate TDD/HIL customization rules - #147

Merged
zarfld merged 2 commits into
mainfrom
feat/146-consolidate-tdd-hil-rules
Jul 31, 2026
Merged

docs: consolidate TDD/HIL customization rules#147
zarfld merged 2 commits into
mainfrom
feat/146-consolidate-tdd-hil-rules

Conversation

@zarfld

@zarfld zarfld commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Closes #146
Part of #140

Summary

  • Replace the legacy Hardware-verified terminology with the canonical
    HIL-observed, HIL-test-executed, and HIL-verified statuses.
  • Keep .github/skills/hil-tdd/references/result-schema.md as the single
    authority for HIL status and outcome definitions.
  • Remove the duplicated preflight outcome table from the HIL-TDD skill.
  • Add explicit migration guidance for legacy HIL terminology.

Scope

Only these files changed:

  • AGENTS.md
  • .github/instructions/engineering-discipline.instructions.md
  • .github/skills/hil-tdd/SKILL.md
  • .github/prompts/apply-tdd-infrastructure-plan.prompt.md

Verification

  • Operative guidance contains no Hardware-verified definition.
  • Legacy labels occur only in the explicit migration warning.
  • All three canonical HIL statuses are present.
  • The duplicated Step C outcome table is removed.
  • The zero-results invariant remains.
  • git diff --check passes.
  • No fixtures, tests, agents, production code, or Phase 2 prompts changed.

- Narrowed workflow entry point to focus on approved PoKeysHal implementation work.
- Updated prompt to apply specifically to C and header files, enhancing clarity for TDD processes.
- Refined TDD cycle steps to emphasize the importance of issue traceability and adherence to TDD principles.
- Improved documentation structure for better readability and usability in TDD workflows.

## Description

Brief description of the changes in this PR.

## Related Issues

Fixes #
Implements #
Part of #

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Real-time / HAL component change

## Traceability

- **Requirements**: #
- **Architecture / Design**: #
- **Tests**: #

## Testing

Describe how this was tested:

- [ ] `bash test_compile.sh` passes
- [ ] `make -f Makefile.noqmake` builds without errors
- [ ] HAL userspace component loads (`halrun` / `loadusr`)
- [ ] HAL RT component loads (`halrun` / `loadrt`)
- [ ] No memory allocation in RT paths
- [ ] No blocking calls in RT paths

## Real-Time Safety Checklist (if RT code changed)

- [ ] No `malloc`/`free` in real-time thread paths
- [ ] No blocking socket operations (all sockets are `O_NONBLOCK`)
- [ ] RT function completes within timing budget (<50µs for PREEMPT_RT userspace/soft-RT; <5µs for RTAI/hard-RT kernel module)
- [ ] `mlockall` used where required
- [ ] HAL pin types are correct (`hal_s32_t`, `hal_bit_t`, `hal_float_t`)

## Checklist

- [ ] All tests pass
- [ ] Documentation updated alongside code changes
- [ ] No unrelated files changed
- [ ] Traceability links verified (PR links to implementing issue)
Copilot AI review requested due to automatic review settings July 31, 2026 16:09

@zarfld zarfld left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes required before merge.

The four-file scope, branch topology, canonical HIL terminology changes, and removal of the duplicated Step C outcome table are correct. One semantic regression remains in apply-tdd-infrastructure-plan.prompt.md: the patch removes the existing prohibition on claiming RT-validated and timing-validated, although #146 explicitly says not to otherwise change this prompt. Restore that guard after the legacy-label migration sentence, using canonical RT-validated / Timing-validated spelling.

The PR metadata also needs replacement. The current title and body describe a C99 TDD prompt rewrite, contain empty Fixes # / Part of # placeholders, and include irrelevant RT-code checklists. Use a Phase 3 consolidation title and a concise body containing Closes #146 and Part of #140, the exact four-file scope, and the documentation-only verification evidence.

No CI status contexts validate this documentation patch. The two successful workflow runs associated with the head are unrelated lifecycle issue-creation workflows and should not be cited as verification.


Use `Implemented` and `configuration-validated` precisely. Do not claim
`HIL-tested`, `hardware-verified`, `RT-validated`, or `timing-validated`. No newline at end of file
Use `Implemented` and `configuration-validated` precisely. Do not use legacy labels such as `HIL-tested` or `Hardware-verified`. Use `HIL-observed`,

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replacement drops the existing RT-validated / timing-validated claim prohibition. Issue #146 authorizes only terminology migration here and says not to otherwise change the prompt. Keep the new legacy-label warning, then retain a sentence such as: Do not claim RT-validated or Timing-validated without corresponding evidence.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

AGENTS.md uses non-sequential ordered-list numbering for rule IDs, which will render with incorrect numbering on GitHub and should be reformatted to preserve the intended rule numbers.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR updates PoKeysHal’s contributor/TDD documentation to standardize hardware-in-the-loop (HIL) evidence vocabulary and reduce duplication by pointing readers to the canonical HIL result schema.

Changes:

  • Replaced legacy “Hardware-verified” / “HIL-tested” terminology with HIL-observed, HIL-test-executed, and HIL-verified and added references to the shared schema.
  • Removed the duplicated preflight outcomes table from the hil-tdd skill doc in favor of the central references/result-schema.md.
  • Refined the TDD infrastructure plan prompt to discourage legacy labels and direct users to the schema for correct usage.
File summaries
File Description
AGENTS.md Updates status-term vocabulary for evidence reporting and points to the HIL schema.
.github/skills/hil-tdd/SKILL.md Removes duplicated outcome table and centralizes outcome/status guidance via schema reference.
.github/prompts/apply-tdd-infrastructure-plan.prompt.md Updates reporting guidance to avoid legacy labels and use schema-defined HIL terms.
.github/instructions/engineering-discipline.instructions.md Replaces legacy hardware-verification terminology with schema-defined HIL evidence terms.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread AGENTS.md
Comment on lines 35 to +36
6. **No RT shortcuts** — verify the complete call path; do not trust the name `Async`.
10. **Report exact evidence** — use precise status terms: Implemented / Compiled / Tested / Hardware-verified / RT-validated / Timing-validated.
10. **Report exact evidence** — use precise status terms: Implemented / Compiled / Tested / HIL-observed / HIL-test-executed / HIL-verified / RT-validated / Timing-validated. For HIL status definitions and outcomes, use `.github/skills/hil-tdd/references/result-schema.md`.
@zarfld zarfld changed the title feat(tdd): streamline PoKeysHal implementation workflow for C99 sources docs: consolidate TDD/HIL customization rules Jul 31, 2026

@zarfld zarfld left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final review against head 23003a72a671964ce568fc5c557afd711721b812.

No blocking findings remain.

Verified:

  • PR title/body now match Phase 3 scope and include Closes #146 / Part of #140;
  • exactly the four files approved by #146 are changed;
  • the prompt retains the original prohibition on claiming RT-validated and Timing-validated while adding the canonical HIL migration warning;
  • AGENTS.md and the engineering-discipline instruction use HIL-observed, HIL-test-executed, and HIL-verified and defer definitions to the shared result schema;
  • the duplicated Step C outcome table is removed from the HIL skill while the zero-results invariant remains;
  • no agents, Phase 2 prompts, fixtures, tests, production C/HAL, or result-schema files changed.

The Copilot comment about non-sequential numbering in AGENTS.md concerns pre-existing structure and is outside issue #146. It should be handled separately rather than broadening this PR.

The documentation-specific verification reported in the PR is sufficient for this scoped change. The workflow runs attached to the head are unrelated lifecycle issue-creation workflows and are not treated as validation.

PR #147 is ready to merge. Keep #140 open until the final Phase 3/parent-issue closure check is recorded.

@zarfld
zarfld merged commit 7485fad into main Jul 31, 2026
2 checks passed
@zarfld
zarfld deleted the feat/146-consolidate-tdd-hil-rules branch July 31, 2026 16:47
Sign up for free to 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.

Consolidate duplicated TDD/HIL customization rules

2 participants