一键导入
gh-work-x
Execute iOS Swift/ObjC work with Morph-X blueprint, transform, audit, and memory fingerprinting to reduce template-code repetition risk.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute iOS Swift/ObjC work with Morph-X blueprint, transform, audit, and memory fingerprinting to reduce template-code repetition risk.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | gh:work-x |
| description | Execute iOS Swift/ObjC work with Morph-X blueprint, transform, audit, and memory fingerprinting to reduce template-code repetition risk. |
| argument-hint | [Plan doc path or description of iOS work. Blank to auto use latest plan doc] |
Execute work with the normal shipping discipline, plus Morph-X safeguards for iOS Swift/ObjC output. This reduces template-code repetition risk; it does not guarantee App Review success and does not replace real product, UI, content, metadata, or feature differentiation.
<input_document> #$ARGUMENTS </input_document>
Determine how to proceed from <input_document>.
Plan document: read it completely in Phase 1 and treat it as a decision artifact.
Bare prompt: scan likely files, nearby tests, and local conventions; classify scope:
| Complexity | Signals | Action |
|---|---|---|
| Trivial | 1-2 files, no behavioral change | Setup, apply directly, and run relevant tests if behavior changed |
| Small / Medium | Clear scope, under ~10 files | Build a task list, then execute |
| Large | Cross-cutting, architecture, auth/payments/migrations, 10+ files | Recommend planning/brainstorming; if proceeding, build tasks carefully |
Run:
gale-task log skill_started --skill gh:work-x --title "${ARGUMENTS:-work-x}" 2>/dev/null || true
If gale-task is unavailable, skip silently. This must never block execution.
Before choosing a blueprint, retrieve related implementation context and historical Morph-X fingerprints:
memory_root="$(gale-memory resolve-root 2>/dev/null || true)"
[ -n "$memory_root" ] && export HKT_MEMORY_DIR="$memory_root"
hkt-memory retrieve \
--query "<task summary, iOS components, Swift/ObjC files, prior blueprint or strategy tags>" \
--layer all --limit 10 --min-similarity 0.35 \
--vector-weight 0.7 --bm25-weight 0.3
Use results only as context: extract constraints, avoided patterns, and prior blueprint/strategy fingerprints. Do not copy historical code shape. If no results or any command error occurs, proceed silently without blocking.
Query related work sessions:
memory_root="$(gale-memory resolve-root 2>/dev/null || true)"
[ -n "$memory_root" ] && export HKT_MEMORY_DIR="$memory_root"
hkt-memory session-search \
--query "gh:work-x <task title or iOS feature summary>" \
--limit 5
Use returned sessions as supplementary context for blueprint selection. If unavailable, continue silently; session search is non-blocking.
Read Plan and Clarify when a plan/spec path was provided.
Setup Environment
Create Task List
Choose Execution Strategy
Before writing or changing Swift/ObjC code:
.morph-config.yaml from the target iOS project root if present. If missing, use in-memory defaults and record config_source: default.For each task:
After Swift/ObjC code is produced and before final summary:
Apply safe transformation when the CLI is available:
gale-harness morph --apply --config .morph-config.yaml --report .morph-report.json
The transform must be semantics-preserving. If the command, SwiftSyntax, or ObjC adapter is unavailable, skip the transform, record the reason, and continue to audit fallback.
Audit similarity:
gale-harness audit --similarity --config .morph-config.yaml --report .morph-audit.json
Include AST/structure fingerprint, token n-gram, statement Jaccard, and control-flow approximation results when available. Missing baselines or tools are non-blocking and should be reported as degraded signals.
Handle thresholds:
.morph-config.yaml configures a blocking threshold and the audit exceeds it, stop before finalizing code and ask the user how to proceed.Run focused compile/test verification appropriate to the changed iOS project when available. If no Xcode or Swift test target is runnable, state the gap.
After implementation and Morph-X audit, store a concise memory record:
memory_root="$(gale-memory resolve-root 2>/dev/null || true)"
[ -n "$memory_root" ] && export HKT_MEMORY_DIR="$memory_root"
hkt-memory store \
--content "<summary with repo-relative files, blueprint constraints, strategy fingerprint, audit status, degraded fallback notes>" \
--title "<work-x title>" \
--topic "work-x morph blueprint strategy fingerprint" \
--layer all
Store only summaries, tags, and fingerprints; do not store full source code. On error, note it as non-blocking and do not fail the workflow.
Return:
## Work-X Summary
**Completed**: [what changed]
**Blueprint**: [constraints and strategy fingerprint]
**Morph Apply**: [report path or degraded reason]
**Similarity Audit**: [report path, threshold result, blocking/warning decision]
**Tests**: [commands run and results]
**Compliance Boundary**: Reduces template-code repetition risk; does not guarantee App Review success.
Run gale-task log skill_completed 2>/dev/null || true. If unavailable, skip silently.
Generate and critically evaluate grounded improvement ideas for the current project. Use when asking what to improve, requesting idea generation, exploring surprising improvements, or wanting the AI to proactively suggest strong project directions before brainstorming one in depth. Triggers on phrases like 'what should I improve', 'give me ideas', 'ideate on this project', 'surprise me with improvements', 'what would you change', or any request for AI-generated project improvement suggestions rather than refining the user's own idea.
Create structured plans for any multi-step task -- software features, research workflows, events, study plans, or any goal that benefits from structured breakdown. Also deepen existing plans with interactive review of sub-agent findings. Use for plan creation when the user says 'plan this', 'create a plan', 'write a tech plan', 'plan the implementation', 'how should we build', 'what's the approach for', 'break this down', 'plan a trip', 'create a study plan', or when a brainstorm/requirements document is ready for planning. Use for plan deepening when the user says 'deepen the plan', 'deepen my plan', 'deepening pass', or uses 'deepen' in reference to a plan.
[BETA] Execute work with external delegate support. Same as gh:work but includes experimental Codex delegation mode for token-conserving code implementation.
Execute work efficiently while maintaining quality and finishing features
Refresh stale or drifting learnings and pattern docs in docs/solutions/ by reviewing, updating, consolidating, replacing, or deleting them against the current codebase. Use after refactors, migrations, dependency upgrades, or when a retrieved learning feels outdated or wrong. Also use when reviewing docs/solutions/ for accuracy, when a recently solved problem contradicts an existing learning, when pattern docs no longer reflect current code, or when multiple docs seem to cover the same topic and might benefit from consolidation.
Document a recently solved problem to compound your team's knowledge or update CONCEPTS.md, the project's shared domain vocabulary.