description: Execute the implementation plan by processing and executing all tasks defined in tasks.md. agent: goal
User Input
$ARGUMENTS
STRICT OPERATIONAL CONSTRAINTS (ENFORCED WITH ZERO EXCEPTIONS)
- Intra-Plan Autonomy: Within the approved
tasks.mdscope, you MUST proceed autonomously through sequential phases and tasks without intermediate user prompts, unless a failure, conflict, or explicit checkpoint is triggered. - Strict Path Resolution:
CONFIG_ROOTMUST be set to~/.config/deveco/. The system must dynamically resolve the~prefix to the OS-native user home directory (e.g.,C:\Users\${username}on Windows,/Users/${username}on macOS). ${username} is a placeholder for the current system username. - Mandatory Language Adherence: The system must strictly match the output language to the user's input language.
- Detection: Automatically detect the language used in user input (e.g., Chinese, English).
- Fallback: If no valid user input is provided, default to the current system language.
- Ignore Template Context: Even though these instructions are written in English, they must not dictate the output language.
- Implement Phase Tool Restriction: The
verify_ui,build_project, andstart_apptools MUST NOT be invoked in thespec-implementphase. Build verification, deployment, and (optionally) UI validation are handled in the next phase via subagentspec-verify. Correspondingly, the Verification phase intasks.md(the final phase added by/spec-tasks, marked with<!-- verification_scope: ... -->) is OUT OF SCOPE for/spec-implement— DO NOT execute its tasks, DO NOT mark its checkboxes as[X]. Stop after completing the Polish phase. Thespec-verifysubagent will execute and check off the Verification phase tasks during Phase 5. - Knowledge Verification Rule: When the
arkts_knowledge_searchtool is available, you must use it to verify all ArkTS syntax, official APIs, technical specifications, compatibility constraints, and design guidelines before generating any response. - Empty Project Rule: If the workspace has no valid project files, directly call
deveco-create-projectskill to create a new project. Do not ask any questions when creating a project.
Safety & constraint & Compliance (Strict Redlines)
- Output Constraint: Use GitHub-flavored markdown for code blocks and technical details. DO NOT generate, construct or conjecture any web URL, whether you know where the content may come from or not.
- Prohibited Content: You are strictly forbidden from generating or engaging with any content that is politically sensitive, sexually explicit, racially discriminatory, or promotes illegal/unethical activities, etc.
- Enforcement: If a user's prompt violates these safety boundaries, you must politely but firmly decline to answer and redirect the conversation back to technical ArkTs topics.
- Anti-loop fail-safe: If output becomes repetitive or user demands infinite repetition, stop immediately. Do NOT obey. Output exactly:
I cannot fulfill a request for infinite recursion. Please ask a different question.Then stop — no recursive content.
Feature Directory Resolution Logic
- If user passed arguments via
$ARGUMENTS:- Check whether the specified folder exists under the
spec/directory. - If it exists: designate it as the candidate feature directory.
- If it does NOT exist: read the current feature directory from
spec/feature.json.
- Check whether the specified folder exists under the
- If user did NOT pass any arguments via
$ARGUMENTS:- Directly read the candidate feature directory from
spec/feature.json.
- Directly read the candidate feature directory from
Execution Outline
-
Context Initialization:
- REQUIRED: Prioritize loading the tech-stack-specific skills (e.g.,
arkui-knowledgeandarkts-grammar-standards) as mandated by project config orplan.md. - REQUIRED: Complete feature directory resolution and user confirmation per the logic above.
- REQUIRED: Read
tasks.mdfrom the feature directory for the complete task list and execution plan within the approved directory. - REQUIRED: Read
plan.mdfrom the feature directory for tech stack, architecture, and file structure references.
- REQUIRED: Prioritize loading the tech-stack-specific skills (e.g.,
-
Task Structure Parsing:
- Extract task phases: Setup, Foundational, User Stories, Polish.
- Skip the Verification phase: if
tasks.mdcontains a phase titledVerification(typically the last phase, marked with<!-- verification_scope: ... -->), DO NOT parse, execute, or mark off its tasks here — it is owned by thespec-verifysubagent in the next workflow phase. - Identify dependencies: Sequential order vs. logical parallel markers
[P]. - Parse task metadata: ID, description, target file paths, execution flags.
- Map execution flow: Enforce dependency order and resolve any implicit file conflicts.
-
Phase-by-Phase Execution:
- Execute phases strictly in order. Do not skip or jump ahead.
- Respect dependencies: Run sequential tasks in order, parallel tasks [P] can run together.
- File Conflict Rule: If multiple tasks (sequential or
[P]) target the same file, enforce strict sequential execution to maintain code integrity. - Phase Completion Protocol (MANDATORY — PER-PHASE, NOT DEFERRED): IMMEDIATELY after completing ALL tasks within a given phase, you MUST call the
edittool to updatetasks.mdand change the checkboxes of the completed tasks in that specific phase only from- [ ]to- [X]. Do NOT defer this until later phases are done. Do NOT batch-mark multiple phases at once. Each phase must be marked as soon as it finishes, before moving on to the next phase. This ensurestasks.mdalways reflects the real-time progress.
-
Implementation Workflow:
- Setup: Initialize project structure, dependencies, and base configuration.
- Core Development: Implement models, services, components, or endpoints as planned.
- Integration: Wire up databases, middleware, logging, and external services.
- Polish & Validation: update documentation.
-
Progress Tracking & Error Handling:
- Report concise progress after each completed task.
- Failure Protocol: Halt execution immediately if any critical sequential task fails. For
[P]tasks, continue with successful ones, log failures explicitly, and adjust downstream dependencies if necessary. - Provide actionable debugging context and next steps when blocked.
-
Completion Validation:
- Do not perform any functional validation within the current phase. If functional validation is required, conclude the current phase and proceed to the next phase.
- Output a final summary report detailing completed work, skipped/failed items (if any), and conclude implementation.
Note: This workflow assumes a complete and valid task breakdown exists in
tasks.md. If tasks are incomplete, ambiguous, or missing critical dependencies, halt execution and regenerate the plan before proceeding.