waypoint-codex 0.1.0 → 0.1.1

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.
package/README.md CHANGED
@@ -1,156 +1,84 @@
1
1
  # Waypoint
2
2
 
3
- It gives a repository a clean working contract for Codex:
3
+ Waypoint is a docs-first repository operating system for Codex.
4
4
 
5
- - a small `AGENTS.md` map
6
- - a live `WORKSPACE.md`
7
- - indexed `docs/`
8
- - repo-local skills under `.agents/skills/`
9
- - optional sync for Codex App automations and user-home rules
5
+ It helps the next agent pick up your repo with full context by keeping the important things in markdown files inside the repo:
10
6
 
11
- Waypoint is a standalone Codex-native repository operating system. It is advisory-first, repo-local, and open-source-first.
7
+ - `AGENTS.md` for startup instructions
8
+ - `WORKSPACE.md` for live state
9
+ - `.waypoint/docs/` for durable project memory
10
+ - `DOCS_INDEX.md` for docs routing
11
+ - repo-local skills for planning and audits
12
12
 
13
- ## Why it exists
14
-
15
- The next agent should be able to pick up a repository with full context by reading the repository itself.
16
-
17
- Waypoint pushes projects toward:
18
-
19
- - docs-first project memory
20
- - visible operational state
21
- - explicit session bootstrap
22
- - battle-tested reusable workflows
23
- - less hidden magic and less reliance on chat history
24
-
25
- ## What ships today
26
-
27
- - `waypoint init` — scaffold the core repository contract
28
- - `waypoint doctor` — validate repo health and detect drift
29
- - `waypoint sync` — rebuild `DOCS_INDEX.md` and optionally sync automations/rules into Codex home
30
- - `waypoint import-legacy` — analyze a legacy repository layout and write an adoption report into a target Waypoint repo
31
-
32
- ## Install for development
33
-
34
- From the `projects/waypoint/` directory:
35
-
36
- ```bash
37
- npm install
38
- npm run build
39
- ```
40
-
41
- Run directly in development:
42
-
43
- ```bash
44
- npm run dev -- --help
45
- ```
46
-
47
- Run the compiled CLI after building:
48
-
49
- ```bash
50
- node dist/src/cli.js --help
51
- ```
52
-
53
- Run the tests:
54
-
55
- ```bash
56
- npm test
57
- ```
58
-
59
- ## Install for usage
60
-
61
- Global install:
13
+ ## Install
62
14
 
63
15
  ```bash
64
16
  npm install -g waypoint-codex
65
17
  ```
66
18
 
67
- One-off usage:
19
+ Or use it without installing globally:
68
20
 
69
21
  ```bash
70
22
  npx waypoint-codex@latest --help
71
23
  ```
72
24
 
73
- After upgrading the CLI, refresh a repo's scaffold with:
25
+ ## Start using it
26
+
27
+ Inside your Codex project:
74
28
 
75
29
  ```bash
76
30
  waypoint init --with-automations --with-roles
77
31
  waypoint doctor
78
32
  ```
79
33
 
80
- ## Quick start
81
-
82
- Initialize a repository:
83
-
84
- ```bash
85
- npx tsx src/cli.ts init /path/to/repo
86
- ```
87
-
88
- Check repo health:
89
-
90
- ```bash
91
- npx tsx src/cli.ts doctor /path/to/repo
92
- ```
93
-
94
- Sync optional user-home artifacts:
95
-
96
- ```bash
97
- npx tsx src/cli.ts sync /path/to/repo
98
- ```
99
-
100
- Analyze a legacy repository layout and scaffold a target Waypoint repo:
101
-
102
- ```bash
103
- npx tsx src/cli.ts import-legacy /path/to/source-repo /path/to/new-repo --init-target
104
- ```
105
-
106
- ## Repo contract
107
-
108
- Waypoint creates and manages:
34
+ That scaffolds:
109
35
 
110
36
  ```text
111
37
  repo/
112
38
  ├── AGENTS.md
113
39
  ├── WORKSPACE.md
114
40
  ├── DOCS_INDEX.md
115
- ├── docs/
116
41
  ├── .agents/skills/
117
42
  └── .waypoint/
43
+ ├── docs/
44
+ ├── context/
45
+ └── ...
118
46
  ```
119
47
 
120
- Optional packs:
48
+ ## Main commands
121
49
 
