Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/live-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,4 @@ jobs:
fi
bin/tdc fs delete-file-system \
--profile live-e2e \
--file-system-name "$TDC_LIVE_FS_NAME" \
--confirm-file-system-name "$TDC_LIVE_FS_NAME"
--file-system-name "$TDC_LIVE_FS_NAME"
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@
path = docs/pingcap-docs/docs
url = git@github.com:pingcap/docs.git
branch = release-8.5
[submodule "docs/pingcap-docs/docs-cn"]
path = docs/pingcap-docs/docs-cn
url = git@github.com:pingcap/docs-cn.git
branch = release-8.5
27 changes: 17 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Implemented:
`docs/spec/done/0018-fs-token-auth-and-config-free-access.md`
- install and update distribution from
`docs/spec/done/0012-install-and-update-distribution.md`
- English and Chinese PingCAP Preview documentation from
- English PingCAP Preview documentation from
`docs/spec/done/0019-pingcap-tdc-documentation.md`
- `tdc configure`
- `tdc update --check`
Expand Down Expand Up @@ -288,7 +288,6 @@ docs/priciples.md product principles and MVP scope source of truth
docs/spec/ pending requirement specs
docs/spec/done/ completed requirement specs
docs/pingcap-docs/docs/ pingcap/docs English documentation submodule
docs/pingcap-docs/docs-cn/ pingcap/docs-cn Chinese documentation submodule
ref/ read-only reference implementations
```

Expand Down Expand Up @@ -344,10 +343,16 @@ Follow these rules unless `docs/priciples.md` is updated:
credential source.
- Every command should be usable by scripts and agents without
terminal-specific assumptions.
- When creating a pull request, check whether the target repository has a pull
request template. If it does, follow that template when writing the pull
request description.
- Help must work as:
- `tdc help`
- `tdc <command> help`
- `tdc <command> <subcommand> help`
- In generated Flags and Global Flags sections, render value types as
`<type>` and append `(required)` to flags marked with
`tdc_usage_required`.
- Keep the global `--version` behavior intact at every command level. Do not
add command-specific `--version <value>` flags; use names such as
`--target-version` when a command needs a version input.
Expand All @@ -374,6 +379,8 @@ Follow these rules unless `docs/priciples.md` is updated:

Implemented command behavior:

- `tdc` without a command returns `cli.missing_command` with exit code `2` and
an AWS-style compact two-level usage synopsis on stderr
- `tdc configure`
- `tdc configure --non-interactive`
- `tdc help`
Expand Down Expand Up @@ -427,8 +434,8 @@ Implemented command behavior:
- `tdc fs create-file-system --file-system-name workspace --wait`
- `tdc fs create-file-system --file-system-name workspace --dry-run`
- `tdc fs create-file-system --file-system-name scratch --set-default`
- `tdc fs delete-file-system --file-system-name workspace --confirm-file-system-name workspace`
- `tdc fs delete-file-system --file-system-name workspace --confirm-file-system-name workspace --dry-run`
- `tdc fs delete-file-system --file-system-name workspace`
- `tdc fs delete-file-system --file-system-name workspace --dry-run`
- `tdc fs list-file-systems`
- `tdc fs describe-file-system --file-system-name workspace`
- `tdc fs set-default-file-system --file-system-name workspace`
Expand Down Expand Up @@ -595,12 +602,12 @@ Registered command surface:

Do not rename commands without updating specs, README, e2e tests, and AGENTS.
Any code change that changes user-visible behavior must keep README.md in sync.
It must also update the matching English and Chinese tdc pages under
`docs/pingcap-docs/` when the published behavior changes. Keep both locale
trees structurally identical, use globally unique `tdc-` basenames, preserve
the standard Preview note on every page, and update both `TOC-ai.md` files and
both `ai/_index.md` pages when adding or removing a document. Validate command
names and flags against the compiled CLI help, not historical specs or demos.
It must also update the matching English tdc pages under
`docs/pingcap-docs/docs/` when the published behavior changes. Use globally
unique `tdc-` basenames, preserve the standard Preview note on every page, and
update `TOC-ai.md` and `ai/_index.md` when adding or removing a document.
Validate command names and flags against the compiled CLI help, not historical
specs or demos.

## Configuration And Credentials

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Each project includes a `type`: `tidbx` identifies a regular project and `tidbx_

