@givolt/i3-composer-agent 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +1 -1
- package/.claude/commands/i3-sop.md +3 -3
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.gemini/commands/i3-sop.toml +3 -3
- package/README.md +22 -27
- package/commands/i3-sop.toml +3 -3
- package/docs/codex-setup.md +1 -1
- package/docs/other-hosts.md +1 -1
- package/docs/workbuddy-setup.md +1 -1
- package/evals/cases/i3-enterprise-sop.json +70 -32
- package/evals/zh-CN/cases/i3-enterprise-sop.json +77 -31
- package/package.json +1 -23
- package/plugin.json +1 -1
- package/skills/i3-enterprise-sop/SKILL.md +151 -91
- package/skills/i3-enterprise-sop/references/engineering-skeleton/directory-standard.md +29 -15
- package/skills/i3-enterprise-sop/references/handoff.py +171 -100
- package/skills/i3-enterprise-sop/references/read_text.py +60 -0
- package/skills/i3-enterprise-sop/references/technical-baseline/baselines/enterprise-application-technical-baseline-v0-0-4.md +28 -28
- package/skills/i3-enterprise-sop/references/technical-baseline/readme.md +9 -118
- package/skills/i3-enterprise-sop/references/{ad/templates → templates}/ad.md +34 -27
- package/skills/i3-enterprise-sop/references/{brd/templates → templates}/brd.md +21 -10
- package/skills/i3-enterprise-sop/references/{prd/templates → templates}/prd.md +57 -24
- package/skills/i3-enterprise-sop/references/{testcase/templates → templates}/testcase.md +32 -22
- package/docs/upstream-repository/AGENTS.md +0 -92
- package/docs/upstream-repository/CLAUDE.md +0 -60
- package/docs/upstream-repository/CONTRIBUTING.md +0 -137
- package/docs/upstream-repository/README.md +0 -8
- package/docs/upstream-repository/gitattributes.txt +0 -1
- package/docs/upstream-repository/gitignore.txt +0 -10
- package/docs/upstream-repository/manifest.json +0 -71
- package/docs/upstream-repository/opencode-skills.link +0 -1
- package/docs/upstream-repository/skill-gap.yml +0 -80
- package/docs/upstream-repository/skills-contributing.md +0 -15
- package/docs/upstream-repository/test-plugin-install.yml +0 -167
- package/skills/i3-enterprise-sop/references/ad/assets-manifest.json +0 -86
- package/skills/i3-enterprise-sop/references/ad/prompts/01-generate.md +0 -58
- package/skills/i3-enterprise-sop/references/ad/prompts/02-review.md +0 -54
- package/skills/i3-enterprise-sop/references/ad/prompts/03-revise.md +0 -54
- package/skills/i3-enterprise-sop/references/ad/prompts/04-recheck.md +0 -54
- package/skills/i3-enterprise-sop/references/ad/readme.md +0 -70
- package/skills/i3-enterprise-sop/references/assets-manifest.json +0 -230
- package/skills/i3-enterprise-sop/references/brd/assets-manifest.json +0 -83
- package/skills/i3-enterprise-sop/references/brd/prompts/01-generate.md +0 -51
- package/skills/i3-enterprise-sop/references/brd/prompts/02-review.md +0 -47
- package/skills/i3-enterprise-sop/references/brd/prompts/03-revise.md +0 -47
- package/skills/i3-enterprise-sop/references/brd/prompts/04-recheck.md +0 -47
- package/skills/i3-enterprise-sop/references/brd/readme.md +0 -50
- package/skills/i3-enterprise-sop/references/codebuddy-project-guide.md +0 -34
- package/skills/i3-enterprise-sop/references/controlled-handoff.md +0 -41
- package/skills/i3-enterprise-sop/references/controlled_handoff.py +0 -379
- package/skills/i3-enterprise-sop/references/engineering-skeleton/adoption.md +0 -200
- package/skills/i3-enterprise-sop/references/engineering-skeleton/catalog.json +0 -17
- package/skills/i3-enterprise-sop/references/engineering-skeleton/readme.md +0 -52
- package/skills/i3-enterprise-sop/references/handoff-contract.md +0 -196
- package/skills/i3-enterprise-sop/references/lifecycle-contract.md +0 -91
- package/skills/i3-enterprise-sop/references/plan-handoff.md +0 -73
- package/skills/i3-enterprise-sop/references/prd/assets-manifest.json +0 -109
- package/skills/i3-enterprise-sop/references/prd/prompts/01-generate.md +0 -64
- package/skills/i3-enterprise-sop/references/prd/prompts/02-review.md +0 -49
- package/skills/i3-enterprise-sop/references/prd/prompts/03-revise.md +0 -48
- package/skills/i3-enterprise-sop/references/prd/prompts/04-recheck.md +0 -47
- package/skills/i3-enterprise-sop/references/prd/readme.md +0 -137
- package/skills/i3-enterprise-sop/references/prd/template-contracts.md +0 -39
- package/skills/i3-enterprise-sop/references/prd/templates/ad.md +0 -17
- package/skills/i3-enterprise-sop/references/readme.md +0 -167
- package/skills/i3-enterprise-sop/references/recovery-contract.md +0 -65
- package/skills/i3-enterprise-sop/references/review-handoff.md +0 -105
- package/skills/i3-enterprise-sop/references/selection-handoff.md +0 -55
- package/skills/i3-enterprise-sop/references/selection_handoff.py +0 -225
- package/skills/i3-enterprise-sop/references/stages.json +0 -271
- package/skills/i3-enterprise-sop/references/technical-baseline/assets-manifest.json +0 -84
- package/skills/i3-enterprise-sop/references/template-contracts.md +0 -142
- package/skills/i3-enterprise-sop/references/testcase/assets-manifest.json +0 -91
- package/skills/i3-enterprise-sop/references/testcase/prompts/01-generate.md +0 -53
- package/skills/i3-enterprise-sop/references/testcase/prompts/02-review.md +0 -51
- package/skills/i3-enterprise-sop/references/testcase/prompts/03-revise.md +0 -49
- package/skills/i3-enterprise-sop/references/testcase/prompts/04-recheck.md +0 -51
- package/skills/i3-enterprise-sop/references/testcase/readme.md +0 -61
- package/skills/i3-enterprise-sop/references/verification/check_execution.py +0 -185
- package/skills/i3-enterprise-sop/references/verification/check_native_execution.py +0 -282
- package/skills/i3-enterprise-sop/references/verification/check_reads.py +0 -348
- package/skills/i3-enterprise-sop/references/verification/readme.md +0 -149
- package/skills/i3-enterprise-sop/references/verification/review-output.schema.json +0 -155
- package/skills/i3-enterprise-sop/references/verification/review_handoff.py +0 -329
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
"""One-topic path selection, used only after controlled readonly preflight.
|
|
2
|
-
|
|
3
|
-
Business documents and Plan are never written. Source quotes bind paths, not
|
|
4
|
-
business compatibility or approval. Existing handoff storage remains canonical.
|
|
5
|
-
"""
|
|
6
|
-
import copy
|
|
7
|
-
import importlib.util
|
|
8
|
-
import json
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
import re
|
|
11
|
-
import sys
|
|
12
|
-
import uuid
|
|
13
|
-
|
|
14
|
-
sys.dont_write_bytecode = True
|
|
15
|
-
RESOURCES = Path(__file__).resolve().parent
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def _module(name, file):
|
|
19
|
-
spec = importlib.util.spec_from_file_location(name, file)
|
|
20
|
-
module = importlib.util.module_from_spec(spec); spec.loader.exec_module(module)
|
|
21
|
-
return module
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
handoff = _module('selection_json', RESOURCES/'handoff.py')
|
|
25
|
-
native = _module('selection_native', RESOURCES/'verification/check_native_execution.py')
|
|
26
|
-
ROLES = {'prd', 'ad', 'testCase', 'prototype'}
|
|
27
|
-
PAIRS = {('ad', 'prd'), ('testCase', 'prd'), ('testCase', 'ad'), ('prototype', 'prd')}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def _file(root, raw):
|
|
31
|
-
if not isinstance(raw, str) or not raw.strip():
|
|
32
|
-
raise ValueError('selection requires an explicit file path')
|
|
33
|
-
path = (root/raw).resolve()
|
|
34
|
-
if not path.is_relative_to(root) or not path.is_file() or not path.read_text(encoding='utf-8').strip():
|
|
35
|
-
raise ValueError('selection source missing, empty or outside project: '+raw)
|
|
36
|
-
return str(path.relative_to(root))
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def plan(project_root, request):
|
|
40
|
-
root = Path(project_root).resolve()
|
|
41
|
-
fields = {'schemaVersion', 'operation', 'work', 'manifest', 'capabilityId', 'prdId', 'target', 'links', 'inputs', 'task', 'preview'}
|
|
42
|
-
if not isinstance(request, dict) or set(request)-fields or type(request.get('schemaVersion')) is not int or request['schemaVersion'] != 1:
|
|
43
|
-
raise ValueError('selection request contract differs')
|
|
44
|
-
if request.get('operation') not in ('selection-preview', 'selection-switch'):
|
|
45
|
-
raise ValueError('explicit selection operation required')
|
|
46
|
-
if not all(isinstance(request.get(k), str) and request[k].strip() for k in ('work', 'capabilityId', 'prdId', 'task')):
|
|
47
|
-
raise ValueError('explicit work and selected topic identity required')
|
|
48
|
-
mf = handoff._manifest_path(root, request.get('manifest'))
|
|
49
|
-
before_bytes = mf.read_bytes(); raw = before_bytes.decode('utf-8')
|
|
50
|
-
before = handoff._load(before_bytes)
|
|
51
|
-
if before['scope']['work'] != request['work']:
|
|
52
|
-
raise ValueError('selection manifest belongs to another work')
|
|
53
|
-
matches = [t for t in before['selected'].get('topics', []) if all(t[k] == request[k] for k in ('capabilityId', 'prdId'))]
|
|
54
|
-
if len(matches) != 1:
|
|
55
|
-
raise ValueError('explicit topic is not uniquely selected; no latest-version fallback')
|
|
56
|
-
old_topic = matches[0]; topic = copy.deepcopy(old_topic)
|
|
57
|
-
target = request.get('target')
|
|
58
|
-
if not isinstance(target, dict) or set(target)-ROLES or not isinstance(target.get('prd'), str):
|
|
59
|
-
raise ValueError('target must explicitly name PRD and only local companion roles')
|
|
60
|
-
for role, path in target.items():
|
|
61
|
-
if path is None and role != 'prd': topic.pop(role, None)
|
|
62
|
-
else: topic[role] = _file(root, path)
|
|
63
|
-
expected = handoff._selected_only(before)
|
|
64
|
-
expected['selected']['topics'][before['selected']['topics'].index(old_topic)] = topic
|
|
65
|
-
# The selected scope supplies shared dependencies; no unrelated topic is loaded.
|
|
66
|
-
selected = handoff._resolve(root, before, request['capabilityId'], request['prdId'], ())['references']
|
|
67
|
-
paths = [_file(root, item['path']) for item in selected]
|
|
68
|
-
paths += [_file(root, topic[role]) for role in sorted(ROLES) if role in topic]
|
|
69
|
-
inputs = request.get('inputs', [])
|
|
70
|
-
if not isinstance(inputs, list): raise ValueError('inputs must be explicit paths')
|
|
71
|
-
paths += [_file(root, p) for p in inputs]
|
|
72
|
-
delivery = before.get('delivery', {})
|
|
73
|
-
if not isinstance(delivery, dict): raise ValueError('delivery must remain an object')
|
|
74
|
-
plan_paths = [_file(root, delivery[k]) for k in ('plan', 'taskTarget') if k in delivery]
|
|
75
|
-
plan_paths += [_file(root, p) for p in ('tasks/plan.md', 'tasks/todo.md') if (root/p).exists()]
|
|
76
|
-
paths = list(dict.fromkeys(paths+plan_paths))
|
|
77
|
-
links = request.get('links', [])
|
|
78
|
-
if not isinstance(links, list): raise ValueError('links must be a caller supplied source-evidence array')
|
|
79
|
-
by_pair = {}
|
|
80
|
-
for link in links:
|
|
81
|
-
if not isinstance(link, dict) or set(link) != {'role', 'upstreamRole', 'line', 'quote'}:
|
|
82
|
-
raise ValueError('source evidence needs role/upstreamRole/line/quote')
|
|
83
|
-
pair = (link['role'], link['upstreamRole'])
|
|
84
|
-
if pair not in PAIRS or pair in by_pair: raise ValueError('ambiguous or unsupported companion source evidence')
|
|
85
|
-
by_pair[pair] = link
|
|
86
|
-
gaps = []; checks = []
|
|
87
|
-
for role, upstream_role in sorted(PAIRS):
|
|
88
|
-
if role not in topic: continue
|
|
89
|
-
link = by_pair.get((role, upstream_role)); upstream = topic.get(upstream_role)
|
|
90
|
-
lines = (root/topic[role]).read_text().splitlines(); passed = False
|
|
91
|
-
if link and upstream and type(link['line']) is int and 1 <= link['line'] <= len(lines):
|
|
92
|
-
quote = lines[link['line']-1]
|
|
93
|
-
tokens = re.findall(r'`([^`]+)`|\]\(([^)]+)\)', quote)
|
|
94
|
-
passed = quote == link['quote'] and any(upstream == token for pair in tokens for token in pair if token)
|
|
95
|
-
check = {'role': role, 'path': topic[role], 'upstreamRole': upstream_role, 'upstreamPath': upstream,
|
|
96
|
-
'passed': passed, 'evidence': link, 'semanticCompatibility': 'requires-human-review'}
|
|
97
|
-
checks.append(check)
|
|
98
|
-
if not passed: gaps.append({'code': 'companion_source_unconfirmed', **check})
|
|
99
|
-
diff = [{'role': role, 'before': old_topic.get(role), 'after': topic.get(role)}
|
|
100
|
-
for role in sorted(ROLES) if old_topic.get(role) != topic.get(role)]
|
|
101
|
-
tasks = []; mentions = []
|
|
102
|
-
changed_paths = {x[k] for x in diff for k in ('before', 'after') if x[k]}
|
|
103
|
-
for path in list(dict.fromkeys(plan_paths+[p for p in paths if p.startswith('tasks/')])):
|
|
104
|
-
for n, line in enumerate((root/path).read_text().splitlines(), 1):
|
|
105
|
-
checkbox = re.match(r'^\s*[-*]\s+\[([ xX])\]\s+(.+)', line)
|
|
106
|
-
if checkbox:
|
|
107
|
-
tasks.append({'path': path, 'line': n, 'state': 'completed' if checkbox[1].lower() == 'x' else 'unfinished', 'text': checkbox[2]})
|
|
108
|
-
found = sorted(p for p in changed_paths if p in line)
|
|
109
|
-
if found: mentions.append({'path': path, 'line': n, 'text': line, 'references': found})
|
|
110
|
-
base_request = {'schemaVersion': 1, 'operation': 'manual', 'work': request['work'],
|
|
111
|
-
'manifest': str(mf.relative_to(root)), 'reference': {'role': 'prd', 'path': topic['prd'],
|
|
112
|
-
'capabilityId': request['capabilityId'], 'prdId': request['prdId']},
|
|
113
|
-
'inputs': paths, 'task': request['task']+' 仅只读改选预检;不得自行登记、改稿或调整Plan。'}
|
|
114
|
-
return {'projectRoot': str(root), 'manifest': str(mf.relative_to(root)), 'request': request,
|
|
115
|
-
'beforeText': raw, 'expected': expected, 'beforeTopic': old_topic, 'afterTopic': topic,
|
|
116
|
-
'diff': diff, 'sourceChecks': checks, 'gaps': gaps, 'preflightRequest': base_request,
|
|
117
|
-
'sharedReferences': [x for x in selected if x['role'] not in ROLES],
|
|
118
|
-
'planImpact': {'paths': list(dict.fromkeys(plan_paths)), 'tasks': tasks, 'mentions': mentions,
|
|
119
|
-
'automaticallyUpdated': False, 'completionEvidence': 'checkbox text only; not execution proof',
|
|
120
|
-
'nextAction': '将选定AD及准确来源显式交原Plan核影响;修改计划与开工认可另行处理。'},
|
|
121
|
-
'engineeringReady': False, 'businessApproved': False}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def freeze(selection, files):
|
|
125
|
-
"""Outside-project preview evidence, not an approval or business JSON field."""
|
|
126
|
-
return {'schemaVersion': 1, 'kind': 'i3-sop-selection-preview', 'id': str(uuid.uuid4()),
|
|
127
|
-
'plan': copy.deepcopy(selection), 'files': copy.deepcopy(files)}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
def _intent(selection):
|
|
131
|
-
request = selection['request']
|
|
132
|
-
return {'projectRoot': selection['projectRoot'], 'manifest': selection['manifest'],
|
|
133
|
-
**{k: request[k] for k in ('work', 'capabilityId', 'prdId', 'links', 'inputs') if k in request},
|
|
134
|
-
'target': {k: selection['afterTopic'].get(k) for k in request['target']}}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
def apply(project_root, selection, receipt, *, authorized=False, on_store=None):
|
|
138
|
-
if authorized is not True: raise ValueError('exact selection authorization required')
|
|
139
|
-
root = Path(project_root).resolve()
|
|
140
|
-
if (receipt.get('schemaVersion') != 1 or receipt.get('kind') != 'i3-sop-selection-preview'
|
|
141
|
-
or not isinstance(receipt.get('id'), str) or not isinstance(receipt.get('files'), dict)):
|
|
142
|
-
raise ValueError('valid saved selection preview required')
|
|
143
|
-
saved = receipt['plan']
|
|
144
|
-
if (_intent(saved) != _intent(selection) or saved['expected'] != selection['expected']
|
|
145
|
-
or saved['projectRoot'] != str(root)):
|
|
146
|
-
raise ValueError('preview does not name this exact selection')
|
|
147
|
-
if saved['gaps'] or selection['gaps']: raise ValueError('companion source evidence unresolved')
|
|
148
|
-
mf = handoff._manifest_path(root, selection['manifest'])
|
|
149
|
-
current = mf.read_bytes(); before_files = native.inventory(root)
|
|
150
|
-
delta = [p for p in set(before_files)|set(receipt['files']) if before_files.get(p) != receipt['files'].get(p)]
|
|
151
|
-
if delta:
|
|
152
|
-
# A repeated, already-applied exact switch is a no-op. No new business
|
|
153
|
-
# content or other topic change may ride along with the old preview.
|
|
154
|
-
history = [p for p in delta if p != selection['manifest']]
|
|
155
|
-
history_parent = mf.parent/'history'
|
|
156
|
-
repeated = (handoff._load(current) == saved['expected'] and len(history) == 1
|
|
157
|
-
and selection['manifest'] in delta and history[0] not in receipt['files'])
|
|
158
|
-
if repeated:
|
|
159
|
-
hp = handoff._manifest_path(root, history[0])
|
|
160
|
-
repeated = (hp.parent == history_parent and hp.name.startswith(mf.stem+'-')
|
|
161
|
-
and hp.suffix == '.json' and hp.read_bytes() == saved['beforeText'].encode('utf-8'))
|
|
162
|
-
if repeated: return {'ok': True, 'changed': False, 'readbackPassed': True, 'changedFiles': []}
|
|
163
|
-
raise ValueError('project changed since preview; re-read and create a new preview')
|
|
164
|
-
if current != saved['beforeText'].encode('utf-8'):
|
|
165
|
-
raise ValueError('manifest changed since preview')
|
|
166
|
-
if on_store: on_store()
|
|
167
|
-
result = handoff._store(root, mf, current, saved['expected'])
|
|
168
|
-
after_files = native.inventory(root)
|
|
169
|
-
changed = sorted(p for p in set(before_files)|set(after_files) if before_files.get(p) != after_files.get(p))
|
|
170
|
-
allowed = [selection['manifest'], result['history']] if result['changed'] else []
|
|
171
|
-
if (set(changed) != set(allowed) or handoff._load(mf.read_bytes()) != saved['expected']
|
|
172
|
-
or (result['changed'] and (root/result['history']).read_bytes() != current)):
|
|
173
|
-
raise ValueError('selection postcheck failed; retain actual files for human review, no automatic rollback')
|
|
174
|
-
return {**result, 'readbackPassed': True, 'changedFiles': changed}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
def finish(prepared, evidence, *, authorized, response):
|
|
178
|
-
"""Called after real native receipts and current file boundaries pass."""
|
|
179
|
-
root = Path(prepared['root']); proposal = prepared['selection']; request = prepared['request']
|
|
180
|
-
summary = {k: proposal[k] for k in ('diff', 'sourceChecks', 'gaps', 'sharedReferences', 'planImpact', 'engineeringReady')}
|
|
181
|
-
out = response('needs_confirmation', 'selection_confirmation_required',
|
|
182
|
-
'改选预检完成;请核配套及Plan影响,再明确选择该组路径。',
|
|
183
|
-
recommendation='核对预览;配套未确认先补证据或明确解除引用,保留文档原件。')
|
|
184
|
-
out['selection'] = summary
|
|
185
|
-
out['options'] = [{'id': 'keep-selection', 'label': '保留当前选择'},
|
|
186
|
-
{'id': 'prepare-companions', 'label': '补齐配套或明确解除引用后重新预览'},
|
|
187
|
-
{'id': 'manual-handoff', 'label': '本次手动交接路径'},
|
|
188
|
-
{'id': 'stop', 'label': '暂停并保留现场'}]
|
|
189
|
-
if request['operation'] == 'selection-preview':
|
|
190
|
-
preview = freeze(proposal, prepared['scope']['files'])
|
|
191
|
-
(evidence/'selection-preview.json').write_text(json.dumps(preview, ensure_ascii=False, indent=2)+'\n')
|
|
192
|
-
out['preview'] = {'id': preview['id'], 'path': str(evidence/'selection-preview.json')}
|
|
193
|
-
else:
|
|
194
|
-
preview = prepared['selectionReceipt']
|
|
195
|
-
if native.loads(Path(request['preview']).read_text()) != preview:
|
|
196
|
-
return response('blocked', 'selection_preview_changed', '预览证据已改变;保留现场并重新预览。')
|
|
197
|
-
out['preview'] = {'id': preview.get('id'), 'path': request['preview']}
|
|
198
|
-
if proposal['gaps']:
|
|
199
|
-
out['reason']['code'] = 'selection_companions_unconfirmed'
|
|
200
|
-
out['reason']['message'] = '现有配套或调用方原文证据不能绑定目标上游;本次不改选。'
|
|
201
|
-
out['recommendation']['id'] = 'prepare-companions'
|
|
202
|
-
return out
|
|
203
|
-
out['options'].insert(1, {'id': 'authorize-selection', 'label': '明确委托切换到此预览的准确组合'})
|
|
204
|
-
out['recommendation']['id'] = 'authorize-selection'
|
|
205
|
-
if request['operation'] != 'selection-switch' or not authorized:
|
|
206
|
-
return out
|
|
207
|
-
registration = {'attempted': False, 'attempts': 0, 'kind': 'direct-python-api',
|
|
208
|
-
'entry': 'selection_handoff.apply -> handoff._store', 'shell': False, 'previewId': preview.get('id')}
|
|
209
|
-
def on_store():
|
|
210
|
-
registration.update(attempted=True, attempts=1)
|
|
211
|
-
(evidence/'selection-registration.json').write_text(json.dumps(registration, indent=2)+'\n')
|
|
212
|
-
try:
|
|
213
|
-
result = apply(root, proposal, preview, authorized=True, on_store=on_store)
|
|
214
|
-
registration['result'] = result
|
|
215
|
-
(evidence/'selection-readback.json').write_text(json.dumps(result, ensure_ascii=False, indent=2)+'\n')
|
|
216
|
-
out = response('selected' if result['changed'] else 'unchanged', 'selection_applied',
|
|
217
|
-
'准确组合及差量已回读;业务稿、其他主题和原Plan保持,后续规划认可另行处理。')
|
|
218
|
-
except (OSError, ValueError, KeyError, TypeError) as exc:
|
|
219
|
-
registration['error'] = str(exc)
|
|
220
|
-
out = response('blocked', 'selection_not_applied', str(exc),
|
|
221
|
-
recommendation='保留当前内容;核对变化或锁后用新预览处理,不自动重试或回滚。')
|
|
222
|
-
out['registration'] = registration
|
|
223
|
-
out['selection'] = summary
|
|
224
|
-
(evidence/'selection-registration.json').write_text(json.dumps(registration, ensure_ascii=False, indent=2)+'\n')
|
|
225
|
-
return out
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"resourceId": "i3-enterprise-sop",
|
|
4
|
-
"resourceVersion": "0.17.1",
|
|
5
|
-
"status": "local-skill-owned-resource-candidate",
|
|
6
|
-
"activation": "explicit-enterprise-task-or-applicable-recorded-selection",
|
|
7
|
-
"ordinaryInstallEnablesEnterpriseWorkflow": false,
|
|
8
|
-
"sharedContract": "template-contracts.md",
|
|
9
|
-
"integrityManifest": "assets-manifest.json",
|
|
10
|
-
"stagePathBase": "this-index-directory",
|
|
11
|
-
"stageFilePathBase": "selected-stage-manifest-directory",
|
|
12
|
-
"stages": {
|
|
13
|
-
"brd": {
|
|
14
|
-
"documentType": "BRD",
|
|
15
|
-
"resourceRoot": "brd",
|
|
16
|
-
"manifest": "brd/assets-manifest.json",
|
|
17
|
-
"resourceVersion": "0.2.3",
|
|
18
|
-
"templateVersion": "v0.0.3",
|
|
19
|
-
"templateRole": "complete-document-template",
|
|
20
|
-
"actions": [
|
|
21
|
-
"generate",
|
|
22
|
-
"review",
|
|
23
|
-
"revise",
|
|
24
|
-
"recheck"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"prd": {
|
|
28
|
-
"documentType": "PRD",
|
|
29
|
-
"resourceRoot": "prd",
|
|
30
|
-
"manifest": "prd/assets-manifest.json",
|
|
31
|
-
"resourceVersion": "0.3.3",
|
|
32
|
-
"templateVersion": "v0.0.4",
|
|
33
|
-
"templateRole": "complete-document-template",
|
|
34
|
-
"actions": [
|
|
35
|
-
"generate",
|
|
36
|
-
"review",
|
|
37
|
-
"revise",
|
|
38
|
-
"recheck"
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
"ad": {
|
|
42
|
-
"documentType": "AD",
|
|
43
|
-
"resourceRoot": "ad",
|
|
44
|
-
"manifest": "ad/assets-manifest.json",
|
|
45
|
-
"resourceVersion": "0.3.3",
|
|
46
|
-
"templateVersion": "v0.0.4",
|
|
47
|
-
"templateRole": "complete-document-template",
|
|
48
|
-
"actions": [
|
|
49
|
-
"generate",
|
|
50
|
-
"review",
|
|
51
|
-
"revise",
|
|
52
|
-
"recheck"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"testcase": {
|
|
56
|
-
"documentType": "TestCase",
|
|
57
|
-
"resourceRoot": "testcase",
|
|
58
|
-
"manifest": "testcase/assets-manifest.json",
|
|
59
|
-
"resourceVersion": "0.3.4",
|
|
60
|
-
"templateVersion": "v0.0.4",
|
|
61
|
-
"templateRole": "complete-document-template",
|
|
62
|
-
"actions": [
|
|
63
|
-
"generate",
|
|
64
|
-
"review",
|
|
65
|
-
"revise",
|
|
66
|
-
"recheck"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"existingPrdSubtreePreserved": false,
|
|
71
|
-
"sopCommandImplemented": true,
|
|
72
|
-
"autoSupported": false,
|
|
73
|
-
"engineeringAssetsIncluded": false,
|
|
74
|
-
"projectModifiedCopiesPreserved": true,
|
|
75
|
-
"handoffContract": "handoff-contract.md",
|
|
76
|
-
"projectGuide": "codebuddy-project-guide.md",
|
|
77
|
-
"auxiliaryResources": {
|
|
78
|
-
"technical-baseline": {
|
|
79
|
-
"resourceRoot": "technical-baseline",
|
|
80
|
-
"manifest": "technical-baseline/assets-manifest.json",
|
|
81
|
-
"resourceVersion": "0.4.0",
|
|
82
|
-
"templateVersion": "v0.0.1",
|
|
83
|
-
"businessStage": false,
|
|
84
|
-
"role": "shared-engineering-guidance",
|
|
85
|
-
"baselineCatalog": "technical-baseline/assets-manifest.json",
|
|
86
|
-
"explicitAdoptionRequired": true
|
|
87
|
-
},
|
|
88
|
-
"engineering-skeleton": {
|
|
89
|
-
"resourceRoot": "engineering-skeleton",
|
|
90
|
-
"manifest": "engineering-skeleton/catalog.json",
|
|
91
|
-
"resourceVersion": "1.0.0",
|
|
92
|
-
"businessStage": false,
|
|
93
|
-
"role": "engineering-directory-standard",
|
|
94
|
-
"explicitAdoptionRequired": true
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"manualHandoffSupported": true,
|
|
98
|
-
"jsonRegistrationImplemented": true,
|
|
99
|
-
"lifecycleContract": "lifecycle-contract.md",
|
|
100
|
-
"existingPrdTemplatePreserved": true,
|
|
101
|
-
"candidateRevision": "20261022-sop-skill-resources-r2",
|
|
102
|
-
"readEvidenceChecker": {
|
|
103
|
-
"entry": "verification/readme.md",
|
|
104
|
-
"script": "verification/check_reads.py",
|
|
105
|
-
"traceFormat": "codebuddy-stream-json",
|
|
106
|
-
"automaticActivation": false,
|
|
107
|
-
"writesProjectFiles": false,
|
|
108
|
-
"version": "0.3.1",
|
|
109
|
-
"reviewOutputContract": "verification/review-output.schema.json",
|
|
110
|
-
"roleBindings": "caller-verification-scope-only",
|
|
111
|
-
"schemaBuilder": {
|
|
112
|
-
"module": "verification/check_reads.py",
|
|
113
|
-
"function": "build_review_schema"
|
|
114
|
-
},
|
|
115
|
-
"reportContentChecker": "check_report"
|
|
116
|
-
},
|
|
117
|
-
"sopSkillImplemented": true,
|
|
118
|
-
"sopSkillScope": "explicit-single-stage-native-spec-or-planning-and-reference-handoff",
|
|
119
|
-
"handoffHelper": {
|
|
120
|
-
"script": "handoff.py",
|
|
121
|
-
"version": "0.2.0",
|
|
122
|
-
"operations": [
|
|
123
|
-
"init",
|
|
124
|
-
"select",
|
|
125
|
-
"resolve"
|
|
126
|
-
],
|
|
127
|
-
"selection": "initial-or-same-only; exact same-topic replacement via controlled preview",
|
|
128
|
-
"manualSupported": true,
|
|
129
|
-
"python": "3.9+",
|
|
130
|
-
"semanticOrApprovalValidation": false,
|
|
131
|
-
"originalPlanBuildConsumptionVerified": false,
|
|
132
|
-
"manifestFields": [
|
|
133
|
-
"schemaVersion",
|
|
134
|
-
"scope",
|
|
135
|
-
"selected"
|
|
136
|
-
]
|
|
137
|
-
},
|
|
138
|
-
"executionEvidenceChecker": {
|
|
139
|
-
"script": "verification/check_execution.py",
|
|
140
|
-
"version": "0.1.0",
|
|
141
|
-
"automaticActivation": false,
|
|
142
|
-
"writesProjectFiles": false,
|
|
143
|
-
"reportContract": "handoff-contract.md#9-真实调用与执行报告",
|
|
144
|
-
"profile": "CodeBuddy stream-json/direct-python3-helper",
|
|
145
|
-
"verdictDoesNotApproveBusiness": true
|
|
146
|
-
},
|
|
147
|
-
"generation": {
|
|
148
|
-
"requiredSkill": "i3-spec-driven-development",
|
|
149
|
-
"wrapperCommandUnchanged": true,
|
|
150
|
-
"nativeStopPreserved": true
|
|
151
|
-
},
|
|
152
|
-
"businessDocuments": {
|
|
153
|
-
"defaultRoot": "spec",
|
|
154
|
-
"layout": "one-capability-one-directory",
|
|
155
|
-
"existingAdoptedPathsPreserved": true,
|
|
156
|
-
"resourceRootUnchanged": true,
|
|
157
|
-
"engineeringEntry": "selected AD plus explicitly referenced selected sources",
|
|
158
|
-
"context": "selected topic and required shared dependencies"
|
|
159
|
-
},
|
|
160
|
-
"nativeHandoff": {
|
|
161
|
-
"plan": "SPEC.md or equivalent; original outputs and approval unchanged",
|
|
162
|
-
"build": "approved next task",
|
|
163
|
-
"buildAuto": "original spec, git, plan approval and per-task loop unchanged",
|
|
164
|
-
"manifestAutomaticallyConsumedByOriginalCommands": false,
|
|
165
|
-
"manualSupported": true,
|
|
166
|
-
"verification": "see current independent evidence; not inferred from index"
|
|
167
|
-
},
|
|
168
|
-
"nativeExecutionEvidenceChecker": {
|
|
169
|
-
"script": "verification/check_native_execution.py",
|
|
170
|
-
"version": "0.1.1",
|
|
171
|
-
"profiles": [
|
|
172
|
-
"generation",
|
|
173
|
-
"status",
|
|
174
|
-
"plan",
|
|
175
|
-
"auto-preflight",
|
|
176
|
-
"standard"
|
|
177
|
-
],
|
|
178
|
-
"automaticActivation": false,
|
|
179
|
-
"writesProjectFiles": false,
|
|
180
|
-
"helperCheckerUnchanged": true,
|
|
181
|
-
"createsApproval": false,
|
|
182
|
-
"reportContract": "verification/README.md#原生方法与执行报告"
|
|
183
|
-
},
|
|
184
|
-
"recoveryContract": "recovery-contract.md",
|
|
185
|
-
"minimalRecovery": {
|
|
186
|
-
"implemented": "owned skill procedure reusing handoff.py",
|
|
187
|
-
"documentWrites": false,
|
|
188
|
-
"newHelperOperations": false,
|
|
189
|
-
"draftCompletionValidation": "caller actual task and final full read; not helper nonempty-path check",
|
|
190
|
-
"supports": [
|
|
191
|
-
"readonly-partial-draft-assessment",
|
|
192
|
-
"explicit-selected-reference-backfill",
|
|
193
|
-
"idempotent-registration",
|
|
194
|
-
"human-edit-protection"
|
|
195
|
-
],
|
|
196
|
-
"selectionReplacementImplemented": true,
|
|
197
|
-
"crossEditorTransactionGuaranteed": false,
|
|
198
|
-
"selectionReplacementScope": "one-existing-topic PRD and explicit local companions; shared sources unchanged",
|
|
199
|
-
"topicCancellationImplemented": false
|
|
200
|
-
},
|
|
201
|
-
"controlledHandoff": {
|
|
202
|
-
"script": "controlled_handoff.py",
|
|
203
|
-
"contract": "controlled-handoff.md",
|
|
204
|
-
"version": "0.4.0",
|
|
205
|
-
"host": "codebuddy-cli-project",
|
|
206
|
-
"activation": "explicit-single-task",
|
|
207
|
-
"nativeReadOnlyPreflight": true,
|
|
208
|
-
"automaticHook": false,
|
|
209
|
-
"businessApproval": false,
|
|
210
|
-
"enterpriseAuto": false,
|
|
211
|
-
"selection": {
|
|
212
|
-
"module": "selection_handoff.py",
|
|
213
|
-
"contract": "selection-handoff.md",
|
|
214
|
-
"operations": [
|
|
215
|
-
"selection-preview",
|
|
216
|
-
"selection-switch"
|
|
217
|
-
],
|
|
218
|
-
"exactPreviewRequired": true,
|
|
219
|
-
"topicScope": "one-existing-topic",
|
|
220
|
-
"changesSharedSources": false,
|
|
221
|
-
"writesBusinessDocumentsOrPlan": false,
|
|
222
|
-
"semanticCompatibility": "caller-source-quotes-and-human-review"
|
|
223
|
-
},
|
|
224
|
-
"auditBeforeSelectedWrite": true
|
|
225
|
-
},
|
|
226
|
-
"independentReview": {
|
|
227
|
-
"contract": "review-handoff.md",
|
|
228
|
-
"script": "verification/review_handoff.py",
|
|
229
|
-
"version": "0.2.0",
|
|
230
|
-
"host": "codebuddy-cli",
|
|
231
|
-
"activation": "explicit-single-review-or-recheck",
|
|
232
|
-
"freshSession": true,
|
|
233
|
-
"projectWrites": false,
|
|
234
|
-
"businessApproval": false,
|
|
235
|
-
"missingHost": "new-session-task",
|
|
236
|
-
"selectedOnlyRegistrationValidation": "pending-S10",
|
|
237
|
-
"contextProfile": "fixed-review-context-v1",
|
|
238
|
-
"modelReads": "full stage README, template, unique action, review contract and necessary actual project/business sources; full selected fallback for unknown/custom combinations",
|
|
239
|
-
"outerChecks": "metadata resolution and source snapshots retained; never model-read evidence"
|
|
240
|
-
},
|
|
241
|
-
"planHandoff": {
|
|
242
|
-
"contract": "plan-handoff.md",
|
|
243
|
-
"requiredSkill": "i3-planning-and-task-breakdown",
|
|
244
|
-
"originalCommandObligationsPreserved": true,
|
|
245
|
-
"defaultOutputs": [
|
|
246
|
-
"tasks/plan.md",
|
|
247
|
-
"tasks/todo.md"
|
|
248
|
-
],
|
|
249
|
-
"writesBusinessJson": false,
|
|
250
|
-
"manualSupported": true,
|
|
251
|
-
"buildAutomaticallyInvoked": false,
|
|
252
|
-
"requiredResourceReads": [
|
|
253
|
-
"readme.md",
|
|
254
|
-
"stages.json",
|
|
255
|
-
"template-contracts.md",
|
|
256
|
-
"handoff-contract.md",
|
|
257
|
-
"plan-handoff.md"
|
|
258
|
-
],
|
|
259
|
-
"identityOrUpstreamConflict": "stop-before-native-planning-and-plan-todo-writes"
|
|
260
|
-
},
|
|
261
|
-
"operations": [
|
|
262
|
-
"brd",
|
|
263
|
-
"prd",
|
|
264
|
-
"ad",
|
|
265
|
-
"testcase",
|
|
266
|
-
"plan",
|
|
267
|
-
"review",
|
|
268
|
-
"status"
|
|
269
|
-
],
|
|
270
|
-
"resourceLocation": "actual-loaded-sop-skill/references"
|
|
271
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"resourceId": "i3-enterprise-sop-technical-baseline",
|
|
4
|
-
"resourceVersion": "0.4.0",
|
|
5
|
-
"resourceRole": "auxiliary-shared-engineering-guidance",
|
|
6
|
-
"status": "local-skill-owned-resource-candidate",
|
|
7
|
-
"businessStage": false,
|
|
8
|
-
"templateContentVersion": "v0.0.1",
|
|
9
|
-
"entry": "readme.md",
|
|
10
|
-
"template": "templates/technical-baseline.md",
|
|
11
|
-
"files": [
|
|
12
|
-
{
|
|
13
|
-
"path": "readme.md",
|
|
14
|
-
"sourceSha256": "3ef610a17961889111d6e1e4e7ff329a5f820d6b1d1cf4c1988380a28019eb68",
|
|
15
|
-
"sha256": "85f1b0c6475eeaf9790916965305564da363571a106e623c4bc7a3a747e6b998",
|
|
16
|
-
"role": "adoption-guidance"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"path": "templates/technical-baseline.md",
|
|
20
|
-
"sourceSha256": "accf9d79fe5aca11b5c2bc54b44576c3e397279ff9fcc46de522598791bf1408",
|
|
21
|
-
"sha256": "e5f357c5372889f040b959b868e306599aca43185b1b8f1173c9b885e61d384f",
|
|
22
|
-
"role": "auxiliary-engineering-template"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"path": "baselines/enterprise-application-technical-baseline-v0-0-4.md",
|
|
26
|
-
"role": "optional-project-technical-baseline",
|
|
27
|
-
"sourceSha256": "ba2c3af5cb8a70308a6325d42233e3015451f35096b75905013d4ff34a7671e3",
|
|
28
|
-
"sha256": "cf7c4f1414bb234190672e33353396107e356deb023aababede8cd0fbae858e4"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"sha256Scope": "source-and-pure-brand-reference-mapping-not-npm-install-proof",
|
|
32
|
-
"dependencies": [
|
|
33
|
-
{
|
|
34
|
-
"path": "../ad/templates/ad.md",
|
|
35
|
-
"role": "ad-linkage-reference"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"path": "../handoff-contract.md",
|
|
39
|
-
"role": "native-plan-handoff-reference"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"path": "../engineering-skeleton/directory-standard.md",
|
|
43
|
-
"role": "engineering-directory-standard",
|
|
44
|
-
"contentVersion": "1.0.0"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"path": "../engineering-skeleton/adoption.md",
|
|
48
|
-
"role": "engineering-adoption-guidance",
|
|
49
|
-
"contentVersion": "1.0.0"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"integration": {
|
|
53
|
-
"registeredInParentStageIndex": true,
|
|
54
|
-
"registeredInCustomRuntimeFiles": true,
|
|
55
|
-
"includedInParentResourceBundle": true,
|
|
56
|
-
"packagePolicy": "included-reference-assets-with-per-artifact-verification",
|
|
57
|
-
"automaticWorkflowActivation": false,
|
|
58
|
-
"newSkillOrCommand": false,
|
|
59
|
-
"proofBoundary": "File presence, pack, installation, model reads and project adoption are distinct."
|
|
60
|
-
},
|
|
61
|
-
"publication": {
|
|
62
|
-
"published": false,
|
|
63
|
-
"businessCandidateApproved": false
|
|
64
|
-
},
|
|
65
|
-
"baselines": [
|
|
66
|
-
{
|
|
67
|
-
"id": "enterprise-application",
|
|
68
|
-
"title": "企业应用公共技术规约",
|
|
69
|
-
"documentVersion": "v0.0.4",
|
|
70
|
-
"path": "baselines/enterprise-application-technical-baseline-v0-0-4.md",
|
|
71
|
-
"explicitAdoptionRequired": true,
|
|
72
|
-
"requiredSources": [
|
|
73
|
-
{
|
|
74
|
-
"path": "../engineering-skeleton/directory-standard.md",
|
|
75
|
-
"contentVersion": "1.0.0"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"path": "../engineering-skeleton/adoption.md",
|
|
79
|
-
"contentVersion": "1.0.0"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
}
|