mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-21 03:40:00 +08:00
feat: gbrain.context_queries manifests on 6 V1 skills (Lane E partial)
Adds the V1 retrieval contracts. Each skill declares what it wants gbrain
to surface in the preamble at invocation time:
/office-hours — prior sessions + builder profile + design docs
+ recent eureka (4 queries)
/plan-ceo-review — prior CEO plans + design docs + recent CEO review
activity (3 queries)
/design-shotgun — prior approved variants + DESIGN.md + recent
design docs (3 queries)
/design-consultation — existing DESIGN.md + prior design decisions +
brand-related notes (3 queries)
/investigate — prior investigations + project learnings + recent
eureka cross-project (3 queries)
/retro — prior retros + recent timeline + recent learnings
(3 queries)
Each query carries an explicit kind (vector | list | filesystem) per D3,
schema: 1 versioning per D15, and {repo_slug} template var per F7
cross-repo-contamination cleanup. Mix of vector / list / filesystem
matches what each skill actually needs:
- filesystem (mtime_desc + tail) for log JSONL + curated markdown
- list with tags_contains filter for typed gbrain pages
- (vector reserved for V1.0.1 when gbrain query surface stabilizes)
Smoke test: bun run bin/gstack-brain-context-load.ts --skill-file
office-hours/SKILL.md --repo test-repo --explain returns mode=manifest
queries=4 with the filesystem kinds populating real data from
~/.gstack/builder-profile.jsonl + ~/.gstack/analytics/eureka.jsonl on
this Mac. End-to-end retrieval flow confirmed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,29 @@ triggers:
|
||||
- design system
|
||||
- create a brand
|
||||
- design from scratch
|
||||
gbrain:
|
||||
schema: 1
|
||||
context_queries:
|
||||
- id: existing-design-md
|
||||
kind: filesystem
|
||||
glob: "DESIGN.md"
|
||||
tail: 1
|
||||
render_as: "## Existing DESIGN.md (if any)"
|
||||
- id: prior-design-decisions
|
||||
kind: filesystem
|
||||
glob: "~/.gstack/projects/{repo_slug}/*-design-*.md"
|
||||
sort: mtime_desc
|
||||
limit: 3
|
||||
render_as: "## Prior design decisions for this project"
|
||||
- id: brand-guidelines
|
||||
kind: list
|
||||
filter:
|
||||
type: ceo-plan
|
||||
tags_contains: "repo:{repo_slug}"
|
||||
content_contains: "brand"
|
||||
sort: updated_at_desc
|
||||
limit: 3
|
||||
render_as: "## Brand-related notes from CEO plans"
|
||||
---
|
||||
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
|
||||
<!-- Regenerate: bun run gen:skill-docs -->
|
||||
|
||||
@@ -23,6 +23,29 @@ triggers:
|
||||
- design system
|
||||
- create a brand
|
||||
- design from scratch
|
||||
gbrain:
|
||||
schema: 1
|
||||
context_queries:
|
||||
- id: existing-design-md
|
||||
kind: filesystem
|
||||
glob: "DESIGN.md"
|
||||
tail: 1
|
||||
render_as: "## Existing DESIGN.md (if any)"
|
||||
- id: prior-design-decisions
|
||||
kind: filesystem
|
||||
glob: "~/.gstack/projects/{repo_slug}/*-design-*.md"
|
||||
sort: mtime_desc
|
||||
limit: 3
|
||||
render_as: "## Prior design decisions for this project"
|
||||
- id: brand-guidelines
|
||||
kind: list
|
||||
filter:
|
||||
type: ceo-plan
|
||||
tags_contains: "repo:{repo_slug}"
|
||||
content_contains: "brand"
|
||||
sort: updated_at_desc
|
||||
limit: 3
|
||||
render_as: "## Brand-related notes from CEO plans"
|
||||
---
|
||||
|
||||
{{PREAMBLE}}
|
||||
|
||||
Reference in New Issue
Block a user