Repository navigation
Complete documentation structure optimization with guides, standards, and templates - #66
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
@copilot 继续 |
…de of conduct Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
已完成文档结构优化!✅ 完成内容包括: 新增文档
文档结构 所有任务已完成,文档结构现已遵循Kubernetes、Salesforce等行业最佳实践。 提交哈希: db88d61 |
|
This PR is very large. Consider breaking it into smaller PRs for easier review. |
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive documentation structure optimization for the ObjectStack Protocol repository, following industry best practices from Kubernetes, Salesforce, and ServiceNow. The changes establish a professional, well-organized documentation foundation that separates technical documentation from user-facing content.
Changes:
- Added complete contributor infrastructure (CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md)
- Created technical documentation hub with architecture deep dives, standards, guides, and migration documentation
- Enhanced README.md with improved navigation and clear documentation paths
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| CONTRIBUTING.md | Comprehensive contributor guidelines with coding standards, testing requirements, and PR process |
| CODE_OF_CONDUCT.md | Community standards based on Contributor Covenant 2.0 |
| CHANGELOG.md | Version tracking template following Keep a Changelog format |
| README.md | Updated with enhanced documentation navigation and standards references |
| docs/README.md | Central documentation hub with clear navigation paths and bilingual support guidance |
| docs/architecture/data-layer.md | Deep dive into ObjectQL data abstraction layer architecture |
| docs/architecture/ui-layer.md | Detailed ObjectUI server-driven UI protocol documentation |
| docs/architecture/system-layer.md | Comprehensive ObjectOS runtime kernel and plugin architecture |
| docs/standards/naming-conventions.md | Clear camelCase vs snake_case naming rules with examples |
| docs/standards/api-design.md | RESTful API design principles and patterns |
| docs/standards/error-handling.md | Consistent error handling strategies and schemas |
| docs/guides/security/best-practices.md | Security guidelines checklist and implementation patterns |
| docs/guides/performance/optimization.md | Query optimization and caching strategies |
| docs/guides/ai-integration/quick-start.md | AI features integration guide with RAG and NLQ setup |
| docs/migration/v0-to-v1.md | Version migration guide with breaking changes documentation |
|
|
||
| ## Enforcement | ||
|
|
||
| Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainers responsible for enforcement at [INSERT CONTACT EMAIL]. All complaints will be reviewed and investigated promptly and fairly. |
There was a problem hiding this comment.
The email placeholder "[INSERT CONTACT EMAIL]" needs to be replaced with an actual contact email address for reporting Code of Conduct violations. This is critical for enforcement of the code of conduct.
| Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainers responsible for enforcement at [INSERT CONTACT EMAIL]. All complaints will be reviewed and investigated promptly and fairly. | |
| Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainers responsible for enforcement at code-of-conduct@example.com. All complaints will be reviewed and investigated promptly and fairly. |
|
|
||
| ## 📄 License | ||
|
|
||
| Apach2 2.0 © ObjectStack |
There was a problem hiding this comment.
Spelling error: "Apach2" should be "Apache".
| Apach2 2.0 © ObjectStack | |
| Apache 2.0 © ObjectStack |
…16483) The `example` template emitted a subset of what `os init` writes plus one README, the only template-level duplication #15531 found between the two scaffolder families. Removed under the #15531 ruling (batch #66, option B) with no alias and no deprecation window. The template is not merely deleted: `os create example` still answers, exits 1 and names `os init`, rather than falling through to `Unknown type:` and printing only the surviving roster. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
…16483) Contract review on PR #16665, findings F1-F4. F1 — the "no alias, no deprecation window" ruling could not be located by the review: not in #15531's comments, not in ledger #12708 (whose earliest comment postdates the attributed date), not in the tree. The removal itself IS verified by the #15531 batch #66 entry, so create.ts and the e2e header now cite that and record the alias/window terms as recorded on card #16483, pending maintainer confirmation. The runtime message is deliberately unchanged: it describes what the code does, which is true whoever ruled it. F2 — `os init` does NOT write "the same objectstack.config.ts". The audit this card cites measures tsconfig.json byte-identical and the two manifests DIFFERENT (both ManifestSchema-valid). Runtime message and changeset now say "the same tsconfig.json and an equivalent objectstack.config.ts", and the changeset states the difference. F3 — `-t empty` writes five files and runs the install, so "objectstack.config.ts only" was wrong in the runtime message, the changeset and the doc callout this PR added. All three now read "config only, no src/objects". F4 — the changeset said the e2e file holds the doc pages (the docs pin is the separate queue-tier file) and that `--in-repo` is unchanged (its examples/ placement goes with the template). Both corrected. F5 is deliberately NOT acted on here: SCAFFOLD_TSX_RANGE stays, init.ts is held by #16654. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
…16483) (#16665) * feat(cli)!: retire `os create example`; the refusal names `os init` (#16483) The `example` template emitted a subset of what `os init` writes plus one README, the only template-level duplication #15531 found between the two scaffolder families. Removed under the #15531 ruling (batch #66, option B) with no alias and no deprecation window. The template is not merely deleted: `os create example` still answers, exits 1 and names `os init`, rather than falling through to `Unknown type:` and printing only the surviving roster. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ * docs(cli): make the retirement's citations match what is verifiable (#16483) Contract review on PR #16665, findings F1-F4. F1 — the "no alias, no deprecation window" ruling could not be located by the review: not in #15531's comments, not in ledger #12708 (whose earliest comment postdates the attributed date), not in the tree. The removal itself IS verified by the #15531 batch #66 entry, so create.ts and the e2e header now cite that and record the alias/window terms as recorded on card #16483, pending maintainer confirmation. The runtime message is deliberately unchanged: it describes what the code does, which is true whoever ruled it. F2 — `os init` does NOT write "the same objectstack.config.ts". The audit this card cites measures tsconfig.json byte-identical and the two manifests DIFFERENT (both ManifestSchema-valid). Runtime message and changeset now say "the same tsconfig.json and an equivalent objectstack.config.ts", and the changeset states the difference. F3 — `-t empty` writes five files and runs the install, so "objectstack.config.ts only" was wrong in the runtime message, the changeset and the doc callout this PR added. All three now read "config only, no src/objects". F4 — the changeset said the e2e file holds the doc pages (the docs pin is the separate queue-tier file) and that `--in-repo` is unchanged (its examples/ placement goes with the template). Both corrected. F5 is deliberately NOT acted on here: SCAFFOLD_TSX_RANGE stays, init.ts is held by #16654. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ --------- Co-authored-by: os-sales <sales@objectstack.ai> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Record the maintainer's ruling (director seat, decision batch #66): a stacked series -- each PR branched off the one below -- is not a supported working form in this repository, and no gate rule or merge-policy change is made for it. A multi-card change uses a trunk branch and pays the two recorded workarounds. The paragraph is self-contained rather than a pointer: AGENTS.md is in check:pm-skill-id-lint's scan set (pattern /#[0-9]{3,}/), so the card number cannot be cited in the file. The three tooling blind spots are stated in one clause each so the rule is actionable without dereferencing history. Fold payment for the 1068/1068 line ratchet: the ADR-0087 marker block in the Post-Task Checklist listed 4 of the gate's 7 disposition categories -- a drifted copy of output the same paragraph already calls "the authority". Replaced by a pointer to the gate's own FIXIT, which prints the full set. Net 0 lines. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P58euzUXCVJNwmhuPC9DXY
…ectstack-ai#16743) * docs(agents): stacked PR series are not a supported working form Record the maintainer's ruling (director seat, decision batch objectstack-ai#66): a stacked series -- each PR branched off the one below -- is not a supported working form in this repository, and no gate rule or merge-policy change is made for it. A multi-card change uses a trunk branch and pays the two recorded workarounds. The paragraph is self-contained rather than a pointer: AGENTS.md is in check:pm-skill-id-lint's scan set (pattern /#[0-9]{3,}/), so the card number cannot be cited in the file. The three tooling blind spots are stated in one clause each so the rule is actionable without dereferencing history. Fold payment for the 1068/1068 line ratchet: the ADR-0087 marker block in the Post-Task Checklist listed 4 of the gate's 7 disposition categories -- a drifted copy of output the same paragraph already calls "the authority". Replaced by a pointer to the gate's own FIXIT, which prints the full set. Net 0 lines. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P58euzUXCVJNwmhuPC9DXY * docs(agents): drop the heavy-CI clause from the stacked-series paragraph Seat review: the ruling grades that cost as "a defect independent of stacking" and splits it out to its own devx card, so it is a defect being fixed -- not a price of an unsupported form. Stating it in AGENTS.md as an inherent property of stacking contradicts the ruling, and the clause goes false the moment that card lands, rotting in place like any other restated fact. The paragraph now carries only the two structural costs the ruling did assign here: squash landing destroys the ancestry link, so every descendant pays a rebuild lap per landing; and a breaking changeset's ADR-0087 disposition is base-relative, so a stacked card's two bases demand contradictory markers. No pointer to the split-out card: AGENTS.md is in check:pm-skill-id-lint's scan set, and any wording like "CI does not run on these yet" would itself go false when that card lands. AGENTS.md 1068 -> 1067; the ratchet is a cap, so a net decrease is legal and nothing was restored to pad it back. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P58euzUXCVJNwmhuPC9DXY * docs(agents): keep the stacked-series paragraph inside the 120-byte budget check:pm-skill-ratchet enforces a per-LINE byte budget alongside the per-file line ceiling, and the reflow left L469 at 121B. Rewrapped to five lines, each under 120B, with the closing boundary shortened to "No gate or merge-policy change is made for it" to fit without an orphan line. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P58euzUXCVJNwmhuPC9DXY --------- Co-authored-by: Claude <noreply@anthropic.com>
The ruling these three headers execute is dated 2026-09-07 (decision batch #66), not 2026-09-16. A rule file that misdates the decision it implements sends the next reader to the wrong thread. Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk Co-authored-by: Claude <noreply@anthropic.com>
…ayer type-check program (objectstack-ai#18692) Fixes objectstack-ai#12511 Clause-②: no The last of the eight packages of this card. `@objectstack/http-conformance` was the one that could not take the objectstack-ai#5286 sibling route when the other seven did in PR objectstack-ai#16295: `packages/qa/http-conformance/tsconfig.json` extended nothing, and it was the only one of the six such configs that also declared no `skipLibCheck`, so two third-party declarations inside `node_modules` were type-checked and its `TEST_DEBT` entry could not graduate by fixing any code in this repository. This executes the recorded maintainer ruling (comment 5564754428, director seat, decision batch objectstack-ai#66, 2026-09-07, maintainer verbatim 「同意」), option B: one `extends` line onto the repo root — the way 73 of 79 packages already do — plus the sibling `tsconfig.test.json` the other seven received. No per-package dialect, no ratchet over third-party errors, no residual entry left behind. `TEST_DEBT` in `scripts/check-type-check-coverage.mjs` is now **empty**. ## What changed | Path | Change | |---|---| | `packages/qa/http-conformance/tsconfig.json` | one `extends` line; nothing else moved | | `packages/qa/http-conformance/tsconfig.test.json` | new — the test-layer program, with its own measured header | | `packages/qa/http-conformance/package.json` | `typecheck` = `tsc --noEmit && pnpm check:test-typecheck`, plus `check:test-typecheck` / `gen:test-typecheck-debt` | | `packages/qa/http-conformance/test-typecheck-debt.json` | new — measured, per file and per signature | | `scripts/check-type-check-coverage.mjs` | the `TEST_DEBT` row graduates, with two-direction attribution | | `scripts/regen-artifacts.mjs` | the new ledger registered `NOT_DRIVER_MANAGED` | | `scripts/check-type-source-resolution.mjs` | the onboarded program re-baselined, numbers stated in place | No test file is edited and none is repaired. The other seven packages are untouched. ## Acceptance, measured Every reading below is on `objectstack-ai/objectstack`, in the worktree `objectstack-issue-12511` branched at `f6c2eb7c865065943a474d1e49833d6184d76e32`, with the dependency closure built first. **1. The package's own `typecheck` is green.** `pnpm --filter @objectstack/http-conformance typecheck` exits **0**; `check:test-typecheck` reports `OK — 3 file(s) / 27 error(s) / 10 pinned signature(s) held in test-typecheck-debt.json`. **2. The feedback-latency claim, demonstrated.** Planted through `scripts/ablation-replace.mjs` into `src/response-observation.conformance.test.ts` — a file that carries **no** ledger entry, so any error in it is red on arrival. The anchor was that file's copyright line; the replacement was `const PLANTED_TYPE_ERROR: number = 'a string, not a number';`. - mutation proven on disk: anchor `1 -> 0`, replacement `0 -> 1`, blob `b960030733eb -> 91be3648cf30` - the package-local check reported it: exit **1** in **6,840 ms**, naming `src/response-observation.conformance.test.ts: 2 type error(s) in a file the ledger does not cover` - **negative control**, same plant on the same file, run against what `typecheck` was *before* this change (`tsc --noEmit -p tsconfig.json` alone): exit **0**, **zero** output lines, in 2,306 ms. That is the defect this card is about, reproduced. - restore proven byte-identical both times: blob after restore `b960030733eb` == blob at HEAD `b960030733eb` (non-empty), `git diff HEAD` empty, `git status --porcelain` 0 paths. **3. Its test files are now in the program**, counted with `tsc --noEmit --listFiles` in ONE run, same binary (6.0.3), same worktree: | program | files in program | own `*.test.ts` in program | own `*.test.ts` on disk | |---|---|---|---| | `http-conformance` build config (the only config `typecheck` named before) | 328 | **0** | 6 | | `http-conformance` `tsconfig.test.json` | 1008 | **6** | 6 | | positive control — `packages/metadata-core` `tsconfig.test.json` | 406 | 9 | 9 | | positive control — `packages/rest` `tsconfig.test.json` | 746 | 194 | 194 | The two controls are packages whose tests are already in their own programs, measured the same way in the same run; without them the `0` above is unfalsifiable. **4. `check:type-check-coverage` still passes and the test-layer line goes to zero.** Re-measured rather than assumed — the number this round starts from is not the one PR objectstack-ai#16295 left: ``` before test layer: 1 package(s) still hide their own tests from tsc (6 files hidden as counted by this run, 2 frozen raw errors in TEST_DEBT). after test layer: 0 package(s) still hide their own tests from tsc (0 files hidden as counted by this run, 0 frozen raw errors in TEST_DEBT). ``` Both runs exit 0. (The card and the ruling both write the path as `packages/http-conformance`; it is `packages/qa/http-conformance/`, read from `git ls-files`.) **5. The full-closure gate is unchanged**, proven rather than asserted, three ways: - `pnpm check:type-check-debt` (the `--re-measure` arm, under the CI-shaped `--max-old-space-size=6144`) exits **0**, `os-verify-lock: VERDICT command-exit 0`, and its DEBT line is the same one it printed before: `4 in the DEBT ledger (53 frozen raw errors)`. - the only **non-comment** change anywhere in `scripts/check-type-check-coverage.mjs` is the deletion of the one `TEST_DEBT` row that graduated. Everything else in that file's diff is comment lines. - the gate's mechanism tokens are untouched, each with a firing control on the same file (`diff` count 0 while the term is present at HEAD): `CI_TSC_HEAP_CEILING_MB` 0/20, `refreshBuiltClosure` 0/4, `unbuiltClosure` 0/8, `TSC_ROOTDIR_DIAGNOSTIC` 0/3, `dropRootDirDiagnostics` 0/9, `countTscErrors` 0/6. The control fires: `TEST_DEBT` reads 3 in the same diff, `@objectstack/http-conformance` 3. `.github/` paths in the diff: 0. ## The attribution, which does not run the way the other thirteen graduations did This is the first entry in the family whose ledger is **larger** than the `TEST_DEBT` row it replaces, so the terms matter more than the totals. Each was isolated by its own single-option probe rather than inferred from the ends: | term | count | | |---|---|---| | RECORDED in `TEST_DEBT` | 2 | | | RAW, through the gate's own `remeasureProject` shape on the unchanged config | 2 | TS2307 x1, TS2304 x1, class for class and file for file | | dissolve — the inherited `skipLibCheck` | −2 | both inside `node_modules` `.d.ts` (`@better-auth/core`'s `bun:sqlite`, `@better-fetch/fetch`'s `Timer`) | | exposed — the root config **declares** `lib`, replacing the `lib.es2022.full` default that `target: ES2022` was supplying | +25 | TS18046 x14, TS2571 x6, TS2339 x5 | | exposed — the root config's `noUnusedParameters` | +2 | TS6133 x2 | | **LEDGER**, per file and per signature | **27** | 3 of the package's 6 test files | The `+25` is one idiom — `await res.json()` bound without a narrowing — across three suites, which is `packages/mcp`'s population almost exactly (51 of its 53). It is **not** a config-tier artefact to be tuned away: `vitest.config.ts` runs this package with `environment: 'node'`, so reading `Response.json()` from `@types/node`'s undici — where it answers a `Promise` of `unknown` — is what matches the runtime, and the DOM reading, where it answers a `Promise` of `any`, was the fiction. The sibling therefore declares `lib: ["ES2022"]` like all 31 of its siblings and does not re-add `DOM` to shrink its own ledger. Measured so the choice is legible: with `lib: ["ES2022", "DOM", "DOM.Iterable"]` the same program reports 2. Module semantics are untouched, on the `packages/mcp` precedent rather than `packages/rest`'s: this package is `"type": "module"`, so the inherited NodeNext already reads these files as ESM. Measured — the layer writes zero `import.meta`, its only relative imports already carry `.js`, and `module: esnext` / `moduleResolution: bundler` subtracts zero from the 27. ## `check:type-source-resolution` — a re-baseline, stated in place `tsconfig.test.json` is a program the `typecheck` script did not name before, so the program set moved: the re-baseline limb that registry's own doc-block opens to a package, not an exposure this change created. All six deps admitted are annotated `via tsconfig.test.json` by the gate's own provenance output — condition 1 read off the instrument rather than asserted. ``` before 135 programs / 80 packages, 61 entries, 321 package-dep pairs after 136 programs / 80 packages, 61 entries, 327 package-dep pairs ``` `+1` program, `+0` entries (this package was already listed for `@objectstack/core`), `+6` pairs. Both readings on one checkout at `d1bacbd2e`, the BEFORE one under a trap-restored mutation that un-**names** the sibling config in the `typecheck` script and nothing else — the gate exits 0 in that state, which is what makes the pair a measurement of the program set rather than of two different trees. One of the six carries the same run-vs-type-verdict disagreement `mcp` and `platform-objects` declare above it: `vitest.config.ts` aliases `@objectstack/hono` to that package's SOURCE on purpose, while the test program resolves that specifier's types through `dist/`. `paths` is measured to be the wrong repair for an onboarding program (PR objectstack-ai#12570), so it is declared in the registry where the shrink-only ratchet keeps it visible. ## Changeset — `skip-changeset`, measured Nothing published moves. Every path in the diff was resolved to its owning manifest and judged against that manifest's `files[]`: - `packages/qa/http-conformance/{package.json,tsconfig.json,tsconfig.test.json,test-typecheck-debt.json}` — owner `@objectstack/http-conformance` is `"private": true` - `scripts/check-type-check-coverage.mjs`, `scripts/regen-artifacts.mjs`, `scripts/check-type-source-resolution.mjs` — no owning workspace package **Firing control** on paths provably absent from this diff (0 hits against the diff's own name list): `packages/lint/CHANGELOG.md` → PUBLISHED, `packages/lint/dist/index.js` → PUBLISHED, `packages/mcp/README.md` → PUBLISHED. The probe fires, so the seven NOT-PUBLISHED verdicts are a measurement and not a probe that sees nothing. ## Gates The derived families (`node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`) were run in full — 69 commands swept with recorded exit codes, plus `check:type-check-debt` and `check:pm-dispatch-gates` handled separately. One family went red and is fixed in this PR (`check:type-source-resolution`, the re-baseline above); the rest are green. `pnpm check:merge-driver` went red for a real missing disposition and is fixed here too. ## Acceptance notes - `scripts/check-type-check-coverage.mjs`'s heap-ceiling doc-block cites `packages/qa/http-conformance`'s `TEST_DEBT` program as "the heaviest program" for the `CI_TSC_HEAP_CEILING_MB` reading. That program no longer exists in the ledger, so the citation is now archaeology about a run on a tree that has moved. It is left as written — it is a historical measurement with its run id, job and image named, and rewriting it would destroy the provenance the pin rests on. Noted, not filed. - The card's body and the ruling both spell the path `packages/http-conformance`. Noted, not filed: the card is closed by this PR, so nothing downstream reads that spelling again. --- _Generated by [Claude Code](https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
Documentation Structure Optimization
Comprehensive optimization of the ObjectStack Protocol documentation following industry best practices from Kubernetes, Salesforce, and ServiceNow.
Changes Made
Root Documentation
Technical Documentation Hub (
docs/)data-layer.md- ObjectQL architecture and query protocolui-layer.md- ObjectUI server-driven UI protocolsystem-layer.md- ObjectOS runtime kernel and pluginsnaming-conventions.md- camelCase vs snake_case rulesapi-design.md- RESTful API design principleserror-handling.md- Consistent error handling patternssecurity/best-practices.md- Security guidelines and checklistperformance/optimization.md- Query optimization and caching strategiesai-integration/quick-start.md- AI features integration guidev0-to-v1.md- Migration guide for version upgradesDocumentation Structure
Benefits
All documentation is production-ready and follows consistent formatting standards.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.