mirror of https://github.com/garrytan/gstack.git
Append-only JSONL log at ~/.gstack/projects/{SLUG}/question-log.jsonl.
Schema: {skill, question_id, question_summary, category?, door_type?,
options_count?, user_choice, recommended?, followed_recommendation?,
session_id?, ts}
Validates:
- skill is kebab-case
- question_id is kebab-case, <= 64 chars
- question_summary non-empty, <= 200 chars, newlines flattened
- category is one of approval/clarification/routing/cherry-pick/feedback-loop
- door_type is one-way or two-way
- options_count is integer in [1, 26]
- user_choice non-empty string, <= 64 chars
Injection defense on question_summary rejects the same patterns as
gstack-learnings-log (ignore previous instructions, system:, override:,
do not report, etc).
followed_recommendation is auto-computed when both user_choice and
recommended are present.
ts auto-injected as ISO 8601 if missing.
21 tests covering: valid payloads, full field preservation, auto-followed
computation, appending, long-summary truncation, newline flattening,
invalid JSON, missing fields, bad case, oversized ids, invalid enum
values, out-of-range options_count, and 6 injection attack patterns.
21 pass, 0 fail, 43 expect() calls.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| chrome-cdp | ||
| dev-setup | ||
| dev-teardown | ||
| gstack-analytics | ||
| gstack-builder-profile | ||
| gstack-community-dashboard | ||
| gstack-config | ||
| gstack-diff-scope | ||
| gstack-extension | ||
| gstack-global-discover.ts | ||
| gstack-learnings-log | ||
| gstack-learnings-search | ||
| gstack-open-url | ||
| gstack-patch-names | ||
| gstack-platform-detect | ||
| gstack-question-log | ||
| gstack-relink | ||
| gstack-repo-mode | ||
| gstack-review-log | ||
| gstack-review-read | ||
| gstack-session-update | ||
| gstack-settings-hook | ||
| gstack-slug | ||
| gstack-specialist-stats | ||
| gstack-team-init | ||
| gstack-telemetry-log | ||
| gstack-telemetry-sync | ||
| gstack-timeline-log | ||
| gstack-timeline-read | ||
| gstack-uninstall | ||
| gstack-update-check | ||