mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
Fix all issues from the 5-agent parallel code review of universal file type support: - Parser error handling: add console.warn in JSON/YAML catch blocks, warn on unbalanced braces in Protobuf/Terraform parsers - Parser correctness: filter .PHONY special targets in Makefile parser, handle opening brace on next line in Shell parser, fix per-stage EXPOSE port assignment in Dockerfile parser - Graph builder: use nodeType-based ID prefix instead of hardcoded "file:", warn on unknown definition kinds, detect duplicate node IDs - Type safety: export NodeType alias, add ServiceInfo.lineRange, type dashboard color maps as Record<NodeType,...>, refactor getDirectionalLabel to Record<EdgeType,...>, consolidate NodeCategory - Schema: add StrictLanguageConfigSchema with extensions/filenames refinement, fix Infrastructure/Schema-Data category comments - Agent prompts: fix Jenkinsfile language ID (groovy → jenkinsfile), fix css.md edge type (configures → related), remove shell.md Makefile cross-reference - Tests: 20+ new edge case tests across parsers, graph builder, language registry, and plugin registry - Documentation: add JSDoc to all 12 parser classes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Shell Language Prompt Snippet
Key Concepts
- Shebang Line:
#!/bin/bashor#!/usr/bin/env bashspecifying the interpreter - Variables:
VAR=valueassignment,$VARor${VAR}expansion, no spaces around= - Functions:
function name()orname()for reusable command groups - Conditionals:
if [[ condition ]]; then ... fiwith[[ ]]for extended tests - Loops:
for item in list,while condition,until conditioniteration patterns - Pipes and Redirection:
|for chaining commands,>/>>/2>&1for output redirection - Exit Codes:
$?captures last command status;set -eexits on any failure - Strict Mode:
set -euo pipefailfor robust error handling (exit on error, undefined vars, pipe failures) - Command Substitution:
$(command)captures command output as a string - Here Documents:
<<EOF ... EOFfor multi-line string input to commands
Notable File Patterns
*.sh/*.bash— Shell script filesscripts/*.sh— Project automation scripts (build, deploy, setup)entrypoint.sh— Docker container entry point scriptinstall.sh/setup.sh— Environment setup scripts.bashrc/.bash_profile/.zshrc— Shell configuration files
Edge Patterns
- Shell scripts
triggersother scripts or build processes they invoke - Entry point scripts
deploysthe application they start - Setup scripts
configuresthe development environment - Build scripts
depends_onthe source files they compile or package
Summary Style
"Build automation script compiling TypeScript, running tests, and packaging the release artifact." "Docker entry point script handling signal forwarding and graceful shutdown." "Environment setup script installing dependencies and configuring development tools."