Skip to content

Setup docs GitHub - #3

Closed
arwazarish wants to merge 2 commits into
mainfrom
setup-docs-github
Closed

Setup docs GitHub#3
arwazarish wants to merge 2 commits into
mainfrom
setup-docs-github

Conversation

@arwazarish

@arwazarish arwazarish commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Related issue

Closes #

Checklist

  • No latest tags introduced in any config
  • No Java-based runtime dependency introduced
  • Works (or degrades gracefully) offline / on intermittent connectivity
  • Docs updated in docs.zarishsphere if this changes behavior
  • No real beneficiary/patient data or PII included anywhere in this PR

Summary by CodeRabbit

  • New Features

    • Added a five-stage workflow for research, PRDs, technical designs, agent setup, and MVP building.
    • Added reusable project templates and integrations for multiple AI development tools.
    • Added a complete Reddit-to-AI example project with planning and research documentation.
    • Added repository validation, security scanning, dependency scanning, release automation, and pull-request labeling.
  • Documentation

    • Added setup, contribution, governance, security, support, FAQ, citation, and repository inventory guides.
  • Bug Fixes

    • Updated browser file access guidance to use directory selection with download fallback.
    • Corrected repository links and project terminology.

…kflow docs

- Bump all actions to exact latest stable versions across 9 workflows:
  checkout@v7.0.1, codeql-action@v4.37.6, github-script@v9.0.0,
  osv-scanner-action@v2.5.0, release-please-action@v5.0.0,
  setup-python@v7.0.0, lychee-action@v2.9.0, scorecard-action@v2.4.4,
  action-semantic-pull-request@v6.1.1, stale@v11.0.0
- Fix repo-lint stale-reference check self-match and KhazP/Reddit-to-AI false positive
- Fix labels.yml stale 'Vibe-coding' workflow label description
- Add tool adapters for opencode, gemini-cli, copilot, windsurf, lovable
- Add .claude skills, templates/, examples/, scripts/validate.py, CITATION.cff
- Update AGENTS/MEMORY/agent_docs for Gemini 3.x model routing correction
- Ignore session-ses_0*.md
- Click-by-click setup for GitHub settings, Gemini key, Cloudflare Worker
  secret (GEMINI_API_KEY), ALLOWED_ORIGIN var, Pages deploy, and code
  placeholders, so the first push runs green
- Fix broken github.com/zarishsphere links in docs (org is zsdotcom)
- Ignore wrangler's .dev.vars local secret file
@arwazarish
arwazarish requested a review from a team August 11, 2026 16:15
@arwazarish arwazarish self-assigned this Aug 11, 2026
@arwazarish
arwazarish enabled auto-merge August 11, 2026 16:15
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds the ZarishDocs workflow system, Claude skills, tool adapters, repository governance, CI automation, validation tooling, setup documentation, and a Reddit-to-AI example project.

Changes

ZarishDocs workflow foundation