122
- - `.waypoint/automations/*.toml`
123
- - `.waypoint/rules/*.rules`
124
- - `.codex/config.toml`
125
- - `.codex/agents/*.toml`
50
+ - `waypoint init` — scaffold or refresh the repo
51
+ - `waypoint doctor` — check for drift and missing pieces
52
+ - `waypoint sync` — rebuild `DOCS_INDEX.md` and sync optional automations/rules
53
+ - `waypoint import-legacy` — import from an older repo layout
126
54
 
127
- ## Shipped Waypoint skills
55
+ ## Shipped skills
128
56
 
129
57
  - `planning`
130
58
  - `error-audit`
131
59
  - `observability-audit`
132
60
  - `ux-states-audit`
133
61
 
134
- ## Optional role pack
62
+ ## Optional reviewer roles
135
63
 
136
- If you initialize with `--with-roles`, Waypoint also scaffolds project-scoped Codex role configs for:
64
+ If you initialize with `--with-roles`, Waypoint scaffolds:
137
65
 
138
66
  - `code-health-reviewer`
139
67
  - `code-reviewer`
140
68
  - `docs-researcher`
141
69
  - `plan-reviewer`
142
70
 
143
- ## Tested
144
-
145
- - `waypoint init`
146
- - `waypoint doctor`
147
- - `waypoint sync` with real Codex automation TOML output
148
- - `waypoint import-legacy`
71
+ ## Update
149
72
 
150
- ## Notes
73
+ ```bash
74
+ npm install -g waypoint-codex@latest
75
+ waypoint init --with-automations --with-roles
76
+ waypoint doctor
77
+ ```
151
78
 
152
- - Core Waypoint does not require Codex App, Cloud tasks, IDE integration, plugins, or MCP.
153
- - App automations are supported as an optional declarative sync target.
154
- - Rules are supported as an optional sync target.
79
+ ## Learn more
155
80
 
156
- For public docs, see [docs/overview.md](docs/overview.md), [docs/architecture.md](docs/architecture.md), [docs/upgrading.md](docs/upgrading.md), [docs/releasing.md](docs/releasing.md), and [docs/importing-existing-repos.md](docs/importing-existing-repos.md).
81
+ - [Overview](docs/overview.md)
82
+ - [Architecture](docs/architecture.md)
83
+ - [Upgrading](docs/upgrading.md)
84
+ - [Importing Existing Repositories](docs/importing-existing-repos.md)
package/dist/src/core.js CHANGED
@@ -6,7 +6,7 @@ import * as TOML from "@iarna/toml";
6
6
  import { renderDocsIndex } from "./docs-index.js";
7
7
  import { readTemplate, renderWaypointConfig, MANAGED_BLOCK_END, MANAGED_BLOCK_START, templatePath } from "./templates.js";
8
8
  const DEFAULT_CONFIG_PATH = ".waypoint/config.toml";
9
- const DEFAULT_DOCS_DIR = "docs";
9
+ const DEFAULT_DOCS_DIR = ".waypoint/docs";
10
10
  const DEFAULT_DOCS_INDEX = "DOCS_INDEX.md";
11
11
  const DEFAULT_WORKSPACE = "WORKSPACE.md";
12
12
  const STATE_DIR = ".waypoint/state";
