@curdx/flow 2.3.11 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/CHANGELOG.md +21 -34
  2. package/LICENSE +1 -1
  3. package/README.md +28 -79
  4. package/dist/index.mjs +995 -0
  5. package/package.json +33 -42
  6. package/.claude-plugin/marketplace.json +0 -48
  7. package/.claude-plugin/plugin.json +0 -70
  8. package/agent-preamble/preamble.md +0 -314
  9. package/agents/flow-adversary.md +0 -202
  10. package/agents/flow-architect.md +0 -197
  11. package/agents/flow-brownfield-analyst.md +0 -142
  12. package/agents/flow-debugger.md +0 -321
  13. package/agents/flow-edge-hunter.md +0 -288
  14. package/agents/flow-executor.md +0 -269
  15. package/agents/flow-orchestrator.md +0 -145
  16. package/agents/flow-planner.md +0 -246
  17. package/agents/flow-product-designer.md +0 -159
  18. package/agents/flow-qa-engineer.md +0 -282
  19. package/agents/flow-researcher.md +0 -165
  20. package/agents/flow-reviewer.md +0 -303
  21. package/agents/flow-security-auditor.md +0 -401
  22. package/agents/flow-triage-analyst.md +0 -272
  23. package/agents/flow-ui-researcher.md +0 -229
  24. package/agents/flow-ux-designer.md +0 -221
  25. package/agents/flow-verifier.md +0 -349
  26. package/bin/curdx-flow +0 -5
  27. package/bin/curdx-flow.js +0 -54
  28. package/cli/README.md +0 -104
  29. package/cli/doctor-workflow.js +0 -483
  30. package/cli/doctor.js +0 -73
  31. package/cli/help.js +0 -59
  32. package/cli/install-bundled-mcps.js +0 -37
  33. package/cli/install-companions.js +0 -19
  34. package/cli/install-context7-config.js +0 -80
  35. package/cli/install-curdx-plugin.js +0 -96
  36. package/cli/install-language.js +0 -35
  37. package/cli/install-next-steps.js +0 -29
  38. package/cli/install-options.js +0 -9
  39. package/cli/install-paths.js +0 -52
  40. package/cli/install-recommended-plugins.js +0 -104
  41. package/cli/install-required-plugins.js +0 -57
  42. package/cli/install-self-update.js +0 -62
  43. package/cli/install-workflow.js +0 -209
  44. package/cli/install.js +0 -101
  45. package/cli/lib/claude-commands.js +0 -41
  46. package/cli/lib/claude-ops.js +0 -47
  47. package/cli/lib/claude.js +0 -183
  48. package/cli/lib/config.js +0 -24
  49. package/cli/lib/doctor-claude-settings.js +0 -1186
  50. package/cli/lib/doctor-report.js +0 -978
  51. package/cli/lib/doctor-runtime-environment.js +0 -196
  52. package/cli/lib/frontmatter.js +0 -44
  53. package/cli/lib/json-schema.js +0 -57
  54. package/cli/lib/logging.js +0 -25
  55. package/cli/lib/process.js +0 -60
  56. package/cli/lib/prompts.js +0 -135
  57. package/cli/lib/runtime.js +0 -107
  58. package/cli/lib/semver.js +0 -109
  59. package/cli/lib/version.js +0 -12
  60. package/cli/protocols-body.md +0 -22
  61. package/cli/protocols.js +0 -162
  62. package/cli/registry.js +0 -123
  63. package/cli/router.js +0 -49
  64. package/cli/uninstall-actions.js +0 -360
  65. package/cli/uninstall-workflow.js +0 -146
  66. package/cli/uninstall.js +0 -42
  67. package/cli/upgrade-workflow.js +0 -80
  68. package/cli/upgrade.js +0 -91
  69. package/cli/utils.js +0 -40
  70. package/gates/adversarial-review-gate.md +0 -219
  71. package/gates/coverage-audit-gate.md +0 -182
  72. package/gates/devex-gate.md +0 -254
  73. package/gates/edge-case-gate.md +0 -194
  74. package/gates/karpathy-gate.md +0 -130
  75. package/gates/security-gate.md +0 -218
  76. package/gates/tdd-gate.md +0 -182
  77. package/gates/test-quality-gate.md +0 -59
  78. package/gates/verification-gate.md +0 -179
  79. package/hooks/hooks.json +0 -58
  80. package/hooks/scripts/common.sh +0 -46
  81. package/hooks/scripts/inject-karpathy.sh +0 -53
  82. package/hooks/scripts/quick-mode-guard.sh +0 -68
  83. package/hooks/scripts/session-start.sh +0 -90
  84. package/hooks/scripts/stop-watcher.sh +0 -230
  85. package/hooks/scripts/subagent-artifact-guard.sh +0 -159
  86. package/hooks/scripts/subagent-statusline.sh +0 -105
  87. package/knowledge/artifact-output-discipline.md +0 -24
  88. package/knowledge/artifact-summary-contracts.md +0 -50
  89. package/knowledge/atomic-commits.md +0 -262
  90. package/knowledge/claude-code-runtime-contracts.md +0 -219
  91. package/knowledge/epic-decomposition.md +0 -307
  92. package/knowledge/execution-strategies.md +0 -303
  93. package/knowledge/karpathy-guidelines.md +0 -219
  94. package/knowledge/planning-reviews.md +0 -211
  95. package/knowledge/poc-first-workflow.md +0 -223
  96. package/knowledge/review-feedback-intake.md +0 -57
  97. package/knowledge/spec-driven-development.md +0 -180
  98. package/knowledge/systematic-debugging.md +0 -378
  99. package/knowledge/two-stage-review.md +0 -249
  100. package/knowledge/wave-execution.md +0 -403
  101. package/monitors/monitors.json +0 -8
  102. package/monitors/scripts/flow-state-monitor.sh +0 -99
  103. package/output-styles/curdx-evidence-first.md +0 -34
  104. package/schemas/agent-frontmatter.schema.json +0 -63
  105. package/schemas/config.schema.json +0 -134
  106. package/schemas/gate-frontmatter.schema.json +0 -30
  107. package/schemas/hooks.schema.json +0 -115
  108. package/schemas/output-style-frontmatter.schema.json +0 -22
  109. package/schemas/plugin-manifest.schema.json +0 -436
  110. package/schemas/plugin-settings.schema.json +0 -29
  111. package/schemas/skill-frontmatter.schema.json +0 -177
  112. package/schemas/spec-frontmatter.schema.json +0 -42
  113. package/schemas/spec-state.schema.json +0 -147
  114. package/settings.json +0 -7
  115. package/skills/brownfield-index/SKILL.md +0 -53
  116. package/skills/brownfield-index/references/applicability.md +0 -12
  117. package/skills/brownfield-index/references/handoff.md +0 -8
  118. package/skills/brownfield-index/references/index-contract.md +0 -10
  119. package/skills/browser-qa/SKILL.md +0 -39
  120. package/skills/browser-qa/references/handoff.md +0 -6
  121. package/skills/browser-qa/references/prerequisites.md +0 -10
  122. package/skills/browser-qa/references/qa-contract.md +0 -20
  123. package/skills/cancel/SKILL.md +0 -41
  124. package/skills/cancel/references/destructive-mode.md +0 -17
  125. package/skills/cancel/references/reporting.md +0 -18
  126. package/skills/cancel/references/state-recovery.md +0 -30
  127. package/skills/cancel/references/target-resolution.md +0 -7
  128. package/skills/debug/SKILL.md +0 -45
  129. package/skills/debug/references/context-gathering.md +0 -11
  130. package/skills/debug/references/failure-guard.md +0 -25
  131. package/skills/debug/references/intake.md +0 -12
  132. package/skills/debug/references/phase-workflow.md +0 -34
  133. package/skills/debug/references/reporting.md +0 -20
  134. package/skills/epic/SKILL.md +0 -39
  135. package/skills/epic/references/epic-artifacts.md +0 -20
  136. package/skills/epic/references/epic-intake.md +0 -9
  137. package/skills/epic/references/slice-handoff.md +0 -16
  138. package/skills/fast/SKILL.md +0 -62
  139. package/skills/fast/references/applicability.md +0 -25
  140. package/skills/fast/references/clarification.md +0 -20
  141. package/skills/fast/references/execution-contract.md +0 -56
  142. package/skills/help/SKILL.md +0 -55
  143. package/skills/help/references/dispatch.md +0 -20
  144. package/skills/help/references/overview.md +0 -39
  145. package/skills/help/references/troubleshoot.md +0 -47
  146. package/skills/help/references/workflow.md +0 -37
  147. package/skills/implement/SKILL.md +0 -96
  148. package/skills/implement/references/error-recovery.md +0 -36
  149. package/skills/implement/references/linear-execution.md +0 -32
  150. package/skills/implement/references/preflight.md +0 -43
  151. package/skills/implement/references/progress-contract.md +0 -32
  152. package/skills/implement/references/state-init.md +0 -33
  153. package/skills/implement/references/stop-hook-execution.md +0 -36
  154. package/skills/implement/references/strategy-router.md +0 -38
  155. package/skills/implement/references/subagent-execution.md +0 -43
  156. package/skills/implement/references/wave-execution.md +0 -162
  157. package/skills/init/SKILL.md +0 -49
  158. package/skills/init/references/gitignore-and-health.md +0 -26
  159. package/skills/init/references/next-steps.md +0 -22
  160. package/skills/init/references/preflight.md +0 -15
  161. package/skills/init/references/scaffold-contract.md +0 -27
  162. package/skills/review/SKILL.md +0 -82
  163. package/skills/review/references/optional-passes.md +0 -48
  164. package/skills/review/references/preflight.md +0 -38
  165. package/skills/review/references/report-contract.md +0 -49
  166. package/skills/review/references/reporting.md +0 -20
  167. package/skills/review/references/stage-execution.md +0 -32
  168. package/skills/security-audit/SKILL.md +0 -47
  169. package/skills/security-audit/references/audit-contract.md +0 -21
  170. package/skills/security-audit/references/gate-handoff.md +0 -8
  171. package/skills/security-audit/references/scope-and-depth.md +0 -9
  172. package/skills/spec/SKILL.md +0 -100
  173. package/skills/spec/references/artifact-landing.md +0 -31
  174. package/skills/spec/references/phase-execution.md +0 -50
  175. package/skills/spec/references/planning-review.md +0 -31
  176. package/skills/spec/references/preflight-and-routing.md +0 -46
  177. package/skills/spec/references/reporting.md +0 -21
  178. package/skills/start/SKILL.md +0 -84
  179. package/skills/start/references/branch-routing.md +0 -51
  180. package/skills/start/references/mode-semantics.md +0 -12
  181. package/skills/start/references/preflight.md +0 -13
  182. package/skills/start/references/reporting.md +0 -20
  183. package/skills/start/references/state-seeding.md +0 -44
  184. package/skills/start/references/workflow-handoff.md +0 -26
  185. package/skills/status/SKILL.md +0 -41
  186. package/skills/status/references/gather-contract.md +0 -27
  187. package/skills/status/references/health-rules.md +0 -27
  188. package/skills/status/references/output-contract.md +0 -24
  189. package/skills/status/references/preflight.md +0 -10
  190. package/skills/status/references/recovery-hints.md +0 -18
  191. package/skills/ui-sketch/SKILL.md +0 -39
  192. package/skills/ui-sketch/references/brief-intake.md +0 -10
  193. package/skills/ui-sketch/references/iteration-handoff.md +0 -5
  194. package/skills/ui-sketch/references/variant-contract.md +0 -15
  195. package/skills/verify/SKILL.md +0 -56
  196. package/skills/verify/references/evidence-workflow.md +0 -39
  197. package/skills/verify/references/output-contract.md +0 -23
  198. package/skills/verify/references/preflight.md +0 -11
  199. package/skills/verify/references/report-handoff.md +0 -35
  200. package/skills/verify/references/strict-mode.md +0 -12
  201. package/templates/CONTEXT.md.tmpl +0 -53
  202. package/templates/PROJECT.md.tmpl +0 -59
  203. package/templates/ROADMAP.md.tmpl +0 -50
  204. package/templates/STATE.md.tmpl +0 -49
  205. package/templates/config.json.tmpl +0 -51
  206. package/templates/design.md.tmpl +0 -83
  207. package/templates/progress.md.tmpl +0 -77
  208. package/templates/requirements.md.tmpl +0 -76
  209. package/templates/research.md.tmpl +0 -83
  210. package/templates/tasks.md.tmpl +0 -107
