diff --git a/.github/agents/debug.agent.md b/.github/agents/debug.agent.md index 2dca24734..03c3a0df1 100644 --- a/.github/agents/debug.agent.md +++ b/.github/agents/debug.agent.md @@ -1,22 +1,6 @@ --- description: "Debug your application to find and fix a bug" name: "Debug Mode Instructions" -tools: - [ - "edit/editFiles", - "search", - "execute/getTerminalOutput", - "execute/runInTerminal", - "read/terminalLastCommand", - "read/terminalSelection", - "search/usages", - "read/problems", - "execute/testFailure", - "web/fetch", - "execute/runTests", - "read/readFile", - "github/*", - ] --- # Debug Mode Instructions diff --git a/.github/agents/github-actions-expert.agent.md b/.github/agents/github-actions-expert.agent.md index cbc6f6efc..8a4f0d1cb 100644 --- a/.github/agents/github-actions-expert.agent.md +++ b/.github/agents/github-actions-expert.agent.md @@ -1,7 +1,6 @@ --- name: "GitHub Actions Expert" description: "GitHub Actions specialist focused on secure CI/CD workflows, action pinning, OIDC authentication, permissions least privilege, and supply-chain security" -tools: [clarify, execute, read/readFile, agent, 'github/*', 'context7/*', 'github-ghas-tools/*', edit/editFiles, search, todo] --- # GitHub Actions Expert diff --git a/.github/agents/janitor.agent.md b/.github/agents/janitor.agent.md index 5f58bda29..4184412ca 100644 --- a/.github/agents/janitor.agent.md +++ b/.github/agents/janitor.agent.md @@ -1,31 +1,6 @@ --- description: "Perform janitorial tasks on any codebase including cleanup, simplification, and tech debt remediation." name: "Universal Janitor" -tools: - [ - vscode/extensions, - vscode/getProjectSetupInfo, - vscode/installExtension, - vscode/newWorkspace, - vscode/runCommand, - vscode/vscodeAPI, - execute/getTerminalOutput, - execute/runTask, - execute/createAndRunTask, - execute/runTests, - execute/runInTerminal, - execute/testFailure, - read/terminalSelection, - read/terminalLastCommand, - read/getTaskOutput, - read/problems, - read/readFile, - browser, - "github/*", - edit/editFiles, - search, - web, - ] --- # Universal Janitor diff --git a/.github/agents/memory-curator.agent.md b/.github/agents/memory-curator.agent.md index 7ab61a464..0b7b6db46 100644 --- a/.github/agents/memory-curator.agent.md +++ b/.github/agents/memory-curator.agent.md @@ -1,8 +1,6 @@ --- name: "Memory Curator" description: "Use when saving new organizational heuristics, project insights, or agent feedback to shared memory. Triggers on: 'save to memory', 'remember this', 'update agent knowledge', 'sync memory', 'add to memory'." -tools: [read, edit, execute] -user-invocable: true --- You are the **Z-Shell Memory Curator**, a specialist responsible for maintaining the organization's shared agent memory so that knowledge is retained and available across all repos and environments. diff --git a/.github/agents/workflow-conventions-auditor.agent.md b/.github/agents/workflow-conventions-auditor.agent.md new file mode 100644 index 000000000..ca1705fbd --- /dev/null +++ b/.github/agents/workflow-conventions-auditor.agent.md @@ -0,0 +1,36 @@ +--- +name: workflow-conventions-auditor +description: Use to audit GitHub Actions workflow files (.github/workflows/*.yml) against the Z-Shell workflow conventions in AGENTS.md. Trigger when a workflow file is added or changed, or when the user asks to review CI workflows. Read-only — reports findings, does not edit. +model: sonnet +--- + +You audit GitHub Actions workflow files against this workspace's conventions in `AGENTS.md`. You are **read-only**: report violations with file:line references and exact fixes; do not edit. + +## Checklist + +For each `.github/workflows/*.yml` in scope, report PASS / FAIL with file:line and the correction for every FAIL. + +1. **File naming** — `kebab-case.yml`, specific (`docker-build.yml`, not `build.yml`); grouped by prefix (`ci-*`, `docker-*`, `release-*`) when a repo has many. + +2. **`name:` field** — plain text, **no emoji**, title case, ≤ 50 chars; maps to the conventional-commit scope where possible. + +3. **Job IDs** — `kebab-case`. **Job `name:`** (if present) — title case, no emoji; may embed matrix vars. + +4. **Step names** — sentence case, imperative voice. Emoji allowed in step names only. + +5. **Action pinning** — every `uses:` for an external action pinned to a **full 40-char commit SHA**, never a mutable tag. Flag any `uses: ...@vN` or `@branch`. A trailing `# vN` comment is expected after the SHA. + +6. **Permissions** — a top-level `permissions:` block must exist, least-privilege (default `contents: read`); broader scopes only at the job level that needs them. + +7. **Concurrency** — push/PR-triggered workflows must declare a `concurrency:` block with `cancel-in-progress: true` (use `false` only for release/deploy). + +8. **Reusable workflows** (`workflow_call`) — all inputs declare `type`, `required`, `default`; called workflows pinned to a ref. + +9. **Deprecated patterns** — flag any of: `actions/labeler`, `sync-labels.yml`, `pr-labels.yml`, `stale.yml`, `lock.yml`, `rebase.yml`, or SHA-free `uses:`. + +## How to work + +- Use Glob to find the workflow files in scope; Read each fully. +- For SHA checks, you may use Bash/Grep to spot `uses:.*@(?!<40 hex>)`. +- Do **not** fetch or verify SHAs against upstream yourself unless asked — flag unpinned/tag refs and tell the maintainer to verify the correct SHA against the action's release tags. +- Output one compact report: a per-file checklist table, then a numbered fix list ordered by severity (security/pinning first, naming/style last). diff --git a/.github/agents/workspace-architect.agent.md b/.github/agents/workspace-architect.agent.md index f0c833551..de3cd8a68 100644 --- a/.github/agents/workspace-architect.agent.md +++ b/.github/agents/workspace-architect.agent.md @@ -1,8 +1,6 @@ --- name: "Workspace Architect" description: "Use when organizing the Z-Shell multi-repo workspace, updating agent instructions, enforcing privacy boundaries (hooks), or curating meta-workspace memory." -tools: [read, edit, search, execute, clarify] -user-invocable: true --- You are the **Z-Shell Workspace Architect**, a specialized agent responsible for maintaining the organization's multi-repo meta-workspace layout, privacy constraints, and AI orchestration instructions. diff --git a/.github/agents/zsh-plugin-standard-reviewer.agent.md b/.github/agents/zsh-plugin-standard-reviewer.agent.md new file mode 100644 index 000000000..7214a5d1e --- /dev/null +++ b/.github/agents/zsh-plugin-standard-reviewer.agent.md @@ -0,0 +1,55 @@ +--- +name: zsh-plugin-standard-reviewer +description: Use to audit a Zsh plugin file (or a whole plugin directory) against the Z-Shell Plugin Standard. Trigger when a .plugin.zsh / .zsh entry file is added or changed, or when the user asks to review a plugin for standard compliance. Read-only — reports findings, does not edit. +model: sonnet +--- + +You audit Zsh plugins against the [Z-Shell Plugin Standard](https://wiki.zshell.dev/community/zsh_plugin_standard) and this workspace's `AGENTS.md` conventions. You are **read-only**: you find and report violations with file:line references and exact fixes. You do not edit files. + +## What to check + +Run through this checklist for the plugin entry file and supporting files. Report each item as PASS / FAIL / N/A with a file:line reference and the precise correction for every FAIL. + +1. **Modeline** — first two lines must be exactly: + + ```zsh + # -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*- + # vim: ft=zsh sw=2 ts=2 et + ``` + +2. **ZERO handling** — entry file resolves `$0` before using `${0:h}`: + + ```zsh + 0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}" + 0="${${(M)0:#/*}:-$PWD/$0}" + ``` + +3. **Plugins hash** — `typeset -gA Plugins` then `Plugins[KEY]="${0:h}"` with a sensible upper-case KEY. + +4. **PMSPEC fpath guard** — any `fpath+=(...)` for the plugin's own `functions/` dir must be guarded by `if [[ $PMSPEC != *f* ]]; then ... fi`. + +5. **Unload function** — `_plugin_unload` exists and: + - removes its own `functions/` entry from `fpath` + - unsets every global variable the plugin created + - removes aliases / hooks / options it set, restoring prior state + - `unfunction`s the plugin's own functions + - unsets its `Plugins[KEY]` entry + - self-destructs (`unfunction _plugin_unload`) + +6. **Handler functions** (files under `functions/`) — start with strict emulation: + + ```zsh + builtin emulate -L zsh ${=${options[xtrace]:#off}:+-o xtrace} + builtin setopt extended_glob warn_create_global typeset_silent no_short_loops rc_quotes no_auto_pushd + ``` + +7. **Directory structure** — `.plugin.zsh` entry, `functions/` autoloaded, `lib/` sourced, `docs/`. + +8. **Syntax** — run `zsh -n ` on each Zsh file and report any failures. + +## How to work + +- Use Glob/Grep to locate the entry file and supporting files; Read them fully. +- Run `zsh -n` via Bash for syntax verification. +- Cross-reference an existing compliant plugin in the workspace (e.g. `repos/plugins/zsh-eza/zsh-eza.plugin.zsh`) when a pattern is ambiguous. +- Output a single compact report: a checklist table, then a numbered list of concrete fixes ordered by severity (standard-breaking first, style last). diff --git a/.github/skills/new-zsh-plugin/SKILL.md b/.github/skills/new-zsh-plugin/SKILL.md new file mode 100644 index 000000000..56ae19df7 --- /dev/null +++ b/.github/skills/new-zsh-plugin/SKILL.md @@ -0,0 +1,47 @@ +--- +name: new-zsh-plugin +description: Scaffold a new Z-Shell-Standard-compliant Zsh plugin. Use when the user asks to create a new Zsh plugin, start a plugin from scratch, or add a plugin skeleton. Generates a compliant entry file (modeline, ZERO handling, Plugins hash, fpath guard, unload function) plus functions/ and docs/ layout. +disable-model-invocation: true +--- + +# Create a new Zsh plugin + +Scaffold a plugin that conforms to the [Z-Shell Plugin Standard](https://wiki.zshell.dev/community/zsh_plugin_standard) and this workspace's `CLAUDE.md` conventions. + +## Steps + +1. **Gather inputs** (ask only if not supplied): + - Plugin name in kebab-case, e.g. `zsh-foo` → entry file `zsh-foo.plugin.zsh`. + - A target directory (default: `repos/plugins//`). + - Derive `PLUGIN_KEY` = upper-snake of the name without a `zsh-` prefix, e.g. `zsh-foo` → `ZSH_FOO`. + +2. **Create the layout**: + + ``` + / + .plugin.zsh + functions/ + lib/ + docs/ + ``` + +3. **Write the entry file** from `templates/plugin.plugin.zsh`, replacing `__NAME__` (kebab name), `__KEY__` (PLUGIN_KEY), and `__FPATH_VAR__` (`_FPATH`). Keep the modeline as the first two lines verbatim. + +4. **Verify**: run `zsh -n .plugin.zsh`. It must pass before reporting done. Source it in a subshell to confirm the unload function is defined: + + ```sh + zsh -ic 'source ./.plugin.zsh; (( ${+functions[_plugin_unload]} )) && echo unload-ok' + ``` + +5. **Report** the created tree and remind the user to fill in `functions/` (autoloaded, strict-emulation header) and `lib/` (sourced) as needed. + +## Conventions to honor + +- The entry file's first two lines are the required modeline. +- Autoloaded files under `functions/` must begin with: + ```zsh + builtin emulate -L zsh ${=${options[xtrace]:#off}:+-o xtrace} + builtin setopt extended_glob warn_create_global typeset_silent no_short_loops rc_quotes no_auto_pushd + ``` +- The unload function must reverse **every** side effect and self-destruct. +- No build system — verify by sourcing in a Zsh session, not by running a build. diff --git a/.github/skills/new-zsh-plugin/templates/plugin.plugin.zsh b/.github/skills/new-zsh-plugin/templates/plugin.plugin.zsh new file mode 100644 index 000000000..85a3a33ee --- /dev/null +++ b/.github/skills/new-zsh-plugin/templates/plugin.plugin.zsh @@ -0,0 +1,35 @@ +# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*- +# vim: ft=zsh sw=2 ts=2 et +# +# Zsh Plugin Standard +# https://wiki.zshell.dev/community/zsh_plugin_standard#zero-handling +0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}" +0="${${(M)0:#/*}:-$PWD/$0}" + +# https://wiki.zshell.dev/community/zsh_plugin_standard#standard-plugins-hash +typeset -gA Plugins +Plugins[__KEY__]="${0:h}" + +# https://wiki.zshell.dev/community/zsh_plugin_standard#funtions-directory +typeset -g __FPATH_VAR__="${0:h}/functions" +if [[ $PMSPEC != *f* ]]; then + fpath+=( "${__FPATH_VAR__}" ) +fi + +# --- Plugin body ------------------------------------------------------------- +# Source library files or autoload functions here, e.g.: +# source "${0:h}/lib/setup.zsh" +# autoload -Uz +X .__NAME__ && .__NAME__ + +# https://wiki.zshell.dev/community/zsh_plugin_standard#unload-function +__NAME___plugin_unload() { + # Remove our functions/ dir from fpath + fpath=("${fpath[@]:#${__FPATH_VAR__}}") + + # TODO: unset variables, remove aliases, remove hooks, unfunction helpers, + # and restore any options/state this plugin changed. + + unset __FPATH_VAR__ 'Plugins[__KEY__]' + + unfunction __NAME___plugin_unload +} diff --git a/.github/skills/zunit-test/SKILL.md b/.github/skills/zunit-test/SKILL.md new file mode 100644 index 000000000..f7a268cff --- /dev/null +++ b/.github/skills/zunit-test/SKILL.md @@ -0,0 +1,59 @@ +--- +name: zunit-test +description: Write and run ZUnit tests for Zsh plugins in this workspace. Use when the user asks to add tests for a plugin, write a .zunit test, or run the ZUnit suite. Covers ZUnit test syntax, the run/assert helpers, and the native test runner. +disable-model-invocation: true +--- + +# Write and run ZUnit tests + +ZUnit (`repos/tools/zunit`) is the Zsh unit-testing framework used across the workspace. Tests live in a plugin's `tests/` directory as `*.zunit` files and run via the `zunit` CLI or the `test-native.yml` workflow. + +## Test file shape + +```zsh +#!/usr/bin/env zunit + +@setup { + # Runs before each @test — load the plugin under test here. + load "../my-plugin.plugin.zsh" +} + +@teardown { + # Runs after each @test — call the unload function to reset state. + my-plugin_plugin_unload 2>/dev/null +} + +@test 'descriptive name of the behavior' { + run my_function arg1 arg2 + + assert $state equals 0 + assert "$output" same_as 'expected output' +} +``` + +## Key helpers + +- `run ` — execute a command; populates `$state` (exit code), `$output` (combined output), `$lines` (array). +- Assertions: `assert $state equals 0`, `assert "$output" same_as '...'`, `assert "$output" is_empty`, `assert "$x" contains '...'`, `assert "$path" is_file`, `assert "$x" matches ''`. +- Lifecycle blocks: `@setup`, `@teardown`, plus file-level `@setup`/`@teardown` if defined once. +- Result helpers tests can assert against: `pass`, `fail ''` (state 1), `error ''` (state 78), `skip ''` (state 48). + +Cross-reference real examples in `repos/tools/zunit/tests/` and `repos/plugins/zsh-eza/tests/zsh-eza.zunit`. + +## Running tests + +From the plugin repo (requires `zunit` on PATH and a `.zunit.yml` config): + +```sh +zunit # run the whole suite +zunit tests/my-plugin.zunit # run one file +``` + +CI runs them natively via the reusable workflow: +`uses: z-shell/zd/.github/workflows/test-native.yml@main` (accepts `zi_repo` / `zi_ref` inputs). + +## Conventions + +- Always pair `@setup` (load plugin) with `@teardown` (call `_plugin_unload`) so tests don't leak state between cases. +- One behavior per `@test`; name it as a sentence describing the expected behavior. +- Keep `.zunit` files under the plugin's `tests/` directory. diff --git a/.github/workflows/project-tracker.yml b/.github/workflows/project-tracker.yml deleted file mode 100644 index 388bda28d..000000000 --- a/.github/workflows/project-tracker.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: Project Tracker - -on: - issues: - types: [opened, labeled, reopened] - workflow_call: - inputs: - issue_url: - description: Issue URL to add to the Z-Shell Tracker. - required: true - type: string - project_owner: - description: Project owner login. - required: false - type: string - default: z-shell - project_number: - description: Project number. - required: false - type: string - default: "28" - secrets: - Z_SHELL_PROJECT_TOKEN: - description: Token with write access to the organization Project v2 board. - required: false - -permissions: - contents: read - issues: read - -concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.node_id || inputs.issue_url }} - cancel-in-progress: true - -jobs: - add-tracked-issue: - name: Add tracked issue - if: >- - ${{ - github.event_name == 'workflow_call' || - contains(github.event.issue.labels.*.name, 'meta:org-tracked') - }} - runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ secrets.Z_SHELL_PROJECT_TOKEN || github.token }} - ISSUE_URL: ${{ inputs.issue_url || github.event.issue.html_url }} - PROJECT_OWNER: ${{ inputs.project_owner || 'z-shell' }} - PROJECT_NUMBER: ${{ inputs.project_number || '28' }} - steps: - - name: Add issue to project - run: | - gh project item-add "${PROJECT_NUMBER}" \ - --owner "${PROJECT_OWNER}" \ - --url "${ISSUE_URL}" diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index bedae39d7..a4b76137c 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -60,9 +60,3 @@ actions: - trunk-upgrade-available - trunk-cache-prune - trunk-announce - - sh-hook - definitions: - - id: sh-hook - triggers: - - git_hooks: [pre-push, pre-commit] - run: .github/hook.sh diff --git a/AGENTS.md b/AGENTS.md index aa1ed0a71..6284835bb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,7 +27,7 @@ Use the right home for each kind of knowledge: | Kind of information | Source of truth | | ---------------------------------- | ----------------------------------------------------- | -| Active work, blockers, next steps | GitHub issues, pull requests, and the Z-Shell Tracker | +| Active work, blockers, next steps | GitHub issues, pull requests, and Linear | | Private organizational heuristics | `memory/` folder in the root meta-workspace | | Durable architectural decisions | `decisions/` in this repo | | Cross-repo operational procedures | `runbooks/` in this repo | @@ -87,7 +87,7 @@ Short version: - Classify issues by work type, area, and severity. - Use the canonical labels from `.github/lib/labels.yml`. - Search for prior art across the org before responding. -- Put cross-repo, release-blocking, security, or strategic work on the Z-Shell Tracker. +- Put cross-repo, release-blocking, security, or strategic work on Linear. ## Draft-only workflows diff --git a/lib/labels.yml b/lib/labels.yml index 452efa838..4c0c10acb 100644 --- a/lib/labels.yml +++ b/lib/labels.yml @@ -105,7 +105,7 @@ labels: description: Acknowledged but not planned for implementation. - name: meta:org-tracked color: '5319e7' - description: Auto-add this issue to the org-wide Z-Shell Tracker. + description: Indicates this issue has cross-repository tracking implications (synced to Linear). # External automation labels retained for compatibility. # These are not part of the triage taxonomy but appear in z-shell/.github diff --git a/runbooks/onboarding.md b/runbooks/onboarding.md index c7b302b94..ab626c00b 100644 --- a/runbooks/onboarding.md +++ b/runbooks/onboarding.md @@ -19,7 +19,7 @@ Before touching anything, read, in order: ## Step 2 — Understand the source of truth -- Active progress lives in **GitHub issues, PRs, and the Z-Shell Tracker** — not +- Active progress lives in **GitHub issues, PRs, and Linear** — not in local notes or agent memory. - `.gitmodules` is the Git-native source of truth for child-repo paths/remotes; the meta-workspace `workspace/repos.yml` is the human/LLM-readable catalog. diff --git a/runbooks/project-tracker.md b/runbooks/project-tracker.md index 45afb6676..d55546adb 100644 --- a/runbooks/project-tracker.md +++ b/runbooks/project-tracker.md @@ -1,14 +1,11 @@ # Runbook — Project tracker -Use this runbook for the organization-wide Z-Shell Tracker. +Use this runbook for the organization-wide task tracking in Linear. ## Tracker identity -- Project: `z-shell — Org-wide` -- URL: `https://github.com/orgs/z-shell/projects/28` -- Owner: `z-shell` -- Project number: `28` -- Auto-add label: `meta:org-tracked` +- Workspace: `ss-o` +- URL: `https://linear.app/ss-o/` ## What belongs on the tracker @@ -22,83 +19,24 @@ Track issues that need cross-repository or maintainer-level attention: Do not add ordinary single-repository bugs, support questions, or small cleanup tasks just because they are actionable. -## Auto-add paths +## Syncing with GitHub -There are two supported auto-add paths. - -### Preferred: Project v2 built-in workflow - -In the GitHub Project UI, enable the Project workflow that auto-adds issues with this filter: - -```text -is:issue label:meta:org-tracked -``` - -GitHub's public GraphQL API currently exposes Project v2 workflow names and enabled state, but not the auto-add filter configuration. Verify the filter in the Project UI when auditing this setup. - -### Repository workflow fallback - -This repository provides `.github/workflows/project-tracker.yml`. - -It: - -- runs directly for issues in `z-shell/.github` -- can be reused by other repositories through the Project Tracker workflow template -- adds issues labelled `meta:org-tracked` to Project 28 with `gh project item-add` - -For organization-wide reliability, configure an organization or repository secret named `Z_SHELL_PROJECT_TOKEN` with permission to write to the organization Project v2 board. The workflow falls back to `github.token`, but that token may not have organization-project write access in every repository. - -## Installing in another repository - -Use the Project Tracker starter workflow from **Actions > New workflow**, or add this caller workflow: - -```yaml ---- -name: Project Tracker - -on: - issues: - types: [opened, labeled, reopened] - -permissions: - contents: read - issues: read - -concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.node_id }} - cancel-in-progress: true - -jobs: - add-tracked-issue: - if: contains(github.event.issue.labels.*.name, 'meta:org-tracked') - uses: z-shell/.github/.github/workflows/project-tracker.yml@main - with: - issue_url: ${{ github.event.issue.html_url }} - secrets: inherit -``` - -## Verification - -To verify auto-add behavior: +Linear natively integrates with GitHub issues and pull requests. +We rely on Linear's built-in GitHub integration rather than maintaining custom GitHub Actions workflows. 1. Create or choose a test issue in the repository. -2. Apply `meta:org-tracked`. -3. Wait for either the Project built-in workflow or the repository workflow to run. -4. Confirm the issue appears on Project 28: +2. Because of the native integration, any issue matching the configured criteria in Linear will automatically be ingested. +3. You can manage and prioritize the issue directly from Linear. -```sh -gh issue view --repo z-shell/ --json projectItems -``` +## Verification -If the issue does not appear, add it manually and investigate the project workflow or token: +If an issue does not sync to Linear: -```sh -gh project item-add 28 --owner z-shell --url https://github.com/z-shell//issues/ -``` +1. Verify the Linear GitHub integration settings are active for the specific repository. +2. Ensure you have not hit rate limits or permission boundaries. +3. Contact an organization admin if the repository needs to be manually added to the integration. ## See also -- `.github/workflows/project-tracker.yml` -- `workflow-templates/project-tracker.yml` +- `AGENTS.md` - `runbooks/triage.md` -- `.github/lib/labels.yml` diff --git a/runbooks/triage.md b/runbooks/triage.md index 6e424cfc7..232df0ca9 100644 --- a/runbooks/triage.md +++ b/runbooks/triage.md @@ -99,21 +99,21 @@ Do not promise delivery dates. ## Step 5 — Decide whether it belongs on the tracker -Add the work to the Z-Shell Tracker when it: +Add the work to Linear when it: - crosses repositories - blocks a release - has security impact - has strategic or roadmap significance -Apply `meta:org-tracked` to issues that should appear on the org-wide tracker. Do not apply it to ordinary single-repository bugs, questions, or cleanup tasks. See `runbooks/project-tracker.md` for auto-add setup and verification. +Linear's native GitHub integration will automatically ingest tracking issues based on configuration. Do not apply broad sync to ordinary single-repository bugs, questions, or cleanup tasks. See `runbooks/project-tracker.md`. -When the project fields exist, populate: +In Linear, populate: -- `Impact`: `low`, `medium`, or `high` -- `Effort`: `XS`, `S`, `M`, or `L` -- `Strategic value`: one short sentence explaining why the item matters beyond the source issue -- `Status`: `Triage`, `Ready`, `In Progress`, `In Review`, or `Done` +- `Priority`: `Low`, `Medium`, or `High` +- `Estimate`: e.g. `1`, `2`, `3` +- `Project`: Assign to relevant strategic project +- `Status`: `Triage`, `Todo`, `In Progress`, `In Review`, or `Done` ## Step 6 — Close with an explicit reason diff --git a/scripts/zsh-syntax-check.sh b/scripts/zsh-syntax-check.sh new file mode 100755 index 000000000..c1695fa29 --- /dev/null +++ b/scripts/zsh-syntax-check.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# PostToolUse hook: run `zsh -n` on edited Zsh files. +# Reads the hook JSON payload from stdin, extracts the edited file path, +# and reports a syntax error back to Claude (exit 2) if `zsh -n` fails. +set -euo pipefail + +payload="$(cat)" + +file_path="$(printf '%s' "$payload" | jq -r '.tool_input.file_path // .tool_input.path // empty')" +[ -n "$file_path" ] || exit 0 + +case "$file_path" in + *.zsh | *.plugin.zsh | *.zsh-theme | *zshrc | *zshenv) ;; + *) exit 0 ;; +esac + +[ -f "$file_path" ] || exit 0 +command -v zsh >/dev/null 2>&1 || exit 0 + +if ! err="$(zsh -n "$file_path" 2>&1)"; then + printf 'zsh -n found a syntax error in %s:\n%s\n' "$file_path" "$err" >&2 + exit 2 +fi + +exit 0 diff --git a/workflow-templates/project-tracker.yml b/workflow-templates/project-tracker.yml deleted file mode 100644 index 584678c00..000000000 --- a/workflow-templates/project-tracker.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Project Tracker - -on: - issues: - types: [opened, labeled, reopened] - -permissions: - contents: read - issues: read - -concurrency: - group: ${{ github.workflow }}-${{ github.event.issue.node_id }} - cancel-in-progress: true - -jobs: - add-tracked-issue: - if: contains(github.event.issue.labels.*.name, 'meta:org-tracked') - uses: z-shell/.github/.github/workflows/project-tracker.yml@main - with: - issue_url: ${{ github.event.issue.html_url }} - secrets: inherit