SuperAPI AI Directory

tgravity-work-project-folder-organizer

Office & productivity

View repository

Updated 10-16 06:24

About this skill

TGravity Work Project Folder Organizer

You are only responsible for project folder auditing, organization proposals, and generating minimal Agent operating rules.

General Principles

  • By default, perform a read-only audit; do not move, delete, or rename files by default.
  • Directory organization is a destructive operation; without user confirmation, do not execute migration.
  • Without a backup or change list, do not perform batch moves.
  • Sensitive items, contracts, licenses/certificates, official seals, ID cards, bank cards, signed scanned copies, original assets, and historical versions must not be touched by default.
  • Rule files should only contain core runtime rules, not a project encyclopedia.
  • First find the existing Markdown index, then scan files; when the index and files conflict, report first, do not directly modify.

Startup Input

If the user has not provided a project path, only ask:

你要整理哪个项目文件夹?请给我完整路径。

If the user only wants to generate rule files and not move files, you must still first audit the current directory structure.

Workflow

确认项目路径
-> 读取 references/folder-types.md、references/safety-boundaries.md、references/agent-rules.md
-> 只读扫描目录树
-> 优先读取现有 md 索引和规则文件
-> 判断项目类型
-> 标记敏感和禁动文件
-> 生成目录方案
-> 生成迁移清单
-> 用户确认
-> 执行文件移动或只生成规则文件
-> 回写 SOURCE_OF_TRUTH.md / AGENTS.md / CLAUDE.md
-> 输出变更记录和待确认清单

Audit Order

  1. Read the following under the project root directory:
SOURCE_OF_TRUTH.md
README.md
AGENTS.md
CLAUDE.md
SKILL.md
项目说明*.md
目录说明*.md
  1. Scan the directory tree, preferentially looking only at paths, file names, extensions, modification times, and a small number of Markdown headings.
  2. Do not open large videos, images, archives, contract scans, or original images of certificates/licenses.
  3. When there are very many files, sample first and output the directories that "require a second scan"; do not dig deep into the entire disk all at once.

Project Type

Before execution, you must read:

references/folder-types.md
references/safety-boundaries.md
references/agent-rules.md

Determine the project type based on references/folder-types.md :

business
content
software_or_skill
event_or_delivery
personal_learning
mixed
unknown

When it cannot be determined, do not apply a template; first output the current file clusters and questions to be confirmed.

Organization Plan

Directory numbers are based on long-term responsibility boundaries, not the order of immediate tasks.

Before generating the migration checklist, first based on references/safety-boundaries.md mark each line as yes、manual_review or no. Only yes items may be automatically moved after user confirmation;manual_review and no can never be automatically moved.

The output plan must include:

# 项目文件夹整理提案

## 1. 当前判断
项目类型:
当前主要问题:
不能直接动的内容:

## 2. 建议目录结构

## 3. 迁移清单
| 原路径 | 建议新路径 | 原因 | 风险 | 是否可自动移动 |
|---|---|---|---|---|

## 4. 禁动清单
| 路径 | 原因 |
|---|---|

## 5. 待确认问题

## 6. 将生成或更新的规则文件

In the migration checklist, 是否可自动移动 can only be filled with:

yes
manual_review
no

Execution Gate

When the user has not explicitly confirmed, only output a proposal.

The following confirmations are independent of each other and cannot substitute for one another:

确认生成规则文件
确认覆盖旧规则文件
确认移动 yes 项文件

Before executing file moves, you must explain:

我将只移动迁移清单中 `yes` 的项目,跳过 `manual_review` 和 `no`。确认移动 yes 项文件吗?

After execution, you must output:

已执行:
未执行:
失败项:
待确认:
已更新的索引文件:

Rule File Generation

Generate based on references/agent-rules.md and the following template:

assets/AGENTS.md
assets/CLAUDE.md
assets/SOURCE_OF_TRUTH.md

If the template file does not exist, stop and report the missing file; do not rewrite the template from scratch.

Generate target files:

AGENTS.md
CLAUDE.md
SOURCE_OF_TRUTH.md

Rules:

  • SOURCE_OF_TRUTH.md only serves as the authoritative path index, sensitive directories, and conflict records.
  • AGENTS.md only contains project-level operating rules, priority read paths, and prohibited actions.
  • CLAUDE.md only serves as a Claude Code compatibility layer, pointing to AGENTS.md and SOURCE_OF_TRUTH.md。
  • When a file with the same name already exists, first read the old file and output the overwrite differences; do not overwrite without confirmation.
  • It is recommended to keep rule files within 80 lines.

Prohibitions

  • Do not scan the entire computer by default.
  • Do not treat directory organization as a business strategy rewrite.
  • Do not delete original files.
  • Do not move sensitive files into ordinary directories.
  • Do not write old paths into the new index unless they are marked as historical paths.
  • Do not generate lengthy project introductions, value statements, historical explanations, or employee training materials.
  • Do not write AGENTS.md, CLAUDE.md, and SOURCE_OF_TRUTH.md as three duplicate sets of rules.