#653 Replace get-session-context skill with a bundled TS deriver - #663
Merged
Conversation
Introduce `src/derive-session-context/` with a TypeScript implementation of the branch-manifest derivation contract previously housed in the Zero-Bash `get-session-context` skill. The new deriver bundles via the existing `bundle-skill-helpers.ts` pipeline into `content/skills/derive-session-context/derive-session-context.mjs`, a self-contained `.mjs` invokable directly by `node` from main agents, subagents, or shell scripts. The module decomposes into four pure pieces: an eemeli-`yaml`-based preferences reader that validates against `schemas/preferences.json` via `@hyperjump/json-schema`, a ticket-ID extractor implementing the contract in `_data/ticket-id-extraction.md`, a manifest composer, and a CLI entry that wraps git branch resolution, idempotent manifest reads, and JSON-stdout output. Vitest unit tests cover every behavior-table row from the extraction contract, every numbered worked example from the existing skill's documentation, and the CLI's fresh-derivation / idempotent-read / stale-schema-overwrite / corrupt-overwrite / detached-HEAD paths. The `SmokeTestInvocation` interface gains optional `cwd` and `env` fields so the new bundle's smoke test can run against a hermetic fixture directory rather than against the developer's ambient environment. Adds `yaml` as a direct dependency of `@codeassembly/agents` (matching the `2.9.0` pin used by `kb-core`).
… miss When the branch manifest is absent, `resolve-frontmatter.sh` now invokes the bundled `derive-session-context` helper to create one before continuing — what was a precondition violation becomes a self-healing recovery. The bundle is located via `../skills/derive-session-context/derive-session-context.mjs` relative to the script's own install path, an invariant of both the Claude Code and Rovo Dev install layouts. The CLI gains a `--home` flag (paralleling `--cwd` and `--branch`) so tests and other isolated invocations can override the default `os.homedir()` lookup without disturbing PATH-resolution tools such as asdf shims. The bash script accepts two test-only env vars — `RESOLVE_FRONTMATTER_BUNDLE_PATH` and `RESOLVE_FRONTMATTER_BUNDLE_ARGS` — to keep the shellspec test hermetic under the `Include` directive. The previous "Subagent dispatch precondition" error path is retired; subagents and main agents now reach the manifest through the same code path.
…ed deriver
Removes the Zero-Bash `get-session-context` skill and points every consumer at the bundled TypeScript deriver instead. Skills now invoke `node {platform_home_dir}/skills/derive-session-context/derive-session-context.mjs` via Bash and read the manifest JSON from stdout, eliminating the asymmetry where main agents had a skill but subagents and shell scripts did not. The "subagent dispatch precondition" that existed to bridge that asymmetry is also gone: any caller can now compose the manifest on demand.
Updated step-1 invocations (and other inline references) in `align-ticket-with-implementation`, `condense-branch`, `create-devlog`, `create-pr`, `create-ticket`, `design-and-plan`, `find-orchestration-savings`, `merge-pr`, `orchestrate`, `plan`, `plan-orchestrable-steps`, `refine-plan`, `respond-to-review`, `review-branch`, `review-pr`, `save-artifact`, `save-plan`, `summarize-change`, `summarize-chat`, and `wrap-up`. Updated the cross-reference in `get-ticket-id` to point at the new TypeScript implementation of the shared ticket-ID extraction contract.
Rewrote `_data/artifact-conventions.md` § "Subagent dispatch precondition" as a new "Manifest creation" section describing the unified invocation surface; dropped the dispatcher table. Updated inline references in `branch-format.md`, `pr-resolution.md`, `ticket-id-extraction.md`, and `ticket-source-resolution.md` to name the bundled deriver.
Removes the last `get-session-context` references from comments in `resolve-frontmatter.sh`, the deriver's source comments, and the manifest-composer tests' docstring — all now point at the surviving artifacts (`_data/branch-format.md`, `_data/ticket-id-extraction.md`, the deriver bundle itself). Restructures the `parseArgs` flag-dispatch loop in `cli.ts` to use a `switch` instead of an `else-if` chain (satisfies `unicorn/prefer-switch`), and extracts a small `consumeValue` helper for the shared "read the next argv element as a flag's value" path. Behavior is unchanged. Excludes the new `derive-session-context.mjs` bundle from the root `.prettierignore` — Prettier exhibits a non-idempotent reformatting bug on long ternary expressions emitted into the bundle (the `yaml` package surfaces the pattern), so the root format check rejects it. The package-level `.prettierignore` already excluded the file; this propagates the exclusion to the root.
…hen-strip
`derive_manifest` in `resolve-frontmatter.sh` now passes `--cwd "$(git rev-parse --show-toplevel)"` to the bundled deriver so the manifest is always written to and read from the repo root. Previously, an invocation from a subdirectory wrote the manifest to `{subdir}/.agents/` while `read_manifest` looked at `{repo_root}/.agents/`, so every call re-ran the deriver and orphaned manifests accumulated in unintended `.agents/` subtrees.
The bash `sanitize_branch` helper now loops `${branch%-}` until no trailing hyphen remains, matching the TypeScript `sanitizeBranch` while-loop. The previous `${branch%%-}` form stripped only one trailing hyphen, so a branch whose `/`-replacement produced multiple trailing hyphens would yield a different sanitized name in bash than in TypeScript — and the two must agree on the manifest filename.
Adds shellspec coverage for the derive-on-cache-miss path from a nested subdirectory, the `feat//` → `feat` sanitization case in both `cli.test.ts` and `resolve_frontmatter_test.sh`, and the `--cwd=value` inline-form `parseArgs` case (mirroring the existing `--branch=` and `--home=` cases).
…tration guard `isMain()` in the session-context CLI now falls back to `true` rather than `false` when `realpathSync` or `fileURLToPath` throws — most plausibly a broken symlink in an installed layout. Returning `false` silently no-opped the CLI; returning `true` runs `main()` defensively, which surfaces a real error or completes normally instead of swallowing the invocation. `ensureSchemaRegistered` no longer pattern-matches the duplicate-registration error message from `@hyperjump/json-schema`. The library exports `hasSchema(uri)` from the same `draft-2020-12` entry point as `registerSchema`, so the duplicate check is now a non-exceptional pre-check. This removes the dependency on internal error-message wording, which would have silently swallowed unrelated registration errors across a library version bump.
…se corruption `deriveSessionContext` now writes the new-format `.branch-manifest.json` whenever it successfully reads from the old-format `.manifest.json` path. Without this, a repo with only the old file would re-invoke the deriver on every call — the same cache-miss-loop class as the recently-fixed subdirectory cwd bug. Subsequent calls now hit the fast-path read. `isCurrentSchema` now narrows the most load-bearing fields of a parsed manifest: `ticket_id` and `ticket_ref` must be `string | null`, `artifact_paths` must be a plain object, and `platform` must be `'github'` or `'bitbucket'`. Hand-rolled narrowing rather than Zod because the schema is small and stable and Zod is not in use elsewhere in this module. A hand-edited or corrupt manifest that passed presence checks but fails these is now treated as stale and recomposed, matching the existing stale-schema-overwrite path. The corrupt-manifest catch in `tryReadManifest` now writes a single-line diagnostic to stderr before falling through to recompose: `derive-session-context: warning: manifest at <path> is corrupt; recomposing`. The recovery behavior is unchanged, but operators can now distinguish a normal cache miss from a recurring storage problem. Adds a vitest case asserting that `deriveSessionContext` rejects when `.agents/` is read-only (chmod `0o555`); the test skips on root where chmod restrictions are bypassed. Updates the existing old-format test to assert the new-format file is also written.
…ge invariants `assertDeriveSessionContextOutput` in the bundle smoke test now also asserts `artifact_base_dir` contains `"ai-artifacts"` (confirming the default `~/ai-artifacts` was expanded against the smoke harness's `--home` flag) and `default_branch` equals `"origin/main"` (the default surfaced when no `repository.default_remote` is configured). Both fields were silently untested at the bundle level; the smoke test is the only place the bundled `.mjs` is exercised end-to-end, so a regression in the resolver or remote-name logic would have passed. The two-file `readPreferences` merge test now asserts that `result.sources.project` and `result.sources.global` are both defined. The merge previously had unit coverage for the each-only case but no test would have caught a regression that cleared `sources.global` while a project file was present.
Lint reported `dot-notation` errors on the bracket-notation accesses (`value['ticket_id']` etc.) introduced in the type-narrowing change. Replaces all five accesses with dot-notation form, which TypeScript resolves identically because `value` was already narrowed to `Record<string, unknown>` by the preceding `isRecord` check.
…ion fix Rebuilds the bundled `.mjs` to match the source-tree dot-notation change in `isCurrentSchema`. Pure rebuild — no behavior change.
`ensureSchemaRegistered` in `read-preferences.ts` now uses a single `hasSchema(SCHEMA_ID)` guard around `registerSchema`. The module-level `schemaRegistered` boolean and its accompanying docstring are removed — `hasSchema` checks the library's global registry and already covers the vitest-watch and repeated-CLI-invocation cases without a separate flag. Also drops the redundant `: string` annotation from `const SCHEMA_ID`; TypeScript infers `string` from `preferencesSchema.$id`.
…content `read_manifest` in `resolve-frontmatter.sh` now runs `jq empty` over the file contents before echoing them. A corrupt cached manifest (truncated by a crashed concurrent writer, hand-edited badly, partially written) previously satisfied `[[ -r "$path" ]]`, so the function returned the bad content and the downstream `jq -r '.platform // "github"' <<<"$manifest"` aborted the script under `set -euo pipefail`. With the guard in place, corrupt content falls through to `derive_manifest`, which already recovers via the bundle's `tryReadManifest`. This brings the bash caller into full symmetry with the TS caller — the architectural claim that motivated retiring the dispatch-time precondition is now end-to-end consistent. Shellspec coverage: a corrupt `.branch-manifest.json` is seeded and the script is expected to succeed, surface the deriver's `is corrupt` stderr diagnostic, and leave a valid manifest on disk.
`assertValidatesAgainstSchema` in `read-preferences.ts` now calls the hyperjump validator with `BASIC` output instead of `FLAG`, then formats the thrown message around the most specific error in the resulting list — `preferences failed schema validation at "<key/path>" (failed keyword: <kw>). Check the contents of …`. The picker walks the error list and selects the entry with the longest `instanceLocation`, since hyperjump emits parent errors before child errors and the deepest pointer is what a user typing into YAML most wants to know. `formatInstanceLocation` strips the `{baseUri}#` prefix and the leading `/` of the JSON Pointer, rendering the root instance as `"(root)"`.
The module's own docstring already promised "Schema-validation failure throws with a message identifying the offending key path", and Task 2 of the plan committed to "Schema validation errors surface a concrete message that points at the offending key" — both gaps now close.
Test coverage: the enum-violation case asserts `/at "platform"/`; a new deeply-nested case (`repository.default_remote.name` with a wrong-type integer) asserts `/at "repository\/default_remote\/name"/`.
`parseArgs` in `cli.ts` now uses a single if/else-if chain with one paired set of branches per flag: the literal-form branch (`arg === '--branch'`, `i += 1`) immediately followed by the inline-form branch (`arg.startsWith('--branch=')`), then the same shape for `--cwd` and `--home`, terminating in `else throw new Error(`unknown argument: …`)`. The previous structure split the parse across a `switch` (for space-delimited flags, each case `continue`-ing) and a following if-chain (for inline flags), glued by a `default: break` that exited only the switch — a `break` a future reader could plausibly mis-read as exiting the loop.
Behavior is unchanged. The existing CLI tests, which assert that both `--flag value` and `--flag=value` forms parse identically, stand as the contract.
…ror and parseArgs changes Rebuilds the bundled `.mjs` to match the source-tree changes in the two preceding commits: `read-preferences.ts` (BASIC-format hyperjump output with offending-key-path messages) and `cli.ts` (flag-per-block `parseArgs` chain). Pure rebuild — no behavior change beyond what the source commits describe.
Dependency auditProduction dependency audit passed. |
williamthorsen
marked this pull request as ready for review
May 26, 2026 06:21
williamthorsen
added a commit
that referenced
this pull request
Jul 18, 2026
…0.2.1 agents-v0.3.0 - #1019 feat: Add a personal rulebook with em-dash usage rule (#1024) - #1005 internal: Emit session-lifecycle events via harness hooks (#1021) - #1014 fix: Rebuild post-review next steps on the reviewer/author role model (#1020) - #1008 feat: Add a managed event-hook utility for Rovo config.yml (#1017) - #1004 feat: Add an implement-plan skill for the implementation phase (#1016) - #1009 fix: Sweep ticket and plan for missed decisions before saving (#1015) - #1007 internal: Add a managed hook-entry utility for Claude Code settings.json (#1011) - #1000 feat!: Rename and generalize the upgrade-dependencies skill (#1003) - #881 tooling: Migrate build to nmr-compile and give mcp an entry point (#1001) - #987 internal: Instrument review-branch, respond-to-review, and create-pr with lifecycle events (#999) - #986 internal: Add an emit-event skill helper and lifecycle event envelope v0 (#998) - deps: Upgrade all deps to latest minor version - #991 refactor: Remove client-side event-immutability enforcement (#997) - #993 refactor: Separate the smoke-test code from the bundle build tooling (#996) - #994 fix: Remove the visualization hooks that logged an error on every prompt (#995) - #740 fix: Recommend refine-plan only when decisions remain unsettled (#990) - #989 refactor: Give the store's on-disk layout a single owner (#992) - #973 fix: Carry comment discipline in every agent that writes comments (#983) - #978 feat: Add an action-items convention that separates asks from prose (#982) - #972 fix: Support events from a harness that exposes no session id (#981) - #971 fix: Inline output-shaping specs so skills cannot improvise them (#980) - #976 feat!: Disambiguate the memory-store selector and accept its displayed label (#979) - #927 feat: Frame agent-guidance changes as instructions, not accomplished behavior (#970) - #964 feat: Default to folding discovered work into the current change (#969) - #962 feat: Standardize ticket-authoring doctrine across the emitting skills (#968) - #958 refactor: Route the capture-event add path through KbEvent (#966) - #853 refactor: Replace rule engine with a type-blind vault-integrity layer (#961) - #852 refactor: Route the assertion write commands through KbAssertion (#959) - #907 fix: Render self-referential and cross-skill invocations per harness (#957) - #953 feat: Resolve the PR URL from a PR-based branch identity (#956) - #914 feat: Add spike mode to the ticket and plan authoring skills (#955) - #950 feat: Support a PR number as a branch and artifact identifier (#954) - #938 feat: Support collections from user-declared content sources (#951) - #939 fix: Dedup migrated memories by topic, not session id alone (#949) - #919 feat: Keep implementation detail out of ticket drafts (#948) - #933 feat: Report the source each deployed artifact resolved from (#947) - #940 feat: Add a feedback-memories list command and rename the toolbox (#946) - #932 feat: Support skills and subagents from user-declared content sources (#945) - #936 fix: Attribute migrated feedback events to their origin project (#942) - #934 refactor: Narrow resolveClosure to SourceResolver only (#941) - #924 feat: Resolve rulebooks from user-declared content sources (#935) - #859 feat: Scope feedback-memory migration per store and ground triage in each project (#931) - #650 feat: Add migrate-feedback-memories skill to route memories home (#930) - fix: Special-case the # prefix in create-ticket id construction - #721 feat: Route generalizable feedback to capture-feedback, not memory (#929) - #847 fix: Prevent create-ticket from mis-associating backlog tickets (#928) - #922 feat: Default interactive chat to concise with deep-dive opt-in (#926) - #921 feat: Extend compose-time concision to plans, devlogs, summaries (#925) - docs: Add ambient-hosts to guidance README - #920 feat: Establish the concision spine and wire the ticket and review-comment gates (#923) - #883 tests: Run real-install tests only as a deliberate integration step (#917) - #751 refactor: Set the shell-conventions rulebook to skill-only delivery (#916) - #886 feat!: Deploy harness-specific skills via the declarative mechanism (#912) - #877 feat: Generate project-scoped Rovo Dev prompts.yml on sync (#911) - #904 feat: Make events editable until pushed to the remote (#910) - #879 fix: Declare cross-artifact runtime dependencies (#908) - #897 feat: Surface event impact in recall and filter by it (#906) - #898 feat: Add `{skill:}` and `{subagent:}` invocation tokens (#905) - #899 fix: Skip support directories with no installable files (#903) - #821 feat: Add a mutable impact rating to events (#901) - #895 fix: Deploy a subagent's injected skills with sync (#900) - fmt: Auto-format - #880 feat: Add authoring-guidance rulebook for agents (#896) - #878 feat!: Retire unconditional install (#894) - #892 feat: Apply skill transforms when sync deploys declared skills (#893) - #888 feat: Resolve and persist ticket URLs for bare or omitted references (#890) - #887 feat: Add collection members key with computed @library membership (#889) - #857 feat: Add a user-global deployment domain via sync --global (#884) - #871 feat: Add capture-feedback skill (#882) - #856 feat: Add collections and transitive dependency resolution (#876) - #855 feat: Make subagents declarable and deployable via codeassembly.yaml (#875) - #854 feat!: Make skills declarable & deployable via codeassembly.yaml (#873) - #851 feat: Add kb-retrieve-events for event recall (#872) - #865 tests: Rationalize install-command tests onto fixtures to remove timeout flakes (#870) - #860 feat: Add library list command to enumerate artifacts (#868) - #850 feat: Add kb-update-events for batch event editing (#867) - #733 feat!: Introduce the codeassembly.yaml rulebook declaration format (#866) - #843 fix: Wire comment-discipline into respond-to-review (#845) - #834 fix: Remove dangling owned symlinks during uninstall (#844) - #830 feat: Name skill-delivered rulebooks with a consult- prefix (#839) - #833 fix: Make a no-findings review a valid, full-score result (#838) - #827 feat: Rename collaboration skill to collaborate and make it user-invocable (#837) - #828 fix: Prune stale files on install (#836) - #820 feat!: Rename platform to harness (runtime) and scm (VCS host) (#832) - #824 fix: Scope kb-retrieve recall to the configured note set (#829) - #818 tests: Use full timestamps in test fixtures, not bare dates (#826) - #816 fix: Write kb-add assertions under content/assertions (#819) - #813 fix: Stop --retag from bumping updated for curatorial tag edits (#823) - #817 feat: Record the agent harness in captured events (#822) - #802 fix: Gate kb-add's registry default behind an explicit @default sentinel (#814) - #775 feat: Default ticket-emitting skills to concise tickets (#811) - #785 feat: Add a kb-edit operation to append addressed-by references (#808) - #784 fix: Stop reviewers emitting self-disqualifying findings (#804) - #800 fix: Require an explicit --store on every capture-event call (#806) - #803 fix: Repair collaboration skill's mistake-recording step (#805) - #796 refactor: Rename PlatformConfig dir-name fields to *DirName (#801) - #791 fix: Expand templated script paths in installed subagents (#797) - #783 feat: Store and reuse resolved ticket and PR URLs in the branch manifest (#789) - #780 fix: Exclude top-level skills/_partials/ from skill installation (#788) - #763 feat: Add an addressed-by/addresses relation linking problems to their responses (#787) - #779 feat!: Designate the default KB with a top-level default_kb pointer (#786) - #774 feat: Unify plan and design-and-plan on a shared plan template (#782) - #771 refactor: Consolidate duplicated parseTagList and readAll helpers (#781) - #766 feat!: Adopt explicit-UTC second-precision timestamps for KB date fields (#773) - tests: Drop the removed immutable field from a kb-retrieve helper - #749 feat: Honor the schema recall policy in kb-retrieve (#764) - #748 refactor: Remove the unused immutable record-type schema flag (#765) - #756 feat: Rename the Diátaxis --type flag to --diataxis (#757) - #720 feat: Add a kb create command to provision new KB stores (#755) - #732 feat: Add skill delivery mode for rulebooks (#754) - #741 fix: Resolve review spec source by recency with an explicit override (#753) - #734 refactor: Replace js-yaml with the yaml library (#743) - #727 refactor: Redesign the record taxonomy around a stored recordType discriminant (#742) - #731 feat: Add init and sync commands for the project rulebook library (#738) - #718 feat: Add a config-driven kb check CLI and library export (#735) - #724 refactor: Rename @codeassembly/kb-core to @codeassembly/kb (#726) - #715 fix: Drop branch-cleanup advice and deletion-status fields from merge output (#722) - #716 feat: Relocate event records to content/events/ and document the fix-tag convention (#719) - #714 feat: Add event capture and a kind-aware record-store core (#717) - deps: Upgrade all deps to latest minor version - #706 fix: Reframe legacy finding-ID rule to prevent ID collisions (#712) - #709 feat: Skip HTML sanitization for the markdown Jira-update tool (#710) - #704 fix: Give the lede pipeline authority to cut supplied mechanism (#708) - #702 refactor: Deduplicate the isRecord type guard across factory and run-core (#707) - #661 fix: Self-anchor agents helpers at the git repo root (#703) - #690 refactor: Deduplicate filesystem-existence and type-guard helpers (#700) - #684 test: Pin --kb resolution for a single-entry default registry (#698) - #689 feat: Consolidate the kb.yaml loader and surface registry defects in kb-retrieve (#695) - #683 fix: Forbid interactive UI controls when prompting the user (#692) - #685 refactor: Consolidate acceptance-criteria scaffold into a partial (#691) - #670 fix: Keep change-summary ledes outcome-shaped (#688) - #671 feat: Treat suppression directives as reviewable design signals (#686) - #678 fix: Stop resolving the pr field at artifact-write time; set it only in PR-aware skills (#687) - #638 feat: Add kb-curate skill for vault-wide KB hygiene (#681) - #662 feat: Add /revise-comments to audit and edit existing comments (#680) - #674 fix: Tighten review-finding thresholds for genuine improvements (#679) - #673 feat: Add kb-edit skill for post-creation note maintenance (#676) - #672 fix: Move user-global KB config to `~/.agents/kb.yaml` (#675) - #657 feat: Add test-structure discipline to agent guidance and review pipeline (#669) - #658 fix: Fix `&` corruption in rendered titles on bash 5.2+ (#667) - #664 fix: Tolerate unknown keys in `.agents/preferences.yaml` (#666) - #653 fix: Replace `get-session-context` skill with a bundled TS deriver (#663) - #642 feat: Add comment discipline to agent guidance and review pipeline (#659) - #643 fix: Add update-jira-ticket pre-flight validator and rework recovery protocol (#654) - #637 feat: Add kb-add skill for capturing knowledge-base notes (#652) - #636 feat: Add kb-retrieve skill for querying the knowledge base (#645) - #629 fix: Skip .DS_Store and stray entries during rovodev install (#633) - #631 fix: Make installable content paths resolve outside the monorepo (#632) - #567 feat: Surface ticket-vs-PR-description divergence in /review-pr (#628) - #624 fix: Make resolve-frontmatter work from any subdirectory (#627) - #621 fix: Codify dispatch precondition for resolve-frontmatter (#626) - #592 feat: Apply recommendation gradient to all substantive option choices (#625) - #558 feat: Add changelog-writer subagent (#620) - #617 fix: Make skill tool-name references platform-portable (#619) - #603 tests: Add edge-case tests for artifact-frontmatter YAML emission (#618) - #599 feat: Decouple review dispositions from reviewer framing (#616) - #611 feat: Stop reporting "behavior unchanged" in changelog entries (#615) - #608 feat: Discourage code-level detail in design-and-plan tickets (#614) - #607 fix: Use {platform_home_dir} for helper-script invocations (#613) - feat: Add guidance about capitalization after a colon - deps: Upgrade all deps to latest minor version - #606 tooling: Allow test:sh to run selected shellspec tests (#610) - #605 fix: Fix shellspec test suite hangs in agents package (#609) - #595 refactor: Emit complete YAML frontmatter from resolve-frontmatter.sh (#604) - #593 feat: Add change-narrating voice and jargon to lede-voice (#602) - #597 feat: Make subagent tool-name references platform-portable (#601) - refactor: Fix capitalization in subagent definitions - #572 feat: Revise `respond-to-review` to be less deferential to reviewer recommendations (#600) - #589 feat: Guide agents to prefer partials over duplicated content (#598) - #537 feat: Unify artifact frontmatter under a canonical metadata schema (#596) - #583 feat: Require repo-relative paths in review finding locations (#594) - #581 feat: Redefine 👍🏼👎🏼 as a confirmation contract (#586) - #584 fix: Remove `<pre>` from update-jira-ticket allowlist (#585) - feat: Strengthen type-safety guidance - #580 fix: Restore gradient usage with skill-local pointers (#582) - #578 fix: Prohibit `version_message` argument in update-jira-ticket (#579) - #555 feat: Restructure voice and format rules to enforce inline at point-of-use (#573) - #522 feat: Support partials in skills and subagent definitions (#571) - #553 feat: Replace /review-change with /review-branch and /review-pr (#570) - #515 feat: Auto-retry interrupted reviewer dispatches (#566) - #519 fix: Raise reviewer max_turns defaults (#564) - #560 feat: Treat tickets as requests; design as if from the beginning (#562) - #544 fix: Stop under-recommending direct implementation (#557) - #548 feat: Add work-type emojis and breaking tag to PR descriptions (#554) - #542 refactor: Stop duplicating work-type tiers in commit/SKILL.md (#551) - #545 feat: Add critical-evaluation guidance to collaboration skill (#550) - #538 feat: Extract release-notes voice into shared rules (#549) - #540 refactor: Remove duplicated rules from shared AGENTS.md (#547) - #536 fix: Treat menu omission as drop in /wrap-up (#541) - #535 feat: Inline shared guidance into platform files at install time (#539) - #524 feat: Document code+mark restriction in update-jira-ticket (#534) - #531 feat: Delimit publishable content in merge approval prompt (#533) - #526 feat: Make recommendation-gradient the interactive default (#532) - #469 internal: Migrate label-map schema reference to release-kit (#530) - ## tooling: Exclude generated files from Prettier formatting - #527 refactor: Unify Jira-style ticket ID extraction across skills (#529) factory-v0.2.1 - deps: Upgrade all deps to latest minor version - #943 docs: Remove local-only references from design docs (#944) - fmt: Auto-format - deps: Upgrade all deps to latest minor version - #818 tests: Use full timestamps in test fixtures, not bare dates (#826) - deps: Upgrade jsdom to patch vuln in undici - deps: Upgrade all deps to latest minor version - deps: Upgrade all deps to latest minor version - #702 refactor: Deduplicate the isRecord type guard across factory and run-core (#707) - deps: Upgrade all deps to latest minor version - deps: Upgrade all deps to latest minor version - deps: Upgrade dependencies - ## tooling: Exclude generated files from Prettier formatting kb-v0.2.0 - #881 tooling: Migrate build to nmr-compile and give mcp an entry point (#1001) - deps: Upgrade all deps to latest minor version - #989 refactor: Give the store's on-disk layout a single owner (#992) - #972 fix: Support events from a harness that exposes no session id (#981) - #965 tooling: Fix type resolution in the published kb and run-core packages (#975) - #853 refactor: Replace rule engine with a type-blind vault-integrity layer (#961) - #852 refactor: Route the assertion write commands through KbAssertion (#959) - #821 feat: Add a mutable impact rating to events (#901) - fmt: Auto-format - #851 feat: Add kb-retrieve-events for event recall (#872) - #850 feat: Add kb-update-events for batch event editing (#867) - #849 internal: Add type-blind note I/O and declared per-type record modules (#858) - #824 fix: Scope kb-retrieve recall to the configured note set (#829) - #818 tests: Use full timestamps in test fixtures, not bare dates (#826) - #817 feat: Record the agent harness in captured events (#822) - #800 fix: Require an explicit --store on every capture-event call (#806) - #792 feat: Set the default knowledge base when creating one (#799) - #793 feat: Add a kb set-default command for the default knowledge base (#798) - #763 feat: Add an addressed-by/addresses relation linking problems to their responses (#787) - #779 feat!: Designate the default KB with a top-level default_kb pointer (#786) - #766 feat!: Adopt explicit-UTC second-precision timestamps for KB date fields (#773) - #767 refactor: Normalize declaration ordering across the kb package (#770) - #761 feat: Add note targeting to kb check via paths and --vs (#769) - #748 refactor: Remove the unused immutable record-type schema flag (#765) - #759 feat: Alphabetize the default schema's field lists and add diataxis to assertion (#760) - #752 refactor: Consolidate duplicated kb test helpers into a shared module (#758) - #720 feat: Add a kb create command to provision new KB stores (#755) - #727 refactor: Redesign the record taxonomy around a stored recordType discriminant (#742) - kb: Fix executable bit of kb script - #718 feat: Add a config-driven kb check CLI and library export (#735) - #724 refactor: Rename @codeassembly/kb-core to @codeassembly/kb (#726) mcp-v0.2.1 - #881 tooling: Migrate build to nmr-compile and give mcp an entry point (#1001) - ## tooling: Exclude generated files from Prettier formatting run-core-v0.2.1 - #881 tooling: Migrate build to nmr-compile and give mcp an entry point (#1001) - #965 tooling: Fix type resolution in the published kb and run-core packages (#975) - #818 tests: Use full timestamps in test fixtures, not bare dates (#826) - #734 refactor: Replace js-yaml with the yaml library (#743) - deps: Upgrade all deps to latest minor version - #702 refactor: Deduplicate the isRecord type guard across factory and run-core (#707) - ## tooling: Exclude generated files from Prettier formatting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes an issue where artifact writes failed when the branch manifest had not yet been initialized. Subagents and shell scripts can now create the manifest themselves instead of depending on a separate skill to do it as a side effect.
Why
Artifact-writing operations were intermittently failing for subagents and the
resolve-frontmatter.shscript when the branch manifest had not been pre-created by an earlierget-session-contextskill invocation. The structural cause was that derivation logic lived in a Zero-Bash skill only main agents could invoke, while many consumers could not invoke skills and relied on a side-effect-created manifest as the bridge. Moving derivation into a bundled helper every caller can invoke directly removes the bridge and the failure mode.Details
🎉 Features
src/derive-session-context/TypeScript modules (preferences reader with eemeliyaml+ JSON-schema validation, ticket-ID extractor, manifest composer, CLI) bundled intocontent/skills/derive-session-context/derive-session-context.mjsresolve-frontmatter.shinvokes the bundled deriver on cache miss instead of failing with a precondition error; anchored atgit rev-parse --show-toplevelso manifests always land at the repo rootat "repository/default_remote/name" (failed keyword: type).manifest.jsonfiles are migrated to the new.branch-manifest.jsonpath on first read🐛 Bug fixes
read_manifestvalidates JSON viajq emptybefore returning content; corrupt manifests fall through to fresh derivation rather than aborting the script underset -euo pipefail♻️ Refactoring
get-session-contextskill; rewire 22 consumer skillSKILL.mdfiles and five_data/docs to the new invocation pattern_data/artifact-conventions.md§ "Subagent dispatch precondition" as § "Manifest creation" — the dispatch-time precondition is gone, so the doctrine is gone with itparseArgsas a flag-per-block if/else-if chain (removes aswitch+default: break+if-chain hybrid that was easy to misread)🧪 Tests
_data/ticket-id-extraction.mdrow-for-rowcompose-manifest📦 Dependencies
yaml@2.9.0added as a direct dependency of@codeassembly/agents(eemeliyaml, matching the pin already used inkb-core)Closes #653