From 468e1b0ea706d0ae4c3955b5ab0d78c5c5951458 Mon Sep 17 00:00:00 2001 From: xueli Date: Thu, 8 Jan 2026 21:06:00 +0800 Subject: [PATCH] create a standard-document-template.md --- .../standards}/directory-structure.md | 0 .../standards/standard-document-template.md | 287 ++++++++++++++++++ 2 files changed, 287 insertions(+) rename {standards => hyperfleet/standards}/directory-structure.md (100%) create mode 100644 hyperfleet/standards/standard-document-template.md diff --git a/standards/directory-structure.md b/hyperfleet/standards/directory-structure.md similarity index 100% rename from standards/directory-structure.md rename to hyperfleet/standards/directory-structure.md diff --git a/hyperfleet/standards/standard-document-template.md b/hyperfleet/standards/standard-document-template.md new file mode 100644 index 0000000..e7acb49 --- /dev/null +++ b/hyperfleet/standards/standard-document-template.md @@ -0,0 +1,287 @@ +# HyperFleet [Topic] Standard + + + +This document defines the standard [describe what the standard covers] for all HyperFleet components (API, Sentinel, Adapters). + +--- + +## Table of Contents + + + +1. [Overview](#overview) +2. [Section Name](#section-name) +3. [Examples](#examples) +4. [Action Items](#action-items) +5. [References](#references) + +--- + +## Overview + +### Goals + + + +- **Goal One**: Brief description of the first goal +- **Goal Two**: Brief description of the second goal +- **Goal Three**: Brief description of the third goal + +### Non-Goals + + + +- What this standard intentionally does not address +- Another out-of-scope item + +### Applicability + + + +This standard applies to: + +- All HyperFleet service repositories +- All adapter repositories owned by hyperfleet team +- Infrastructure and tooling repositories + +### Reference Implementation + + + +A shared Go library implementing this standard is available at: + +**Repository:** `github.com/openshift-hyperfleet/hyperfleet-[library-name]` *(planned - see [HYPERFLEET-XXX](https://issues.redhat.com/browse/HYPERFLEET-XXX))* + +--- + +## Section Name + + + +### Subsection + +Description of this subsection's content. + +| Column 1 | Column 2 | Column 3 | Description | +|----------|----------|----------|-------------| +| Value 1 | Value 2 | Value 3 | What this row represents | +| Value 4 | Value 5 | Value 6 | What this row represents | + +### Another Subsection + + + +All components MUST implement the following: + +- Requirement one +- Requirement two + +Components SHOULD also consider: + +- Recommendation one +- Recommendation two + +> **Note:** Include important clarifications or edge cases that readers should be aware of. + +**Rationale:** Explain the reasoning behind design decisions when it helps readers understand why the standard exists. + +--- + +## Configuration + + + +All components MUST support configuration via **command-line flags** and **environment variables**. + +| Option | Flag | Environment Variable | Default | Description | +|--------|------|---------------------|---------|-------------| +| Option Name | `--option-name` | `OPTION_NAME` | `default` | What this option controls | + +**Precedence** (highest to lowest): flags → environment variables → config file → defaults + +--- + +## Component-Specific Guidelines + + + +### API + +| Field | Description | +|-------|-------------| +| `field_name` | What this field represents | + +### Sentinel + +| Field | Description | +|-------|-------------| +| `field_name` | What this field represents | + +### Adapters + +| Field | Description | +|-------|-------------| +| `field_name` | What this field represents | + +--- + +## Examples + + + +### Basic Example + +```text +Example showing the basic format or usage +``` + +### Code Example + +```go +// ✅ DO: Describe what makes this correct +func correctExample() { + // Implementation following the standard +} + +// ❌ DON'T: Describe what makes this incorrect +func incorrectExample() { + // Implementation that violates the standard +} +``` + +### Complete Example + + + +```json +{ + "field": "value", + "nested": { + "example": "data" + } +} +``` + +--- + +## Enforcement + + + +This standard will be enforced through: + +### CI Validation + +- **Tool Name**: Description of automated validation +- See [HYPERFLEET-XXX](https://issues.redhat.com/browse/HYPERFLEET-XXX) for implementation status + +### Code Review + +- Reviewers should verify compliance during PR reviews +- Non-compliant code should not be merged + +--- + +## Action Items + + + +- **Action item name** + - Description: What needs to be done and why + - Acceptance Criteria: How to verify the work is complete + - Priority: High | Medium | Low + - Size: S | M | L | XL + +- **Another action item** + - Description: What needs to be done and why + - Acceptance Criteria: How to verify the work is complete + - Priority: High | Medium | Low + - Size: S | M | L | XL + +--- + +## References + +### External Resources + + + +- [External Resource Name](https://example.com/resource) +- [RFC XXXX - Description](https://www.rfc-editor.org/rfc/rfcXXXX.html) + +### Related HyperFleet Standards + + + +- [Logging Specification](./logging-specification.md) +- [Error Model](./error-model.md) +- [Health Endpoints](./health-endpoints.md)