@ankhorage/devtools 1.12.0 → 1.12.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
|
@@ -188,7 +188,7 @@ The canonical workflow, VS Code, and skill files are packaged with `@ankhorage/d
|
|
|
188
188
|
|
|
189
189
|
## Managed agent instructions
|
|
190
190
|
|
|
191
|
-
`ankh devtools agents sync` owns the repository-root `AGENTS.md`. The shared instructions are intentionally small and stable. The target repository's package name and description are rendered from `package.json`; the remaining content defines the unconditional current-architecture policy
|
|
191
|
+
`ankh devtools agents sync` owns the repository-root `AGENTS.md`. The shared instructions are intentionally small and stable. The target repository's package name and description are rendered from `package.json`; the remaining content defines the unconditional current-architecture policy, directs structural work to the managed project-structure skill, and requires the canonical build, type, lint, Knip, Changeset, and formatting commands before pull request creation.
|
|
192
192
|
|
|
193
193
|
Only the current Ankhorage architecture is supported. Managed instructions reject deprecated APIs, compatibility aliases, shims, dual old/new paths, historical-state fallbacks, and migrations whose sole purpose is obsolete state. A canonical cross-package change requires affected repositories to update to the latest released public API.
|
|
194
194
|
|
|
@@ -39,6 +39,19 @@ For directory ownership, package boundaries, architectural profiles, ports and a
|
|
|
39
39
|
entrypoints, or cross-repository structural work, load and follow
|
|
40
40
|
\`.agents/skills/ankhorage-project-structure/SKILL.md\`.
|
|
41
41
|
|
|
42
|
+
## Pull requests
|
|
43
|
+
|
|
44
|
+
Before creating a pull request, run all of these commands in this order and resolve every failure:
|
|
45
|
+
|
|
46
|
+
\`\`\`sh
|
|
47
|
+
bun run build
|
|
48
|
+
bun run check-types
|
|
49
|
+
bun run lint
|
|
50
|
+
bun run knip:test
|
|
51
|
+
bun run changeset
|
|
52
|
+
bun run format
|
|
53
|
+
\`\`\`
|
|
54
|
+
|
|
42
55
|
## Skill scripts
|
|
43
56
|
|
|
44
57
|
Scripts inside an Agent Skill must always be TypeScript files with the \`.ts\` extension.
|
|
@@ -76,6 +76,7 @@ src/
|
|
|
76
76
|
utils/
|
|
77
77
|
types/
|
|
78
78
|
<topic>.ts
|
|
79
|
+
constants.ts
|
|
79
80
|
utils/
|
|
80
81
|
```
|
|
81
82
|
|
|
@@ -154,6 +155,26 @@ For example, `selectRoute.ts` can own a non-exported `SelectRouteInput` directly
|
|
|
154
155
|
Types used by several local navigation operations belong together in `src/types/navigation.ts`.
|
|
155
156
|
A navigation binding exchanged by Studio and Navigator belongs in `@ankhorage/contracts/navigator`.
|
|
156
157
|
|
|
158
|
+
## Constant ownership
|
|
159
|
+
|
|
160
|
+
Constants are static declarations, not utility implementations. Do not create one exported
|
|
161
|
+
constant per constant-named file under `utils/`.
|
|
162
|
+
|
|
163
|
+
1. **Used by one implementation module:** keep the constant private in the module that owns it.
|
|
164
|
+
2. **Reused only inside a feature:** group related constants in that feature's `constants.ts`.
|
|
165
|
+
3. **Shared across features in one package:** group related package metadata, static policy values,
|
|
166
|
+
and other constants in `src/constants.ts`.
|
|
167
|
+
|
|
168
|
+
A `constants.ts` module may export multiple related constants. Keep it cohesive by ownership and
|
|
169
|
+
purpose; it is not a package-wide catch-all. Split constants when they have different owners, not
|
|
170
|
+
merely to create one file per export.
|
|
171
|
+
|
|
172
|
+
For example, Navigator's
|
|
173
|
+
[`src/utils/NAVIGATOR_PACKAGE_METADATA.ts`](https://github.com/ankhorage/navigator/blob/main/src/utils/NAVIGATOR_PACKAGE_METADATA.ts)
|
|
174
|
+
and
|
|
175
|
+
[`src/utils/NAVIGATOR_ROUTER_POLICY.ts`](https://github.com/ankhorage/navigator/blob/main/src/utils/NAVIGATOR_ROUTER_POLICY.ts)
|
|
176
|
+
belong together in `ankhorage/navigator/src/constants.ts`.
|
|
177
|
+
|
|
157
178
|
## Utilities
|
|
158
179
|
|
|
159
180
|
`utils/` is the only utility directory name. Do not create `shared/`, `helper/`, `helpers/`,
|
package/package.json
CHANGED