package/CHANGELOG.md CHANGED
@@ -1,44 +1,31 @@
1
1
  # Changelog
2
2
 
3
- ## 2.3.8
3
+ All notable changes to `@curdx/flow` are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/) and the project follows [Semantic Versioning](https://semver.org/).
4
4
 
5
- - taught `doctor` to detect dirty CurDX-Flow source checkouts, so plugin developers immediately see when Claude cannot possibly be running their latest local edits yet
6
- - surfaced bundled source repo metadata (`branch`, `shortSha`, `exactTag`, `dirty`) alongside bundled plugin body version in diagnostics and JSON output
7
- - documented the reinstall workflow for “same version, but local source changed” plugin-development scenarios
5
+ ## 3.1.0 2026-04-26
8
6
 
9
- ## 2.3.7
7
+ Major rewrite preserving the same goal (one-command installer for Claude Code plugins and MCP servers) with a cleaner internal architecture and broader coverage.
10
8
 
11
- - taught `doctor` to detect source/package-vs-installed plugin version drift so local plugin development and release validation no longer silently run against stale Claude plugin cache state
12
- - exposed bundled plugin body version in the runtime report and machine-readable doctor payload for automation consumers
13
- - documented the reinstall/restart recovery path when Claude is still loading an older CurDX-Flow build
9
+ ### Added
14
10
 
15
- ## 2.3.6
11
+ - **Bilingual UI** — every interactive run starts with a 中文 / English picker; default is auto-detected from `$LANG`. No config file is written.
12
+ - **Two new MCP servers**:
13
+ - `sequential-thinking` (`@modelcontextprotocol/server-sequential-thinking`)
14
+ - `context7` (Upstash HTTP MCP) with optional API key prompt at install time
15
+ - **`citty` subcommand mode** — `npx @curdx/flow install|uninstall|update|status` for non-interactive / CI use, alongside the original interactive menu.
16
+ - **`status --json`** — machine-readable install state for scripting.
17
+ - **`install --all --yes`** — non-interactive bulk install.
18
+ - **`Pkg` registry abstraction** (`src/registry/types.ts`) — every installable item declares `isInstalled / install / uninstall / update / prereqCheck / configPrompts` once, and the four flows (install / uninstall / update / status) use the same interface. Future additions are a single file in `src/registry/`.
19
+ - **Idempotency layer** — every flow pre-checks state via cached `claude plugin list --json` / `claude mcp list` parsing, so re-running after a partial install is safe.
20
+ - **`prereqCheck` for `chrome-devtools-mcp`** — detects Node ≥ 20.19 and a locally installed Chrome before attempting install.
21
+ - **GitHub Actions CI + Release workflows** — Node 20 + 22 matrix on PRs; `v*` tag triggers `npm publish --provenance --access public` and an auto-noted GitHub Release.
16
22
 
17
- - taught `doctor` to inspect file-based Claude Code managed settings and apply them at the correct highest-precedence layer for CurDX-Flow plugin options
18
- - upgraded the `doctor --json` contract to v2 so wrappers can distinguish inspected `managed-file` scope from uninspected server-managed / MDM / CLI overrides
19
- - added report and workflow coverage for managed-settings fragments, invalid managed JSON, and managed-vs-local/project/user precedence
23
+ ### Changed
20
24
 
21
- ## 2.3.5
25
+ - `@clack/prompts` upgraded **0.8.x → 1.2.x** (Node ≥ 20.12 required).
26
+ - Bundler: now `tsup` producing a single 35 KB ESM file (`dist/index.mjs`) with shebang banner — no more multi-file dist.
27
+ - Plugin registry now uses the **real marketplace name** from `.claude-plugin/marketplace.json`, not the GitHub repo path. Specifically `chrome-devtools-mcp` lives in marketplace `chrome-devtools-plugins`, not `chrome-devtools-mcp`.
22
28
 
23
- - added a versioned `doctor --json` contract for CI/wrappers, including applied-fix metadata and explicit settings-inspection scope metadata
24
- - added CLI-level regression coverage so `doctor --json` stays silent except for JSON stdout and exit code
25
- - locked runtime env consumer drift checks against manifest `userConfig` keys and the actual bundled hook/monitor scripts
29
+ ### Removed
26
30
 
27
- ## 2.3.1
28
-
29
- - expanded `doctor` to report CurDX-Flow’s bundled main-thread agent, monitor surface, and plugin option defaults
30
- - documented where Claude Code stores CurDX-Flow non-sensitive `userConfig` values in `pluginConfigs`
31
- - added troubleshooting guidance for stop-hook blocking and plugin monitor behavior
32
-
33
- ## 2.3.0
34
-
35
- - added a default `flow-orchestrator` main-thread agent through plugin-level `settings.json`
36
- - added a plugin `flow-state` monitor plus `userConfig` runtime knobs for stop-hook blocking, dependency reminders, and monitor cadence
37
- - made the manifest explicit about `outputStyles` and `monitors`, shipped the monitor assets in npm tarballs, and strengthened pack/plugin contract tests
38
- - updated doctor/runtime guidance and public docs to reflect the new main-agent + monitor architecture
39
-
40
- ## 2.2.4
41
-
42
- - aligned the public docs surface with the current skill-first plugin layout
43
- - kept thin entry docs while moving detailed workflow logic into skill references
44
- - locked command summaries to workflow skill descriptions with tests
31
+ - `~/.curdx-flow/config.json` — language preference is no longer persisted; the picker runs every interactive session.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 wdx
3
+ Copyright (c) 2026 bydongxin
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,95 +1,44 @@
1
- # CurdX-Flow
1
+ # @curdx/flow
2
2
 
3
- > Stop Claude Code from faking "done".
4
- > Spec-driven workflow, goal-backward verification, and Karpathy discipline for real feature delivery.
3
+ Interactive installer for Claude Code plugins and MCP servers.
5
4
 
6
- [![npm version](https://img.shields.io/npm/v/@curdx/flow.svg)](https://www.npmjs.com/package/@curdx/flow)
7
- [![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
8
- [![Plugin](https://img.shields.io/badge/claude--code-plugin-blue)](https://code.claude.com)
9
-
10
- CurdX-Flow is a skill-first Claude Code plugin. The public surface stays small:
11
- 11 slash commands, 5 auto-invoked skills, 17 internal agents, and a thin set of
12
- entry docs. The heavy workflow detail lives in `skills/*/references/` and
13
- `knowledge/`.
14
-
15
- ## Install
5
+ ## Quick start
16
6
 
17
7
  ```bash
18
- npx @curdx/flow install --all
8
+ npx @curdx/flow
19
9
  ```
20
10
 
21
- Requires modern Claude Code and Node 18+. The install flow registers the plugin,
22
- required reasoning/doc tools, and recommended companion plugins. Run
23
- `npx @curdx/flow doctor` after install if anything looks off. For CI or wrapper
24
- automation, use `npx @curdx/flow doctor --json`, which now includes file-based
25
- managed settings in its inspected precedence model.
11
+ On first run you'll be asked to pick a language (中文 / English). Then choose what to install, update, uninstall, or just check status.
26
12
 
27
- After restart, CurDX-Flow routes the main thread through `flow-orchestrator`
28
- by default and starts the bundled `.flow` progress monitor in interactive
29
- Claude Code sessions.
30
-
31
- ## 11 slash commands, that's it
32
-
33
- ```text
34
- /curdx-flow:init Initialize the .flow scaffold for the current repository.
35
- /curdx-flow:start Create, resume, list, or switch the active feature spec.
36
- /curdx-flow:status Show active spec health, progress, artifacts, and recovery hints.
37
- /curdx-flow:spec Generate or refresh research, requirements, design, and tasks for the active spec.
38
- /curdx-flow:implement Execute active-spec tasks with strategy routing and atomic progress.
39
- /curdx-flow:cancel Cancel the active execution loop or delete a spec with explicit confirmation.
40
- /curdx-flow:verify Verify the active spec against code, tests, and browser evidence.
41
- /curdx-flow:review Run two-stage review with optional adversarial, edge-case, and DevEx passes.
42
- /curdx-flow:fast Execute a one-shot small task without creating a spec.
43
- /curdx-flow:debug Debug a bug or failing test with the root-cause workflow.
44
- /curdx-flow:help Show command detail, workflow guidance, and troubleshooting.
45
- ```
46
-
47
- Plus 5 auto-invoked skills: `/curdx-flow:epic`, `/curdx-flow:browser-qa`,
48
- `/curdx-flow:ui-sketch`, `/curdx-flow:security-audit`,
49
- `/curdx-flow:brownfield-index`.
50
-
51
- ## Quick start
13
+ ## Subcommands
52
14
 
53
15
  ```bash
54
- cd ~/your-project
55
- claude
56
- /curdx-flow:init
57
- /curdx-flow:start jwt-auth "Add JWT authentication to the REST API"
58
- /curdx-flow:spec
59
- /curdx-flow:implement
60
- /curdx-flow:verify
61
- /curdx-flow:review
62
-
63
- # Main artifacts:
64
- # .flow/specs/jwt-auth/verification-report.md
65
- # .flow/specs/jwt-auth/review-report.md
16
+ npx @curdx/flow # interactive menu
17
+ npx @curdx/flow install # interactive install (current state-aware)
18
+ npx @curdx/flow install --all --yes
19
+ npx @curdx/flow uninstall
20
+ npx @curdx/flow update
21
+ npx @curdx/flow status
22
+ npx @curdx/flow status --json
23
+ npx @curdx/flow --lang en # override language
66
24
  ```
67
25
 
68
- This produces a durable audit trail instead of a chat-only claim of completion.
69
-
70
- ## What ships
26
+ ## What it installs
71
27
 
72
- - 11 slash commands and 5 auto-invoked skills
73
- - 17 internal agents
74
- - a default main-thread `flow-orchestrator` agent
75
- - a `.flow` state monitor that streams spec progress changes back into Claude
76
- - 8 composable gates
77
- - 4 execution strategies for `/curdx-flow:implement`
78
- - thin public docs, thick supporting references
28
+ | id | type | source |
29
+ | --- | --- | --- |
30
+ | `pua` | plugin | `tanweai/pua` → `pua@pua-skills` |
31
+ | `claude-mem` | plugin | `thedotmack/claude-mem` |
32
+ | `chrome-devtools-mcp` | plugin | `ChromeDevTools/chrome-devtools-mcp` |
33
+ | `frontend-design` | plugin | `claude-plugins-official` (built-in) |
34
+ | `sequential-thinking` | mcp | `@modelcontextprotocol/server-sequential-thinking` |
35
+ | `context7` | mcp | HTTP — `https://mcp.context7.com/mcp` (optional API key) |
79
36
 
80
- ## Docs
37
+ ## Requirements
81
38
 
82
- - [docs/getting-started.md](./docs/getting-started.md) for the first end-to-end walkthrough
83
- - [docs/command-reference.md](./docs/command-reference.md) for flags, strategy semantics, and specialty skill contracts
84
- - [docs/workflows.md](./docs/workflows.md) for greenfield, brownfield, epic, fast, and enterprise flows
85
- - [docs/headless-ci.md](./docs/headless-ci.md) for `claude --bare -p`, `system/init`, `system/plugin_install`, and CI patterns
86
- - [docs/troubleshoot.md](./docs/troubleshoot.md) for operator fixes
87
- - [docs/architecture.md](./docs/architecture.md) for the skill-first layout
88
- - [docs/agent-reference.md](./docs/agent-reference.md) for the 17 internal agents and their artifacts
39
+ - Node.js >= 20.12
40
+ - `claude` CLI installed and on `PATH` (this tool shells out to `claude plugin` and `claude mcp`)
89
41
 
90
- ## Notes
42
+ ## License
91
43
 
92
- - `enterprise` mode turns on adversarial, edge-case, security, and DevEx gates.
93
- - `subagent` is serial; `wave` is the parallel strategy.
94
- - Headless usage should favor `claude --bare -p` and explicit `--plugin-dir`,
95
- `--settings`, and `--mcp-config` wiring.
44
+ MIT