Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a55f5ea7b0 | ||
|
|
801f3847fa | ||
|
|
08dd1996e6 | ||
|
|
5cc95e0ce9 | ||
|
|
e324610416 | ||
|
|
ef7bdf015b | ||
|
|
a7efaf86fe | ||
|
|
091617ffe8 | ||
|
|
07634ab144 | ||
|
|
c7620c804a | ||
|
|
f9bef3bee6 |
@@ -0,0 +1,17 @@
|
||||
name: Validate skill
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Run policy tests
|
||||
run: python3 -m unittest discover -s tests -v
|
||||
- name: Validate whitespace
|
||||
run: git diff --check HEAD^ HEAD
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: corp-v1-channel-architecture
|
||||
description: "Use when operating or synchronizing a Corp v1 project's architecture channel. Maintains C4-based architecture documentation, Draw.io diagrams, architecture decisions, and requirements while correlating verified activity across the project's seven channels."
|
||||
version: 1.6.1
|
||||
version: 1.8.0
|
||||
author: Hermes Agent
|
||||
license: MIT
|
||||
metadata:
|
||||
@@ -32,6 +32,17 @@ https://gitea.lego-cloud.eu/home-v1-skills-code-agent/documentation-docusaurus
|
||||
|
||||
Load the global `corp-v1--glossary` skill from `https://gitea.lego-cloud.eu/home-v1-skills-code-agent/corp-v1--glossary` whenever project documentation needs to define or explain a reusable term. Maintain one canonical definition in the project's final top-level **Glossary** area and link to it from the owning domain page; do not duplicate glossary-style explanations across channel documentation.
|
||||
|
||||
## Shared Corp v1 System Login
|
||||
|
||||
When an authorized task requires login to a Corp v1 system being built or operated, follow the shared policy in `corp-v1--main` and use only the Bitwarden-injected runtime secrets named:
|
||||
|
||||
```text
|
||||
HL_V1_SSO_EMAIL
|
||||
HL_V1_SSO_PASSWORD
|
||||
```
|
||||
|
||||
Secret availability is capability, not authorization. Verify the destination origin and task purpose before login. Never print, inspect, log, hash, serialize, paste, screenshot, or persist either value; never place a value in a command line, URL, file, repository, prompt, Discord message, browser console, test fixture, CI output, or generated artifact. Never ask a human to paste a value into chat. If a variable is unavailable, report only its missing name and request Bitwarden/gateway injection. Login does not authorize account recovery, MFA or credential changes, permission changes, billing, spending, destructive operations, or access outside the approved project task.
|
||||
|
||||
## When to Use
|
||||
|
||||
Use this skill when:
|
||||
@@ -191,6 +202,23 @@ Use stable IDs such as `FR-0001` and `NFR-0001`. Requirements must be unambiguou
|
||||
|
||||
Architecture derives and maintains implementation-task semantics, dependencies, sequencing, and readiness from the FR/NFR solution. Scope hosts the canonical task records and reader pages under their owning Feature; Architecture must not create a competing task registry page or task navigation.
|
||||
|
||||
Architecture owns complete Task decomposition for every Feature allocated to the release.
|
||||
|
||||
Before reporting a release planning-ready, Architecture must:
|
||||
|
||||
1. Architecture creates missing Tasks, reviews existing Tasks, and retains, revises, supersedes, or removes them according to the current Feature outcomes and Architecture boundaries. Architecture may freely revise or remove only draft Tasks with no implementation approval, Kanban admission, execution, or completion evidence;
|
||||
2. define between two and six independently executable Tasks per Feature; permit one Task only when a recorded Architecture rationale proves it is the smallest atomic, independently verifiable boundary;
|
||||
3. map the Feature's Tasks collectively, exactly, and reciprocally to every acceptance-outcome ID and every applicable active `FR-*` and `NFR-*` record;
|
||||
4. encode acyclic within-Feature sequencing and require every entry Task to depend on all terminal Tasks of every prerequisite Feature;
|
||||
5. give each Task one specific outcome, repository/component owner, canonical/display identity, task-specific implementation artifacts, concrete inputs and outputs, failure boundaries, exclusions, verification steps, and future acceptance-evidence requirements;
|
||||
6. keep draft Tasks separate from implementation approval and Kanban Focus admission.
|
||||
|
||||
Architecture must not report planning readiness while any Feature allocated to the release lacks this complete Task breakdown. A Feature-shaped placeholder Task, a generated empty Task group, or requirement coverage without executable Tasks does not satisfy the gate.
|
||||
|
||||
Approved, Kanban-admitted, in-progress, or completed Tasks must not be deleted or silently rewritten. Retain an obsolete Task with a terminal Superseded or Cancelled status, its prior evidence and history, and explicit replacement links.
|
||||
|
||||
A material change to Task scope, outcome, dependency, repository, or component invalidates the Task's existing implementation approval, returns the Task to its pre-approval state, and always requires renewed human `Approved for Implementation` before implementation can resume. After renewed approval, execution still requires a separate exact-task Kanban Focus admission.
|
||||
|
||||
```text
|
||||
canonical_id | display_id | feature | outcome | scope | dependencies | owner | status | acceptance evidence | affected repository/component
|
||||
```
|
||||
@@ -201,9 +229,22 @@ Use canonical Task IDs `TASK-<ZERO_PADDED_NUMBER>` and separate project-scoped d
|
||||
|
||||
Maintain a version allocation registry linking Features to intended versions. Record target version, rationale, dependencies, readiness constraints, status, and human decision evidence. Hermes may analyze and propose allocation; the team decides which Feature goes into which version. Do not invent version assignments or treat a proposal as final.
|
||||
|
||||
## Delivery Readiness State
|
||||
|
||||
Architecture uses the task flow `IN_DESIGN → READY_FOR_DELIVERY → IN_PROGRESS`. `READY_FOR_DELIVERY` is a fail-closed, pre-execution readiness state: Architecture may emit it for an exact Task only when all of the following evidence is durable and linked to that Task:
|
||||
|
||||
1. an exact item-specific `Approved for Implementation` decision from a human team member;
|
||||
2. complete task inputs, including implementation artifacts, concrete inputs and outputs, failure boundaries, exclusions, verification steps, and future acceptance-evidence requirements;
|
||||
3. evidence that all entry dependencies are satisfied; and
|
||||
4. for a Task that affects the user interface or user experience, exact approved UI/UX implementation-handoff evidence; otherwise the readiness record explicitly records UI/UX as not applicable with a rationale.
|
||||
|
||||
`READY_FOR_DELIVERY` does not mean Focus admission, assignment, claim, implementation start, `delivery_started`, or `IN_PROGRESS`. Architecture records the satisfied gate and sends a handoff to Kanban for a separate exact-task Focus-admission decision; only the authorized delivery-flow owner may subsequently record `IN_PROGRESS` when implementation actually starts.
|
||||
|
||||
Scope owns the canonical Task lifecycle schema. Architecture must not silently mutate or outrun Scope-owned canonical lifecycle schema: when the schema cannot represent `READY_FOR_DELIVERY`, return the handoff to Scope for canonicalization and keep the Task in its prior state. Never infer this state from solution-package completeness, UI/UX discussion, dependency expectations, CI success, or implementation activity.
|
||||
|
||||
## Kanban Handoff
|
||||
|
||||
After human Feature implementation approval, Architecture sends dependency-ready task records to Kanban. Architecture does not place tasks into Focus `InBacklog`; Kanban records the separate human task-admission decision. Keep task dependencies and readiness evidence current when Kanban or Delivery reports drift.
|
||||
After human Feature implementation approval, Architecture applies the `READY_FOR_DELIVERY` gate to each exact Task and sends only qualifying task records to Kanban. Architecture does not place tasks into Focus `InBacklog`; Kanban records the separate human task-admission decision. Keep task dependencies and readiness evidence current when Kanban or Delivery reports drift.
|
||||
|
||||
## Proactive Iteration Requirement
|
||||
|
||||
@@ -263,6 +304,7 @@ Requires team approval for:
|
||||
14. Publishing static diagram exports without onboarding the editable `.drawio` source into Docusaurus.
|
||||
15. Reintroducing Architecture Feature pages or task reader navigation instead of linking canonical Scope pages.
|
||||
16. Renaming task display IDs by rewriting historic canonical identities, evidence, or append-only hashes.
|
||||
17. Treating `READY_FOR_DELIVERY` as automatic Focus admission or `IN_PROGRESS`, or emitting it without exact implementation approval, complete task inputs, satisfied entry dependencies, and applicable approved UI/UX handoff evidence.
|
||||
|
||||
## Verification Checklist
|
||||
|
||||
@@ -280,9 +322,11 @@ Requires team approval for:
|
||||
- [ ] ADR, FR, and NFR entries have stable IDs and traceability.
|
||||
- [ ] Every solution Feature has explicit human `Approved for Solution` evidence.
|
||||
- [ ] Eligible Features have dependency-aware task derivation and version proposals, with canonical task reader pages under their Scope Feature.
|
||||
- [ ] Every Feature allocated to the planned release has a reviewed, non-placeholder Task breakdown covering every acceptance outcome and applicable requirement, with acyclic within-Feature and cross-Feature dependencies.
|
||||
- [ ] Task display IDs use `<UPPERCASE_PROJECT_CODE>-TS-<NUMBER>` without rewriting historic canonical identities, evidence, or append-only hashes.
|
||||
- [ ] Only a human team member moved a Feature to `Approved for Implementation` or finalized its version.
|
||||
- [ ] Tasks were proposed to Kanban with readiness/dependency evidence; Architecture did not self-admit them to Focus `InBacklog`.
|
||||
- [ ] Every emitted `READY_FOR_DELIVERY` Task has exact implementation approval, complete task inputs, satisfied entry dependencies, and applicable approved UI/UX handoff evidence (or an explicit not-applicable rationale).
|
||||
- [ ] `READY_FOR_DELIVERY` remained distinct from Focus admission, assignment, claim, `delivery_started`, and `IN_PROGRESS`; Architecture did not self-admit Tasks to Focus `InBacklog`.
|
||||
- [ ] At least one useful solution artifact was improved, or the exact human approval/clarification gate was documented.
|
||||
- [ ] Proposed items remain visibly proposed.
|
||||
- [ ] Documentation and diagram checks passed.
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
from pathlib import Path
|
||||
import re
|
||||
import unittest
|
||||
|
||||
|
||||
COMMENT = re.compile(r"<!--.*?-->", re.DOTALL)
|
||||
|
||||
|
||||
def task_section(skill: str) -> str:
|
||||
operative = COMMENT.sub("", skill)
|
||||
return operative.split("## Task and Dependency Breakdown", 1)[1].split("## Version Allocation", 1)[0]
|
||||
|
||||
|
||||
def readiness_section(skill: str) -> str:
|
||||
operative = COMMENT.sub("", skill)
|
||||
return operative.split("## Delivery Readiness State", 1)[1].split("## Kanban Handoff", 1)[0]
|
||||
|
||||
|
||||
def policy_failures(section: str, approval_rule: str) -> list[str]:
|
||||
section = COMMENT.sub("", section)
|
||||
patterns = {
|
||||
"ownership": r"(?m)^Architecture owns complete Task decomposition for every Feature allocated to the release\.$",
|
||||
"lifecycle": r"(?m)^1\. Architecture creates missing Tasks, reviews existing Tasks, and retains, revises, supersedes, or removes them according to the current Feature outcomes and Architecture boundaries\. Architecture may freely revise or remove only draft Tasks with no implementation approval, Kanban admission, execution, or completion evidence;$",
|
||||
"cardinality": r"(?m)^2\. define between two and six independently executable Tasks per Feature; permit one Task only when a recorded Architecture rationale proves it is the smallest atomic, independently verifiable boundary;$",
|
||||
"mapping": r"(?m)^3\. map the Feature's Tasks collectively, exactly, and reciprocally to every acceptance-outcome ID and every applicable active `FR-\*` and `NFR-\*` record;$",
|
||||
"dependencies": r"(?m)^4\. encode acyclic within-Feature sequencing and require every entry Task to depend on all terminal Tasks of every prerequisite Feature;$",
|
||||
"contract": r"(?m)^5\. give each Task one specific outcome, repository/component owner, canonical/display identity, task-specific implementation artifacts, concrete inputs and outputs, failure boundaries, exclusions, verification steps, and future acceptance-evidence requirements;$",
|
||||
"separate-gates": r"(?m)^6\. keep draft Tasks separate from implementation approval and Kanban Focus admission\.$",
|
||||
"planning-readiness": r"(?m)^Architecture must not report planning readiness while any Feature allocated to the release lacks this complete Task breakdown\. A Feature-shaped placeholder Task, a generated empty Task group, or requirement coverage without executable Tasks does not satisfy the gate\.$",
|
||||
"protected-history": r"(?m)^Approved, Kanban-admitted, in-progress, or completed Tasks must not be deleted or silently rewritten\. Retain an obsolete Task with a terminal Superseded or Cancelled status, its prior evidence and history, and explicit replacement links\.$",
|
||||
"approval-invalidation": approval_rule,
|
||||
}
|
||||
return [name for name, pattern in patterns.items() if re.search(pattern, section) is None]
|
||||
|
||||
|
||||
def readiness_failures(section: str) -> list[str]:
|
||||
patterns = {
|
||||
"sequence": r"`IN_DESIGN → READY_FOR_DELIVERY → IN_PROGRESS`",
|
||||
"implementation-approval": r"exact item-specific `Approved for Implementation`",
|
||||
"complete-inputs": r"complete task inputs",
|
||||
"entry-dependencies": r"all entry dependencies are satisfied",
|
||||
"ui-ux-evidence": r"approved UI/UX implementation-handoff evidence",
|
||||
"ui-ux-not-applicable": r"explicitly records UI/UX as not applicable",
|
||||
"not-execution": r"does not mean Focus admission, assignment, claim, implementation start, `delivery_started`, or `IN_PROGRESS`",
|
||||
"kanban-admission": r"handoff to Kanban for a separate exact-task Focus-admission decision",
|
||||
"scope-schema": r"must not silently mutate or outrun Scope-owned canonical lifecycle schema",
|
||||
"scope-fallback": r"return the handoff to Scope for canonicalization and keep the Task in its prior state",
|
||||
}
|
||||
return [name for name, pattern in patterns.items() if re.search(pattern, section) is None]
|
||||
|
||||
|
||||
class TaskBreakdownPolicyTest(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.skill = Path(__file__).parents[1].joinpath("SKILL.md").read_text()
|
||||
cls.task_section = task_section(cls.skill)
|
||||
cls.approval_rule = (
|
||||
r"(?m)^A material change to Task scope, outcome, dependency, repository, or component invalidates the Task's existing implementation approval, returns the Task to its pre-approval state, and always requires renewed human `Approved for Implementation` before implementation can resume\. After renewed approval, execution still requires a separate exact-task Kanban Focus admission\.$"
|
||||
)
|
||||
|
||||
def test_operational_policy_is_complete_and_structured(self):
|
||||
self.assertIn("version: 1.8.0", self.skill)
|
||||
self.assertEqual(policy_failures(self.task_section, self.approval_rule), [])
|
||||
|
||||
def test_comments_and_weakened_rules_cannot_satisfy_policy(self):
|
||||
self.assertTrue(policy_failures(f"<!--{self.task_section}-->", self.approval_rule))
|
||||
mutations = {
|
||||
"draft-protection": ("with no implementation approval, Kanban admission, execution, or completion evidence", "even with implementation approval, Kanban admission, execution, or completion evidence"),
|
||||
"planning-readiness": ("must not report planning readiness", "may report planning readiness"),
|
||||
"placeholder-rejection": ("A Feature-shaped placeholder Task, a generated empty Task group, or requirement coverage without executable Tasks does not satisfy the gate.", ""),
|
||||
"cardinality": ("between two and six", "at least two"),
|
||||
"mapping": ("exactly, and reciprocally", "loosely"),
|
||||
"dependencies": ("all terminal Tasks", "some Tasks"),
|
||||
"approval": ("invalidates the Task's existing implementation approval", "invalidates prior readiness evidence"),
|
||||
"renewal": ("always requires renewed human", "may require renewed human"),
|
||||
}
|
||||
for name, (old, new) in mutations.items():
|
||||
with self.subTest(name=name):
|
||||
self.assertTrue(policy_failures(self.task_section.replace(old, new), self.approval_rule))
|
||||
|
||||
def test_ready_for_delivery_is_a_fail_closed_pre_execution_state(self):
|
||||
section = readiness_section(self.skill)
|
||||
self.assertEqual(readiness_failures(section), [])
|
||||
|
||||
def test_ready_for_delivery_gate_cannot_be_weakened(self):
|
||||
section = readiness_section(self.skill)
|
||||
mutations = [
|
||||
("exact item-specific `Approved for Implementation`", "implementation is expected"),
|
||||
("complete task inputs", "partial task inputs"),
|
||||
("all entry dependencies are satisfied", "entry dependencies are expected to be satisfied"),
|
||||
("approved UI/UX implementation-handoff evidence", "a UI/UX discussion"),
|
||||
("explicitly records UI/UX as not applicable with a rationale", "assumes UI/UX is not applicable"),
|
||||
("separate exact-task Focus-admission decision", "automatic Focus admission"),
|
||||
("does not mean Focus admission", "means Focus admission"),
|
||||
("return the handoff to Scope for canonicalization and keep the Task in its prior state", "continue with a local readiness state"),
|
||||
]
|
||||
for old, new in mutations:
|
||||
with self.subTest(old=old):
|
||||
changed = section.replace(old, new)
|
||||
self.assertNotEqual(changed, section)
|
||||
self.assertTrue(readiness_failures(changed))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user