fp-implement

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

FP Implement Skill

FP 技能实施

Find, claim, and complete work on issues.
查找、领取并完成议题相关工作。

Prerequisites

前置条件

Before using fp commands, check setup:
bash
undefined
使用fp命令前,请检查设置:
bash
undefined

Check if fp is installed

检查fp是否已安装

fp --version

**If fp is not installed**, tell the user:
> The `fp` CLI is not installed. Install it with:
> ```bash
> curl -fsSL https://setup.fp.dev/install.sh | sh -s
> ```

```bash
fp --version

**如果未安装fp**,请告知用户:
> 尚未安装`fp` CLI工具。请通过以下命令安装:
> ```bash
> curl -fsSL https://setup.fp.dev/install.sh | sh -s
> ```

```bash

Check if project is initialized

检查项目是否已初始化

fp tree

**If project is not initialized**, ask the user if they want to initialize:
> This project hasn't been initialized with fp. Would you like to initialize it?

If yes:
```bash
fp init

fp tree

**如果项目未初始化**,询问用户是否要初始化:
> 该项目尚未通过fp初始化。是否要进行初始化?

如果用户同意:
```bash
fp init

Core Workflow

核心工作流

1. Find work     → fp tree, fp issue list --status todo
2. Claim work    → fp issue update --status in-progress <PREFIX>-X
3. Do work       → implement the task
4. Comment often → fp comment <PREFIX>-X "progress update"
5. Complete      → fp issue update --status done <PREFIX>-X

1. 查找工作     → fp tree, fp issue list --status todo
2. 领取工作    → fp issue update --status in-progress <PREFIX>-X
3. 开展工作       → 执行任务
4. 经常评论 → fp comment <PREFIX>-X "进度更新"
5. 完成工作      → fp issue update --status done <PREFIX>-X

Finding Work

查找工作

See the Full Picture

查看全局视图

bash
fp tree
Shows all issues with hierarchy, status, and dependencies.
bash
fp tree --status todo
Shows only todo items (filters out done work).
bash
fp tree <PREFIX>-X
Shows a specific issue and its children - useful for focusing on one feature/epic.
bash
fp tree
展示所有议题的层级结构、状态和依赖关系。
bash
fp tree --status todo
仅显示待办事项(过滤已完成工作)。
bash
fp tree <PREFIX>-X
展示特定议题及其子议题——便于聚焦单个功能/史诗任务。

List by Status

按状态列出

bash
fp issue list --status todo          # Available to pick up
fp issue list --status in-progress   # Currently active
fp issue list --status done          # Completed
fp issue list                        # All issues
bash
fp issue list --status todo          # 可领取的任务
fp issue list --status in-progress   # 当前进行中的任务
fp issue list --status done          # 已完成的任务
fp issue list                        # 所有议题

Pick the Right Task

选择合适的任务

Look for tasks that:
  • Have status
    todo
  • Have no dependencies, OR all dependencies are
    done
  • Match your current focus/expertise

寻找符合以下条件的任务:
  • 状态为
    todo
  • 无依赖项,或所有依赖项均已完成
  • 匹配当前工作重点/专业领域

Claiming Work

领取工作

Mark as In-Progress

标记为进行中

bash
fp issue update --status in-progress <PREFIX>-2
This captures the current VCS state as the starting point for tracking changes.
bash
fp issue update --status in-progress <PREFIX>-2
此命令会捕获当前VCS状态作为跟踪变更的起始点。

Log That You're Starting

记录开始工作

bash
fp comment <PREFIX>-2 "Starting work. First step: implement the User model schema"
bash
fp comment <PREFIX>-2 "开始工作。第一步:实现用户模型架构"

Load Context

加载上下文

bash
fp context <PREFIX>-2
Shows issue details, description, and related information.

bash
fp context <PREFIX>-2
展示议题详情、描述及相关信息。

During Work

工作进行中

Comment Frequently

频繁评论

Log progress at key milestones:
bash
fp comment <PREFIX>-2 "Completed schema design. Added User, Session, Token models to src/models/"

fp comment <PREFIX>-2 "Hit a snag: OAuth library doesn't support refresh tokens out of the box. Investigating alternatives."

fp comment <PREFIX>-2 "Resolved: using custom refresh logic. Proceeding with implementation."
When to comment:
  • When you start a task
  • When you complete a significant milestone
  • When you discover important information
  • When you encounter problems
  • When you finish work
在关键节点记录进度:
bash
fp comment <PREFIX>-2 "完成架构设计。在src/models/中添加了User、Session、Token模型"

fp comment <PREFIX>-2 "遇到问题:OAuth库不原生支持刷新令牌。正在研究替代方案。"

fp comment <PREFIX>-2 "问题已解决:使用自定义刷新逻辑。继续推进实施。"
评论时机:
  • 开始任务时
  • 完成重要里程碑时
  • 发现重要信息时
  • 遇到问题时
  • 完成工作时

Check Progress

检查进度

bash
fp issue diff <PREFIX>-2 --stat   # Quick view of changed files
fp issue files <PREFIX>-2         # List files changed
fp issue diff <PREFIX>-2          # Full diff

bash
fp issue diff <PREFIX>-2 --stat   # 快速查看已变更文件
fp issue files <PREFIX>-2         # 列出已变更文件
fp issue diff <PREFIX>-2          # 完整差异对比

Completing Work

完成工作

Mark as Done

标记为已完成

