Skip to content

Commit f35480c

Browse files
zrosenbauerclaude
andcommitted
docs: fix broken links, align standards with codebase conventions
Fix broken lifecycle.md links in contributing/concepts/ that pointed to a non-existent file (should reference docs/concepts/lifecycle.md). Update CLAUDE.md test file glob to match actual colocated test pattern, add type-fest to tech stack. Align testing.md integration test directory example with real codebase (test/integration/ not __tests__/). Add undocumented Crust color to diagrams.md palette table and clarify classDef vs inline style guidance for subgraphs. Update changesets to cover output/prompts removal, utils fs export, and CLI command refactoring. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c54ed5f commit f35480c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+649
-2081
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@kidd-cli/cli': patch
3+
---
4+
5+
Refactor CLI commands to use shared config helpers and validation utilities

.changeset/oauth-pkce-device-code.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ After:
2121
```
2222

2323
New `device-code` resolver added for headless/browserless environments (RFC 8628).
24+
25+
**Breaking change:** Remove `lib/output` and `lib/prompts` sub-exports. The `Spinner` interface is now inlined in `context/types.ts` and prompts use `@clack/prompts` directly. Consumers importing from `@kidd-cli/core/lib/output` or `@kidd-cli/core/lib/prompts` must update to use `@clack/prompts` directly.
26+
27+
**Breaking change:** Export `MiddlewareEnv` type from main entry point.

.changeset/utils-fs-export.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@kidd-cli/utils': patch
3+
---
4+
5+
Add `fileExists` utility for checking file existence without throwing

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ You are a strict functional programmer. You write pure, immutable, declarative T
2929
| [tsdown](https://tsdown.dev) | Bundler | [llms.txt](https://tsdown.dev/llms.txt) \| [llms-full.txt](https://tsdown.dev/llms-full.txt) |
3030
| [OXC](https://oxc.rs) (oxlint) | Linting | [llms.txt](https://oxc.rs/llms.txt) |
3131
| [Vitest](https://vitest.dev) | Testing | [GitHub](https://github.com/vitest-dev/vitest) |
32+
| [type-fest](https://github.com/sindresorhus/type-fest) | Type utilities | [GitHub](https://github.com/sindresorhus/type-fest) |
3233
| [Changesets](https://github.com/changesets/changesets) | Versioning & publishing | [GitHub](https://github.com/changesets/changesets) |
3334

3435
## Commands
@@ -55,7 +56,7 @@ pnpm test # Run package tests
5556
- ESM only (`"type": "module"`)
5657
- Built with `tsdown` (`dts: true`, `format: 'esm'`, `clean: true`, `outDir: 'dist'`)
5758
- TypeScript: `target: ES2022`, `module: ESNext`, `moduleResolution: bundler`, `strict: true`, `isolatedDeclarations: true`
58-
- `vitest` for tests (test files in `test/**/*.test.ts`)
59+
- `vitest` for tests (unit tests colocated as `src/**/*.test.ts`, integration tests in `test/integration/*.test.ts`)
5960
- All public properties `readonly`
6061
- Config validated with Zod at boundaries
6162
- Explicit return types on all exported functions (required by `isolatedDeclarations`)

contributing/concepts/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ middleware(async (ctx, next) => {
254254
})
255255
```
256256

257-
Middleware follows an onion model: root middleware (from `cli()`) wraps command middleware (from `command()`), which wraps the handler. Each middleware calls `next()` to pass control inward. Data flows between middleware and handlers via `ctx.store`. See [Lifecycle](./lifecycle.md) for the full execution model.
257+
Middleware follows an onion model: root middleware (from `cli()`) wraps command middleware (from `command()`), which wraps the handler. Each middleware calls `next()` to pass control inward. Data flows between middleware and handlers via `ctx.store`. See [Lifecycle](../../docs/concepts/lifecycle.md) for the full execution model.
258258

259259
## Autoloader
260260

@@ -323,7 +323,7 @@ if (error) return [error, null]
323323
## References
324324

325325
- [CLI](./cli.md)
326-
- [Lifecycle](./lifecycle.md)
326+
- [Lifecycle](../../docs/concepts/lifecycle.md)
327327
- [Coding Style](../standards/typescript/coding-style.md)
328328
- [Design Patterns](../standards/typescript/design-patterns.md)
329329
- [Errors](../standards/typescript/errors.md)

contributing/concepts/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ root middleware end
192192
- A middleware can short-circuit by not calling `next()`
193193
- Data flows between middleware and handlers via `ctx.store`
194194

195-
See [Lifecycle](./lifecycle.md) for the full execution model.
195+
See [Lifecycle](../../docs/concepts/lifecycle.md) for the full execution model.
196196

197197
## Autoloading
198198

@@ -272,6 +272,6 @@ See the [Adding a CLI Command](../guides/adding-a-cli-command.md) guide for a st
272272
## References
273273

274274
- [Architecture](./architecture.md)
275-
- [Lifecycle](./lifecycle.md)
275+
- [Lifecycle](../../docs/concepts/lifecycle.md)
276276
- [Errors](../standards/typescript/errors.md)
277277
- [Design Patterns](../standards/typescript/design-patterns.md)

contributing/standards/documentation/diagrams.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Based on [Catppuccin Mocha](https://catppuccin.com/palette).
3131

3232
| Name | Hex | Usage |
3333
| -------- | --------- | -------------------------------------- |
34+
| Crust | `#181825` | Subgraph fill (app boundary, groups) |
3435
| Base | `#1e1e2e` | Background, cluster backgrounds |
3536
| Surface0 | `#313244` | Node fill (primary) |
3637
| Surface1 | `#45475a` | Node fill (secondary), cluster borders |
@@ -136,7 +137,7 @@ Apply with the `class` directive -- never use `classDef default`.
136137

137138
- Max 10-15 nodes per diagram
138139
- Prefer LR (left-to-right) or TB for vertical flows
139-
- Use `classDef` + `class` for styling -- never inline `style` on individual nodes
140+
- Use `classDef` + `class` for styling nodes -- never inline `style` on individual nodes (subgraphs require inline `style` since `classDef` does not apply to them)
140141
- Use semantic class names (`external`, `core`, `agent`) -- never `classDef default`
141142
- Group related nodes with subgraphs
142143
- Add a legend when using both solid and dashed lines

contributing/standards/typescript/testing.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ src/
2626
├── runtime/
2727
│ ├── executor.ts
2828
│ └── executor.test.ts
29-
└── __tests__/
30-
└── integration.test.ts
29+
test/
30+
└── integration/
31+
└── auth-oauth-pkce.test.ts
3132
```
3233

3334
### Write Clear Test Cases

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build": "turbo run build --filter='./packages/*'",
1515
"dev": "turbo run dev",
1616
"test": "turbo run test --filter='./packages/*'",
17-
"test:coverage": "turbo run build --filter='./packages/*' && vitest run --coverage",
17+
"test:coverage": "turbo run test:coverage --filter='./packages/*'",
1818
"test:watch": "turbo run build --filter='./packages/*' && vitest",
1919
"typecheck": "turbo run typecheck --filter='./packages/*'",
2020
"check": "turbo run typecheck --filter='./packages/*' && pnpm lint && pnpm format",

packages/bundler/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"lint": "oxlint --ignore-pattern node_modules",
2525
"lint:fix": "oxlint --fix --ignore-pattern node_modules",
2626
"test": "vitest run",
27+
"test:coverage": "vitest run --coverage",
2728
"test:watch": "vitest"
2829
},
2930
"dependencies": {

0 commit comments

Comments
 (0)