Layer / File(s) Summary
Canonical templates and tool adapters
templates/...
Added reusable project guidance, workflow prompts, memory files, review checklists, and adapters for supported AI development tools.
Claude workflow skills and hooks
.claude/...
Added six skills for research, PRD creation, technical design, agent setup, MVP building, and workflow routing. Added hooks for protection, formatting, status reporting, and notifications.
Repository validation and CI automation
scripts/validate.py, .github/workflows/*
Added repository contract validation and workflows for security scanning, repository linting, releases, pull-request labeling, semantic titles, greetings, and stale-item handling.
Repository governance and setup
.github/*, SETUP.md, REPOSITORY-INVENTORY.md, CITATION.cff
Added repository policies, issue and discussion forms, ownership rules, setup guidance, inventory metadata, citation metadata, and ignore patterns.
Project context and reconstructed example
agent_docs/*, examples/*, docs/*, AGENTS.md, MEMORY.md, README.md
Updated architecture and testing guidance, corrected file-access and repository-link references, and added the Reddit-to-AI research, PRD, technical design, and agent context files.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • zsdotcom/zarishdocs#2: Substantially overlaps with the same validator API, Claude skills, GitHub workflows, documentation, templates, and tool adapters.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the GitHub setup documentation, which is a real and significant part of the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65f391fc60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread SETUP.md

```bash
wrangler pages project create zarishdocs # once; answer the prompts
wrangler pages deploy src # from the repo root

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Deploy the repository root, not src

When maintainers follow this setup, Cloudflare Pages uploads only the files under src/, but the actual static entrypoint and shell assets (index.html, styles.css, sw.js, manifest.webmanifest, icon.svg) live at the repository root. Because Wrangler's positional argument is the directory of static files to upload, this deployment would publish a site with no index.html and break the app; point the command at . or at a build output that contains the root assets.

Useful? React with 👍 / 👎.

Comment thread scripts/validate.py
Comment on lines +226 to +227
if adapters_dir.is_dir():
targets.extend(adapters_dir.rglob("*.md"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include Cursor rule files in the fabricated-config check

This guard says it covers skills/tool adapters, but it only scans *.md files under templates/tool-adapters; the committed Cursor always-on rule is templates/tool-adapters/cursor/rules/zsdocs.mdc. If the forbidden cursor.sh, ai.autoComplete, or ai.explainCode strings are reintroduced there, python scripts/validate.py --ci and the Repo Lint workflow still pass, defeating the contract this check is meant to enforce.

Useful? React with 👍 / 👎.

Comment thread CITATION.cff

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
templates/agent_docs/project_brief.md (1)

10-13: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Require approval before payment or authentication changes.

If a project needs payment or authentication, require explicit human approval before the agent selects or modifies the integration. The Stripe Checkout example currently says to use it whenever it is simpler, so it can bypass this approval gate.

Proposed clarification
- If a simpler low-code integration exists (e.g. using pre-built Stripe Checkout instead of a custom form), use it.
+ If a simpler low-code integration exists, propose it. Do not select or modify payment gateway or authentication configuration without explicit human approval.

Based on learnings: “Do not modify payment gateway configuration or authentication setup without explicit human approval.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/agent_docs/project_brief.md` around lines 10 - 13, Update the “Key
Principles” guidance to require explicit human approval before selecting or
modifying any payment integration, payment gateway configuration, or
authentication setup. Clarify that the simpler Stripe Checkout example remains
subject to this approval gate and must not be used automatically to bypass it.

Source: Learnings

🟠 Major comments (36)
.github/workflows/codeql.yml-28-28 (1)

28-28: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Set persist-credentials: false on both checkout steps. Both workflows check out the repository with the default credential-persistence behavior, which writes the GITHUB_TOKEN into .git/config. Neither workflow needs the token after checkout. .github/workflows/scorecard.yml line 24 already sets the flag, so the three checkout steps in this pull request are inconsistent.

  • .github/workflows/codeql.yml#L28-L28: add with: persist-credentials: false to the actions/checkout@v7.0.1 step.
  • .github/workflows/repo-lint.yml#L14-L14: add with: persist-credentials: false to the actions/checkout@v7.0.1 step. The git ls-files call in scripts/validate.py does not need credentials, so this is safe.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/codeql.yml at line 28, Set persist-credentials to false on
the checkout steps using actions/checkout@v7.0.1 in .github/workflows/codeql.yml
at lines 28-28 and .github/workflows/repo-lint.yml at lines 14-14; add the
corresponding with configuration to both steps, while leaving the existing
checkout behavior otherwise unchanged.

Source: Linters/SAST tools

.github/workflows/repo-lint.yml-1-6 (1)

1-6: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Confirm explicit approval for the nine new workflow files. This pull request adds nine GitHub Actions workflows. The pull request description states no implemented changes, related issues, or completed checklist items, so the approval is not recorded anywhere in the pull request. Record the approval in the pull request description or in MEMORY.md before merging.

As per coding guidelines: ".github/workflows/**: Do not modify GitHub workflow files without explicit approval."

  • .github/workflows/repo-lint.yml#L1-L6: this workflow becomes a required merge gate; confirm the approval and the intended branch-protection configuration.
  • .github/workflows/codeql.yml#L1-L5: confirm the approval for weekly code scanning on the declared languages.
  • .github/workflows/greetings.yml#L1-L7: confirm the approval for a workflow that comments on issues and pull requests.
  • .github/workflows/osv-scanner.yml#L1-L4: confirm the approval for the reusable vulnerability scan.
  • .github/workflows/pr-size-labeler.yml#L1-L5: confirm the approval for a workflow that writes labels.
  • .github/workflows/release-please.yml#L1-L8: confirm the approval for automated tagging and release publication, which uses contents: write.
  • .github/workflows/scorecard.yml#L1-L10: confirm the approval for publishing results to the public OpenSSF dataset.
  • .github/workflows/semantic-pr.yml#L1-L8: confirm the approval for enforcing Conventional Commit titles.
  • .github/workflows/stale.yml#L1-L6: confirm the approval for automatic closure of issues and pull requests.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/repo-lint.yml around lines 1 - 6, Record explicit approval
for all nine workflow files in the pull request description or MEMORY.md before
merging: .github/workflows/repo-lint.yml (1-6), .github/workflows/codeql.yml
(1-5), .github/workflows/greetings.yml (1-7), .github/workflows/osv-scanner.yml
(1-4), .github/workflows/pr-size-labeler.yml (1-5),
.github/workflows/release-please.yml (1-8), .github/workflows/scorecard.yml
(1-10), .github/workflows/semantic-pr.yml (1-8), and .github/workflows/stale.yml
(1-6). Confirm the intended branch-protection configuration for repo-lint and
approval for each workflow’s described behavior; no direct workflow-file change
is required.

Source: Coding guidelines

scripts/validate.py-325-329 (1)

325-329: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

The fallback year regex misses a top-level year: key.

Line 327 uses ^\s+year\s*:. The \s+ requires at least one whitespace character after the line start, so a year: key at column 0 does not match. The result also depends on whether a blank line precedes the key, because \s+ can consume a blank line plus its newline.

The PyYAML path at line 319 accepts a top-level year. The two paths therefore disagree on the same file.

.github/workflows/repo-lint.yml lines 85-93 sets up Python and runs the validator without installing PyYAML, so CI runs this fallback path. A CITATION.cff with a top-level year fails CI and passes locally for a contributor who has PyYAML installed.

Match year at any indentation, including none.

🔧 Proposed fix
-        has_year = re.search(r"^\s+year\s*:", text, re.MULTILINE) is not None
+        has_year = re.search(r"^[ \t]*year\s*:", text, re.MULTILINE) is not None
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/validate.py` around lines 325 - 329, Update the fallback year
detection in the validation logic around top_level_keys and has_year so the
regex matches a year: key at any indentation level, including column zero,
without allowing preceding blank lines to affect the match. Keep the PyYAML and
fallback paths consistent for top-level year keys.
.github/workflows/pr-size-labeler.yml-53-72 (1)

53-72: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

setLabels can delete labels that this workflow did not manage.

Two problems combine here.

listLabelsOnIssue at line 53 is not paginated. It returns at most 30 labels. github.paginate is already used at line 24 for the file list, so the inconsistency is unintentional.

setLabels at line 67 replaces the complete label set with nonSizeLabels + sizeLabel. Any label past the first page is deleted. Any label added by another actor between the read at line 53 and the write at line 67 is also deleted. That is a time-of-check to time-of-use race.

Use removeLabel for stale size/ labels and addLabels for the new one. Both operations are non-destructive and idempotent, and neither needs the full label list.

🔧 Proposed fix
             const current = await github.rest.issues.listLabelsOnIssue({
               owner,
               repo,
-              issue_number: pull_number
+              issue_number: pull_number,
+              per_page: 100
             });

             const existingSizeLabels = current.data
               .map((l) => l.name)
               .filter((name) => name.startsWith('size/'));

-            const nonSizeLabels = current.data
-              .map((l) => l.name)
-              .filter((name) => !name.startsWith('size/'));
-
-            await github.rest.issues.setLabels({
-              owner,
-              repo,
-              issue_number: pull_number,
-              labels: [...nonSizeLabels, sizeLabel]
-            });
+            for (const name of existingSizeLabels) {
+              if (name === sizeLabel) continue;
+              await github.rest.issues.removeLabel({
+                owner, repo, issue_number: pull_number, name
+              });
+            }
+
+            if (!existingSizeLabels.includes(sizeLabel)) {
+              await github.rest.issues.addLabels({
+                owner, repo, issue_number: pull_number, labels: [sizeLabel]
+              });
+            }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-size-labeler.yml around lines 53 - 72, Update the
label-management flow around listLabelsOnIssue to avoid replacing the complete
label set: remove each existing stale size/ label with removeLabel, then apply
sizeLabel using addLabels. Use the retrieved labels only to identify stale size/
entries; preserve all unrelated labels and avoid setLabels, pagination, and
read/write race issues.
.github/workflows/release-please.yml-18-21 (1)

18-21: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

The release pull request will not run any status checks.

No token: input is set, so the action uses the default GITHUB_TOKEN. GitHub does not trigger workflow runs for events raised by that token. The standing release pull request will therefore skip repo-lint.yml, semantic-pr.yml, codeql.yml, and osv-scanner.yml.

.github/PULL_REQUEST_TEMPLATE.md requires python scripts/validate.py to pass on every pull request. The release pull request would merge without that gate.

Supply a GitHub App token or a personal access token through the token: input so the release pull request runs the same checks.

🔧 Proposed fix
       - uses: googleapis/release-please-action@v5.0.0
         with:
+          # A GITHUB_TOKEN-created PR does not trigger workflows; use an App/PAT token
+          # so the release PR runs repo-lint, semantic-pr, CodeQL, and OSV.
+          token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
           # Node release type bumps package.json version (v0.1.0 at the repo root).
           release-type: node
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-please.yml around lines 18 - 21, Update the
release-please action configuration to provide a non-default GitHub App or
personal access token through its token input, sourced from the repository’s
configured secret. Keep the existing release-type: node setting unchanged so
release pull requests trigger the standard status-check workflows.
examples/reddit-to-ai/research-reddit-to-ai.md-5-5 (1)

5-5: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Add sources and evidence status for factual claims.

Only a few claims use Unverified — model knowledge; most claims lack a live source and access date. Add dated sources for claims about context windows, chrome.storage, competitor behavior, costs, and timelines. Label claims that cannot be sourced as Unverified — model knowledge.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/reddit-to-ai/research-reddit-to-ai.md` at line 5, Update the
research document’s factual claims to include dated sources and access dates,
especially claims about context windows, chrome.storage, competitor behavior,
costs, and timelines. Mark any claims that cannot be supported with a source as
“Unverified — model knowledge,” while preserving the existing evidence-status
format.

Source: Coding guidelines

examples/reddit-to-ai/TechDesign-reddit-to-ai-MVP.md-53-54 (1)

53-54: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Run redditScraper.js outside the service worker.

The service worker cannot access the Reddit page DOM. Keep service_worker.js as the orchestrator, and run redditScraper.js as a content script or through chrome.scripting.executeScript; return normalized thread data through messaging. Declare the required injection and host permissions. Source: https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts (accessed August 2026).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/reddit-to-ai/TechDesign-reddit-to-ai-MVP.md` around lines 53 - 54,
Update the Reddit scraping flow so redditScraper.js executes in the Reddit page
context as a content script or via chrome.scripting.executeScript, while
service_worker.js remains the orchestrator. Return normalized thread data
through messaging, and declare the required script-injection and Reddit host
permissions in the extension manifest.
agent_docs/tech_stack.md-24-34 (1)

24-34: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Require authentication or rate limiting for production proxy requests

worker/index.js accepts a valid POST without Origin and forwards it with env.GEMINI_API_KEY. CORS validation does not authenticate non-browser callers. Add production authentication or rate limiting. If test calls need no authentication, gate them behind an explicit test-only environment flag.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent_docs/tech_stack.md` around lines 24 - 34, Update the worker fetch
handler described in the Worker Proxy Sketch to require production
authentication or rate limiting before forwarding valid POST requests with
env.GEMINI_API_KEY. Do not treat Origin/CORS validation as authentication; if
tests must bypass this check, require an explicit test-only environment flag and
keep the bypass disabled by default.
agent_docs/code_patterns.md-33-37 (1)

33-37: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Implement the documented IndexedDB blocked-request handling.

During a version upgrade, another open tab can keep indexedDB.open() pending, which blocks session persistence. Add onblocked handling and close existing connections on versionchange, or provide an explicit retry/reload path. MDN blocked event (accessed August 2026).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent_docs/code_patterns.md` around lines 33 - 37, Update the IndexedDB
implementation in src/db.js, especially openDB, to handle blocked version
upgrades by closing existing database connections when they receive a
versionchange event and providing an explicit retry or reload path for the
blocked request. Preserve the documented database stores and existing
persistence API behavior.
agent_docs/testing.md-5-5 (1)

5-5: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make npm run check validate the documented files.

package.json defines check as a loop over src/ and worker/. It does not run node --check sw.js, although this line claims that it does. Extend the script to include sw.js, or remove sw.js from the documentation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent_docs/testing.md` at line 5, Align the documented Syntax check with the
npm check script in package.json: update the check command to run node --check
against sw.js in addition to src/ and worker/, preserving validation of all
documented shipped modules.
MEMORY.md-19-19 (1)

19-19: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Keep the final File System Access API decision synchronized.

The project-state record and generated inventory still contain the obsolete file-writing architecture.

  • MEMORY.md#L19-L19: mark the older ADR-003 entry as superseded or update it to showDirectoryPicker.
  • REPOSITORY-INVENTORY.md#L100-L105: regenerate the file description and related inventory metadata from the final implementation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@MEMORY.md` at line 19, Update MEMORY.md at line 19 to mark the obsolete
ADR-003 file-writing architecture as superseded or describe the final
showDirectoryPicker implementation. Regenerate REPOSITORY-INVENTORY.md lines
100-105 so the file description and related metadata match the final
implementation; apply changes in both specified files.
CITATION.cff-9-9 (1)

9-9: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Align the license metadata and ship the license texts.

CITATION.cff declares MIT, but project documentation declares Apache 2.0 for code and CC BY 4.0 for documentation. The repository tracks no license file. Add the corresponding license texts and update the metadata, or correct the documentation and metadata to match the supported licenses.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CITATION.cff` at line 9, Align CITATION.cff with the project’s documented
licenses by using Apache 2.0 for code and CC BY 4.0 for documentation, and add
the corresponding license text files to the repository. Remove the conflicting
MIT declaration from the license metadata while preserving valid citation
formatting.
.github/CODEOWNERS-5-7 (1)

5-7: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Require a visible team with explicit Write access.

GitHub requires teams used as code owners to be visible and have explicit Write access. Replace Read and confirm that zsdotcom/maintainers exists and has access to zsdotcom/zarishdocs; the API lookup currently returns 404 Not Found.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/CODEOWNERS around lines 5 - 7, Update the CODEOWNERS prerequisite
comment to require referenced teams to be visible and have explicit Write access
instead of Read access. Also verify that the zsdotcom/maintainers team exists
and has access to zsdotcom/zarishdocs, correcting the team or repository
configuration if the lookup remains 404.
SETUP.md-29-32 (1)

29-32: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Separate repository-visibility requirements by tool.

  • CodeQL is free for public repositories. Private repositories require GitHub Code Security or GHAS (GitHub documentation, accessed 2026-08-11).
  • OSV-Scanner runs in private repositories and does not require public visibility (OSV-Scanner documentation, accessed 2026-08-11).
  • Scorecard can scan private repositories. Only publish_results requires a public repository (Scorecard Action documentation, accessed 2026-08-11).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@SETUP.md` around lines 29 - 32, Update the “Confirm repo visibility” section
in SETUP.md to distinguish requirements by tool: state that CodeQL’s free
availability applies to public repositories, OSV-Scanner supports private
repositories, and Scorecard supports private scanning while its publish_results
option requires public visibility. Remove the blanket requirement that the
repository must be public.

Source: Coding guidelines

CITATION.cff-16-18 (1)

16-18: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Make CITATION.cff release metadata valid and consistent.

date-released is optional, but an empty string is invalid. If the project is unreleased, omit this field. Otherwise, set it to the actual YYYY-MM-DD release date. Align preferred-citation.version with the 0.1.0 version declared in package.json and SETUP.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CITATION.cff` around lines 16 - 18, Update the release metadata in
CITATION.cff: remove the empty date-released field if the project is unreleased,
or replace it with the actual YYYY-MM-DD release date, and change
preferred-citation.version from 1.0.0 to 0.1.0 to match package.json and
SETUP.md.
SETUP.md-192-198 (1)

192-198: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Deploy a complete Pages asset directory.

wrangler pages deploy src omits the root-level entrypoint and assets referenced by index.html, including styles.css, manifest.webmanifest, icon.svg, sw.js, and sources.config.json. Stage these files with src/, then deploy the staging directory.

Proposed staging command
rm -rf dist
mkdir -p dist
cp index.html styles.css sw.js manifest.webmanifest icon.svg sources.config.json dist/
cp -R src dist/src
wrangler pages deploy dist

Source: Cloudflare Pages Direct Upload (accessed August 2026).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@SETUP.md` around lines 192 - 198, Update the Pages deployment instructions in
“Create and deploy the Pages site” to stage the complete asset set in a clean
dist directory, including index.html, styles.css, sw.js, manifest.webmanifest,
icon.svg, sources.config.json, and src/, then deploy dist instead of src.
.github/ISSUE_TEMPLATE/config.yml-3-5 (1)

3-5: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Expose the fallback security contact in the issue chooser.

If private vulnerability reporting is unavailable, direct reporters to platform@zarishsphere.com, the fallback address in .github/SECURITY.md, while retaining the instruction not to open a public issue.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/ISSUE_TEMPLATE/config.yml around lines 3 - 5, Update the “Security
vulnerability” entry in the issue template chooser to expose
platform@zarishsphere.com as the fallback contact when private reporting is
unavailable, while retaining the instruction not to open a public issue.
.github/MCP-SETUP.md-1-8 (1)

1-8: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Separate local and remote server setup, and qualify the cost statement.

The Remote option uses GitHub’s hosted MCP server. The Docker option runs locally. Replace the opening hosting claim with this distinction. Replace Free with a statement that the server is available to GitHub users, while individual tools can require paid GitHub or Copilot features and organization policies.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/MCP-SETUP.md around lines 1 - 8, Update the opening description in
the MCP setup documentation to distinguish GitHub’s hosted Remote MCP server
from the locally running Docker option. Replace the unconditional “Free” claim
with qualified wording that availability is for GitHub users, while individual
tools may require paid GitHub or Copilot features and remain subject to
organization policies.
.github/SECURITY.md-16-18 (1)

16-18: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Limit the policy scope to this repository.

A repository-local .github/SECURITY.md takes precedence over any organization default. Change line 18 to:

This applies to the `zsdotcom/zarishdocs` repository.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/SECURITY.md around lines 16 - 18, Update the Scope statement in
SECURITY.md to limit the policy to this repository by replacing the
organization-wide scope with “This applies to the `zsdotcom/zarishdocs`
repository.”
templates/tool-adapters/lovable/README.md-7-12 (1)

7-12: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the no-repository Knowledge instructions.

If no repository is connected, AGENTS.md and agent_docs/ are unavailable. The quoted Project Knowledge pointer therefore gives Lovable no project rules. Put the required rules directly in Project Knowledge, or require a connected repository before telling users to use the pointer.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/tool-adapters/lovable/README.md` around lines 7 - 12, Update the
no-repository guidance in the README so it does not direct users to the
unavailable AGENTS.md or agent_docs/ pointer; provide the required rules
directly in Project Knowledge, or require connecting a repository before
recommending that pointer.
templates/tool-adapters/cursor/commands/zsdocs-workflow.md-18-18 (1)

18-18: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Define one required Handoff Context schema across all adapters.

The research and PRD adapters define only Stage, and the tech-design adapter adds only Chosen stack and AI coding tool. This does not satisfy the router contract for user level, app name, platform, budget, and timeline. Update every adapter variant, or narrow the router statement to the fields each stage guarantees.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/tool-adapters/cursor/commands/zsdocs-workflow.md` at line 18, Align
the router contract and adapter documentation around a single required Handoff
Context schema: ensure every research, PRD, and tech-design adapter defines user
level, app name, platform, budget, and timeline alongside its existing fields.
Alternatively, narrow the router statement to explicitly list only the fields
guaranteed by each stage, without claiming universal coverage.
templates/tool-adapters/README.md-57-59 (1)

57-59: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Preserve existing agent rules unless the user confirms deletion.

The same unsafe deletion instruction appears in three adapters.

  • templates/tool-adapters/README.md#L57-L59: replace “delete it” with an explicit confirmation step.
  • templates/tool-adapters/windsurf/README.md#L11-L13: preserve .windsurfrules by default.
  • .claude/skills/zsdocs-agents/SKILL.md#L170-L172: do not delete .cursorrules automatically.

As per coding guidelines, “Do not delete files without explicit confirmation.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/tool-adapters/README.md` around lines 57 - 59, Update the legacy
rule guidance to preserve existing files unless the user explicitly confirms
deletion: in templates/tool-adapters/README.md lines 57-59, replace the “delete
it” instruction with a confirmation step; in
templates/tool-adapters/windsurf/README.md lines 11-13, state that
.windsurfrules is preserved by default; and in
.claude/skills/zsdocs-agents/SKILL.md lines 170-172, ensure .cursorrules is not
deleted automatically.

Source: Coding guidelines

.claude/skills/zsdocs-agents/SKILL.md-75-86 (1)

75-86: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Require an explicit plan and approval before agent setup writes multiple files.

Both agent-setup entry points can generate a large file set without a required approval checkpoint.

  • .claude/skills/zsdocs-agents/SKILL.md#L75-L86: add a plan and wait for explicit confirmation before instantiating templates.
  • templates/tool-adapters/antigravity/workflows/zsdocs-agents.md#L9-L16: add the same approval gate before generating project files.

Based on learnings, “Before changing more than one file, propose a brief step-by-step plan and wait for approval.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/zsdocs-agents/SKILL.md around lines 75 - 86, Require an
explicit plan and approval before generating project files in both entry points:
.claude/skills/zsdocs-agents/SKILL.md lines 75-86 and
templates/tool-adapters/antigravity/workflows/zsdocs-agents.md lines 9-16.
Update the template-instantiation workflow to propose a brief step-by-step plan,
wait for explicit confirmation, and only then copy the multiple template files;
apply the same approval gate in the Antigravity workflow.

Source: Learnings

.claude/skills/zsdocs-agents/SKILL.md-15-19 (1)

15-19: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Keep imported project text out of persistent agent instructions.

Lines 15-19 require continuity hints, and Lines 88-104 copy PRD and Tech Design content into AGENTS.md, MEMORY.md, and agent_docs. If those documents contain imported or untrusted instruction text, it can become persistent prompt injection for future sessions. Extract only allowlisted fields, delimit imported prose as project data, and show the generated-file diff for approval before writing.

The supplied persistent-context warning is consistent with this data flow.

Also applies to: 88-104

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/zsdocs-agents/SKILL.md around lines 15 - 19, Update the
Session Continuity guidance and the generation flow around the referenced
AGENTS.md, MEMORY.md, and agent_docs outputs to prevent imported PRD or Tech
Design prose from becoming persistent agent instructions. Extract only
explicitly allowlisted fields, clearly delimit retained project text as
untrusted project data, and require displaying the generated-file diff for user
approval before writing any files.

Source: Linters/SAST tools

.claude/settings.json-19-19 (1)

19-19: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Close bypasses in the destructive-command guard.

The rm expression matches only literal target forms. It does not match equivalent commands such as rm -rf "$PWD", rm -rf /home/user/project, or rm -rf ./*. The TRUNCATE expression is case-sensitive, so lowercase truncate table bypasses it. Implement a path-aware command policy or narrow the README claim, then test quoted paths, command substitutions, long flags, and case variants.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/settings.json at line 19, Strengthen the destructive-command guard
in the inline Node command by detecting equivalent recursive force-removal
targets, including quoted paths, $PWD-based paths, absolute project paths,
wildcard forms, and long flags; make the TRUNCATE check case-insensitive. Add
coverage for quoted paths, command substitutions, long flags, and case variants,
or narrow the README claim if the guard cannot provide that coverage.
templates/tool-adapters/opencode/commands/zsdocs-workflow.md-9-20 (1)

9-20: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not route incomplete agent setup to build.

Lines 9-10 only check AGENTS.md and the agent_docs/ directory. The setup contract requires MEMORY.md, REVIEW-CHECKLIST.md, and all five agent_docs/*.md files. A directory can exist while those files are absent, so Line 20 can route an incomplete project to /zsdocs-build.

Check every required output or use a generated completion marker.

Proposed routing check
-1. Check which of these exist: `docs/research-*.md`, `docs/PRD-*.md`, `docs/TechDesign-*.md`, `AGENTS.md` + `agent_docs/`.
+1. Check which of these exist: `docs/research-*.md`, `docs/PRD-*.md`, `docs/TechDesign-*.md`, `AGENTS.md`, `MEMORY.md`, `REVIEW-CHECKLIST.md`, and all required `agent_docs/*.md`.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/tool-adapters/opencode/commands/zsdocs-workflow.md` around lines 9
- 20, Update the stage-detection logic in the zsdocs workflow to verify complete
agent setup before selecting /zsdocs-build: require AGENTS.md, MEMORY.md,
REVIEW-CHECKLIST.md, and all five required agent_docs/*.md files, or use the
established generated completion marker. Route to /zsdocs-agents whenever any
required setup output is missing, rather than treating the directory’s existence
as completion.
.claude/settings.json-3-9 (1)

3-9: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Enforce protected paths for Bash, or document the limited scope.

The file-protection hook matches only Edit|Write. The separate Bash hook does not check protected paths, so shell redirection or copy commands can modify .env, lockfiles, and .git internals. The check also uses unresolved lexical paths, so symlink aliases are not protected. Update the policy to resolve paths, or state the Edit|Write limitation in .claude/README.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/settings.json around lines 3 - 9, Extend the protected-path
enforcement in the PreToolUse configuration to cover Bash-based file
modifications, including redirection and copy commands, and resolve canonical
paths before checking .env files, lockfiles, and .git internals so symlink
aliases are blocked. Alternatively, document the existing Edit|Write-only
limitation in the Claude policy README, but ensure the chosen approach clearly
defines the protection scope.
.claude/skills/zsdocs-build/SKILL.md-82-102 (1)

82-102: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Make infrastructure and analytics steps conditional.

Database setup, authentication, and analytics are written as mandatory phases. Execute them only when the approved PRD and Tech Design require them. Otherwise, this skill can add infrastructure or tracking outside the project scope.

As per coding guidelines, do not add features outside the current phase.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/zsdocs-build/SKILL.md around lines 82 - 102, Update the phase
guidance so database connection, authentication, and analytics are conditional
on explicit requirements in the approved PRD and Tech Design, rather than
mandatory steps. State that infrastructure and tracking must not be added when
unspecified, and preserve the rule against introducing features outside the
current phase.

Source: Coding guidelines

.claude/skills/zsdocs-prd/SKILL.md-46-101 (1)

46-101: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Make every required handoff field collectable before generating the next artifact.

Later stages require fields that the question banks do not guarantee.

  • .claude/skills/zsdocs-prd/SKILL.md#L46-L101: collect and confirm platform, budget, and timeline for every fresh PRD path.
  • .claude/skills/zsdocs-techdesign/SKILL.md#L50-L73: ask which AI coding tool the user will use.
  • .claude/skills/zsdocs-techdesign/SKILL.md#L98-L114: do not require AI coding tool in Handoff Context unless it was collected.
  • templates/tool-adapters/antigravity/workflows/zsdocs-techdesign.md#L10-L14: mirror the same required-field collection in the adapter.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/zsdocs-prd/SKILL.md around lines 46 - 101, Update
.claude/skills/zsdocs-prd/SKILL.md lines 46-101 so every fresh PRD path collects
and confirms platform, budget, and timeline before generating the next artifact,
including Level B and Level C where currently missing. Update
.claude/skills/zsdocs-techdesign/SKILL.md lines 50-73 to ask which AI coding
tool the user will use, and update lines 98-114 so AI coding tool is included in
Handoff Context only when collected. Mirror the same required-field collection
in templates/tool-adapters/antigravity/workflows/zsdocs-techdesign.md lines
10-14.
.claude/skills/zsdocs-workflow/SKILL.md-90-128 (1)

90-128: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Enforce all stage prerequisites before advancing.

The If Tech Design Exists branch can start Agent Setup without checking the PRD. The If AGENTS.md Exists branch marks the project ready to build without checking agent_docs/, PRD, or Tech Design. The build skill requires all four files.

Use one first-missing-stage decision instead of existence-only branches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/zsdocs-workflow/SKILL.md around lines 90 - 128, Update the
stage-routing logic in the “If Tech Design Exists” and “If AGENTS.md Exists”
sections to use a single first-missing-stage decision that enforces the required
sequence: Research, PRD, Tech Design, then Agent Config with AGENTS.md,
MEMORY.md, REVIEW-CHECKLIST.md, and agent_docs/. Only announce Agent Config when
all earlier artifacts exist, and only start the build when every required
artifact is present; otherwise route the user to the earliest missing stage.
.claude/skills/zsdocs-prd/SKILL.md-33-44 (1)

33-44: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Consume Handoff Context before repeating stage questions.

The canonical skills and Antigravity adapter do not consistently use persisted handoff data.

  • .claude/skills/zsdocs-prd/SKILL.md#L33-L44: skip the A/B/C question when the research handoff is valid.
  • .claude/skills/zsdocs-techdesign/SKILL.md#L40-L48: skip the A/B/C question when the PRD handoff is valid.
  • templates/tool-adapters/antigravity/workflows/zsdocs-techdesign.md#L10-L14: read the PRD handoff before asking the technical-level question.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/zsdocs-prd/SKILL.md around lines 33 - 44, Update
.claude/skills/zsdocs-prd/SKILL.md lines 33-44,
.claude/skills/zsdocs-techdesign/SKILL.md lines 40-48, and
templates/tool-adapters/antigravity/workflows/zsdocs-techdesign.md lines 10-14
to read and validate the persisted Handoff Context before asking technical-level
questions; when valid, prefill and confirm its values and skip the A/B/C prompt,
otherwise retain the existing question flow.
templates/tool-adapters/codex/prompts/zsdocs-agents.md-10-16 (1)

10-16: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not derive every AGENTS value only from PRD and Tech Design.

The canonical templates/AGENTS.md also requires setup, test, lint, build, formatter, architecture, and current-state values. If a value is absent, inspect the existing project/toolchain or ask the user. Do not invent package-manager commands.

The canonical templates/AGENTS.md contract supplies project-specific commands and forbids invented package-manager commands.

Proposed prompt change
-- fill every `[REPLACE:]` / `[CHOOSE:]` placeholder from the PRD and Tech Design; never rewrite the templates:
+- fill placeholders from the PRD and Tech Design; inspect the project or ask the user for missing values; never invent commands or rewrite the templates:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/tool-adapters/codex/prompts/zsdocs-agents.md` around lines 10 - 16,
Update the canonical-template instantiation guidance in the prompt to require
deriving AGENTS.md setup, test, lint, build, formatter, architecture, and
current-state values from the existing project/toolchain or the user when absent
from the PRD and Tech Design. Explicitly prohibit inventing package-manager
commands while preserving the requirement to fill every template placeholder.
.claude/skills/zsdocs-build/SKILL.md-68-76 (1)

68-76: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use project-defined verification commands.

Hardcoded npm test and npm run lint are invalid for non-Node projects and conflict with AGENTS.md, which stores the project commands.

Proposed verification change
-1. Run tests: `npm test` (or equivalent)
-2. Run linter: `npm run lint`
+1. Run the test command defined in `AGENTS.md` or `agent_docs/tech_stack.md`
+2. Run the lint and formatting commands defined in those files

The canonical AGENTS contract defines project-specific commands and forbids invented package-manager commands.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/zsdocs-build/SKILL.md around lines 68 - 76, Update the
verification steps in the feature workflow to use the project-defined test,
lint, and other verification commands documented in AGENTS.md instead of
hardcoded npm commands. Preserve the required smoke testing, issue fixing, and
AGENTS.md/MEMORY.md updates, and retain browser verification for frontend
projects.
.claude/skills/zsdocs-build/SKILL.md-4-4 (1)

4-4: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make verification and build steps project-specific.

  • Add a supported browser/computer tool, or require the user to run the required Chromium and Safari/Firefox/mobile checks before completion.
  • Replace the hardcoded npm run lint step with the project-defined checks, including npm test, npm run check, and npm run format:check.
  • Remove mandatory database, authentication, and analytics steps when they are not in AGENTS.md; analytics conflicts with the repository’s no-telemetry constraint.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/zsdocs-build/SKILL.md at line 4, Update the verification and
build instructions in SKILL.md to use project-defined checks, including npm
test, npm run check, and npm run format:check instead of hardcoded linting. Add
a supported browser/computer tool or require the user to perform Chromium and
Safari/Firefox/mobile checks before completion, and remove database,
authentication, and analytics requirements unless AGENTS.md explicitly requires
them.

Source: Coding guidelines

templates/tool-adapters/codex/prompts/zsdocs-workflow.md-9-20 (1)

9-20: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Check all Stage 4 artifacts before routing to Build.

Line [9] treats AGENTS.md plus agent_docs/ as complete Stage 4 setup. templates/tool-adapters/cursor/commands/zsdocs-agents.md also creates MEMORY.md and REVIEW-CHECKLIST.md at Lines [8]-[12]. The build adapters require REVIEW-CHECKLIST.md. If it is missing, this router can skip setup and send the user to Build without a required checklist. Check all Stage 4 artifacts before selecting stage 5.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/tool-adapters/codex/prompts/zsdocs-workflow.md` around lines 9 -
20, Update the Stage 4 artifact check in the workflow routing instructions to
require AGENTS.md, agent_docs/, MEMORY.md, and REVIEW-CHECKLIST.md before
selecting Stage 5. Keep routing to /zsdocs-agents when any required setup
artifact is missing, while preserving the existing stage ordering and behavior
for earlier stages.
templates/tool-adapters/codex/prompts/zsdocs-workflow.md-5-22 (1)

5-22: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Keep all Codex and Cursor adapters aligned with the canonical workflow contract.

templates/tool-adapters/README.md defines zsdocs-* files as thin wrappers around root part*.md files. These eight files embed complete workflows, so canonical changes can drift across tools.

  • templates/tool-adapters/codex/prompts/zsdocs-workflow.md#L5-L22: reduce the router to a thin Codex wrapper.
  • templates/tool-adapters/codex/prompts/zsdocs-build.md#L5-L15: reduce the build command to a thin Codex wrapper.
  • templates/tool-adapters/codex/prompts/zsdocs-prd.md#L5-L17: reduce the PRD command to a thin Codex wrapper.
  • templates/tool-adapters/codex/prompts/zsdocs-research.md#L5-L17: reduce the research command to a thin Codex wrapper.
  • templates/tool-adapters/codex/prompts/zsdocs-techdesign.md#L5-L17: reduce the technical-design command to a thin Codex wrapper.
  • templates/tool-adapters/cursor/commands/zsdocs-agents.md#L1-L14: reduce the agent-setup command to a thin Cursor wrapper.
  • templates/tool-adapters/cursor/commands/zsdocs-build.md#L1-L11: reduce the build command to a thin Cursor wrapper.
  • templates/tool-adapters/cursor/commands/zsdocs-prd.md#L1-L13: reduce the PRD command to a thin Cursor wrapper.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/tool-adapters/codex/prompts/zsdocs-workflow.md` around lines 5 -
22, Reduce the complete workflow content in
templates/tool-adapters/codex/prompts/zsdocs-workflow.md (lines 5-22),
zsdocs-build.md (lines 5-15), zsdocs-prd.md (lines 5-17), zsdocs-research.md
(lines 5-17), zsdocs-techdesign.md (lines 5-17),
templates/tool-adapters/cursor/commands/zsdocs-agents.md (lines 1-14),
zsdocs-build.md (lines 1-11), and zsdocs-prd.md (lines 1-13) to thin wrappers
that delegate to the corresponding canonical root part*.md workflow, following
the contract defined in templates/tool-adapters/README.md; remove duplicated
workflow instructions while preserving each adapter’s command-specific
delegation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 68a3099e-9c89-4985-a2a4-39e60e523467

📥 Commits

Reviewing files that changed from the base of the PR and between 1c4339c and 65f391f.

📒 Files selected for processing (99)
  • .claude/README.md
  • .claude/settings.json
  • .claude/skills/zsdocs-agents/SKILL.md
  • .claude/skills/zsdocs-build/SKILL.md
  • .claude/skills/zsdocs-prd/SKILL.md
  • .claude/skills/zsdocs-research/SKILL.md
  • .claude/skills/zsdocs-techdesign/SKILL.md
  • .claude/skills/zsdocs-workflow/SKILL.md
  • .github/CODEOWNERS
  • .github/CODE_OF_CONDUCT.md
  • .github/CONTRIBUTING.md
  • .github/DISCUSSION_TEMPLATE/governance.yml
  • .github/FAQ.md
  • .github/FUNDING.yml
  • .github/GOVERNANCE.md
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/ISSUE_TEMPLATE/showcase_submission.md
  • .github/MCP-SETUP.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/SECURITY.md
  • .github/SUPPORT.md
  • .github/labels.yml
  • .github/workflows/codeql.yml
  • .github/workflows/greetings.yml
  • .github/workflows/osv-scanner.yml
  • .github/workflows/pr-size-labeler.yml
  • .github/workflows/release-please.yml
  • .github/workflows/repo-lint.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/semantic-pr.yml
  • .github/workflows/stale.yml
  • .gitignore
  • AGENTS.md
  • CITATION.cff
  • MEMORY.md
  • README.md
  • REPOSITORY-INVENTORY.md
  • SETUP.md
  • agent_docs/code_patterns.md
  • agent_docs/product_requirements.md
  • agent_docs/project_brief.md
  • agent_docs/tech_stack.md
  • agent_docs/testing.md
  • docs/TechDesign-ZarishDocs-MVP.md
  • docs/research-ZarishDocs.md
  • examples/README.md
  • examples/reddit-to-ai/AGENTS.md
  • examples/reddit-to-ai/MEMORY.md
  • examples/reddit-to-ai/PRD-reddit-to-ai-MVP.md
  • examples/reddit-to-ai/TechDesign-reddit-to-ai-MVP.md
  • examples/reddit-to-ai/research-reddit-to-ai.md
  • scripts/validate.py
  • templates/AGENTS.md
  • templates/MEMORY.md
  • templates/REVIEW-CHECKLIST.md
  • templates/agent_docs/code_patterns.md
  • templates/agent_docs/product_requirements.md
  • templates/agent_docs/project_brief.md
  • templates/agent_docs/tech_stack.md
  • templates/agent_docs/testing.md
  • templates/tool-adapters/CLAUDE.md
  • templates/tool-adapters/README.md
  • templates/tool-adapters/antigravity/rules/zsdocs.md
  • templates/tool-adapters/antigravity/workflows/zsdocs-agents.md
  • templates/tool-adapters/antigravity/workflows/zsdocs-build.md
  • templates/tool-adapters/antigravity/workflows/zsdocs-prd.md
  • templates/tool-adapters/antigravity/workflows/zsdocs-research.md
  • templates/tool-adapters/antigravity/workflows/zsdocs-techdesign.md
  • templates/tool-adapters/antigravity/workflows/zsdocs-workflow.md
  • templates/tool-adapters/codex/README.md
  • templates/tool-adapters/codex/prompts/zsdocs-agents.md
  • templates/tool-adapters/codex/prompts/zsdocs-build.md
  • templates/tool-adapters/codex/prompts/zsdocs-prd.md
  • templates/tool-adapters/codex/prompts/zsdocs-research.md
  • templates/tool-adapters/codex/prompts/zsdocs-techdesign.md
  • templates/tool-adapters/codex/prompts/zsdocs-workflow.md
  • templates/tool-adapters/copilot/README.md
  • templates/tool-adapters/copilot/copilot-instructions.md
  • templates/tool-adapters/cursor/commands/zsdocs-agents.md
  • templates/tool-adapters/cursor/commands/zsdocs-build.md
  • templates/tool-adapters/cursor/commands/zsdocs-prd.md
  • templates/tool-adapters/cursor/commands/zsdocs-research.md
  • templates/tool-adapters/cursor/commands/zsdocs-techdesign.md
  • templates/tool-adapters/cursor/commands/zsdocs-workflow.md
  • templates/tool-adapters/cursor/rules/zsdocs.mdc
  • templates/tool-adapters/gemini-cli/GEMINI.md
  • templates/tool-adapters/gemini-cli/README.md
  • templates/tool-adapters/lovable/README.md
  • templates/tool-adapters/opencode/README.md
  • templates/tool-adapters/opencode/commands/zsdocs-agents.md
  • templates/tool-adapters/opencode/commands/zsdocs-build.md
  • templates/tool-adapters/opencode/commands/zsdocs-prd.md
  • templates/tool-adapters/opencode/commands/zsdocs-research.md
  • templates/tool-adapters/opencode/commands/zsdocs-techdesign.md
  • templates/tool-adapters/opencode/commands/zsdocs-workflow.md
  • templates/tool-adapters/windsurf/README.md
  • templates/tool-adapters/windsurf/rules/zsdocs.md

Comment thread .claude/settings.json
"hooks": [
{
"type": "command",
"command": "node -e \"const fs=require('fs'); const d=JSON.parse(fs.readFileSync(0,'utf8')); const p=d.tool_input?.file_path||''; if(/\\.(ts|tsx|js|jsx)$/.test(p) && fs.existsSync('node_modules/.bin/prettier')) { require('child_process').execSync('npx prettier --write \\\"'+p+'\\\"', {stdio:'inherit'}); }\"",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- .claude/settings.json lines 1-45 ---'
nl -ba .claude/settings.json | sed -n '1,45p'
printf '%s\n' '--- child-process invocation context ---'
rg -n -C 3 'execSync|execFileSync|prettier|tool_input|PostToolUse' .claude/settings.json
printf '%s\n' '--- path-related repository context ---'
rg -n -C 2 'settings\.json|PostToolUse|prettier --write|node_modules/\.bin/prettier' . --glob '!node_modules' --glob '!dist' --glob '!build'

Repository: zsdotcom/zarishdocs

Length of output: 7991


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
import json
from pathlib import Path

path = Path(".claude/settings.json")
data = json.loads(path.read_text())
hooks = data["hooks"]["PostToolUse"]
command = hooks[0]["hooks"][0]["command"]
print("json_parse=ok")
print("posttooluse_matcher=", hooks[0]["matcher"])
print("has_execSync=", "execSync" in command)
print("has_execFileSync=", "execFileSync" in command)
print("command=", command)
PY

node - <<'JS'
const fs = require('fs');
const { execFileSync } = require('child_process');
const settings = JSON.parse(fs.readFileSync('.claude/settings.json', 'utf8'));
const hook = settings.hooks.PostToolUse[0].hooks[0].command;
const p = 'x.js"; echo INJECTION; #.js';

// Model the hook's interpolation without invoking the repository hook.
// The replacement keeps the same shell quoting and changes only the
// formatter command to a harmless builtin.
const shellText = hook
  .replace(/^node -e "/, '')
  .replace(/"$/, '')
  .replace(/const fs=require\('fs'\); const d=JSON\.parse\(fs\.readFileSync\(0,'utf8'\)\); const p=d\.tool_input\?\.\.file_path\|\|''; if\(.*?\) \{ require\('child_process'\)\.execSync\('/,
         'const shellCommand = ')
  .replace(/', \{stdio:'inherit'\}\); \}/, '; }')
  .replace(/const shellCommand = 'npx prettier --write \\\\"'\+p\+'\\\\\\"'/,
         "const shellCommand = 'printf PRETTIER ' + JSON.stringify(p)")
  .replace(/; }$/, '; }');

console.log('payload_extension_matches=', /\.(ts|tsx|js|jsx)$/.test(p));
console.log('interpolated_command=', `npx prettier --write \\"${p}\\"`);
console.log('shell_syntax=', 'the injected command contains a command separator');
console.log('argument_api_output=');
const output = execFileSync(process.execPath, [
  '-e',
  'process.stdout.write(JSON.stringify(process.argv[1]))',
  p
], { encoding: 'utf8' });
console.log(output);
JS

Repository: zsdotcom/zarishdocs

Length of output: 768


Pass file_path as an argument, not shell text.

Line 31 interpolates d.tool_input.file_path into execSync. Shell metacharacters can execute additional commands. Use execFileSync with an argument array and the local Prettier executable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/settings.json at line 31, Update the command handler around the
file_path extraction to invoke Prettier without shell interpolation: replace
execSync and the constructed shell string with execFileSync, passing the local
node_modules/.bin/prettier path and its arguments in an array. Preserve the
existing TypeScript/JavaScript extension check and formatter existence guard.

@codeandbrain codeandbrain left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed and approved

@arwazarish

Copy link
Copy Markdown
Contributor Author

Superseded by #4 — its two commits (96bb095, 65f391f) are included in the new branch. Closing.

@arwazarish arwazarish closed this Aug 12, 2026
auto-merge was automatically disabled August 12, 2026 04:22

Pull request was closed

@arwazarish
arwazarish deleted the setup-docs-github branch August 12, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants