From omni
Reconstructs scenario patterns, inventories with stats, and individual Markdown docs from existing APIs, functions, or tests. Auto-activates on `reverse --target scenarios` or `all`.
npx claudepluginhub zte-aicloud/co-omnispec --plugin omniThis skill uses the workspace's default tool permissions.
- **职责**:基于既有的接口清单 / 功能清单 / 测试用例等反构产物,完成:
Analyzes SCN-*.md scenario documents into EARS-format functional requirements and splits into individual templated files in omni-doc/specs/requirements/. Triggers on reverse --target requirements or all.
Reverse-engineers existing codebases into V-Model artifacts: plan-context.md, ADRs, arc42 snapshot, FEATURE inventory, backlog seed, evidence-based BA draft. Use for brownfield projects or when V-Model artifacts are missing.
Share bugs, ideas, or general feedback.
reverse --target scenarios ... 或 --target all 触发{REPO_ROOT}/.cache/reverse/scenarios/
scenario-patterns.jsonfew-shot-examples.jsonscenario-types.jsonconstraints.jsonscenario-list.json 及批次相关 JSON{REPO_ROOT}/omni-doc/specs/scenarios/SCN-XXX-*.md核心要求:只消费既有产物,不重复做架构识别;严格使用缓存与分批机制;所有交互说明和输出必须为中文。
reverse 命令的关系reverse --target scenarios ...,或reverse --target all ... 且执行到“场景反构阶段”时,reverse 负责:
$ARGUMENTS(--path / --exclude / --interactive 等)REPO_ROOT 与通用缓存目录reverse-scenarios,将必要上下文(参数、路径、缓存位置)作为前置条件提供。references/implementation/):
本 Skill 按以下阶段编排,阶段详细说明见本目录下 references/stages/:
运行时需结合 todo 系统:
reverse 会为 --target scenarios 创建顶层 todo;in_progress,完成后标记为 completed。{REPO_ROOT}/.cache/reverse/scenarios/.cache-status.jsonscenario_patterns、few_shot_examples、scenario_list、document_generation 等字段)。confirmed / progress 决定是否跳过当前阶段。详细字段与初始化规则参见本 Skill 内
references/中的阶段文档。
scenario-patterns.jsonfew-shot-examples.jsonscenario-types.jsonconstraints.jsonscenario_patterns 和 few_shot_examples 已确认则可跳过;.cache/user_input/scenario-identification-rules.yaml(简化配置 → 结构化 JSON);scenario-list.json、scenario-list.mdscenario-list-batch-{batch_number}.jsonbatch-mapping.json、scenario_scanning-batch-status.jsonscenario_list.confirmed == true 且文件存在则可跳过;generate-scenario-batches.sh、get-next-batches.sh、update-batches-status.sh、verify-batches-completion.sh 等);scenario-list.json;scenario_list.confirmed 标记为 true。scenario-list.json(包含所有场景及 processing_status 等状态字段).infra/templates/default/reverse-scenario-detail-template.md{REPO_ROOT}/omni-doc/specs/scenarios/SCN-XXX-场景名称.mdscenario-list.json 中的场景处理状态(processing_status 等)create_scenario_detail_batches.sh、get_next_scenario_detail_batches.sh 等);document_generation.confirmed 标记为 true。references/stages/*.md 中对 .cache-status.json、批次状态等的定义。reverse 创建的顶层 todo,本 Skill 内部在各阶段/子步骤中更新对应 todo 状态。/compact 机制,优先复用结构化 JSON,避免加载完整代码。本 Skill 的详细规范位于本目录下 references/:
AI Agent 在执行本 Skill 时,应读取上述文档并严格按照其中的步骤执行。