Skip to content

feat(github-agent): add @gittensory ask command with cited contribution-context output - #262

Merged
JSONbored merged 9 commits into
JSONbored:mainfrom
claytonlin1110:feat/github-agent-ask-command-cited-qa
Jun 5, 2026
Merged

feat(github-agent): add @gittensory ask command with cited contribution-context output#262
JSONbored merged 9 commits into
JSONbored:mainfrom
claytonlin1110:feat/github-agent-ask-command-cited-qa

Conversation

@claytonlin1110

Copy link
Copy Markdown
Contributor

Summary

  • Add @gittensory ask <question> to support contribution-quality Q&A from connected cached sources with source/freshness notes.
  • Thread parsed question text into mention command orchestration so responses can be scoped to the user’s prompt.
  • Add tests for parsing/rendering and preserve public-surface sanitizer boundaries.
    Closes feat(github-agent): add repo and docs context Q&A from connected sources #142

Scope

  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; global coverage stays at or above 97% for lines, statements, functions, and branches (aim for 98%+ branch coverage locally so CI variance does not fail near the threshold)
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Ran targeted suites for touched behavior:
    • vitest run test/unit/github-commands.test.ts
    • vitest run test/unit/queue.test.ts
    • vitest run test/unit/product-usage.test.ts test/unit/openapi.test.ts test/integration/api.test.ts
  • Full repo validation matrix was not run in this local pass.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include screenshots or a short recording.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

@dosubot

dosubot Bot commented Jun 2, 2026

Copy link
Copy Markdown

Related Knowledge

2 documents with suggested updates are ready for review.

gittensory

