Design: Configurable document types (#224)#225
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ef177f1 to
48198f6
Compare
tilmann-ochs
approved these changes
Apr 1, 2026
- Rename .ipsra.md to .hara.md and add .tara.md as example doc types - Add PL-a through PL-d (ISO 13849 machine safety) to SIL enum values - Change handbook description from "Operational" to "Product" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 tasks
nesono
added a commit
that referenced
this pull request
Apr 4, 2026
## Summary - Add YAML-driven configuration system for custom document types (field definitions + document type definitions) - Build Pydantic validation models dynamically from config at runtime, with identical behaviour to the static models - Wire optional `config` attribute into `requirement_library()`, `release_report()`, and their Python scripts - Add `generate_format_specification()` Bazel rule to auto-generate FORMAT_SPECIFICATION.md from config - Ship `default_fire_config.yaml` matching the built-in sysreq/swreq/regreq types (including new PL-a through PL-d values) - Document custom document types in README.md Implements the design from #225. ## New files | File | Purpose | |------|---------| | `fire/starlark/default_fire_config.yaml` | Default config matching built-in types | | `fire/starlark/config_models.py` | Pydantic models for config schema + `load_config()` | | `fire/starlark/dynamic_requirement_model.py` | Factory: config → Pydantic model at runtime | | `fire/starlark/generate_format_spec.py` | Generates FORMAT_SPECIFICATION.md from config | | `fire/starlark/format_spec.bzl` | Bazel rule `generate_format_specification()` | ## Test plan - [x] All 24 existing tests pass (backwards compatibility) - [x] New config_models_test validates config parsing and rejection of invalid configs - [x] New dynamic_requirement_model_test proves equivalence with static models (accept/reject same inputs) - [x] New generate_format_spec_test verifies generated output covers all document types and fields - [x] Full `bazel build //...` succeeds - [x] CI passes on all platforms 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Purpose
This PR is for team discussion and review of the proposed design before implementation begins.
🤖 Generated with Claude Code