Repository navigation
docs: add AI context and stabilize timeout regression #582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Architecture | ||
|
|
||
| Each public module is one sourceable file under `lib/bash/<module>/lib_<module>.sh`. | ||
| `std` provides initialization, logging, checked commands, imports, filesystem | ||
| helpers, and cleanup registration. `arg`, `str`, `list`, `file`, `git`, and `gh` | ||
| add composable utilities. `cli` declares command models; `app` supplies typed | ||
| configuration and application lifecycle policy. `process` offers preview | ||
| supervision primitives rather than a second stable runner API. | ||
|
|
||
| Sourcing stdlib is passive. Standalone consumers initialize through `base_init`; | ||
| `bin/base-bash` preloads stdlib, initializes once, sources the application, and | ||
| calls its `main`. Package-relative imports use `base_std_import` or the launcher's | ||
| import helper. Public functions use `base_<module>_...`; framework-owned state | ||
| uses `BASE_BASH_LIBS_...`. Applications retain ownership of their command and | ||
| configuration semantics. | ||
|
|
||
| Keep existing single-file library boundaries. Production libraries use explicit | ||
| status checks rather than `set -e`, `set -u`, or `pipefail`. Logs belong on stderr; | ||
| stdout remains available for command data. Release bundles, API checks, and | ||
| consumer fixtures establish compatibility independently of any one application. | ||
|
|
||
| Sources: [module map](../lib/bash/README.md), [stdlib contract](../lib/bash/std/README.md), | ||
| [standards](../STANDARDS.md), and [launcher](../bin/base-bash). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # base-bash-libs AI context index | ||
|
|
||
| Read in this order: | ||
|
|
||
| 1. [Project](PROJECT.md): purpose, audience, scope, and boundaries. | ||
| 2. [Architecture](ARCHITECTURE.md): components, contracts, and source map. | ||
| 3. [Workflows](WORKFLOWS.md): setup, validation, and contribution practices. | ||
| 4. [Maintenance](README.md): sources, update rules, and export behavior. | ||
|
|
||
| The pack is curated orientation. Canonical repository sources linked from each | ||
| page take precedence when exact implementation or policy details matter. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Base Bash | ||
|
|
||
| `base-bash-libs` is an independently consumable Bash application framework and | ||
| standard library. It provides checked execution, logging, cleanup, structured | ||
| CLIs, typed configuration, and reusable shell helpers. Its consumers include | ||
| Base, standalone scripts, and the separate Beacon reference application. | ||
|
|
||
| Use it where Bash is an intentional runtime constraint and shared application | ||
| infrastructure is useful. It does not require the Base workspace runtime and | ||
| does not own an application's domain policy. Homebrew installation, vendored | ||
| release bundles, source checkouts, and submodules are supported consumption paths. | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inaccurate conflation of consumption paths: "Homebrew installation, vendored release bundles, source checkouts, and submodules are supported consumption paths" merges two distinct, separately-documented things into a nonexistent hybrid category. README.md's real categories are Homebrew / Source Checkout (git checkout, tarball extract, or copied tree) / Vendored or Submodule Layout (placement pattern, covers both vendored copies and git submodules) — plus an independently-documented standalone release-archive download path (README.md:294, "Pinned checkout, archive, Homebrew, vendored, and standalone consumption..."). "Vendored release bundles" names neither the real "vendored" placement pattern nor the real "release archive" download path accurately, and omits the standalone archive-download path entirely. A reader could wrongly conclude there's no independent "download the verified tarball" consumption path, or misunderstand what "vendoring" means in this repo (placement, not bundling a release archive). |
||
| The documented minimum is Bash 4.2.53; macOS system Bash is insufficient. | ||
|
|
||
| The public API manifest and versioning policy define stability. The `process` | ||
| module is preview functionality; do not infer stable status merely because it | ||
| ships in a release. Use VERSION and immutable release evidence for exact package | ||
| identity instead of treating this summary as a current-release registry. | ||
|
|
||
| Sources: [README](../README.md), [API contract](../docs/v2-api-contract.md), | ||
| [API manifest](../base_api_manifest.yaml), and | ||
| [support matrix](../docs/support-matrix.md). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # AI context for base-bash-libs | ||
|
|
||
| This directory is the repository's curated orientation for AI-assisted work and | ||
| portable export. It summarizes verified repository behavior; it is not generated | ||
| runtime evidence or an authoritative release/status registry. Start with | ||
| [INDEX.md](INDEX.md). | ||
|
|
||
| Keep purpose, architecture, commands, and workflows aligned with code and | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copy-paste residue referencing a nonexistent category: "Keep purpose, architecture, commands, and workflows aligned with code and canonical documentation" lists "commands" as one of four things to keep aligned, and CONTRIBUTING.md:128 (added in the same PR) repeats "architecture, commands, or contributor workflows." But this pack's own INDEX.md only enumerates PROJECT (purpose) / ARCHITECTURE / WORKFLOWS / README (maintenance) — there is no COMMANDS.md page here, unlike base's own |
||
| canonical documentation. Update the affected pages in the same meaningful PR; | ||
| for typo-only or internal changes with no contract impact, record no context | ||
| impact in the PR. Resolve disagreements by correcting this pack from its sources. | ||
| Do not copy credentials, local databases, private machine paths, personal records, | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cross-repo duplication, different wording: this Safety text ("Do not copy credentials, local databases, private machine paths, personal records, or transient logs") restates base's own |
||
| or transient logs into it. Link to evidence rather than copying runtime data. | ||
|
|
||
| From this checkout, with Base available: | ||
|
|
||
| ```bash | ||
| basectl export-context --list-files | ||
| basectl export-context --print | ||
| ``` | ||
|
|
||
| Markdown exports combine Markdown files in INDEX order, then append unlisted | ||
| files deterministically. Links outside this directory are source references; | ||
| the exporter does not inline their targets. Keep core explanations self-contained. | ||
| Use real regular files, not symlinks. Store generated bundles outside the project | ||
| and keep generation timestamps out of source pages so unchanged exports remain | ||
| byte-identical. This pack is picked up automatically by workspace export jobs. | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unsupported/false claim: "This pack is picked up automatically by workspace export jobs." I grepped the entire base ecosystem (base, base-cli, base-demo, base-bash-libs, base-cli-demo, base-bash-libs-demo, base-platform-tools, basefoundry-dot-github) for any CI workflow, cron, or batch job that runs |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Workflows | ||
|
|
||
| Start with the [v2 quickstart](../docs/v2/quickstart.md) and a verified immutable | ||
| release when building a consumer. `base-bash check --project .` inspects a | ||
| consumer without changing it. Library development uses the repository checks: | ||
|
|
||
| ```bash | ||
| ./tests/validate.sh | ||
| ./tests/lint-warnings.sh | ||
| git diff --check | ||
| ``` | ||
|
|
||
| Focused BATS tests accompany behavior changes. The complete validator also | ||
| covers API/namespace contracts, release artifacts, consumer examples, and | ||
| compatibility. Use supported Bash and the documented development dependencies; | ||
| run timeout/process tests with non-terminal stdin. | ||
|
|
||
| Tracked work starts from an issue and a dedicated canonical worktree. Move its | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restates rather than links: "Tracked work starts from an issue and a dedicated canonical worktree. Move its Project item to In Progress before implementation and In Review when the PR opens... Ordinary PRs do not change VERSION. Releases must enter through |
||
| Project item to In Progress before implementation and In Review when the PR opens. | ||
| Leave contributor-reserved good-first-issue work to its intended audience unless | ||
| explicitly selected. Ordinary PRs do not change VERSION. Releases must enter | ||
| through `scripts/release` and follow the repository's release process, including | ||
| artifact and downstream evidence. | ||
|
|
||
| Sources: [contribution guide](../CONTRIBUTING.md), [agent guidance](../AGENTS.md), | ||
| [release process](../docs/release-process.md), and | ||
| [versioning policy](../docs/versioning-policy.md). | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,3 +120,17 @@ before dispatching again; rotating a valid token is unnecessary. See the | |
|
|
||
| Run the offline workflow regression tests with | ||
| `python3 tests/project-intake-test.py`; they also run in `./tests/validate.sh`. | ||
|
|
||
| ## AI Context Maintenance | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same-PR duplication: this new "AI Context Maintenance" section restates |
||
|
|
||
| Start AI-assisted orientation with [.ai-context/INDEX.md](.ai-context/INDEX.md). | ||
| Maintain these curated summaries alongside meaningful changes to product scope, | ||
| architecture, commands, or contributor workflows. Canonical docs and code remain | ||
| the source of truth; update the pack when they disagree. State context impact in | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Toothless instruction: "State context impact in the PR, including a reason when no update is needed" reads as a sibling to the existing required Demo/Docs/API/CI Impact sections, but isn't backed by the same machinery. |
||
| the PR, including a reason when no update is needed. Typo-only and internal changes | ||
| without behavioral or architectural impact usually need no context update. | ||
|
|
||
| Validate changes with `basectl export-context --list-files` and | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No mechanical enforcement (altitude): this instructs contributors to manually run |
||
| `basectl export-context --print` from the checkout, plus `git diff --check`. | ||
| Keep the pack self-contained enough for offline reading, free of secrets and | ||
| private runtime data, and independent of generated timestamps or export bundles. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor inaccuracy in a blanket naming-convention claim: "Public functions use
base_<module>_..." is not 100% true —lib/bash/std/lib_std.shexportsbase_initandbase_require_versionas public entry points, neither of which follows the module-prefixedbase_std_...pattern. Spot-checking the other modules (arg/str/list/file/git/gh/cli/app/process),stdis the only one with exceptions. Low severity since these are well-known top-level bootstrap functions documented elsewhere (README.md), but the blanket claim as written is technically inaccurate and could mislead someone writing new public API against this doc's stated convention.