docs: reorganize reference area and unify directory READMEs

Reorganize the AI-agent documentation by function area:
- Move the plays/ application archive and experiences into docs/reference/, grouped by contributor <username>/ (flat experience entries + application subdirectories), with a single reference/README entry.
- Add a second level under docs/development/ (engineering/, ci/, release/); fold agent-guide into ai-guide; flatten the six project-completion sub-documents into one file.
- Unify each directory to a single README (drop every INDEX); fold assets/{fonts,images,music} README leaves into assets/README; remove the empty docs/software-design/.
- Add an upstream-PR rule: do not add or modify the repository-root README.
- Update all cross-references and bibliographic links (EN/ZH aligned); validate.sh --static passes. The repository-root README is left untouched.
This commit is contained in:
Shinku committed 2026-08-31 15:05:42 +08:00
1 parent 545881ad1d
commit cbede2d2fa
105 files changed
+1025 -1576

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
<p align="right">
<a href="file-issues.zh_CN.md">简体中文</a> · <strong>English</strong>
</p>
# Filing Issues
This page describes how to file a suggestion as a GitHub issue against the
upstream `FoloToy/ai-passport` project. It is the documentation counterpart to
the `issue-suggestions` skill, which drives the workflow; this page explains
the rules and conventions.
Issues are for user suggestions, feature requests, and usage feedback about the
firmware, BSP, hardware, or documentation. They are filed against the upstream
project, not the fork.
## Issue types and templates
The repository defines issue templates under `.github/ISSUE_TEMPLATE/`. Use the
one that matches the report:
- `feature_request.yml` for a new feature or improvement.
- `usage_question.yml` for help building, flashing, configuring, or using the
device.
Fill the template fields completely. Feature requests use these fields:
- Problem or use case
- Proposed behavior and acceptance criteria
- Affected area (firmware or demo, BSP or hardware interface, documentation or
tooling, hardware revision, not sure)
- Alternatives considered
- Additional context
- Safety check
Write the title and body in English for an upstream-facing issue; keep the
template's field labels as the template defines them (bilingual).
## Collect and screen
Gather the improvement points the releasing developer encountered while
developing or shipping this release, then screen them:
- Deduplicate overlapping suggestions into one.
- Drop invalid, off-topic, or already-resolved entries.
- Merge related items into a coherent feature request.
- Match against existing issues and PRs; do not create duplicates.
## Review and consent before filing
Filing an issue is a public, externally visible action and touches
project-related content. Follow these gates:
1. Confirm with the developer that they agree to start this follow-up.
2. Confirm a GitHub channel is available, trying in order GitHub MCP, a GitHub
skill, then the `gh` CLI; if none is available, hand the draft to the
developer to paste manually.
3. Draft the issue, present it to the developer, and wait for explicit approval.
4. Only after approval, create it through the first available GitHub channel
(GitHub MCP, a GitHub skill, or
`gh issue create --repo FoloToy/ai-passport`), then read it back to confirm.
## Safety
Never include credentials, device QR secrets, private device links, personal
data, or unsanitized logs. Security vulnerabilities must go through
`.github/SECURITY.md`, not a public issue.
## Related documents
- Project completion overview: [project-completion.md](project-completion.md)
- Issue skill: [`../../skills/issue-suggestions/SKILL.md`](../../../skills/issue-suggestions/SKILL.md)
- Firmware publishing: [publish-to-community.md](publish-to-community.md)
@@ -0,0 +1,60 @@
<p align="right">
<strong>简体中文</strong> · <a href="file-issues.md">English</a>
</p>
# 提交 issue
本页说明如何把建议作为 GitHub issue 提交到上游 `FoloToy/ai-passport` 项目。它是
`issue-suggestions` skill 的文档配套;skill 负责驱动流程,本页说明规则与约定。
issue 用于提交围绕固件、BSP、硬件或文档的用户建议、功能请求与使用反馈。它们提交到上游项目,
而不是 fork。
## issue 类型与模板
仓库在 `.github/ISSUE_TEMPLATE/` 下定义了 issue 模板。选择匹配的报告类型:
- `feature_request.yml`:新功能或改进。
- `usage_question.yml`:构建、烧录、配置或使用设备方面的求助。
完整填写模板字段。功能建议使用这些字段:
- 问题或使用场景
- 期望行为与验收标准
- 涉及范围(固件或示例、BSP 或硬件接口、文档或工具、硬件版本、不确定)
- 已考虑的替代方案
- 补充信息
- 安全确认
面向上游的 issue,标题与正文用英文书写;模板的字段标签按模板定义保留双语。
## 收集与筛选
收集发布固件的开发者在开发或发布本次版本时遇到的改进点,然后筛选:
- 把重复或重叠的建议去重合并为一条。
- 剔除无效、离题或已解决的条目。
- 把相关条目合并成内聚的功能建议。
- 与已有 issue 和 PR 匹配;不要重复建。
## 提交前审查与同意
提交 issue 是公开、对外可见的动作,且涉及项目相关内容。遵守以下门槛:
1. 与开发者确认他们同意开始本次收尾。
2. 确认已有可用的 GitHub 通道,依次尝试 GitHub MCP、GitHub skill、再退到 `gh` CLI;若都不可用,
则把草案交给开发者手动粘贴。
3. 起草 issue,交给开发者,等待明确批准。
4. 批准后通过第一个可用的 GitHub 通道(GitHub MCP、GitHub skill、或
`gh issue create --repo FoloToy/ai-passport`)创建,并回读确认。
## 安全
永远不要包含凭证、设备 QR 密钥、私密设备链接、个人数据或未脱敏日志。安全漏洞走
`.github/SECURITY.md`,不要用公开 issue。
## 相关文档
- 项目开发完成流程总览:[project-completion.zh_CN.md](project-completion.zh_CN.md)
- issue skill:[`../../skills/issue-suggestions/SKILL.md`](../../../skills/issue-suggestions/SKILL.zh_CN.md)
- 固件发布:[publish-to-community.zh_CN.md](publish-to-community.zh_CN.md)
@@ -0,0 +1,396 @@
<p align="right">
<a href="project-completion.zh_CN.md">简体中文</a> · <strong>English</strong>
</p>
# Project Completion
When development on a project is finished, the completion flow offers a menu of
six optional closing actions. This page is the single authoritative index: it
describes the trigger, the six actions grouped by purpose, the shared safety and
consent gates, and the shared publish profile.
The completion flow is not a fixed pipeline and is not tied to a release. The
developer selects any one or a combination of the six actions, in any order. Each
action runs only after the developer confirms it.
All six actions are **optional** — none is mandatory. The README update (action
E) is one of the six; it runs when selected, and it also accompanies archiving
(action D) by default, so archiving a project also refreshes the README.
## When the completion flow is offered
Offer the six-action menu when either signal occurs:
- The developer says the project is complete (development is done).
- The developer asks to run any one of the six actions directly.
In both cases, remind the developer that the following six closing actions are
available, each selectable on its own or with others.
## The six actions
The actions are grouped by purpose. Delivery actions publish the result of the
project; recording actions capture documentation and open collaboration.
### Delivery
| ID | Action | Detail |
| --- | --- | --- |
| A | Publish to the community market | [Action A](#action-a) |
| B | Publish to Git and update the release | [Action B](#action-b) |
### Recording
| ID | Action | Detail |
| --- | --- | --- |
| C | Publish experience | [Action C](#action-c) |
| D | Archive the application to plays | [Action D](#action-d) |
| E | Update the root README | [Action E](#action-e) |
| F | File an issue | [Action F](#action-f) |
Each action names the repository skill or authoritative document that drives it.
The skills are not rewritten here; the action sections reference them.
## Trigger flow
```mermaid
flowchart TD
T1["Developer: the project is complete"]
T2["Developer: run one of the six actions"]
T1 --> OFFER
T2 --> OFFER
OFFER["Offer the six closing actions (single or multiple)"] --> CHOOSE{"Developer selects"}
subgraph DELIVERY["Delivery"]
CHOOSE -- A --> A["Publish to community market"]
CHOOSE -- B --> B["Publish to Git / update release"]
end
subgraph RECORDING["Recording"]
CHOOSE -- C --> C["Publish experience"]
CHOOSE -- D --> D["Archive to plays"]
CHOOSE -- E --> E["Update root README"]
CHOOSE -- F --> F["File an issue"]
end
A --> CONFIRM["Developer confirms"] --> DONE(["Done"])
B --> CONFIRM
C --> CONFIRM
D --> CONFIRM
E --> CONFIRM
F --> CONFIRM
classDef trigger fill:#f3e8ff,stroke:#8a5bd0,color:#333;
classDef offer fill:#fff3cd,stroke:#e6a817,color:#333;
classDef action fill:#e7f0ff,stroke:#4a74b8,color:#333;
classDef done fill:#e6f7e6,stroke:#4a9e4a,color:#333;
class T1,T2 trigger;
class OFFER,CHOOSE offer;
class A,B,C,D,E,F action;
class DONE done;
```
## Published profile
Publishing to the community collects a set of project attributes. Keep these as
a shared profile so actions C, D, E, and F can reuse the same values instead of
collecting them again:
- Application name (lowercase-kebab-case).
- Bilingual publish title and description.
- Cover image (`<app-name>-cover.<webp|png|jpg>`, up to 10 MiB).
- Source address: the HTTPS Git page the developer submitted, resolved from
`git remote -v`.
- Firmware path / merged `.bin`.
At execution, reuse the profile where it was already collected. If the profile
was not collected, fetch the values through the relevant action skill.
## Post-release hardware verification
When a delivery action (A or B) produced a merged full build, verify it on real
hardware before treating the project as complete. Download the release's merged
full firmware (`FoloToy-AI-Passport-full.bin`, the flashable complete build from
`0x0`), flash it to a device, and confirm it runs normally. Do not treat a
successful build or upload as hardware validation: this step proves the artifact
the release actually points to boots and works on real hardware. The artifact
comes from the release assets (the CI/CD `full.bin`) or, for a Git release with
no CI artifact, the local `full.bin` the developer built. If it does not run,
stop and fix before closing out. See
[`CI-build-and-release.md`](../ci/CI-build-and-release.md) for the artifact and
flashing.
## Shared safety and consent gates
Every action follows the same non-negotiable rules:
- Confirm consent before starting; this work touches project-private content.
- Confirm a GitHub channel (GitHub MCP, a GitHub skill, or `gh`) before any
submission; if none is available, generate content for manual pasting and stop.
- Do not submit (issue or PR) until the developer has reviewed and authorized it.
- Do not commit on or modify the developer's current branch; carry the change on a
dedicated branch or worktree.
- Never include credentials, device QR secrets, private device links, personal
data, or unsanitized logs.
## Action A: Publish to the Community Market
This action releases the firmware to the AI Passport community market. The
workflow is driven by the official publisher skill. Running the prompt once makes
the assistant install the skill from the official bundle; nothing is committed
into the repository.
### Inputs
- A single merged ESP `.bin` flashed from `0x0`, built and verified with
`./tools/validate.sh --firmware` (this produces and verifies the merged full
image; do not substitute `idf.py build`, which is only for day-to-day
incremental compilation).
- A representative cover image (JPEG / PNG / WebP, up to 10 MiB).
- The public HTTPS Git page for the firmware repository, resolved from
`git remote -v`.
### Output
These values form the [published profile](#published-profile) that the other
closing actions reuse:
- Application name.
- Bilingual publish title and description.
- Cover image.
- Source address.
### Steps
1. Install the publisher skill from the official bundle.
2. Inspect the project and prepare the bilingual title and description.
3. Resolve the HTTPS Git source.
4. Prepare and validate the cover.
5. Authorize through the official site.
6. Preview every field and obtain explicit approval before uploading.
7. Upload and report the response.
### Safety and boundaries
- Upload only to `https://ai-passport.folotoy.cn`. Publishing and updating are
external mutations.
- Validation, drafting, and preview that is not confirmed by the developer does
not authorize upload.
- The assistant never requests, receives, or stores authorization credentials.
- Never retry a rejected upload automatically; report the response and resolve
the cause with the developer first.
Related: [community publishing reference](publish-to-community.md).
## Action B: Publish to Git and Update the Release
This action publishes the firmware or code to a version-controlled repository and,
when intended, updates the GitHub/GitLab release. This is the Git publishing path,
not the community path — confirm the destination first.
Each step is an external, authorizing mutation. Confirm each one with the
developer separately — do not treat a single up-front confirmation as covering
commit, push, tag, and release.
### Steps
1. Commit the change and push it to the fork (`origin`) — confirm separately.
2. Create and push a tag to trigger the release workflow — confirm separately.
3. Let the tagged build produce the merged firmware `.bin`.
4. Create or update the GitHub/GitLab release with the artifact — confirm
separately. The workflow sets the default release title to the version/tag
name; after the release is up, refine it to the project feature name plus the
version number.
5. Write release notes in English (and a Simplified Chinese version where the
project is bilingual) covering what is new, how to build, and how to use.
6. Verify the released full build on hardware (see
[Post-release hardware verification](#post-release-hardware-verification)).
### Rules
- Follow the repository commit and pull-request rules
([commit-and-pr.md](../../contribution/commit-and-pr.md)).
- Follow the fork workflow ([fork-guide.md](../../fork-guide.md)).
- A tag-triggered build runs `build-firmware.yml`, which publishes the release
only for a tag. See [CI-build-and-release.md](../ci/CI-build-and-release.md).
- For day-to-day compilation prefer `idf.py build` (fast, incremental); use
`./tools/validate.sh --firmware` only when the merged, byte-verified `0x0`
full image is needed, such as before a release or delivery.
- The workflow creates the release with a default title of the version/tag name
(from `softprops/action-gh-release` and `github.ref_name`). After the release
is published, refine the title to the project feature name plus the version
number — for example `Voice Keychain v1.2.0`. The version is the tag, and the
feature name is the application's publish name from the shared
[publish profile](#published-profile).
- Release notes must explain the build to a user who has not read the
repository: what is new, how to build, and how to use.
Related: [tagged firmware builds and releases](../ci/CI-build-and-release.md).
## Action C: Publish Experience
This action captures reusable, durable development experience from a release and
proposes it as a documentation pull request to the upstream project. The workflow
is driven by the `experience-pr` skill.
### Focus
Capture the fork's own `docs/` differences from upstream — the documents the
developer created or changed on this fork. Extract only durable, reusable
learnings:
- What the fork documents or changes that upstream does not, and why.
- Hardware facts, interfaces, timings, resource budgets, or failure behavior.
- Build, validation, or release-flow improvements.
- Generalizations that apply to the next release.
### Route
Decide where each learning belongs before submitting:
- **Upstream the reusable, general experience** — learnings that benefit any
user and belong in the upstream baseline. Submit as a PR to the upstream
project.
- **Keep fork-specific customization in the fork** — product-customized content,
fork-private business rules, or fork-only assets. Do not submit these
upstream; record them locally.
### Steps
1. Confirm consent and a GitHub channel (GitHub MCP, a GitHub skill, or `gh`).
2. Compare the fork to upstream to find the `docs/` differences.
3. Extract and route the reusable experience.
4. Write a single entry under `docs/reference/<username>/` (one `.md` file plus
its `.zh_CN.md` peer), named after the entry's content summary in
lowercase-kebab-case, and link it from the experience index.
5. Present the change for review, then commit, push to the fork, and open a PR
only after explicit approval.
Related: [experience index](../../reference/README.md), [fork workflow](../../fork-guide.md).
## Action D: Archive the Application to plays
This action archives a published application into the upstream `plays/` application
archive so it is discoverable in-repository for later querying. The workflow is
driven by the `plays-archive` skill.
### Inputs
- Application name (lowercase-kebab-case).
- [Published profile](#published-profile): bilingual title and description, and
the source address.
### Steps
1. Confirm consent and a GitHub channel (GitHub MCP, a GitHub skill, or `gh`).
2. Generate a bilingual AI-functional summary under `plays/<username>/<app-name>/`
(`README.md` / `.zh_CN.md`), merging the root README when one exists.
3. Record the publish metadata — the bilingual title and description and the
source address — which include the cover image by file name and format, but
do not commit the cover image itself. The archive is text-only.
4. Handle each branch's root README independently (see
[Action E](#action-e) for the required README sync).
5. Commit only the summary on a dedicated branch; do not store the firmware
`.bin` or the cover image.
6. After review, open the archive PR against the upstream project.
### Safety
- Never store the merged firmware `.bin` or the cover image in the archive; the
archive is text-only, and both are build/publish artifacts.
- Do not submit before developer review and consent.
Related: [application archive convention](../../reference/README.md),
[`plays-archive` skill](../../../skills/plays-archive/SKILL.md).
## Action E: Update the Root README
This action updates the fork's root `README.md` on the relevant branches to reflect
the newly released or archived application.
The root README path is intentionally reserved for the fork owner. Upstream's
project overview lives at `docs/README.md`; a fork may add its own root README to
explain its product without replacing upstream documentation.
The fork keeps `main` synced with upstream and puts product work on `feature/*`
branches, so root READMEs exist on multiple branches. Handle each branch's root
README independently — the `main` README and a `feature/*` branch README are
separate decisions.
### When this is recommended
The README update is an **optional** action like the other five, and it is also
the default companion to archiving: when the application is archived to `plays/`
(action D), the README sync runs as part of that action. Archiving itself is
optional — the developer may decline — but whenever a project is completed, the
README should be refreshed on the hosting branch and on fork `main` so the
application is registered where it is developed.
### Rules
- Only touch fork-owned root READMEs (`README.md` / `README.zh_CN.md`); do not
modify the upstream project overview at `docs/README.md`.
- Check the root README on each relevant branch (`main` and the current
`feature/*` branch), not just one branch.
- The fork `main` root README is the **catalog of the fork's projects**: it
**fully includes** the content of each project's own README — a complete
description of what the application does and how to use it (its interactions,
modes, keys, persistence, and notes) — not a one-line intro followed by a
branch link. Pull the content from the hosting branch's README.
- The fork root README and the hosting branch's root README are fork-owned
content. Commit them directly (merge) rather than opening a PR; open a PR only
when the change is meant to go upstream.
- Follow the repository language rule: English at the default `.md` path and
Simplified Chinese at the paired `.zh_CN.md`, aligned in the same change.
### Steps
1. Confirm consent and a GitHub channel (GitHub MCP, a GitHub skill, or `gh`).
2. On the hosting `feature/*` branch: create the bilingual README pair if it is
missing, or update it to add or refresh the application's own description.
3. On fork `main`: update the root README pair so the released application is
discoverable from the repository landing page, fully including the hosting
branch's README content.
4. Commit the README updates directly to the branch / fork `main` (fork-owned
content); do not open a PR for this unless it is an upstream change.
Related: [fork workflow and root README ownership](../../fork-guide.md),
[`plays-archive` skill](../../../skills/plays-archive/SKILL.md),
[documentation conventions](../../contribution/doc-conventions.md).
## Action F: File an Issue
This action gathers the releasing developer's own improvement points and files
them as feature request issues against the upstream project. The workflow is
driven by the `issue-suggestions` skill. Issues are filed against the upstream
project, not the fork.
### Steps
1. Confirm consent and a GitHub channel (GitHub MCP, a GitHub skill, or `gh`).
2. Collect the developer's own improvement points encountered while developing or
shipping the release.
3. Deduplicate, drop invalid or resolved points, and categorize by affected area.
4. Match against existing issues and PRs; do not create duplicates.
5. Draft a feature request using the upstream issue template.
6. Present the draft and wait for explicit approval before submitting.
7. Submit through the first available GitHub channel and read the created issue
back to confirm.
### Safety
- Never include credentials, device QR secrets, private device links, personal
data, or unsanitized logs.
- Security vulnerabilities go through `.github/SECURITY.md`, not a public issue.
Related: [filing issues reference](file-issues.md),
[`issue-suggestions` skill](../../../skills/issue-suggestions/SKILL.md),
[issue template](../../../.github/ISSUE_TEMPLATE/feature_request.yml).
## Related documents
- Firmware publishing: [publish-to-community.md](publish-to-community.md)
- Fork workflow and root README ownership: [fork-guide.md](../../fork-guide.md)
- Commit and pull-request rules: [commit-and-pr.md](../../contribution/commit-and-pr.md)
Loaded 3 of 105 files, more files were not shown because too many files have changed in this diff. Show more