## Commands

Run `tdc help`, `tdc <command> help`, or `tdc <command> <subcommand> help` for flags and examples.
Running `tdc` without a command returns a usage error and a compact two-level command synopsis. Run `tdc help`, `tdc <command> help`, or `tdc <command> <subcommand> help` for the full command list, flags, and examples. Help displays flag value types in angle brackets and marks required flags with `(required)`.

<details>
<summary>All commands</summary>
Expand Down Expand Up @@ -268,7 +268,6 @@ tdc update --target-version v0.1.1
## Documentation

- [English Preview documentation](docs/pingcap-docs/docs/ai/tdc/tdc-overview.md)
- [中文预览文档](docs/pingcap-docs/docs-cn/ai/tdc/tdc-overview.md)

## Build from source

Expand Down
2 changes: 1 addition & 1 deletion cmd/tdc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func main() {

root := cli.NewRootCommand(version.Current())
if err := cli.Execute(ctx, root, os.Args[1:], os.Stdout, os.Stderr); err != nil {
fmt.Fprintf(os.Stderr, "tdc [ERROR]: %s\n", apperr.MessageFor(err))
fmt.Fprintf(os.Stderr, "\ntdc [ERROR]: %s\n", apperr.MessageFor(err))
os.Exit(apperr.ExitCodeFor(err))
}
}
1 change: 0 additions & 1 deletion docs/pingcap-docs/docs-cn
Submodule docs-cn deleted from cd88bf
3 changes: 1 addition & 2 deletions docs/present.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,7 @@ rm -f /tmp/tdc-demo-token.txt

```bash
bin/tdc fs delete-file-system \
--file-system-name tdc-demo-workspace \
--confirm-file-system-name tdc-demo-workspace
--file-system-name tdc-demo-workspace
```

删除演示 cluster:
Expand Down
7 changes: 6 additions & 1 deletion docs/spec/done/0001-cli-foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ on.
include component-specific version details when a component has them.
- Unknown commands and flags must return non-zero exit codes with actionable
errors.
- Running `tdc` without a command returns the `cli.missing_command` usage error
with exit code `2` and a compact two-level command synopsis. Users can run
`tdc help` for the complete command and flag listing.
- Help text must be deterministic and suitable for agents to parse.
- Flags and Global Flags sections render value types as `<type>` and append
`(required)` after flags declared required by the command contract.

## Inputs And Config

Expand Down Expand Up @@ -112,7 +117,7 @@ rendering are local-only.
- `tdc help`, root/command/subcommand `--version`, and nested help commands
work.
- No command exposes short flags.
- Tests cover unknown command handling and help availability.
- Tests cover missing and unknown command handling and help availability.

## Out Of Scope

Expand Down
8 changes: 4 additions & 4 deletions docs/spec/done/0009-tdc-fs-control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ canonical region:
tdc fs check-file-system
tdc fs create-file-system --file-system-name workspace --dry-run
tdc fs create-file-system --file-system-name workspace
tdc fs delete-file-system --file-system-name workspace --confirm-file-system-name workspace
tdc fs delete-file-system --file-system-name workspace
```

The user chooses one canonical region code during `tdc configure`; the CLI
Expand All @@ -85,8 +85,8 @@ resolves all fs endpoints internally.
selecting `tidb_cloud_native` entries.
- `internal/fs/status` defines the structured check response with local config,
credential, permission, endpoint, and service health entries.
- Delete safety is implemented through an explicit long flag, initially
`--confirm-file-system-name <name>`.
- Deletion requires an explicit `--file-system-name <name>` and does not add a
console-style name confirmation flag.

## API Call Chain

Expand Down Expand Up @@ -140,7 +140,7 @@ Command mapping:
canonical `fs_region_code` in `[profile]` of `~/.tdc/config`.
5. Store `fs_api_key` in `[profile]` of `~/.tdc/credentials`.
- `tdc fs delete-file-system`
1. Validate `--confirm-file-system-name`.
1. Validate `--file-system-name`.
2. Resolve the tdc fs base URL through the region manifest.
3. Load the stored resource API key and call `DELETE /v1/tenant` with
`Authorization: Bearer <api-key>`.
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/done/0013-github-actions-ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Then it runs:
FS_NAME="tdc-live-e2e-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
bin/tdc fs create-file-system --profile live-e2e --file-system-name "$FS_NAME"
make live-e2e
bin/tdc fs delete-file-system --profile live-e2e --file-system-name "$FS_NAME" --confirm-file-system-name "$FS_NAME"
bin/tdc fs delete-file-system --profile live-e2e --file-system-name "$FS_NAME"
```