bash
fp issue update --status done <PREFIX>-2
This captures the current VCS state as the endpoint.
bash
fp issue update --status done <PREFIX>-2
此命令会捕获当前VCS状态作为终点。

Add Completion Comment

添加完成评论

bash
fp comment <PREFIX>-2 "Task completed. Implemented User, Session, and Token models with Drizzle ORM. All tests passing."

bash
fp comment <PREFIX>-2 "任务完成。使用Drizzle ORM实现了User、Session和Token模型。所有测试均通过。"

Continuing Previous Work

继续之前的工作

Find In-Progress Work

查找进行中的工作

bash
fp issue list --status in-progress
bash
fp issue list --status in-progress

Load Context

加载上下文

bash
fp context <PREFIX>-5
bash
fp context <PREFIX>-5

Review Recent Activity

查看近期活动

bash
fp log <PREFIX>-5 --limit 5
bash
fp log <PREFIX>-5 --limit 5

See What's Changed

查看变更内容

bash
fp issue diff <PREFIX>-5 --stat
bash
fp issue diff <PREFIX>-5 --stat

Resume

恢复工作

bash
fp comment <PREFIX>-5 "Resuming work. Current focus: finishing the error handling logic"

bash
fp comment <PREFIX>-5 "恢复工作。当前重点:完成错误处理逻辑"

Breaking Down Work

拆分工作

If a task is too large, break it down:
bash
undefined
如果任务过大,可将其拆分:
bash
undefined

Create sub-tasks

创建子任务

fp issue create --title "Part 1: Setup" --parent <PREFIX>-4 fp issue create --title "Part 2: Implementation" --parent <PREFIX>-4 --depends "<PREFIX>-10" fp issue create --title "Part 3: Tests" --parent <PREFIX>-4 --depends "<PREFIX>-11"
fp issue create --title "Part 1: Setup" --parent <PREFIX>-4 fp issue create --title "Part 2: Implementation" --parent <PREFIX>-4 --depends "<PREFIX>-10" fp issue create --title "Part 3: Tests" --parent <PREFIX>-4 --depends "<PREFIX>-11"

Document

记录

fp comment <PREFIX>-4 "Broke down into sub-tasks: <PREFIX>-10, <PREFIX>-11, <PREFIX>-12. Working on <PREFIX>-10 first."
fp comment <PREFIX>-4 "已拆分为子任务:<PREFIX>-10, <PREFIX>-11, <PREFIX>-12。先处理<PREFIX>-10。"

Work on sub-tasks

处理子任务

fp issue update --status in-progress <PREFIX>-10

---
fp issue update --status in-progress <PREFIX>-10

---

Viewing Changes

查看变更

For a Single Issue

单个议题

bash
fp issue diff <PREFIX>-2           # Full diff since task started
fp issue diff <PREFIX>-2 --stat    # Just file stats
fp issue files <PREFIX>-2          # List of changed files
bash
fp issue diff <PREFIX>-2           # 任务开始以来的完整差异
fp issue diff <PREFIX>-2 --stat    # 仅文件统计信息
fp issue files <PREFIX>-2          # 已变更文件列表

For Parent Issues

父议题

For parent issues with children, these commands aggregate changes from all descendants:
bash
fp issue diff <PREFIX>-1 --stat    # All changes across child tasks
fp issue files <PREFIX>-1          # All files changed by descendants

对于包含子议题的父议题,以下命令会汇总所有子议题的变更:
bash
fp issue diff <PREFIX>-1 --stat    # 所有子任务的变更汇总
fp issue files <PREFIX>-1          # 所有子任务变更的文件列表

Quick Reference

快速参考

Essential Commands

核心命令

bash
undefined
bash
undefined

Find work

查找工作

fp tree # Full hierarchy fp tree --status todo # Only todo items fp tree <PREFIX>-X # Focus on one issue fp issue list --status todo # List available tasks
fp tree # 完整层级结构 fp tree --status todo # 仅待办事项 fp tree <PREFIX>-X # 聚焦单个议题 fp issue list --status todo # 列出可领取的任务

Claim work

领取工作

fp issue update --status in-progress <PREFIX>-X fp context <PREFIX>-X
fp issue update --status in-progress <PREFIX>-X fp context <PREFIX>-X

Log progress

记录进度

fp comment <PREFIX>-X "message"
fp comment <PREFIX>-X "message"

View changes

查看变更

fp issue diff <PREFIX>-X --stat fp issue files <PREFIX>-X
fp issue diff <PREFIX>-X --stat fp issue files <PREFIX>-X

Complete

完成工作

fp issue update --status done <PREFIX>-X
fp issue update --status done <PREFIX>-X

Activity

活动记录

fp log --limit 10 fp log <PREFIX>-X
undefined
fp log --limit 10 fp log <PREFIX>-X
undefined

Status Values

状态值

  • todo
    - Not started
  • in-progress
    - Actively being worked on
  • done
    - Completed
  • todo
    - 未开始
  • in-progress
    - 进行中
  • done
    - 已完成

Priority Values (optional)

优先级值(可选)

  • critical
    - Blocking other work
  • high
    - Important, do soon
  • medium
    - Normal priority
  • low
    - Nice to have
bash
fp issue update --priority high <PREFIX>-X
  • critical
    - 阻塞其他工作
  • high
    - 重要,尽快处理
  • medium
    - 常规优先级
  • low
    - 锦上添花
bash
fp issue update --priority high <PREFIX>-X