GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add package public surface workflow · stackpress/stackpress@4aec67b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .agents
    • AGENTS.md
    • context
      • compatibility-and-maintenance.md
      • extension-and-contribution.md
    • references
      • 00018-contributor-source-patterns.md
    • workflows
      • stackpress-package-public-surface.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.agents/AGENTS.md‎

Copy file name to clipboardExpand all lines: .agents/AGENTS.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ When several next steps are realistic, include up to two useful alternatives. Us
7171

7272
## Project Workflow
7373

74+
- [Stackpress Package Public Surface Workflow](workflows/stackpress-package-public-surface.md): use when adding or moving public package types, runtime values, helpers, files, subpaths, or aggregate facade exports.
7475
- [Stackpress KB Maintenance Workflow](workflows/stackpress-kb-maintenance.md): use when source, dependencies, generated contracts, product language, governance, or contributor workflows may change accepted Stackpress context.
Collapse file

‎.agents/context/compatibility-and-maintenance.md‎

Copy file name to clipboardExpand all lines: .agents/context/compatibility-and-maintenance.md
-2Lines changed: 0 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ These checks do not form a universal compatibility handshake.
6363

6464
- Per-generator rename/removal cleanup is not universally enforced outside
6565
stackpress-schema; purge and clean regeneration are allowed recovery paths.
66-
- `packages/stackpress-sql/src/helpers.ts` is a maintainer-declared current
67-
violation pending separate repair and must not be copied as canonical design.
6866
- Every changed package should pass tests above 90% coverage for new work, but
6967
current package coverage and root orchestration do not yet enforce that target.
7068
- Root `yarn test` currently exercises server, schema, and SQL only.
Collapse file

‎.agents/context/extension-and-contribution.md‎

Copy file name to clipboardExpand all lines: .agents/context/extension-and-contribution.md
+9-7Lines changed: 9 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,22 @@ covers only server, schema, and SQL, so run other owning package suites directly
143143

144144
- Preserve package responsibilities instead of centralizing feature code in the
145145
aggregate package.
146+
- Keep build-time-only code, especially transforms and artifact-building scripts,
147+
out of runtime import paths. Runtime-safe helpers may be reused by build-time
148+
code.
149+
- Keep server-only code out of browser-safe entrypoints. Shared or browser-safe
150+
code may be reused by server code.
146151
- Treat lifecycle priority and transform order as compatibility-sensitive.
147152
- Prefer config-driven static seeds over custom population code when no logic is
148153
required.
149154
- Test generated UI in a browser when behavior, hydration, layout, or
150155
accessibility is affected.
151156
- Distinguish illustrative skill/scaffold examples from required package names or
152157
application domains.
153-
- Add a package to default aggregate composition only when it is commonly used
154-
and applies across most web, mobile, and desktop cases. Explicit web-only,
155-
mobile-only, desktop-only, and AI packages remain optional.
156-
- Treat aggregate plugin composition, direct dependencies, facade exports, and
157-
build participation as separate decisions.
158-
- Do not copy `packages/stackpress-sql/src/helpers.ts` as canonical placement or
159-
design guidance; it is a maintainer-declared current violation pending repair.
158+
- A root-level helper module such as `packages/stackpress-sql/src/helpers.ts` is
159+
valid when its helpers are generally reusable across the package. Keep niche
160+
helpers local to the files that need them, even when that means small
161+
duplication.
160162

161163
No project-wide maintainer map, CODEOWNERS policy, or mandatory public-contract
162164
review gate is an accepted current guarantee.
Collapse file

‎.agents/references/00018-contributor-source-patterns.md‎

Copy file name to clipboardExpand all lines: .agents/references/00018-contributor-source-patterns.md
+7-7Lines changed: 7 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ may purge the generated client and regenerate cleanly when needed.
100100

101101
## Aggregate Decision
102102

103-
Default composition contains commonly used capabilities applicable across most
104-
web, mobile, and desktop cases. Explicit web-only, mobile-only, desktop-only, and
105-
AI cases stay optional. Plugin membership, direct dependency, public facade
106-
export, and root-build participation are separate decisions.
103+
Use [Architecture And Composition](../context/architecture-and-composition.md)
104+
to decide default aggregate eligibility. Plugin membership, direct dependency,
105+
public facade export, and root-build participation remain separate decisions.
107106

108107
Update the aggregate only for an intentional change to default plugin
109108
composition/order, selected facade exposure, required dependency, or shared
@@ -113,12 +112,15 @@ aggregate assets. Never centralize feature implementation there.
113112

114113
- Edit `src/`, never `cjs/` or `esm/`, as durable implementation.
115114
- Preserve `.js` import suffixes needed by emitted ESM.
115+
- Export public shared types from both the owning `src/types.ts` and
116+
`src/index.ts`; keep subpath-specific types with their subpath.
116117
- Build both module formats and declarations.
117118
- Align source exports, manifest `exports`, and `typesVersions`.
118119
- Test the actual consumer import, not only source presence.
119120
- Run the exporting and affected consuming package tests above 90% coverage for
120121
new work.
121-
- Forward through the aggregate only when deliberately part of its facade.
122+
- Forward each symbol through the aggregate only when deliberately part of its
123+
facade, resolving root-name collisions explicitly.
122124

