feat(skills): add IoT edge skills and align agent/instruction docs (#1431)

* feat(skills): add IoT edge skills and align agent/instruction docs

* fix(ci): handle fork permission errors in plugin structure check

* fix(ci): allow intentional Spanish vocabulary in codespell

* docs(skills): translate IoT edge skill content to English

* fix(ci): pass codespell and README validation

* chore: regenerate skills index after merge
This commit is contained in:
Sertxito
2026-04-29 03:15:42 +02:00
committed by GitHub
parent bf9136726b
commit e2ae5cc559
15 changed files with 995 additions and 8 deletions

View File

@@ -0,0 +1,63 @@
# Python IoT Edge Module Template
Use this template to structure implementation proposals and reviews.
## 0) Official Python Baseline
- Official references reviewed from <https://www.python.org/> and <https://docs.python.org/3/>.
- Language and stdlib usage validated against <https://docs.python.org/3/reference/> and <https://docs.python.org/3/library/>.
- Best practices reviewed from `references/python-official-best-practices.md`.
## 1) Module Summary
- Module name:
- Business capability:
- Inputs:
- Outputs:
- Trigger conditions:
## 2) Message Contract
- Schema version:
- Required fields:
- Optional fields:
- Error payload contract:
## 3) Runtime Configuration
- Python version:
- Base image:
- Environment variables:
- Desired properties:
- Resource limits:
## 4) Resilience
- Retry policy:
- Backoff policy:
- Queueing strategy:
- Idempotency approach:
- Timeout and circuit-breaker behavior:
## 5) Security
- Secret source (never inline):
- Identity and permissions:
- Command authorization model:
- Audit log requirements:
## 6) Observability
- Health signals:
- Business metrics:
- Error metrics:
- Correlation/trace requirements:
- Alert thresholds:
## 7) Validation Matrix
- Happy path tests:
- Malformed payload tests:
- Network interruption tests:
- Throughput and latency tests:
- Rollback validation:

View File

@@ -0,0 +1,48 @@
# Python Official References and Best Practices
Use these official Python resources before finalizing module architecture or implementation details.
## Official References
- Python home: <https://www.python.org/>
- Python documentation portal: <https://docs.python.org/3/>
- Python tutorial: <https://docs.python.org/3/tutorial/>
- Python language reference: <https://docs.python.org/3/reference/>
- Python standard library reference: <https://docs.python.org/3/library/>
- Python HOWTOs: <https://docs.python.org/3/howto/>
- Installing modules: <https://docs.python.org/3/installing/>
- Distributing modules: <https://docs.python.org/3/distributing/>
- PEP index: <https://peps.python.org/>
- PyPA packaging guide: <https://packaging.python.org/>
## Coding Best Practices
- Target and pin an explicit Python major/minor runtime for each deployment.
- Prefer explicit, readable code paths over clever compact logic.
- Use type hints for public interfaces and critical data transformations.
- Keep module responsibilities focused; separate protocol, business logic, and transport.
- Validate and sanitize external inputs at boundaries.
- Use structured exceptions with actionable error messages.
- Log with enough context for incident triage (correlation id, module id, message id).
## Reliability and Performance Best Practices
- Avoid blocking operations in high-frequency message paths.
- Enforce timeouts and bounded retries with exponential backoff and jitter.
- Design idempotent handlers for replay and duplicate deliveries.
- Use resource limits and monitor memory growth to prevent edge instability.
- Define graceful shutdown behavior to flush buffered state safely.
## Dependency and Supply Chain Best Practices
- Pin dependencies and document upgrade cadence.
- Prefer actively maintained libraries with clear release history.
- Track vulnerabilities and update dependencies regularly.
- Keep container images minimal and patched.
## Testing Best Practices
- Unit test parsing, validation, and routing logic.
- Add integration tests for module I/O boundaries.
- Add chaos tests for network loss, slow upstream, and restart scenarios.
- Verify rollback behavior and state recovery in deployment tests.