@@ -91,6 +91,8 @@ function scaffoldOptionalCodex(projectRoot) {
91
91
  export function initRepository(projectRoot, options) {
92
92
  ensureDir(projectRoot);
93
93
  for (const deprecatedPath of [
94
+ "docs/README.md",
95
+ "docs/code-guide.md",
94
96
  ".agents/skills/waypoint-planning",
95
97
  ".agents/skills/waypoint-docs",
96
98
  ".agents/skills/waypoint-review",
@@ -123,8 +125,8 @@ export function initRepository(projectRoot, options) {
123
125
  }));
124
126
  writeIfMissing(path.join(projectRoot, DEFAULT_WORKSPACE), readTemplate("WORKSPACE.md"));
125
127
  ensureDir(path.join(projectRoot, DEFAULT_DOCS_DIR));
126
- writeIfMissing(path.join(projectRoot, "docs/README.md"), readTemplate("docs/README.md"));
127
- writeIfMissing(path.join(projectRoot, "docs/code-guide.md"), readTemplate("docs/code-guide.md"));
128
+ writeIfMissing(path.join(projectRoot, ".waypoint/docs/README.md"), readTemplate(".waypoint/docs/README.md"));
129
+ writeIfMissing(path.join(projectRoot, ".waypoint/docs/code-guide.md"), readTemplate(".waypoint/docs/code-guide.md"));
128
130
  upsertManagedBlock(path.join(projectRoot, "AGENTS.md"), readTemplate("managed-agents-block.md"));
129
131
  scaffoldSkills(projectRoot);
130
132
  if (options.withRoles) {
@@ -136,7 +138,7 @@ export function initRepository(projectRoot, options) {
136
138
  return [
137
139
  "Initialized Waypoint scaffold",
138
140
  "Installed managed AGENTS block",
139
- "Created WORKSPACE.md and docs/ scaffold",
141
+ "Created WORKSPACE.md and .waypoint/docs/ scaffold",
140
142
  "Installed repo-local Waypoint skills",
141
143
  "Generated DOCS_INDEX.md",
142
144
  ];
@@ -78,7 +78,7 @@ export function renderDocsIndex(projectRoot, docsDir) {
78
78
  "",
79
79
  "Auto-generated by `waypoint sync` / `waypoint doctor`. Read matching docs before working on a task.",
80
80
  "",
81
- "## docs/",
81
+ "## .waypoint/docs/",
82
82
  "",
83
83
  ];
84
84
  if (entries.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waypoint-codex",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Codex-native repository operating system: scaffolding, docs routing, repo-local skills, doctor, and sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -5,6 +5,7 @@ Repo-local Waypoint configuration and optional integration sources.
5
5
  - `config.toml` — Waypoint feature toggles and file locations
6
6
  - `SOUL.md` — agent identity and working values
7
7
  - `agent-operating-manual.md` — required session workflow
8
+ - `docs/` — Waypoint-managed project memory (architecture, decisions, debugging knowledge, durable plans)
8
9
  - `agents/` — agent prompt files that optional Codex roles can read and follow
9
10
  - `automations/` — optional automation source specs
10
11
  - `context/` — generated session context bundle
@@ -20,7 +20,7 @@ Do not skip this sequence.
20
20
  The repository should contain the context the next agent needs.
21
21
 
22
22
  - `WORKSPACE.md` is the live operational record: in progress, current state, next steps
23
- - `docs/` is the durable project memory: architecture, decisions, integration notes, debugging knowledge, and durable plans
23
+ - `.waypoint/docs/` is the durable project memory: architecture, decisions, integration notes, debugging knowledge, and durable plans
24
24
  - `.waypoint/context/` is the generated session context bundle: current git/PR/doc index state
25
25
 
26
26
  If something important lives only in your head or in the chat transcript, the repo is under-documented.
@@ -30,7 +30,7 @@ If something important lives only in your head or in the chat transcript, the re
30
30
  - Read code before editing it.
31
31
  - Follow the repo's documented patterns when they are healthy.
32
32
  - Update `WORKSPACE.md` as live execution state when progress meaningfully changes.
33
- - Update `docs/` when durable knowledge changes.
33
+ - Update `.waypoint/docs/` when durable knowledge changes.
34
34
  - Rebuild `DOCS_INDEX.md` whenever routable docs change.
35
35
  - Use the repo-local skills and optional reviewer agents instead of improvising from scratch.
36
36
 
@@ -1,7 +1,7 @@
1
1
  version = 1
2
2
  profile = "__PROFILE__"
3
3
  workspace_file = "WORKSPACE.md"
4
- docs_dir = "docs"
4
+ docs_dir = ".waypoint/docs"
5
5
  docs_index_file = "DOCS_INDEX.md"
6
6
 
7
7
  [features]
@@ -10,4 +10,3 @@ docs_index = true
10
10
  roles = __ROLES__
11
11
  rules = __RULES__
12
12
  automations = __AUTOMATIONS__
13
-
@@ -0,0 +1,27 @@
1
+ # Waypoint Docs
2
+
3
+ This directory is Waypoint-managed project memory.
4
+
5
+ Put the durable context here that the next agent will need to continue the work:
6
+
7
+ - architecture
8
+ - decisions and tradeoffs
9
+ - integration notes
10
+ - invariants and constraints
11
+ - debugging knowledge
12
+ - active plans that should survive beyond one session
13
+
14
+ These are **project docs**, not Waypoint internals.
15
+
16
+ Every routable doc needs YAML frontmatter:
17
+
18
+ ```yaml
19
+ ---
20
+ summary: One-line description
21
+ read_when:
22
+ - task cue
23
+ ---
24
+ ```
25
+
26
+ `DOCS_INDEX.md` is generated from the docs here.
27
+
@@ -0,0 +1,95 @@
1
+ ---
2
+ summary: Opinionated rules for writing and changing Waypoint code so behavior stays explicit, strict, observable, and easy to evolve.
3
+ read_when:
4
+ - writing new code
5
+ - changing existing behavior
6
+ - introducing or removing configuration
7
+ - handling external input or external systems
8
+ - adding tests, logging, or state transitions
9
+ ---
10
+
11
+ # Code Guide
12
+
13
+ Waypoint favors explicitness over convenience, correctness over compatibility theater, and deletion over accumulation. Code should make the system easier to reason about after the change, not merely pass today.
14
+
15
+ ## 1. Compatibility is opt-in, not ambient
16
+
17
+ Do not preserve old behavior unless a user-facing requirement explicitly asks for it.
18
+
19
+ When replacing a path, remove the old one instead of leaving a shim, alias, translation layer, or silent compatibility branch. If compatibility must be preserved, document the exact contract being preserved and the planned removal condition.
20
+
21
+ Do not keep dead fields, dead parameters, dual formats, or migration-only logic "just in case". Every compatibility layer becomes part of the design whether intended or not.
22
+
23
+ ## 2. Fail clearly, never quietly
24
+
25
+ Errors are part of the contract. Surface them early and with enough context to diagnose the cause.
26
+
27
+ Do not swallow errors, downgrade them to logs, or return partial success unless partial success is the explicit API. If an operation can fail in distinct ways, preserve those distinctions. Do not replace a specific failure with a generic one that destroys meaning.
28
+
29
+ Error messages should identify what failed, at which boundary, and why the system refused to proceed. They should not force readers to infer missing state from generic text.
30
+
31
+ ## 3. No silent fallback paths
32
+
33
+ Fallbacks are allowed only when they are deliberate product behavior, not a coding reflex.
34
+
35
+ Do not silently retry with weaker behavior, alternate providers, cached data, inferred defaults, empty values, or best-effort modes unless the user asked for degraded operation and the degraded result remains truthful.
36
+
37
+ If degradation exists, it must be explicit in code, testable, and observable. Hidden fallback logic makes the system look healthy while it is already off-contract.
38
+
39
+ ## 4. Validate at boundaries, not deep inside
40
+
41
+ Anything that crosses a boundary must be treated as untrusted: user input, config, environment, files, network responses, database reads, queue payloads, generated content, and data from other modules.
42
+
43
+ Validate structure, required fields, allowed values, and invariants at the boundary. Convert external data into a trusted internal shape once. Do not pass loosely-typed or half-validated data deeper into the system and hope downstream code copes.
44
+
45
+ Boundary validation should reject invalid data, not "normalize" it into something ambiguous.
46
+
47
+ ## 5. Configuration must be strict
48
+
49
+ Missing or invalid configuration should stop the system at startup or at the feature boundary where it becomes required.
50
+
51
+ Do not hide absent configuration behind guessed defaults, environment-dependent behavior, or implicit no-op modes. Defaults are acceptable only when they are safe, intentional, and documented as part of the product contract.
52
+
53
+ Configuration should be centralized enough to audit. A reader should be able to tell which settings matter, what values are valid, and what happens when they are wrong.
54
+
55
+ ## 6. Prefer direct code over speculative abstraction
56
+
57
+ Do not introduce abstractions for imagined future use. Add them only when multiple concrete cases already demand the same shape.
58
+
59
+ A small amount of duplication is cheaper than the wrong abstraction. Prefer code that exposes the current domain plainly over generic layers, plugin systems, factories, wrappers, or strategy trees created before the need is real.
60
+
61
+ Abstractions must remove real complexity, not relocate it. If a helper hides critical behavior, state changes, validation, or failure modes, it is making the system harder to read.
62
+
63
+ ## 7. Make state and invariants explicit
64
+
65
+ State transitions should be visible in code. Readers should be able to answer: what states exist, what moves the system between them, and what must always be true.
66
+
67
+ Do not encode important transitions as scattered flag mutations, ordering assumptions, optional fields, or side effects hidden in utility calls. Avoid representations where invalid states are easy to create and hard to detect.
68
+
69
+ When a function changes state, make the transition obvious. When a module depends on an invariant, assert it at the boundary of the operation instead of relying on folklore.
70
+
71
+ ## 8. Tests define behavior changes, not just regressions
72
+
73
+ Any behavior change must update tests to describe the new contract. If the old behavior mattered, remove or rewrite the old tests instead of making them weaker.
74
+
75
+ Test observable behavior and boundary cases, not implementation trivia. Cover failure modes, validation rules, configuration strictness, and any intentional degradation path. If a bug fix closes a previously possible bad state, add a test that proves the bad state is now rejected.
76
+
77
+ Do not merge code whose behavior changed without leaving behind executable evidence of the new rules.
78
+
79
+ ## 9. Observability is part of correctness
80
+
81
+ Code is not complete if production failures cannot be understood from its signals.
82
+
83
+ Emit structured logs, metrics, or events at important boundaries and state transitions, especially around input rejection, external calls, retries, and degraded modes. Observability should explain which path executed and why.
84
+
85
+ Do not log noise to compensate for poor design. Prefer a small number of high-value signals tied to decisions, failures, and contract edges.
86
+
87
+ ## 10. Optimize for future legibility
88
+
89
+ Write code for the next person who must change it under pressure.
90
+
91
+ Keep modules narrow in responsibility. Keep data flow obvious. Keep control flow boring. Prefer designs where the main path is easy to follow and unusual behavior is explicitly named.
92
+
93
+ When changing code, improve the shape around the change if needed. Do not leave behind half-migrated designs, obsolete branches, commented-out code, or placeholders for imagined follow-ups.
94
+
95
+ The best code is not code that can handle every possible future. It is code whose current truth is obvious, whose failures are visible, and whose wrong parts can be deleted without fear.
@@ -108,7 +108,7 @@ function walkDocs(projectRoot, currentDir, output) {
108
108
  }
109
109
 
110
110
  export function renderDocsIndex(projectRoot) {
111
- const docsDir = path.join(projectRoot, "docs");
111
+ const docsDir = path.join(projectRoot, ".waypoint", "docs");
112
112
  const entries = [];
113
113
 
114
114
  if (existsSync(docsDir)) {
@@ -120,7 +120,7 @@ export function renderDocsIndex(projectRoot) {
120
120
  "",
121
121
  "Auto-generated by `.waypoint/scripts/build-docs-index.mjs`. Read matching docs before working on a task.",
122
122
  "",
123
- "## docs/",
123
+ "## .waypoint/docs/",
124
124
  "",
125
125
  ];
126
126
 
@@ -15,7 +15,7 @@ This is mandatory, not optional. Do not skip the context refresh or skip files i
15
15
 
16
16
  Working rules:
17
17
  - Keep `WORKSPACE.md` current as the live execution state
18
- - Update `docs/` when behavior or durable project knowledge changes
18
+ - Update `.waypoint/docs/` when behavior or durable project knowledge changes
19
19
  - Use the repo-local skills Waypoint ships for structured workflows when relevant
20
20
  - Treat the generated context bundle as required session bootstrap, not optional reference material
21
21
  <!-- waypoint:end -->
@@ -1,16 +0,0 @@
1
- # Docs
2
-
3
- Store durable project knowledge here.
4
-
5
- Each document that should be routable by Codex needs YAML frontmatter:
6
-
7
- ```yaml
8
- ---
9
- summary: One-line description
10
- read_when:
11
- - keyword or task cue
12
- ---
13
- ```
14
-
15
- `DOCS_INDEX.md` is generated from the docs that include this frontmatter.
16
-
@@ -1,31 +0,0 @@
1
- ---
2
- summary: Repository coding conventions — correctness, explicit error handling, maintainability, and testing discipline
3
- read_when:
4
- - writing code
5
- - implementing a feature
6
- - fixing a bug
7
- - updating tests
8
- ---
9
-
10
- # Code Guide
11
-
12
- ## Core rules
13
-
14
- - Prefer explicit behavior over clever shortcuts.
15
- - Keep changes scoped and reviewable.
16
- - Update docs when durable behavior changes.
17
- - Validate external data at boundaries.
18
- - Do not swallow errors silently.
19
-
20
- ## Testing
21
-
22
- - Run the smallest relevant verification first.
23
- - Add or update tests when behavior changes.
24
- - If tests cannot be run, say exactly why.
25
-
26
- ## Maintainability
27
-
28
- - Reuse existing patterns where they are healthy.
29
- - Do not introduce hidden fallback behavior without making it visible.
30
- - Prefer clear names and clear module boundaries over compact code.
31
-