The workflow must not commit or upload `~/.tdc/` as an artifact.
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/done/0016-profile-fs-resource-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ New or changed commands:

```bash
tdc fs create-file-system --file-system-name <name> [--set-default] [--wait] [--dry-run]
tdc fs delete-file-system --file-system-name <name> --confirm-file-system-name <name> [--dry-run]
tdc fs delete-file-system --file-system-name <name> [--dry-run]
tdc fs list-file-systems
tdc fs describe-file-system --file-system-name <name>
tdc fs check-file-system [--file-system-name <name>]
Expand Down
43 changes: 15 additions & 28 deletions docs/spec/done/0019-pingcap-tdc-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Goal

Publish complete Preview documentation for tdc in the English and Chinese PingCAP documentation repositories. The documentation must help a new user reach a successful result quickly, cover every implemented command, explain the tdc and Drive9 ownership boundary, and provide scenario-based examples for database, filesystem, Git workspace, journal, vault, and ephemeral agent workflows.
Publish complete Preview documentation for tdc in the English PingCAP Cloud documentation repository. The documentation must help a new user reach a successful result quickly, cover every implemented command, explain the tdc and Drive9 ownership boundary, and provide scenario-based examples for database, filesystem, Git workspace, journal, vault, and ephemeral agent workflows.

The English documentation lives in the `pingcap/docs` submodule at `docs/pingcap-docs/docs/`. The Chinese translation lives in the `pingcap/docs-cn` submodule at `docs/pingcap-docs/docs-cn/`. Both submodules track the `release-8.5` branch and must keep matching document structures and links.
The documentation lives in the `pingcap/docs` submodule at `docs/pingcap-docs/docs/`. The submodule tracks the `release-8.5` branch. TiDB Cloud documentation is not translated into `pingcap/docs-cn`.

This is a documentation-only requirement. It does not add or change tdc runtime behavior, TiDB Cloud APIs, Drive9 APIs, configuration formats, credentials, commands, or dependencies.

Expand All @@ -22,15 +22,7 @@ English:
> tdc is currently in Preview. Its features and command-line interface might change without prior notice.
```

Chinese:

```markdown
> **注意:**
>
> tdc 当前处于预览(Preview)阶段,其功能和命令行界面可能会发生变更,恕不另行通知。
```

The tdc section labels in both `TOC-ai.md` files and both AI home pages must also include `(Preview)`.
The tdc section label in `TOC-ai.md` and the AI home page must also include `(Preview)`.

Product feedback and bug reports must point to:

Expand All @@ -44,7 +36,7 @@ Do not direct ordinary tdc feedback to the TiDB, Drive9, or PingCAP docs issue t

All new tdc Markdown basenames must be globally unique within each PingCAP documentation repository, even when files are stored in different directories. Every basename must start with the `tdc-` prefix and use the existing PingCAP docs kebab-case naming convention. Do not add a generic `_index.md`, `overview.md`, `quick-start.md`, or `reference.md` under the tdc tree.

The English and Chinese repositories use the same relative paths:
The English repository uses these relative paths:

```text
ai/tdc/
Expand Down Expand Up @@ -75,7 +67,7 @@ ai/tdc/
tdc-troubleshooting.md
```

All internal links use absolute PingCAP documentation paths rooted at `/ai/tdc/`. English and Chinese links use the same paths; locale routing is handled by the documentation site.
All internal links use absolute PingCAP documentation paths rooted at `/ai/tdc/`.

## Documentation Style

Expand All @@ -90,7 +82,7 @@ Follow the existing PingCAP documentation templates and AI documentation style:
- Commands use the installed `tdc` name, never the local development path `bin/tdc`.
- Examples use placeholders and synthetic resource names. Never include real API keys, FS tokens, SQL passwords, vault tokens, project IDs, cluster IDs, tenant IDs, or customer data.
- Secrets should be passed through environment variables where possible. If a secret flag must be explained, warn that flags may remain in shell history or process listings.
- English is the source documentation. Chinese pages preserve the same technical meaning and command blocks but use natural Chinese technical writing rather than literal machine translation.
- English is the only published language for these TiDB Cloud pages.
- Product and command names remain in their canonical form: `tdc`, TiDB Cloud Starter, TiDB Cloud Filesystem, `tdc fs`, `tdc fs-git`, `tdc fs-journal`, and `tdc fs-vault`.

