refactor: implement concrete Delivery responsibility dispositions
This commit is contained in:
1 parent
cb6b41f1a5
commit
1bff2cefab
23 files changed
+231
-717
No files matched your search
@@ -0,0 +1,13 @@
|
||||
from pathlib import Path
|
||||
import os
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
def owner(name):
|
||||
base=Path(os.environ.get('DELIVERY_OWNER_ROOT',str(ROOT.parent)))
|
||||
direct=base/name/'SKILL.md'
|
||||
found=[direct] if direct.is_file() else list(base.glob('*/'+name+'/SKILL.md'))
|
||||
if len(found)!=1: raise RuntimeError('Owner missing or ambiguous: '+name+' under '+str(base))
|
||||
return found[0].read_text()
|
||||
def effective(path):
|
||||
text=(ROOT/path).read_text()
|
||||
routes={'references/runtime-and-ci.md':['ci-runtime-skic'], 'references/status-and-reporting.md':['status-reporting-skic'], 'references/failure-and-documentation.md':['ci-runtime-skic','status-reporting-skic','delivery-docs']}
|
||||
return text+'\n'+'\n'.join(owner(n) for n in routes.get(path,[]))
|
||||
Reference in new issue
Block a user