feat: add explicit POSIX shell, Bash, Zsh and Fish indexing contracts

未关闭
#240 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
bash, fish, go, shell, zsh
领域
devtools

调研方向

Start by qualifying the candidate grammars named in the issue (tree-sitter/tree-sitter-bash, georgeharker/tree-sitter-zsh, ram02z/tree-sitter-fish) for license, Go/C integration and supported build targets, and record any upstream gap. The work begins with the OpenSpec change shell-language-support, which the issue asks to create before implementation. Done means each dialect (POSIX, Bash, Zsh, Fish) is either registered with passing semantic accuracy evaluation or kept unsupported with the specific gap reported.

由索引模型根据 Issue 内容生成。

描述

area:indexer feature priority:low spec-needed
What problem does this solve?

The language registry has no shell dialect. Scripts, extensionless executables, shell startup files, function declarations, variable bindings, and sourced-file dependencies remain outside the graph. Treating all shells as Bash would hide dialect-specific omissions.

What should it do?

Create the OpenSpec change shell-language-support for separate POSIX shell, Bash, Zsh, and Fish support. Discover files through recognized extensions, interpreter declarations, and known startup-file names. Resolve conflicts deterministically and disclose unsupported or ambiguous inputs.

Extract functions, statically named variable bindings and reads, literal sourced-file dependencies, and statically resolvable function calls. Distinguish built-ins and external commands from repository functions. Do not execute scripts or expand variables by running a shell. Dynamic command names and source paths remain explicit limitations.

Use the existing parser and extractor seams. Qualify maintained upstream grammar candidates for the required dialect constructs, license, Go/C integration, and supported build targets before registering support. Bash parsing alone is not evidence of Zsh or Fish support. If a candidate fails, report the specific upstream gap and keep that dialect unsupported until the gap is resolved.

Use the semantic accuracy evaluation for each dialect independently, including fresh indexing, sync, public queries, extensionless files, and startup files. Preserve the one-binary distribution model.

Which surface does this affect?

CLI; MCP (agent-facing tools); Indexing / extraction; Query / ranking; Sync / watcher / git hooks

Is this covered by an existing command or tool today?

No shell dialect is registered. The existing language capability matrix lists fourteen other languages. This is separate from PR #237 and from the core-language symbol-completeness change.

What have you tried instead?

Manual source searches. Candidate grammar repositories include tree-sitter/tree-sitter-bash, georgeharker/tree-sitter-zsh, and ram02z/tree-sitter-fish. Candidate existence does not establish integration or accuracy.

Embedded shell in YAML, Makefiles or strings, executing user scripts, runtime environment reconstruction, plugin/autoload execution, dynamic eval resolution, and general command-line semantic analysis are out of scope.

Before submitting
  • I searched existing issues and this is not a duplicate
  • I understand this is pre-1.0 and the surface may change before this lands

Generated with Codex.

主要语言
Go
星标
0
派生
0
平均合并
7 小时 42 分钟
30 天内合并 PR
111

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

seanb4t/codegraph-go 的其他 Issue

查看 seanb4t/codegraph-go 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。