Do not document `make build`, `go build`, `go install`, or source compilation as an end-user installation method. Developers who need source builds can use the tdc GitHub repository. Published user installation documentation covers only supported release installers and updates.
Expand Down Expand Up @@ -267,20 +259,18 @@ Do not document pending telemetry commands or unimplemented serverless-function/

## Navigation

Update both files:
Update:

```text
docs/pingcap-docs/docs/TOC-ai.md
docs/pingcap-docs/docs-cn/TOC-ai.md
```

Under Quick Start, Concepts, Guides, Examples, and Reference, add a nested `TiDB Cloud CLI (tdc) (Preview)` group with direct links to all corresponding tdc pages. Do not expose only the overview while leaving the other pages unreachable from the TOC.

Update both AI home pages:
Update the AI home page:

```text
docs/pingcap-docs/docs/ai/_index.md
docs/pingcap-docs/docs-cn/ai/_index.md
```

Add a `TiDB Cloud CLI (tdc) (Preview)` section with concise grouped tables linking directly to every tdc page. `tdc-overview.md` is the tdc landing page; no generic `_index.md` is added under `ai/tdc/`.
Expand Down Expand Up @@ -324,12 +314,10 @@ The two documentation directories are independent Git submodules:

1. Create an English docs branch from `release-8.5` in `docs/pingcap-docs/docs`.
2. Write and validate the English pages, `TOC-ai.md`, and AI home-page updates.
3. Create a Chinese docs branch from `release-8.5` in `docs/pingcap-docs/docs-cn`.
4. Translate the final English structure and update the Chinese TOC and AI home page.
5. Validate both submodule worktrees independently.
6. Commit changes inside each submodule.
7. Update the parent tdc repository gitlinks to the reviewed submodule commits.
8. Update the parent tdc current docs and completed-spec annotations in the same tdc change set.
3. Validate the documentation submodule worktree.
4. Commit changes inside the submodule.
5. Update the parent tdc repository gitlink to the reviewed submodule commit.
6. Update the parent tdc current docs and completed-spec annotations in the same tdc change set.

Do not make the tdc build, tests, packaging, or release artifacts depend on either documentation submodule. The submodules are documentation source only.

Expand All @@ -342,17 +330,16 @@ No example may depend on an undocumented endpoint, raw server URL, or direct Dri
## Dependencies And Platform

- Depends on all completed MVP command specs through `0018`.
- Depends on the `pingcap/docs` and `pingcap/docs-cn` submodules tracking `release-8.5`.
- Depends on the `pingcap/docs` submodule tracking `release-8.5`.
- Adds no Go package, cgo, runtime, installer, or service dependency.
- Published installation instructions support release installers only.
- Platform documentation must be based on current tested behavior and must distinguish macOS WebDAV from optional macFUSE/FUSE.

## Acceptance Criteria

- Every English tdc page has a matching Chinese page at the same relative path.
- Every new Markdown basename starts with `tdc-` and is globally unique in its repository.
- Every page includes valid front matter and the standard Preview note.
- Both TOC files directly link every tdc page under the correct category.
- `TOC-ai.md` directly links every tdc page under the correct category.
- Both AI home pages directly link every tdc page.
- All internal links resolve to files or approved external URLs.
- The overview links feedback to `https://github.com/tidbcloud/tdc/issues`.
Expand All @@ -365,7 +352,7 @@ No example may depend on an undocumented endpoint, raw server URL, or direct Dri
- Examples use only synthetic values and never expose a real secret.
- `docs/priciples.md`, `docs/present.md`, README, AGENTS, and the listed completed specs no longer present superseded behavior as current behavior.
- Archived README snapshots and historical release notes remain unchanged.
- English and Chinese Markdown lint and link checks pass using each documentation repository's available validation workflow.
- English Markdown lint and link checks pass using the documentation repository's available validation workflow.
- The parent tdc repository records clean submodule gitlinks with no uncommitted documentation changes.

## Out Of Scope
Expand Down
Loading