feat: PromptScript integration - single source of truth for 10+ AI assistants#756
feat: PromptScript integration - single source of truth for 10+ AI assistants#756mrwogu wants to merge 1 commit intoaffaan-m:mainfrom
Conversation
|
Analysis Failed
Troubleshooting
Retry: |
📝 WalkthroughWalkthroughAdds a new PromptScript configuration suite for ECC: project entrypoint, context, standards, restrictions, a command registry, and eight specialized agents plus a promptscript.yaml registering multi-tool targets and non-overwrite output behavior. Changes
Sequence DiagramsequenceDiagram
actor Developer
participant CLI as Commands Registry
participant Project as ECC Project
participant Orch as Agent Orchestrator
participant Planner as Planner Agent
participant TDD as TDD Agent
participant Review as CodeReview Agent
Developer->>CLI: Invoke /plan (or other command)
CLI->>Project: Resolve command metadata
Project->>Orch: Select agents & dispatch
Orch->>Planner: Run planning prompt
Planner-->>Developer: Phased plan + requirements
Developer->>CLI: Invoke /tdd
Orch->>TDD: Run tests-first workflow
TDD-->>Developer: Tests, coverage targets
Developer->>CLI: Invoke /code-review
Orch->>Review: Run severity-filtered review
Review-->>Developer: Findings & commit gate
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR introduces a PromptScript integration layer — six Key points:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant PRS as PromptScript CLI
participant YAML as promptscript.yaml
participant Entry as project.prs (@use directives)
participant Files as context/standards/restrictions/commands/agents.prs
participant Out as Compiled Outputs
Dev->>PRS: prs compile
PRS->>YAML: Read config (entry, include glob, targets, overwrite:false)
YAML->>Entry: Load .promptscript/project.prs (entry point)
Entry->>Files: @use ./context
Entry->>Files: @use ./standards
Entry->>Files: @use ./restrictions
Entry->>Files: @use ./commands
Entry->>Files: @use ./agents
Note over Entry,Files: include glob also covers these files — potential double-processing
Files-->>PRS: Merged AST (identity, knowledge, context, standards, restrictions, 8 commands, 8 agents)
loop For each of 10 targets
PRS->>Out: Generate platform-specific output
alt File already exists AND overwrite:false
Note over Out: Silently skipped (CLAUDE.md, AGENTS.md, .claude/agents/*, .claude/commands/*)
else File does not exist
Out-->>Dev: New file created (.cursor/, .factory/, .opencode/, etc.)
end
end
Dev->>Dev: git add / git commit (risk: 300+ untracked generated files if no .gitignore)
|
There was a problem hiding this comment.
9 issues found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".promptscript/restrictions.prs">
<violation number="1" location=".promptscript/restrictions.prs:27">
P2: Hard-rule restrictions are missing required review gates (green CI and conflict resolution), causing inconsistent assistant guidance against established team process.</violation>
</file>
<file name=".promptscript/standards.prs">
<violation number="1" location=".promptscript/standards.prs:63">
P2: PR workflow standard omits required pre-review gates (green CI and conflict resolution), risking repeated non-reviewable PR submissions.</violation>
<violation number="2" location=".promptscript/standards.prs:69">
P1: Architecture standards encourage cloning external templates without explicit trust/vetting requirements, creating a supply-chain risk in shared agent guidance.</violation>
</file>
<file name=".promptscript/commands.prs">
<violation number="1" location=".promptscript/commands.prs:135">
P2: `/tdd` references `/test-coverage`, but `/test-coverage` is not defined in the shortcuts registry, creating a broken internal command link.</violation>
<violation number="2" location=".promptscript/commands.prs:207">
P2: Python build-check command is invalid as written: `python -m py_compile` requires explicit filenames, so build detection may choose a failing command.</violation>
<violation number="3" location=".promptscript/commands.prs:303">
P2: `/verify` reports and promises secrets/security scanning, but no secrets scan step is actually defined.</violation>
</file>
<file name=".promptscript/project.prs">
<violation number="1" location=".promptscript/project.prs:23">
P2: Agent availability documentation is inconsistent with actual agent definitions, creating a source-of-truth mismatch that can cause delegation to undefined agents.</violation>
</file>
<file name=".promptscript/agents.prs">
<violation number="1" location=".promptscript/agents.prs:227">
P2: Reviewer workflow is missing required pre-review gates (green CI and no merge conflicts) before starting code review.</violation>
<violation number="2" location=".promptscript/agents.prs:918">
P2: `build-error-resolver` references a non-existent agent (`refactor-cleaner`), creating a broken delegation target.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| architecture: { | ||
| apiResponse: "Consistent envelope with success indicator, data payload, error message, and pagination metadata" | ||
| repositoryPattern: "Encapsulate data access behind standard interface (findAll, findById, create, update, delete)" | ||
| skeletonProjects: "Search for battle-tested templates, evaluate with parallel agents, clone best match, iterate" |
There was a problem hiding this comment.
P1: Architecture standards encourage cloning external templates without explicit trust/vetting requirements, creating a supply-chain risk in shared agent guidance.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .promptscript/standards.prs, line 69:
<comment>Architecture standards encourage cloning external templates without explicit trust/vetting requirements, creating a supply-chain risk in shared agent guidance.</comment>
<file context>
@@ -0,0 +1,77 @@
+ architecture: {
+ apiResponse: "Consistent envelope with success indicator, data payload, error message, and pagination metadata"
+ repositoryPattern: "Encapsulate data access behind standard interface (findAll, findById, create, update, delete)"
+ skeletonProjects: "Search for battle-tested templates, evaluate with parallel agents, clone best match, iterate"
+ }
+
</file context>
There was a problem hiding this comment.
This content is verbatim from the existing ECC files (AGENTS.md, agents/*.md). This PR faithfully reproduces the original — changes to the content itself should be separate PRs.
| git: { | ||
| commitFormat: "<type>: <description>" | ||
| types: [feat, fix, refactor, docs, test, chore, perf, ci] | ||
| prWorkflow: "Analyze full commit history -> draft comprehensive summary -> include test plan -> push with -u flag" |
There was a problem hiding this comment.
P2: PR workflow standard omits required pre-review gates (green CI and conflict resolution), risking repeated non-reviewable PR submissions.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .promptscript/standards.prs, line 63:
<comment>PR workflow standard omits required pre-review gates (green CI and conflict resolution), risking repeated non-reviewable PR submissions.</comment>
<file context>
@@ -0,0 +1,77 @@
+ git: {
+ commitFormat: "<type>: <description>"
+ types: [feat, fix, refactor, docs, test, chore, perf, ci]
+ prWorkflow: "Analyze full commit history -> draft comprehensive summary -> include test plan -> push with -u flag"
+ }
+
</file context>
There was a problem hiding this comment.
This content is verbatim from the existing ECC files (AGENTS.md, agents/*.md). This PR faithfully reproduces the original — changes to the content itself should be separate PRs.
| | pom.xml | mvn compile | | ||
| | build.gradle | ./gradlew compileJava | | ||
| | go.mod | go build ./... | | ||
| | pyproject.toml | python -m py_compile or mypy . | |
There was a problem hiding this comment.
P2: Python build-check command is invalid as written: python -m py_compile requires explicit filenames, so build detection may choose a failing command.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .promptscript/commands.prs, line 207:
<comment>Python build-check command is invalid as written: `python -m py_compile` requires explicit filenames, so build detection may choose a failing command.</comment>
<file context>
@@ -0,0 +1,478 @@
+ | pom.xml | mvn compile |
+ | build.gradle | ./gradlew compileJava |
+ | go.mod | go build ./... |
+ | pyproject.toml | python -m py_compile or mypy . |
+
+ ## Step 2: Parse and Group Errors
</file context>
There was a problem hiding this comment.
Valid — this is verbatim from the original commands/build-fix.md. The original ECC command has the same issue. Not changing it here to maintain fidelity with the source.
|
|
||
| When invoked: | ||
|
|
||
| 1. **Gather context** — Run `git diff --staged` and `git diff` to see all changes. If no diff, check recent commits with `git log --oneline -5`. |
There was a problem hiding this comment.
P2: Reviewer workflow is missing required pre-review gates (green CI and no merge conflicts) before starting code review.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .promptscript/agents.prs, line 227:
<comment>Reviewer workflow is missing required pre-review gates (green CI and no merge conflicts) before starting code review.</comment>
<file context>
@@ -0,0 +1,1135 @@
+
+ When invoked:
+
+ 1. **Gather context** — Run `git diff --staged` and `git diff` to see all changes. If no diff, check recent commits with `git log --oneline -5`.
+ 2. **Understand scope** — Identify which files changed, what feature/fix they relate to, and how they connect.
+ 3. **Read surrounding code** — Don't review changes in isolation. Read the full file and understand imports, dependencies, and call sites.
</file context>
There was a problem hiding this comment.
Mirrors the original agents/code-reviewer.md content. Pre-review gates are not part of the original agent definition.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.promptscript/agents.prs (1)
3-6: Syntax version inconsistency with other modules.This file uses
syntax: "1.1.0"while other.prsfiles usesyntax: "1.0.0". If intentional (e.g., agents require newer syntax features), consider adding a comment explaining this. Otherwise, align versions for consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.promptscript/agents.prs around lines 3 - 6, The `@meta` block for id "ecc-agents" uses syntax: "1.1.0" which is inconsistent with other .prs modules; either change the syntax value to "1.0.0" to match the rest of the repo or add an inline comment in this file explaining why "1.1.0" is required (mentioning any specific features used); update the `@meta` entry for id "ecc-agents" accordingly so reviewers understand the intentionality and consistency is restored.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.promptscript/commands.prs:
- Around line 129-136: The integration list references an undefined command
`/test-coverage`; update the flow to match the actual shortcuts by either adding
a `/test-coverage` entry to the `@shortcuts` block (defining its behavior and
usage) or replace the reference in the Integration with Other Commands section
with the existing `/verify` command (or another appropriate existing shortcut).
Ensure the symbol `/test-coverage` is removed or defined so the doc and
`@shortcuts` stay consistent.
In `@promptscript.yaml`:
- Around line 9-30: The targets block enables full/standard builds for claude,
opencode, and codex which will be written by prs compile and may overwrite
existing project configs; update promptscript.yaml to set output.overwrite:
false (or add a per-target protection flag if supported) to prevent accidental
replacement of .claude/skills/, .opencode/opencode.json, and .codex/config.toml,
add a note in the PR description documenting that prs compile should be run with
prs compile --dry-run to preview changes, and explicitly state the intended
merge/overwrite policy for these targets so reviewers know the change is truly
additive.
---
Nitpick comments:
In @.promptscript/agents.prs:
- Around line 3-6: The `@meta` block for id "ecc-agents" uses syntax: "1.1.0"
which is inconsistent with other .prs modules; either change the syntax value to
"1.0.0" to match the rest of the repo or add an inline comment in this file
explaining why "1.1.0" is required (mentioning any specific features used);
update the `@meta` entry for id "ecc-agents" accordingly so reviewers understand
the intentionality and consistency is restored.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d58bbb5d-7f92-4dcc-bda3-a2e847fbe6ae
📒 Files selected for processing (7)
.promptscript/agents.prs.promptscript/commands.prs.promptscript/context.prs.promptscript/project.prs.promptscript/restrictions.prs.promptscript/standards.prspromptscript.yaml
|
Analysis Failed
Troubleshooting
Retry: |
Addressed review feedback in 3c0e02eThanks for the thorough reviews! Here's what was fixed (squashed into a single commit): Fixed issues
Acknowledged but not changed
|
…mpilation Add .promptscript/ source files and promptscript.yaml configuration that define ECC's core identity, standards, restrictions, commands, and agents in a single source of truth. Running `prs compile` generates native output for 10+ AI coding assistants simultaneously. Source files: - project.prs: entry point with identity, core principles, full 28-agent table - context.prs: project architecture, dev workflow, contributing guide - standards.prs: coding conventions, testing, git workflow - restrictions.prs: security rules and hard constraints - commands.prs: 8 slash commands with full content and examples - agents.prs: 8 core agents with complete instructions and code examples Safety: output.overwrite: false prevents overwriting existing files. Targets: Claude Code, GitHub Copilot, Cursor, Factory AI, OpenCode, Windsurf, Codex, Gemini CLI, Antigravity
adf6565 to
3c0e02e
Compare
|
Analysis Failed
Troubleshooting
Retry: |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.promptscript/commands.prs (1)
194-197: Keep/code-reviewand/build-fixthin by delegating to the agent definitions.These two shortcuts carry their own long rubrics even though
.promptscript/agents.prsalready definescode-reviewerandbuild-error-resolver. That splits the source of truth this PR is trying to establish and makes command/agent drift more likely.Also applies to: 240-243
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.promptscript/commands.prs around lines 194 - 197, The /code-review and /build-fix command entries are duplicating long rubrics instead of delegating to the agent definitions; update the command objects for "/code-review" and "/build-fix" to be thin wrappers that set prompt: true/description as needed and reference the existing agent definitions (code-reviewer and build-error-resolver) in .promptscript/agents.prs rather than embedding their rubrics, ensuring the commands delegate execution to those agent definitions to avoid source-of-truth drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.promptscript/agents.prs:
- Around line 863-898: The policy text in the prompt script includes directives
that automatically add missing dependencies and remove package-lock.json
(notably the "Add missing dependencies" bullet and the Quick Recovery commands
that run "rm -rf package-lock.json"), which conflicts with the
minimal-diff/stop-and-ask flow in .promptscript/commands.prs; update the
.promptscript/agents.prs content so that the "Add missing dependencies"
instruction is changed to require user confirmation (or to instruct the agent to
stop and ask) and remove or guard the package-lock.json deletion from the Quick
Recovery section, replacing it with a note to prompt the user before any
destructive actions; ensure references to these exact strings ("Add missing
dependencies", "rm -rf package-lock.json") are updated so the agent follows the
stop-and-ask behavior rather than performing automatic deletions.
In @.promptscript/commands.prs:
- Around line 490-497: Step 5 currently hardcodes the persistence path
"~/.claude/skills/learned/" which makes the /learn directive Claude-specific;
update the instruction to be target-neutral by replacing the literal path with
an abstract reference like "the target's configured skills directory" or a
placeholder (e.g., "<skills_persist_dir>") and ensure any code or templates that
use the string "~/.claude/skills/learned/" (search for that exact literal) are
changed to read from the target-specific configuration or environment variable
so each compiler target maps to its own persistence location.
- Around line 252-260: The pyproject.toml build-check row currently uses "python
-m py_compile" which requires file args and will fail; update the table entry
for the "pyproject.toml" / Python row to use a recursive, quiet check command
"python -m compileall -q ." so the build-check performs project-wide syntax
validation instead of invoking py_compile with no arguments.
---
Nitpick comments:
In @.promptscript/commands.prs:
- Around line 194-197: The /code-review and /build-fix command entries are
duplicating long rubrics instead of delegating to the agent definitions; update
the command objects for "/code-review" and "/build-fix" to be thin wrappers that
set prompt: true/description as needed and reference the existing agent
definitions (code-reviewer and build-error-resolver) in .promptscript/agents.prs
rather than embedding their rubrics, ensuring the commands delegate execution to
those agent definitions to avoid source-of-truth drift.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ed37b418-e9ce-41fb-be7d-a7b7437ddc04
📒 Files selected for processing (7)
.promptscript/agents.prs.promptscript/commands.prs.promptscript/context.prs.promptscript/project.prs.promptscript/restrictions.prs.promptscript/standards.prspromptscript.yaml
✅ Files skipped from review due to trivial changes (3)
- promptscript.yaml
- .promptscript/standards.prs
- .promptscript/project.prs
🚧 Files skipped from review as they are similar to previous changes (2)
- .promptscript/restrictions.prs
- .promptscript/context.prs
| **DO:** | ||
| - Add type annotations where missing | ||
| - Add null checks where needed | ||
| - Fix imports/exports | ||
| - Add missing dependencies | ||
| - Update type definitions | ||
| - Fix configuration files | ||
|
|
||
| **DON'T:** | ||
| - Refactor unrelated code | ||
| - Change architecture | ||
| - Rename variables (unless causing error) | ||
| - Add new features | ||
| - Change logic flow (unless fixing error) | ||
| - Optimize performance or style | ||
|
|
||
| ## Priority Levels | ||
|
|
||
| | Level | Symptoms | Action | | ||
| |-------|----------|--------| | ||
| | CRITICAL | Build completely broken, no dev server | Fix immediately | | ||
| | HIGH | Single file failing, new code type errors | Fix soon | | ||
| | MEDIUM | Linter warnings, deprecated APIs | Fix when possible | | ||
|
|
||
| ## Quick Recovery | ||
|
|
||
| ```bash | ||
| # Nuclear option: clear all caches | ||
| rm -rf .next node_modules/.cache && npm run build | ||
|
|
||
| # Reinstall dependencies | ||
| rm -rf node_modules package-lock.json && npm install | ||
|
|
||
| # Fix ESLint auto-fixable | ||
| npx eslint . --fix | ||
| ``` |
There was a problem hiding this comment.
Don't let the build fixer rewrite dependencies unprompted.
Line 867 and Lines 893-895 tell the agent to add missing dependencies and even delete package-lock.json. That conflicts with the “minimal diffs” contract here and with .promptscript/commands.prs Lines 281-286, where missing-dependency cases are supposed to stop and ask the user first.
Suggested change
**DO:**
- Add type annotations where missing
- Add null checks where needed
- Fix imports/exports
-- Add missing dependencies
+- Ask for explicit approval before changing dependencies, manifests, or lockfiles
- Update type definitions
- Fix configuration files
@@
-# Reinstall dependencies
-rm -rf node_modules package-lock.json && npm install
+# Dependency repair changes manifests/lockfiles; stop and ask the user before doing it🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.promptscript/agents.prs around lines 863 - 898, The policy text in the
prompt script includes directives that automatically add missing dependencies
and remove package-lock.json (notably the "Add missing dependencies" bullet and
the Quick Recovery commands that run "rm -rf package-lock.json"), which
conflicts with the minimal-diff/stop-and-ask flow in .promptscript/commands.prs;
update the .promptscript/agents.prs content so that the "Add missing
dependencies" instruction is changed to require user confirmation (or to
instruct the agent to stop and ask) and remove or guard the package-lock.json
deletion from the Quick Recovery section, replacing it with a note to prompt the
user before any destructive actions; ensure references to these exact strings
("Add missing dependencies", "rm -rf package-lock.json") are updated so the
agent follows the stop-and-ask behavior rather than performing automatic
deletions.
There was a problem hiding this comment.
This content is verbatim from the original agents/build-error-resolver.md in the ECC repository. The "add missing dependencies" and "delete lock file" instructions are part of the original agent's recovery strategies. Changing the behavior here would break fidelity with the source — content improvements should be separate PRs to the original agent files.
There was a problem hiding this comment.
@mrwogu, understood — thank you for the clarification. Since .promptscript/agents.prs is a verbatim fidelity mirror of the original agents/build-error-resolver.md, modifying the behavior here would indeed break that fidelity contract. I'll withdraw the suggestion; any behavioral improvements (like the stop-and-ask guardrail for dependency changes) should be raised against the original agents/build-error-resolver.md in a separate PR.
(ミ` ω ´ミ)
Noted for future reviews — behavior changes belong upstream.
✏️ Learnings added
Learnt from: mrwogu
Repo: affaan-m/everything-claude-code PR: 756
File: .promptscript/agents.prs:863-898
Timestamp: 2026-03-22T17:30:07.313Z
Learning: In the affaan-m/everything-claude-code repo, the content of agent definitions inside `.promptscript/agents.prs` is verbatim from the corresponding original agent files (e.g., `agents/build-error-resolver.md`). Do not suggest inline content or behavioral changes to `.prs` agent blocks; any such improvements must be directed to the original agent source files (under `agents/`) via separate PRs to preserve fidelity.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: .cursor/rules/common-development-workflow.md:0-0
Timestamp: 2026-03-01T20:07:46.281Z
Learning: Use tdd-guide agent: write tests first (RED), implement to pass tests (GREEN), refactor (IMPROVE), and verify 80%+ test coverage
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T14:31:21.213Z
Learning: Applies to **/*.{js,ts,jsx,tsx,py,go,rs,kt,java,cpp} : Write tests before implementation as part of TDD workflow (RED → GREEN → IMPROVE), with minimum 80% code coverage required
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/AGENTS.md:0-0
Timestamp: 2026-03-21T10:02:53.983Z
Learning: Follow TDD workflow: write tests first (RED), implement minimally (GREEN), then refactor (IMPROVE), verifying 80%+ coverage
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:49:50.280Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx,py,go,java,kt,cpp,rs} : Write tests before implementation using TDD workflow (write test first in RED state, implement minimally to reach GREEN state, then refactor while maintaining 80%+ coverage)
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/AGENTS.md:0-0
Timestamp: 2026-03-21T10:02:53.983Z
Learning: Write tests before implementation (test-driven development), requiring 80%+ code coverage
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: .cursor/rules/common-testing.md:0-0
Timestamp: 2026-03-01T20:08:27.924Z
Learning: Follow Test-Driven Development (TDD) workflow: write tests first (RED), run failing test, write minimal implementation (GREEN), run passing test, then refactor (IMPROVE), and verify 80%+ coverage
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:50:00.223Z
Learning: Follow TDD workflow: Write test first (RED), write minimal implementation (GREEN), refactor (IMPROVE), verify 80%+ coverage
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: .cursor/rules/common-testing.md:0-0
Timestamp: 2026-03-01T20:08:27.924Z
Learning: Use the tdd-guide agent proactively when developing new features to enforce the write-tests-first approach
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:50:00.223Z
Learning: Applies to **/*.{js,ts,tsx,jsx,py,java,go,kt,cpp,c,rs} : Write tests before implementation with 80%+ code coverage required
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/AGENTS.md:0-0
Timestamp: 2026-03-09T03:37:09.183Z
Learning: Applies to docs/zh-CN/**/*.{js,ts,tsx,go,py} : Write tests before implementation (RED → GREEN → IMPROVE cycle) with minimum 80% code coverage
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:50:00.223Z
Learning: Use build-error-resolver agent for build troubleshooting: analyze errors → fix incrementally → verify after each fix
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/AGENTS.md:0-0
Timestamp: 2026-03-21T10:02:53.984Z
Learning: Use build-error-resolver agent for build failures: analyze error → incrementally fix → verify after each fix
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: .cursor/rules/common-performance.md:0-0
Timestamp: 2026-02-28T10:05:48.562Z
Learning: When build fails, use build-error-resolver agent, analyze error messages, fix incrementally, and verify after each fix
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:49:50.280Z
Learning: Use build-error-resolver agent to troubleshoot build errors incrementally and verify fixes after each step
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/AGENTS.md:0-0
Timestamp: 2026-03-11T04:31:05.187Z
Learning: Use build-error-resolver agent to analyze and incrementally fix build and type errors, verifying after each fix
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: .cursor/rules/common-performance.md:0-0
Timestamp: 2026-03-01T20:08:10.589Z
Learning: If build fails, use build-error-resolver agent, analyze error messages, fix incrementally, and verify after each fix
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T14:31:21.213Z
Learning: Delegate domain tasks to specialized agents: use planner for complex features, architect for system design, tdd-guide for tests, code-reviewer after writing code, security-reviewer before commits
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:49:50.280Z
Learning: Rust code should be reviewed by rust-reviewer agent and build errors resolved by rust-build-resolver agent
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:49:50.280Z
Learning: C++ code should be reviewed by cpp-reviewer agent and build errors resolved by cpp-build-resolver agent
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:49:50.280Z
Learning: Go code should be reviewed by go-reviewer agent and build errors resolved by go-build-resolver agent
Learnt from: mrwogu
Repo: affaan-m/everything-claude-code PR: 756
File: .promptscript/commands.prs:490-497
Timestamp: 2026-03-22T17:29:18.530Z
Learning: In this repo, treat `.promptscript/*.prs` as verbatim fidelity mirrors of their corresponding originals (e.g., the original for `commands/learn.md`). Do not suggest edits in `.prs` to change or hardcode platform-specific paths (such as mapping `~/.claude/skills/learned/` to `.cursor/skills/`). Any platform-specific path remapping must be implemented in the PromptScript compiler’s formatter layer at compile time; if you see an incorrect path in output, direct the fix to the upstream PromptScript compiler rather than modifying the `.prs` sources.
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: .cursor/rules/common-agents.md:0-0
Timestamp: 2026-03-01T20:07:30.799Z
Learning: Use the **build-error-resolver** agent (located in `~/.claude/agents/`) when build failures occur
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/AGENTS.md:0-0
Timestamp: 2026-03-08T12:08:51.781Z
Learning: Delegate domain tasks to specialized agents (planner, architect, tdd-guide, code-reviewer, security-reviewer, etc.) without requiring user prompts
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:49:50.280Z
Learning: Delegate to specialized agents for domain tasks (26 available agents including planner, architect, tdd-guide, code-reviewer, security-reviewer, and language-specific reviewers)
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-19T12:57:45.498Z
Learning: Applies to agents/**/*.md : Agents should be formatted as Markdown with YAML frontmatter containing name, description, tools, and model fields
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:50:00.223Z
Learning: Use specialized agents proactively: complex features → planner, code just written → code-reviewer, bug fix/new feature → tdd-guide, architectural decisions → architect, security-sensitive code → security-reviewer
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-19T12:57:45.498Z
Learning: Follow contributing guidelines from CONTRIBUTING.md for agents (Markdown with frontmatter), skills (clear sections), commands (Markdown with description), and hooks (JSON with matcher and hooks array)
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/CLAUDE.md:0-0
Timestamp: 2026-03-07T22:48:24.598Z
Learning: Applies to docs/zh-CN/agents/**/*.md : Agents must be formatted as Markdown files with YAML front matter containing: name, description, tools, and model
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/AGENTS.md:0-0
Timestamp: 2026-03-21T10:02:53.983Z
Learning: Delegate domain tasks to specialized agents (planner for complex features, tdd-guide for test-driven development, code-reviewer for code quality, security-reviewer for security, architect for architecture decisions)
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:49:50.280Z
Learning: TypeScript/JavaScript code should be reviewed by typescript-reviewer agent
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: .cursor/rules/common-agents.md:0-0
Timestamp: 2026-03-01T20:07:30.799Z
Learning: Use the **planner** agent (located in `~/.claude/agents/`) for implementation planning of complex features and refactoring
| ## Process | ||
|
|
||
| 1. Review the session for extractable patterns | ||
| 2. Identify the most valuable/reusable insight | ||
| 3. Draft the skill file | ||
| 4. Ask user to confirm before saving | ||
| 5. Save to ~/.claude/skills/learned/ | ||
|
|
There was a problem hiding this comment.
Make /learn target-neutral.
Line 496 hardcodes ~/.claude/skills/learned/, but this file is the shared source for non-Claude targets too. That makes the generated shortcut portable only by accident. Keep the instruction abstract and let each compiler target map its own persistence location.
Suggested change
- 5. Save to ~/.claude/skills/learned/
+ 5. Save to the target assistant's learned-skills location (or the project-defined equivalent)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## Process | |
| 1. Review the session for extractable patterns | |
| 2. Identify the most valuable/reusable insight | |
| 3. Draft the skill file | |
| 4. Ask user to confirm before saving | |
| 5. Save to ~/.claude/skills/learned/ | |
| ## Process | |
| 1. Review the session for extractable patterns | |
| 2. Identify the most valuable/reusable insight | |
| 3. Draft the skill file | |
| 4. Ask user to confirm before saving | |
| 5. Save to the target assistant's learned-skills location (or the project-defined equivalent) | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.promptscript/commands.prs around lines 490 - 497, Step 5 currently
hardcodes the persistence path "~/.claude/skills/learned/" which makes the
/learn directive Claude-specific; update the instruction to be target-neutral by
replacing the literal path with an abstract reference like "the target's
configured skills directory" or a placeholder (e.g., "<skills_persist_dir>") and
ensure any code or templates that use the string "~/.claude/skills/learned/"
(search for that exact literal) are changed to read from the target-specific
configuration or environment variable so each compiler target maps to its own
persistence location.
There was a problem hiding this comment.
Good catch. However, this content is verbatim from the original commands/learn.md in the ECC repository, which is Claude Code-specific by design. The PromptScript compiler handles target adaptation at compile time — for Claude targets it preserves the path as-is, while other formatters can remap it to their platform's equivalent (e.g., .cursor/skills/ for Cursor). Changing the source content here would break fidelity with the original. The right fix is in the PromptScript compiler's formatter layer, not in the .prs source — tracked upstream.
There was a problem hiding this comment.
@mrwogu, that makes sense — if the .prs source is intentionally kept as a fidelity mirror of the original commands/learn.md, and the PromptScript compiler's formatter layer is responsible for remapping platform-specific paths at compile time, then the fix does belong upstream rather than in the source file. Thanks for the clear explanation of the compilation architecture.
✏️ Learnings added
Learnt from: mrwogu
Repo: affaan-m/everything-claude-code PR: 756
File: .promptscript/commands.prs:490-497
Timestamp: 2026-03-22T17:29:18.530Z
Learning: In the `affaan-m/everything-claude-code` repo, `.promptscript/*.prs` source files are kept as verbatim fidelity mirrors of their corresponding originals (e.g., `commands/learn.md`). Platform-specific path remapping (e.g., `~/.claude/skills/learned/` → `.cursor/skills/` for Cursor) is handled by the PromptScript compiler's formatter layer at compile time, not in the `.prs` source. Suggesting changes to hardcoded platform paths in `.prs` files is incorrect; such fixes belong in the upstream PromptScript compiler.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: imrobinsingh
Repo: affaan-m/everything-claude-code PR: 503
File: skills/data-scraper-agent/SKILL.md:1-748
Timestamp: 2026-03-15T19:02:48.915Z
Learning: In the `skills/` directory of the `affaan-m/everything-claude-code` repo, the standard convention is to name the skill file `SKILL.md` (uppercase) inside the skill's folder. The lowercase-hyphen naming convention applies to the **folder name** (e.g., `data-scraper-agent/`, `claude-api/`), NOT to the `SKILL.md` file inside it. Flagging `SKILL.md` as a naming violation is incorrect.
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: docs/zh-CN/AGENTS.md:0-0
Timestamp: 2026-03-21T10:02:53.984Z
Learning: Analyze complete commit history before drafting PR summaries; include testing plan in PR description
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: .cursor/rules/common-git-workflow.md:0-0
Timestamp: 2026-03-01T20:07:52.144Z
Learning: Draft comprehensive PR summary and include test plan with TODOs when creating pull requests
Learnt from: CR
Repo: affaan-m/everything-claude-code PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-20T03:50:00.223Z
Learning: In PR workflow: analyze full commit history, draft comprehensive summary, include test plan, push with `-u` flag
|
Interesting PromptScript integration concept. Will review this week. |
|
Closing — this modifies core ECC files (patterns.md, performance.md, coding-standards) to promote a third-party product (toonformat.dev). We don't allow promotional modifications to existing skills/rules. If TOON proves widely adopted, we'd consider a standalone skill in a future PR. |
|
@affaan-m I think you got the PR wrong (TOON) |
Summary
This PR adds PromptScript integration to ECC, enabling single-source compilation of AI instructions to 10+ native formats simultaneously.
7 source files (1,992 lines) → 300+ compiled output files across Claude Code, GitHub Copilot, Cursor, Factory AI, OpenCode, Windsurf, Codex, Gemini CLI, and Antigravity.
What's included
promptscript.yamloverwrite: falsesafety.promptscript/project.prs.promptscript/context.prs.promptscript/standards.prs.promptscript/restrictions.prs.promptscript/commands.prs.promptscript/agents.prsHow it works
One
prs compilegenerates:CLAUDE.md+.claude/agents/+.claude/commands/+.claude/skills/.github/copilot-instructions.md+.github/agents/+.github/prompts/+.github/skills/.cursor/rules/project.mdc+.cursor/commands/AGENTS.md+.factory/droids/+.factory/commands/+.factory/skills/OPENCODE.md+.opencode/agents/+.opencode/skills/GEMINI.md+.gemini/commands/+.gemini/skills/.windsurf/rules/project.md.agent/rules/project.md(Antigravity)Safety:
output.overwrite: falseprevents overwriting existing files. Use--dry-runto preview.Fidelity validation
Compiled outputs were systematically compared against original ECC files:
Why PromptScript for ECC?
ECC already supports multiple AI tools (Claude Code, Cursor, OpenCode). Currently each format is maintained separately. PromptScript provides:
.prs, compile everywhereskills/*/SKILL.mdare automatically included in all targetsprs validate --strictcatches syntax issues before they reach userspromptscript.yamlWhat this PR does NOT do
output.overwrite: falseensures existing files are never silently overwrittenNote: 8 of 28 agents defined
Only the 8 core agents are defined in
agents.prswith full content. The remaining 20 (language-specific reviewers, resolvers, etc.) exist as standalone files inagents/. The@knowledgeblock inproject.prsdocuments all 28 for reference. PromptScript auto-discovers skills fromskills/*/SKILL.md— agent directory auto-discovery is on the PromptScript roadmap.Test plan
prs validate --strictpassesprs compile --dry-runshows expected outputprs compile --output /tmp/testgenerates all targetsoutput.overwrite: falseprevents overwriting existing files