56 lines
2.3 KiB
Python
56 lines
2.3 KiB
Python
from pathlib import Path
|
|
import unittest
|
|
|
|
|
|
class TaskBreakdownPolicyTest(unittest.TestCase):
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
cls.skill = Path(__file__).parents[1].joinpath("SKILL.md").read_text()
|
|
cls.task_section = cls.skill.split("## Task and Dependency Breakdown", 1)[1].split("## Version Allocation", 1)[0]
|
|
|
|
def test_architecture_owns_complete_release_task_breakdown(self):
|
|
required = [
|
|
"Architecture owns complete Task decomposition",
|
|
"every Feature allocated to the release",
|
|
"reviews existing Tasks",
|
|
"at least two independently executable Tasks",
|
|
"every acceptance outcome",
|
|
"every applicable requirement",
|
|
"must not report planning readiness",
|
|
]
|
|
for marker in required:
|
|
self.assertIn(marker, self.task_section)
|
|
|
|
def test_task_lifecycle_and_readiness_rules_are_fail_closed(self):
|
|
required = [
|
|
"repository/component owner",
|
|
"acceptance-evidence requirements",
|
|
"implementation artifacts",
|
|
"inputs and outputs",
|
|
"failure boundaries",
|
|
"exclusions",
|
|
"verification steps",
|
|
"within-Feature sequencing",
|
|
"cross-Feature prerequisite",
|
|
"acyclic Task dependencies",
|
|
"creates missing Tasks",
|
|
"freely revise or remove only draft Tasks",
|
|
"must not be deleted or silently rewritten",
|
|
"Superseded or Cancelled",
|
|
"replacement links",
|
|
"invalidate prior readiness evidence",
|
|
"pre-approval state",
|
|
"renewed human `Approved for Implementation`",
|
|
"separate exact-task Kanban Focus admission",
|
|
"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 must invalidate prior readiness evidence",
|
|
]
|
|
self.assertIn("version: 1.7.0", self.skill)
|
|
for marker in required:
|
|
self.assertIn(marker, self.task_section)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|