Skip to content

Commit 1b23c95

Browse files
committed
Update docs and minor code visibility for consistency
Standardize capitalization in documentation files (README.md, SPEC.md, TODO.md, CONTRIBUTING.md, and sources/common-shell-perf/README.md) for section headers and terminology. Change BenchMetricsRecorder.metricDescriptors from internal to fileprivate for improved encapsulation.
1 parent 8e77e6b commit 1b23c95

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Thanks for your interest in contributing!
44

5-
## Development setup
5+
## Development Setup
66

77
- Swift toolchain: 6.1
88
- Platforms: Linux (CI) and macOS (local).
99
- Build: `swift build -c release`
1010
- Test: `swift test --parallel`
1111

12-
## Coding guidelines
12+
## Coding Guidelines
1313

1414
- Prefer explicit, long-form flags and option names.
1515
- No `Foundation.Process` at call sites; use CommonProcess/CommonShell runners.
@@ -22,13 +22,13 @@ Thanks for your interest in contributing!
2222
- Support: WrkstrmLog, WrkstrmFoundation, WrkstrmPerformance
2323
- Argument parsing: Apple Swift Argument Parser
2424

25-
## Opening issues and PRs
25+
## Opening Issues and PRs
2626

2727
- Include a concise summary and reproduction steps for bugs.
2828
- For features, describe the use case and acceptance criteria.
2929
- Keep PRs focused with clear rationale and tests where applicable.
3030

31-
## License and conduct
31+
## License and Conduct
3232

3333
By contributing, you agree that your contributions will be licensed under the
3434
MIT License (see `LICENSE`) and that you will abide by the `CODE_OF_CONDUCT.md`.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CommonShell – process execution wrapper
1+
# CommonShell – Process Execution Wrapper
22

33
| GitHub Actions | Status |
44
| -------------- | ------ |
@@ -48,7 +48,7 @@ Instrumentation├──────────────────▶ │
4848
- Runners (`ProcessRunnerKind`) handle the actual execution surface (Subprocess/Foundation/TSCBasic/Native).
4949
- Instrumentation and metrics tag invocations automatically (host kind propagates via `ProcessLogOptions.tags`).
5050

51-
## CommandSpec-first model
51+
## CommandSpec-first Model
5252

5353
```swift
5454
public struct CommandSpec: Codable, Sendable {
@@ -75,7 +75,7 @@ public struct CommandSpec: Codable, Sendable {
7575
- Built-in keys: `.noop`, `.metrics` (via `ProcessMetricsRecorder`).
7676
- `ProcessLogOptions.tags["executionHost"]` records the host label automatically.
7777

78-
## Running commands
78+
## Running Commands
7979

8080
```swift
8181
var shell = CommonShell(executable: .name("git"))
@@ -97,7 +97,7 @@ Low-level entry point:
9797

9898
- `run(host:executable:arguments:runnerKind:)` — explicitly supply the host transform and executable identity.
9999

100-
## Route planning & benchmarking
100+
## Route Planning & Benchmarking
101101

102102
- `ShellRouteKind` still enumerates runners (`.auto`, `.native`, `.subprocess(kind)`).
103103
- Bench helpers (`BenchRoutes`, `BenchSupport`) now operate over `(host: ExecutionHostKind, executable: Executable, arguments: [String]) × [ShellRouteKind]`.

SPEC.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CommonShell API Spec (v0.1 – planning)
1+
# CommonShell API Spec (V0.1 – Planning)
22

33
## Goal
44

@@ -12,7 +12,7 @@
1212
- Target `CommonProcess`: process abstraction (protocols + minimal types)
1313
- Target `CommonShell`: shell adapter built on CommonProcess
1414

15-
## CommonProcess (target)
15+
## CommonProcess (Target)
1616

1717
- `enum ExecutableReference` (name|path)
1818
- `struct Executable`
@@ -31,7 +31,7 @@
3131
- `struct ProcessError: Error, CustomStringConvertible` (from CommonProcessRunners)
3232
- `status: Int?`, `error: String`
3333

34-
## CommonShell (target)
34+
## CommonShell (Target)
3535

3636
- `struct CommonShell`
3737
- Properties
@@ -82,7 +82,7 @@
8282
- Use `Executable.name(_:)` / `Executable.path(_:)` for identity.
8383
- Construct `CommandSpec(executable: Executable, args: ...)` and let runners resolve.
8484

85-
### Wrappers and PATH resolution
85+
### Wrappers and PATH Resolution
8686

8787
- Wrappers transform identity (name/path) into a finalized command using unified `Executable`:
8888
- `direct(path)`: set `Executable.path(path)`, prepend `options`, append call‑site args.
@@ -113,12 +113,12 @@ let pwd = sh.withExec(reference: .path("/bin/pwd"))
113113
print(try await pwd.run(args: []))
114114
```
115115

116-
## Out of Scope (v0.1)
116+
## Out of Scope (V0.1)
117117

118118
- Streaming/PTY, interactive input, line‑by‑line coalescing.
119119
- Global registries, environment mutation, or policy.
120120

121-
## Implementation Notes (source reference only)
121+
## Implementation Notes (Source Reference Only)
122122

123123
- Use the existing CommonShell codebase as a reference to port minimal process‑running logic into `CommonProcess`/`CommonShell`. Do not depend on or re‑export CommonShell.
124124
- Implement the smallest surface required by current call sites (blocking run + buffered output). Extend incrementally for streaming/interactive later.

TODO.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# TODO — CommonShell improvements
1+
# TODO — CommonShell Improvements
22

3-
### Typed host options
3+
### Typed Host Options
44
<!-- id:common-shell-typed-host-options owner:platform-tooling priority:P2 labels:common-shell,api,status:planned epic:exec-layer estimate:4x7.5m -->
55
- Replace raw `[String]` options for `.shell/.env/.npm/.npx` with typed enums/option sets.
66
- Add documentation and examples; migrate internal call sites.
77

8-
### Timeout & cancellation
8+
### Timeout & Cancellation
99
<!-- id:common-shell-timeout-cancel owner:platform-tooling priority:P1 labels:common-shell,api,status:in-progress epic:exec-layer estimate:3x7.5m -->
1010
- Add `timeout:` parameter to run APIs; guarantee cooperative cancellation semantics.
1111
- Surface `timedOut/cancelled` flags in structured results where appropriate.

sources/common-shell-bench/BenchMetricsRecorder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ final class BenchMetricsRecorder: ProcessMetricsRecorder, @unchecked Sendable {
7878
private static let metricDescriptorLookup: [String: MetricDescriptor] =
7979
Dictionary(uniqueKeysWithValues: metricDescriptorList.map { ($0.key, $0) })
8080

81-
static var metricDescriptors: [MetricDescriptor] { metricDescriptorList }
81+
fileprivate static var metricDescriptors: [MetricDescriptor] { metricDescriptorList }
8282

8383
private let queue = DispatchQueue(
8484
label: "wrkstrm.common-shell.bench.metrics",

sources/common-shell-perf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Opt‑in perf helpers for CommonShell that delegate to WrkstrmPerformance. The h
44
the CommonShell package as a separate library product so callers can link them without pulling the
55
extra dependency into the core target.
66

7-
## Add dependency
7+
## Add Dependency
88

99
In a package that already depends on `CommonShell`:
1010

0 commit comments

Comments
 (0)