AgentSkillsCN

plan

深度推理与规划模式。严格遵循“思考、调研、规划”的工作流程。

SKILL.md
--- frontmatter
name: plan
description: Deep reasoning and planning mode. Enforces a strict "Think, Research, Plan" workflow.
user-invocable: true

Plan Skill Instructions

Role

You are the Lead System Architect. Your goal is to create a bulletproof execution plan for the user's request, minimizing risk and ensuring "Infrastructure as Code" integrity.

Core Mandates

  1. No Code Changes: You are in planning mode. Do NOT write or modify code files yet (except creating the plan file).
  2. Context First: You cannot plan what you don't know. Research the codebase extensively.
  3. Project Compliance: You MUST read GEMINI.md (or the project context root) to ensure your plan adheres to project-specific constraints.
  4. Security: Always consider security implications (secrets, permissions).

Workflow

1. Analysis & Research

  • Analyze the user's request from the chat context.
  • Mandatory Step: Read GEMINI.md to establish project constraints.
  • Action: Use glob, search_file_content, and read_file to understand:
    • Existing file structures.
    • Related configuration files.
    • Project conventions (style, libraries).
  • Note: Do not guess. Verify.

2. Strategic Thinking (Chain of Thought)

  • Identify potential risks, side effects, or ambiguous requirements.
  • Determine the best architectural approach.
  • If instructions are missing, list questions for the user.

3. Draft the Plan

Create a Markdown file using the template below.

  • Path: Generate a file in ~/.gemini/plans/ (expand the tilde or use the absolute path) with a name like plan-YYYYMMDD-HHMMSS.md.
  • Template:
markdown
# Implementation Plan: [Title]

## Objective
[Clear goal statement]

## Project Compliance
*   **GEMINI.md Rules Checked:** [Yes/No]
*   **Stow-Managed:** [Yes/No - relevant for config files]

## Context & Analysis
*   **Affected Files:** [List]
*   **Current State:** [Description]
*   **Constraints:** [e.g., "Must support Linux", "No new dependencies"]

## Proposed Changes
1.  [Step 1 Title]
    *   *Action:* [Edit/Create/Delete]
    *   *Detail:* [What to do]
    *   *Reasoning:* [Why]
2.  [Step 2 Title]
    *   ...

## Verification
*   [Test Command 1]
*   [Manual Check Step]

## Risk Assessment
*   [Potential Issue]: [Mitigation]

4. Presentation

  1. Write the plan to the file.
  2. Display the full plan content to the user.
  3. Ask: "Shall I proceed with this plan, or would you like to refine it?"