From e7ebc600aaecd5d84568ac5d7acedd20dc0683ae Mon Sep 17 00:00:00 2001 From: Lum1104 Date: Sat, 28 Mar 2026 18:56:14 +0800 Subject: [PATCH] feat(agents): add language context snippets for 11 non-code file types Add language context snippets for markdown, yaml, json, sql, dockerfile, terraform, graphql, protobuf, shell, html, and css. Each snippet follows the existing typescript.md/python.md pattern with Key Concepts, Notable File Patterns, Edge Patterns, and Summary Style sections. These snippets are injected into the architecture analyzer prompt to improve layer assignments for non-code files. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../skills/understand/languages/css.md | 37 ++++++++++++++++++ .../skills/understand/languages/dockerfile.md | 34 +++++++++++++++++ .../skills/understand/languages/graphql.md | 35 +++++++++++++++++ .../skills/understand/languages/html.md | 34 +++++++++++++++++ .../skills/understand/languages/json.md | 34 +++++++++++++++++ .../skills/understand/languages/markdown.md | 34 +++++++++++++++++ .../skills/understand/languages/protobuf.md | 34 +++++++++++++++++ .../skills/understand/languages/shell.md | 36 ++++++++++++++++++ .../skills/understand/languages/sql.md | 36 ++++++++++++++++++ .../skills/understand/languages/terraform.md | 38 +++++++++++++++++++ .../skills/understand/languages/yaml.md | 35 +++++++++++++++++ 11 files changed, 387 insertions(+) create mode 100644 understand-anything-plugin/skills/understand/languages/css.md create mode 100644 understand-anything-plugin/skills/understand/languages/dockerfile.md create mode 100644 understand-anything-plugin/skills/understand/languages/graphql.md create mode 100644 understand-anything-plugin/skills/understand/languages/html.md create mode 100644 understand-anything-plugin/skills/understand/languages/json.md create mode 100644 understand-anything-plugin/skills/understand/languages/markdown.md create mode 100644 understand-anything-plugin/skills/understand/languages/protobuf.md create mode 100644 understand-anything-plugin/skills/understand/languages/shell.md create mode 100644 understand-anything-plugin/skills/understand/languages/sql.md create mode 100644 understand-anything-plugin/skills/understand/languages/terraform.md create mode 100644 understand-anything-plugin/skills/understand/languages/yaml.md diff --git a/understand-anything-plugin/skills/understand/languages/css.md b/understand-anything-plugin/skills/understand/languages/css.md new file mode 100644 index 0000000..5b10d5d --- /dev/null +++ b/understand-anything-plugin/skills/understand/languages/css.md @@ -0,0 +1,37 @@ +# CSS Language Prompt Snippet + +## Key Concepts + +- **Selectors**: Element, class (`.name`), ID (`#name`), attribute (`[attr]`), and pseudo-class (`:hover`) targeting +- **Specificity**: Inline > ID > Class > Element cascade priority determining which rules win +- **Box Model**: `margin`, `border`, `padding`, `content` dimensions controlling element sizing +- **Flexbox**: `display: flex` with `justify-content`, `align-items` for one-dimensional layouts +- **Grid**: `display: grid` with `grid-template-columns/rows` for two-dimensional layouts +- **Custom Properties (Variables)**: `--name: value` with `var(--name)` for reusable design tokens +- **Media Queries**: `@media (max-width: ...)` for responsive design breakpoints +- **SCSS/Sass Features**: Nesting, `$variables`, `@mixin`, `@include`, `@extend`, `@use`, `@forward` +- **CSS Modules**: Scoped class names (`.module.css`) preventing global style collisions +- **Cascade Layers**: `@layer` for explicit control over cascade ordering + +## Notable File Patterns + +- `*.css` — Standard CSS stylesheets +- `*.scss` / `*.sass` — Sass/SCSS preprocessor files +- `*.less` — Less preprocessor files +- `*.module.css` / `*.module.scss` — CSS Modules (scoped styles) +- `globals.css` / `reset.css` / `normalize.css` — Global base styles +- `tailwind.config.js` — Tailwind CSS configuration (though a JS file) +- `variables.scss` / `_variables.scss` — Design token definitions + +## Edge Patterns + +- CSS files `configures` the visual appearance of HTML or component files that import them +- SCSS partial files (`_*.scss`) are `depends_on` by the main stylesheet that `@use`s them +- CSS variable definition files `configures` all stylesheets that reference those variables +- CSS Modules are `related` to the component files that import them + +## Summary Style + +> "Global stylesheet defining CSS custom properties for the design system color palette and typography." +> "Responsive layout styles with flexbox and grid for the dashboard page across 3 breakpoints." +> "SCSS partial defining shared mixins for spacing, shadows, and media query breakpoints." diff --git a/understand-anything-plugin/skills/understand/languages/dockerfile.md b/understand-anything-plugin/skills/understand/languages/dockerfile.md new file mode 100644 index 0000000..1bca3a9 --- /dev/null +++ b/understand-anything-plugin/skills/understand/languages/dockerfile.md @@ -0,0 +1,34 @@ +# Dockerfile Language Prompt Snippet + +## Key Concepts + +- **Multi-Stage Builds**: Multiple `FROM` statements to separate build and runtime stages, reducing image size +- **Layer Caching**: Each instruction creates a layer; order instructions from least to most frequently changing for cache efficiency +- **Base Images**: `FROM image:tag` selects the starting image; prefer slim/alpine variants for smaller images +- **COPY vs ADD**: `COPY` for local files (preferred), `ADD` for URLs and tar extraction +- **Build Arguments**: `ARG` for build-time variables, `ENV` for runtime environment variables +- **Health Checks**: `HEALTHCHECK` instruction for container orchestrator readiness probes +- **Entry Point vs CMD**: `ENTRYPOINT` sets the executable, `CMD` provides default arguments +- **User Permissions**: `USER` instruction to run as non-root for security +- **Ignore Patterns**: `.dockerignore` excludes files from the build context (like `.gitignore`) + +## Notable File Patterns + +- `Dockerfile` — Primary container image definition (at project root) +- `Dockerfile.dev` / `Dockerfile.prod` — Environment-specific Dockerfiles +- `docker-compose.yml` — Multi-container application orchestration +- `docker-compose.override.yml` — Local development overrides +- `.dockerignore` — Build context exclusion patterns + +## Edge Patterns + +- Dockerfile `deploys` the application entry point it packages (COPY/CMD target) +- docker-compose `depends_on` Dockerfile(s) it references for building +- Dockerfile `depends_on` package manifests (package.json, requirements.txt) it copies for dependency installation +- docker-compose services create `related` edges between co-deployed components + +## Summary Style + +> "Multi-stage Docker build producing a minimal Node.js production image with N build stages." +> "Docker Compose configuration orchestrating N services with shared networking and persistent volumes." +> "Development Dockerfile with hot-reload support and mounted source volumes." diff --git a/understand-anything-plugin/skills/understand/languages/graphql.md b/understand-anything-plugin/skills/understand/languages/graphql.md new file mode 100644 index 0000000..c32631c --- /dev/null +++ b/understand-anything-plugin/skills/understand/languages/graphql.md @@ -0,0 +1,35 @@ +# GraphQL Language Prompt Snippet + +## Key Concepts + +- **Type System**: Strongly typed schema defining the API contract with scalar, object, enum, and union types +- **Queries**: Read operations fetching data with field-level selection (no over-fetching) +- **Mutations**: Write operations for creating, updating, and deleting data +- **Subscriptions**: Real-time data push over WebSocket connections +- **Resolvers**: Functions mapping schema fields to data sources (database, API, cache) +- **Fragments**: Reusable field selections reducing query duplication across operations +- **Directives**: `@deprecated`, `@include`, `@skip` for conditional field inclusion and schema metadata +- **Input Types**: `input` keyword for complex mutation arguments +- **Interfaces and Unions**: Polymorphic types for shared fields across multiple object types +- **Schema Stitching / Federation**: Composing multiple GraphQL services into a unified graph + +## Notable File Patterns + +- `schema.graphql` / `*.graphql` — Schema definition files +- `*.gql` — Alternative extension for GraphQL files +- `schema/*.graphql` — Split schema files by domain (users.graphql, orders.graphql) +- `*.resolvers.ts` / `*.resolvers.js` — Resolver implementations (TypeScript/JavaScript convention) +- `codegen.yml` — GraphQL Code Generator configuration + +## Edge Patterns + +- GraphQL schema files `defines_schema` for the resolver code that implements query/mutation handlers +- Type definitions create `related` edges between types connected by field references +- Schema files `defines_schema` for client-side query/mutation files that consume the API +- Codegen config `configures` the schema-to-code generation pipeline + +## Summary Style + +> "GraphQL schema defining N types, M queries, and K mutations for the user management API." +> "API schema with type definitions for products, orders, and payment processing with pagination." +> "Subscription schema enabling real-time notifications for order status updates." diff --git a/understand-anything-plugin/skills/understand/languages/html.md b/understand-anything-plugin/skills/understand/languages/html.md new file mode 100644 index 0000000..c87ff39 --- /dev/null +++ b/understand-anything-plugin/skills/understand/languages/html.md @@ -0,0 +1,34 @@ +# HTML Language Prompt Snippet + +## Key Concepts + +- **Semantic Elements**: `
`, `