For Maintainers
View Suggested Changes
@@ -350,6 +350,16 @@
 @gittensory help
 ```
 
+##### `@gittensory ask <question>`
+
+Answers contribution-quality questions from connected cached sources with citations and freshness notes. Supports contribution-quality Q&A with source citations from connected cached sources including GitHub issues/PRs/recent merges/checks, signal snapshots, focus manifest, and upstream ruleset status. Answer scope is limited to contribution quality and repository policy. Sources are cited with freshness and public-boundary redaction.
+
+**Example:**
+
+```
+@gittensory ask what are the coding standards for this repo?
+```
+
 ##### `@gittensory preflight`
 
 Summarizes PR hygiene and validation readiness. Shows up to 3 relevant actions from preflight analysis, including linked context, branch freshness, and validation status [[48]](https://github.com/JSONbored/gittensory/blob/1e7506f4c5226d0b9b5da8fcd219309d84bacfcd/src/github/commands.ts#L165-L180).

✅ Accepted

Gittensory Architecture
View Suggested Changes
@@ -80,7 +80,7 @@
 - `backfill.ts`: Syncs repos, issues, and PRs from GitHub's REST API
 - `webhook.ts`: Handles incoming GitHub webhook events
 - `app.ts`: Manages GitHub App installation and token generation
-- `commands.ts`: Parses @gittensory mention commands (help, preflight, blockers, duplicate-check, miner-context, next-action, reviewability, repo-fit, packet, queue-summary, review-now, needs-author, confirmed-miners, duplicate-clusters). The last five commands are maintainer-only queue digest commands that build from cached GitHub metadata rather than agent runs [[25]](https://github.com/JSONbored/gittensory/pull/190)
+- `commands.ts`: Parses @gittensory mention commands (help, ask, preflight, blockers, duplicate-check, miner-context, next-action, reviewability, repo-fit, packet, queue-summary, review-now, needs-author, confirmed-miners, duplicate-clusters). The last five commands are maintainer-only queue digest commands that build from cached GitHub metadata rather than agent runs [[25]](https://github.com/JSONbored/gittensory/pull/190)
 - `comments.ts`: Posts public-safe intelligence comments to PRs/issues
 - `labels.ts`: Applies Gittensor labels based on repository settings
 - `public.ts`: Fetches public GitHub user profiles

✅ Accepted

How did I do? Any feedback?  Join Discord

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claytonlin1110 the @gittensory ask command is a good product direction, and the public-surface sanitizer coverage is the right constraint.

A few notes:

  • Parsing the question text and threading it into the command objective is useful.
  • The command is still behaviorally weaker than the PR title/body promise.
  • The current output mostly repackages agent actions and generic source notes; it does not provide concrete cited source references.
  • The refresh path for ask currently renders Next-action snapshot refresh, which is the wrong command framing.

Required changes:

  • Make ask output concrete contribution-context source references, or narrow the PR/body copy so it does not claim cited output.
  • Fix the refresh path so @gittensory ask uses ask/contribution-context refresh wording.
  • Add tests that assert source/freshness details are present for successful ask output and that refresh output uses the ask label.

Validation expected:

  • Re-run validate, with focused coverage for parser, command rendering, authorization, and public-output sanitizer paths.

@claytonlin1110

Copy link
Copy Markdown
Contributor Author

@JSONbored updated. please review

@dosubot dosubot Bot added size:XL and removed size:M labels Jun 2, 2026
@claytonlin1110
claytonlin1110 force-pushed the feat/github-agent-ask-command-cited-qa branch from 80c7f1e to ff6be88 Compare June 2, 2026 10:41
@dosubot dosubot Bot added size:M and removed size:XL labels Jun 2, 2026
@claytonlin1110
claytonlin1110 force-pushed the feat/github-agent-ask-command-cited-qa branch from e804f97 to be11852 Compare June 2, 2026 10:44
@claytonlin1110
claytonlin1110 requested a review from JSONbored June 2, 2026 10:46

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claytonlin1110 this is closer, but the ask command still needs stronger cited-source behavior.

Required changes:

  • Ensure answers include concrete cited source references, not just generic snapshot language.
  • Complete the validation matrix or explain any skipped checks.
  • Keep public output sanitized and low-noise.

Validation expected:

  • npm run test:ci
  • Targeted GitHub command/output tests for cited ask responses

@dosubot dosubot Bot added size:L and removed size:M labels Jun 2, 2026
@claytonlin1110
claytonlin1110 requested a review from JSONbored June 2, 2026 17:10
@claytonlin1110
claytonlin1110 force-pushed the feat/github-agent-ask-command-cited-qa branch from e5ed417 to 662d6d2 Compare June 2, 2026 17:17
@claytonlin1110

Copy link
Copy Markdown
Contributor Author

@claytonlin1110 the @gittensory ask command is a good product direction, and the public-surface sanitizer coverage is the right constraint.

A few notes:

  • Parsing the question text and threading it into the command objective is useful.
  • The command is still behaviorally weaker than the PR title/body promise.
  • The current output mostly repackages agent actions and generic source notes; it does not provide concrete cited source references.
  • The refresh path for ask currently renders Next-action snapshot refresh, which is the wrong command framing.

Required changes:

  • Make ask output concrete contribution-context source references, or narrow the PR/body copy so it does not claim cited output.
  • Fix the refresh path so @gittensory ask uses ask/contribution-context refresh wording.
  • Add tests that assert source/freshness details are present for successful ask output and that refresh output uses the ask label.

Validation expected:

  • Re-run validate, with focused coverage for parser, command rendering, authorization, and public-output sanitizer paths.

@JSONbored Updated

@superagent-security superagent-security Bot added the pr:flagged PR flagged for review by security analysis. label Jun 3, 2026

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claytonlin1110 this still needs stronger cited-source behavior.

A few notes:

  • Adding @gittensory ask is the right product direction.
  • The parser and sanitizer coverage are useful.
  • The title/body promise is still stronger than the current output unless concrete source references are included.

Required changes:

  • Make successful ask responses include concrete cited source/freshness references.
  • Fix any refresh wording so it reads as ask/contribution-context behavior, not generic next-action refresh.
  • Complete the validation matrix or explain skipped checks precisely.

Validation expected:

  • Full npm run test:ci
  • Focused GitHub command rendering tests for cited ask output

@superagent-security superagent-security Bot removed the pr:flagged PR flagged for review by security analysis. label Jun 3, 2026
@claytonlin1110
claytonlin1110 force-pushed the feat/github-agent-ask-command-cited-qa branch from 3410973 to adb107e Compare June 4, 2026 19:47
@claytonlin1110

Copy link
Copy Markdown
Contributor Author

@claytonlin1110 this still needs stronger cited-source behavior.

A few notes:

  • Adding @gittensory ask is the right product direction.
  • The parser and sanitizer coverage are useful.
  • The title/body promise is still stronger than the current output unless concrete source references are included.

Required changes:

  • Make successful ask responses include concrete cited source/freshness references.
  • Fix any refresh wording so it reads as ask/contribution-context behavior, not generic next-action refresh.
  • Complete the validation matrix or explain skipped checks precisely.

Validation expected:

  • Full npm run test:ci
  • Focused GitHub command rendering tests for cited ask output

Fixed

@claytonlin1110
claytonlin1110 requested a review from JSONbored June 4, 2026 19:48

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving for merge.

@dosubot dosubot Bot added the lgtm label Jun 5, 2026
@JSONbored
JSONbored merged commit f967ac1 into JSONbored:main Jun 5, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 5, 2026
@JSONbored JSONbored added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed feature gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

feat(github-agent): add repo and docs context Q&A from connected sources

2 participants