123125
## Cross-Repository Change Checklist
124126

@@ -155,8 +157,6 @@ require auth, validation, event invocation, and status/error mapping.
155157

156158
## Known Exceptions And Defects
157159

158-
- Do not copy `packages/stackpress-sql/src/helpers.ts`; the maintainer identifies
159-
it as a current violation pending repair.
160160
- Current missing tests/coverage do not weaken the new-work target.
161161

162162
## Current Source Anchors
Collapse file

‎.agents/workflows/stackpress-package-public-surface.md‎

Copy file name to clipboard
+107Lines changed: 107 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Stackpress Package Public Surface Workflow
2+
3+
Use this workflow when adding or moving a public type, helper, function, class,
4+
constant, or source file under `packages/*`, especially when the symbol may also
5+
be exposed through the `stackpress` aggregate facade.
6+
7+
Do not use it for private file-local changes or generated-client exports. Follow
8+
the generator procedure in the contributor reference for generated artifacts.
9+
10+
## Read First
11+
12+
1. [Extension And Contribution](../context/extension-and-contribution.md) for
13+
semantic ownership and source-boundary rules.
14+
2. [Contributor Source Patterns](../references/00018-contributor-source-patterns.md)
15+
for exact placement and public-surface requirements.
16+
3. [Architecture And Composition](../context/architecture-and-composition.md)
17+
only when aggregate eligibility is in question.
18+
4. [Exports, Types, And Generated Contracts](../references/00014-exports-types-generated-contracts.md)
19+
when changing a subpath, aggregate alias, or package manifest.
20+
21+
## 1. Classify The Surface
22+
23+
Before editing, identify:
24+
25+
- the focused package that owns the symbol;
26+
- whether it is a type or runtime value;
27+
- whether it is private, subpath-only, package-root public, aggregate-domain
28+
public, or aggregate-root public;
29+
- whether the target entrypoint is server-only, browser-safe, or shared.
30+
31+
Do not infer aggregate exposure from plugin registration, dependency presence,
32+
or build participation. Each public layer is an explicit decision.
33+
34+
## 2. Update The Owning Package
35+
36+
| Symbol | Owning package placement |
37+
| --- | --- |
38+
| shared public type | define or re-export from `src/types.ts`; export with `export type` from `src/index.ts` |
39+
| subpath-specific type | keep with its subpath; export only from that subpath unless promoted separately |
40+
| runtime value | implement in its semantic source file; export from `src/index.ts` only when package-root public |
41+
| generally reusable helper | use a focused root helper module when appropriate |
42+
| niche helper | keep local to its consumers, even when small duplication is clearer |
43+
44+
Preserve `.js` suffixes in source imports. Never edit `cjs/` or `esm/` as the
45+
durable source.
46+
47+
## 3. Update Public Subpaths
48+
49+
When adding or changing a direct import path:
50+
51+
1. Add the source entrypoint.
52+
2. Align the owning package's `package.json` `exports` and `typesVersions`.
53+
3. Confirm both CJS and ESM builds emit the entrypoint and declaration.
54+
55+
Adding a symbol to an existing barrel does not require a new manifest entry.
56+
57+
## 4. Propagate Through The Aggregate
58+
59+
Only propagate symbols deliberately selected for the `stackpress` facade. Skip
60+
layers that are not part of the intended public surface.
61+
62+
For types:
63+
64+
```text
65+
packages/<pkg>/src/types.ts
66+
-> packages/<pkg>/src/index.ts
67+
-> packages/stackpress/src/<domain>/types.ts
68+
-> packages/stackpress/src/<domain>/index.ts
69+
-> packages/stackpress/src/types.ts
70+
-> packages/stackpress/src/index.ts
71+
```
72+
73+
For runtime values:
74+
75+
```text
76+
packages/<pkg>/src/<source>.ts
77+
-> packages/<pkg>/src/index.ts
78+
-> packages/stackpress/src/<domain>/index.ts
79+
-> packages/stackpress/src/index.ts
80+
```
81+
82+
The domain facade and aggregate root are separate promotion decisions. Use
83+
explicit aliases for root-name collisions and prefer named forwarding so the
84+
facade remains reviewable.
85+
86+
Add or change aggregate `package.json` entries only when exposing a new or
87+
changed aggregate subpath.
88+
89+
## 5. Verify The Promised Imports
90+
91+
1. Build and test the owning package with Node.js 22 and Yarn.
92+
2. Test every public import path promised by the change, including type-only
93+
imports where applicable.
94+
3. If `packages/stackpress` changed, build and test the aggregate and exercise
95+
the affected focused and root imports.
96+
4. If a manifest changed, verify CJS, ESM, declarations, packed contents, and a
97+
consumer import.
98+
5. Apply the public export/manifest verification requirements from
99+
[Extension And Contribution](../context/extension-and-contribution.md#verification-matrix).
100+
6. Confirm generated output was not edited as durable source and unrelated
101+
package surfaces were not broadened.
102+
103+
## Handoff
104+
105+
Report the semantic owner, selected public layers, files changed, aliases or
106+
subpaths added, verification performed, intentionally skipped layers, and any
107+
remaining consumer or release sequencing.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.