Skip to content

feat: add install catalog and project config autodetection#878

Merged
affaan-m merged 1 commit intomainfrom
feat/install-catalog-project-config
Mar 27, 2026
Merged

feat: add install catalog and project config autodetection#878
affaan-m merged 1 commit intomainfrom
feat/install-catalog-project-config

Conversation

@affaan-m
Copy link
Copy Markdown
Owner

@affaan-m affaan-m commented Mar 24, 2026

Summary\n- add an \ command for install profiles and components\n- auto-detect \ from the project root for plan/apply flows\n- cover the new CLI and config behaviors with tests\n\n## Test Plan\n- node tests/lib/install-config.test.js\n- node tests/scripts/ecc.test.js\n- node tests/scripts/install-plan.test.js\n- node tests/scripts/install-apply.test.js\n- node tests/scripts/catalog.test.js


Summary by cubic

Adds a new install catalog CLI and auto-detects project install config to simplify planning and applying installs. You can now discover profiles/components easily and run plan/apply without passing a config path; plan also runs with no args when a project config exists.

  • New Features
    • Added ecc catalog with:
      • profiles, components [--family|--target] (supports family aliases like language/lang), and show <component-id> (prints resolved modules); all support --json.
    • Auto-detect ecc-install.json from the project root for plan and install when --config isn’t provided; plan proceeds with no args if a config is found.
    • Preserve legacy language installs when languages are passed (they take precedence over project config).
    • Exposed getInstallComponent() in install manifests; updated ecc help/command routing and added tests for catalog and config autodetection.

Written for commit b4296c7. Summary will update on new commits.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a new catalog command to discover and list install profiles and components with filtering options (--family, --target)
    • Implemented automatic detection of default install configuration files, eliminating the need to explicitly specify config paths
    • Added detailed component information viewing with module-level details and dependencies

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 24, 2026

Analyzing 5000 commits...

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

affaan-m has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

📝 Walkthrough

Walkthrough

A new catalog CLI subcommand is introduced to discover and display ECC install components and profiles. Alongside this, auto-detection of default install config files is added to existing install scripts. Supporting helper functions are exported from install-manifest and install-config modules, with comprehensive test coverage for both new and updated functionality.

Changes

Cohort / File(s) Summary
Catalog CLI Feature
scripts/catalog.js, scripts/ecc.js
New executable script implementing catalog subcommand with profiles, components, and show operations. CLI integration updated in main ecc.js command registry with help text examples.
Auto-detect Default Install Config
scripts/install-plan.js, scripts/install-apply.js, scripts/lib/install/config.js
Added findDefaultInstallConfigPath() helper function and integrated auto-detection logic into install scripts when --config is not provided. Updated help/exit behavior in install-plan.js.
Component Manifest API
scripts/lib/install-manifests.js
New exported getInstallComponent() function returns detailed component objects with resolved module entries, targets intersection, and metadata.
Catalog CLI Tests
tests/scripts/catalog.test.js
New test file covering help display, profile/component listing with filtering (--family, --target), JSON output, component detail view, and error cases.
Integration & Unit Tests
tests/scripts/ecc.test.js, tests/scripts/install-apply.test.js, tests/scripts/install-plan.test.js, tests/lib/install-config.test.js
Extended existing test suites to validate catalog subcommand integration, auto-detect config behavior in install scripts, and new findDefaultInstallConfigPath() function.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI as catalog.js
    participant Loader as install-manifests
    participant FS as File System
    
    User->>CLI: catalog show component-id --json
    CLI->>Loader: getInstallComponent(componentId)
    Loader->>FS: Load install manifests
    FS-->>Loader: Manifest data
    Loader->>Loader: Normalize & validate ID
    Loader->>Loader: Build component object<br/>(modules, targets, metadata)
    Loader-->>CLI: Component object
    CLI->>CLI: Serialize to JSON
    CLI-->>User: JSON output
Loading
sequenceDiagram
    participant User
    participant Script as install-plan.js
    participant ConfigFinder as config.js
    participant FS as File System
    participant Loader as install-manifests
    
    User->>Script: invoke with no --config
    Script->>ConfigFinder: findDefaultInstallConfigPath({ cwd })
    ConfigFinder->>FS: Check for ecc-install.json
    alt Config exists
        FS-->>ConfigFinder: Path found
        ConfigFinder-->>Script: Return path
        Script->>Loader: loadInstallConfig(path)
        Loader-->>Script: Config loaded
    else Config not found
        FS-->>ConfigFinder: null
        ConfigFinder-->>Script: null
        Script->>Script: Display help/exit
    end
    Script-->>User: Planning output or help
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 Hops through manifests with glee,
Catalog commands, wild and free!
Auto-detect, components galore,
Each profile opens up new doors! ✨🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main changes: adding a new install catalog feature and implementing project config autodetection for the install workflows.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/install-catalog-project-config

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 and usage tips.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 24, 2026

Analysis Complete

Generated ECC bundle from 500 commits | Confidence: 100%

View Pull Request #879

Repository Profile
Attribute Value
Language JavaScript
Framework Not detected
Commit Convention conventional
Test Directory separate
Detected Workflows (8)
Workflow Description
database-migration Database schema changes with migration files
feature-development Standard feature implementation workflow
add-new-skill Adds a new skill to the system, including its documentation and, if needed, cross-harness copies for Codex/Cursor/Antigravity compatibility.
add-new-agent Adds a new agent to the platform, including agent definition and registration in documentation/catalog.
add-language-ruleset Adds a new set of language-specific rules (coding style, hooks, patterns, security, testing) to the rules directory.
Generated Instincts (16)
Domain Count
git 2
code-style 3
testing 3
workflow 8

After merging, import with:

/instinct-import .claude/homunculus/instincts/inherited/everything-claude-code-instincts.yaml

Files

  • .claude/ecc-tools.json
  • .claude/skills/everything-claude-code/SKILL.md
  • .agents/skills/everything-claude-code/SKILL.md
  • .agents/skills/everything-claude-code/agents/openai.yaml
  • .claude/identity.json
  • .codex/config.toml
  • .codex/AGENTS.md
  • .codex/agents/explorer.toml
  • .codex/agents/reviewer.toml
  • .codex/agents/docs-researcher.toml
  • .claude/homunculus/instincts/inherited/everything-claude-code-instincts.yaml
  • .claude/rules/everything-claude-code-guardrails.md
  • .claude/research/everything-claude-code-research-playbook.md
  • .claude/team/everything-claude-code-team-config.json
  • .claude/enterprise/controls.md
  • .claude/commands/database-migration.md
  • .claude/commands/feature-development.md
  • .claude/commands/add-new-skill.md

ECC Tools | Everything Claude Code

Copy link
Copy Markdown

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

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: 1166c6ab58

ℹ️ 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 on lines +16 to +18
catalog: {
script: 'catalog.js',
description: 'Discover install profiles and component IDs',
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 Include catalog script in published package files

Adding the catalog subcommand here makes ecc delegate to scripts/catalog.js, but package.json’s files allowlist is not updated to ship that new script. This works from a full repo checkout, but in npm-installed environments ecc catalog ... will fail at runtime because the delegated script is missing from the package tarball; please add scripts/catalog.js to the published file list.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
scripts/install-plan.js (1)

237-240: Edge case: non-actionable flags without config produce a cryptic error.

The condition process.argv.length <= 2 only triggers help when there are zero user arguments. However, if a user runs node install-plan.js --json without an ecc-install.json present, process.argv.length is 3, so help won't be shown. Instead, normalizeInstallRequest will throw "No install profile, module IDs, or included component IDs were provided", which is less helpful than showing usage.

Consider checking whether any actionable options are present (profile, modules, components, list flags) rather than relying on argv length:

💡 Suggested improvement
-    if (process.argv.length <= 2 && !config) {
+    const hasActionableOptions = options.profileId
+      || options.moduleIds.length > 0
+      || options.includeComponentIds.length > 0
+      || options.listProfiles
+      || options.listModules
+      || options.listComponents;
+
+    if (!hasActionableOptions && !config) {
       showHelp();
       process.exit(0);
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/install-plan.js` around lines 237 - 240, The current check uses
process.argv.length to decide to show help, which misses runs with only
non-actionable flags (e.g., --json) and leads to a cryptic error from
normalizeInstallRequest; update the pre-flight check to detect whether any
actionable options were provided (presence of config, a profile flag, module
IDs, included component IDs, or list flags) before calling
normalizeInstallRequest and if none are present call showHelp() and exit;
reference the existing symbols config, normalizeInstallRequest, showHelp and the
parsed options (or process.argv flags like
--profile/--modules/--components/--list) to implement the more precise presence
check.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/catalog.js`:
- Around line 77-88: The parseArgs logic currently accepts --family and --target
for every command but main() only uses them for the "components" command, so you
must validate flag applicability and reject incompatible flags: update parseArgs
(the branch handling '--family' and '--target' that sets parsed.family and
parsed.target) to check parsed.command (or the command being parsed) and throw a
clear Error when these flags are passed to commands other than "components";
likewise add the same validation for the other flag parsing block around lines
143-177 so any unsupported flag is rejected rather than silently ignored by
main().

---

Nitpick comments:
In `@scripts/install-plan.js`:
- Around line 237-240: The current check uses process.argv.length to decide to
show help, which misses runs with only non-actionable flags (e.g., --json) and
leads to a cryptic error from normalizeInstallRequest; update the pre-flight
check to detect whether any actionable options were provided (presence of
config, a profile flag, module IDs, included component IDs, or list flags)
before calling normalizeInstallRequest and if none are present call showHelp()
and exit; reference the existing symbols config, normalizeInstallRequest,
showHelp and the parsed options (or process.argv flags like
--profile/--modules/--components/--list) to implement the more precise presence
check.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e67f1b69-4d7e-4690-a36e-84548277b757

📥 Commits

Reviewing files that changed from the base of the PR and between df4f2df and 1166c6a.

📒 Files selected for processing (11)
  • scripts/catalog.js
  • scripts/ecc.js
  • scripts/install-apply.js
  • scripts/install-plan.js
  • scripts/lib/install-manifests.js
  • scripts/lib/install/config.js
  • tests/lib/install-config.test.js
  • tests/scripts/catalog.test.js
  • tests/scripts/ecc.test.js
  • tests/scripts/install-apply.test.js
  • tests/scripts/install-plan.test.js

Comment on lines +77 to +88
} else if (arg === '--family') {
if (!args[index + 1]) {
throw new Error('Missing value for --family');
}
parsed.family = normalizeFamily(args[index + 1]);
index += 1;
} else if (arg === '--target') {
if (!args[index + 1]) {
throw new Error('Missing value for --target');
}
parsed.target = args[index + 1];
index += 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Reject command-incompatible flags instead of accepting and ignoring them.

parseArgs currently allows --family / --target for all commands, but main() only applies them to components. That means invalid invocations (for example, show ... --target cursor) succeed while silently discarding user input.

Suggested fix
 function parseArgs(argv) {
@@
   for (let index = 1; index < args.length; index += 1) {
@@
   }
+
+  if (parsed.command !== 'components' && parsed.family) {
+    throw new Error('--family is only supported with the components command');
+  }
+  if (parsed.command !== 'components' && parsed.target) {
+    throw new Error('--target is only supported with the components command');
+  }

   return parsed;
 }
As per coding guidelines "Always validate all user input before processing at system boundaries" and "Fail fast with clear error messages when validation fails".

Also applies to: 143-177

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/catalog.js` around lines 77 - 88, The parseArgs logic currently
accepts --family and --target for every command but main() only uses them for
the "components" command, so you must validate flag applicability and reject
incompatible flags: update parseArgs (the branch handling '--family' and
'--target' that sets parsed.family and parsed.target) to check parsed.command
(or the command being parsed) and throw a clear Error when these flags are
passed to commands other than "components"; likewise add the same validation for
the other flag parsing block around lines 143-177 so any unsupported flag is
rejected rather than silently ignored by main().

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 11 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="scripts/lib/install-manifests.js">

<violation number="1" location="scripts/lib/install-manifests.js:226">
P2: Validate component module IDs before mapping; the current logic silently drops unknown IDs and can return inconsistent component data.</violation>
</file>

<file name="scripts/catalog.js">

<violation number="1" location="scripts/catalog.js:65">
P2: Reject `--family` and `--target` unless the `components` subcommand is used; right now other commands accept these flags and silently ignore them, which hides invalid CLI input.</violation>

<violation number="2" location="scripts/catalog.js:81">
P2: `--family` accepts another flag as its value, so malformed input is silently misparsed instead of raising a missing-value error.</violation>

<violation number="3" location="scripts/catalog.js:87">
P2: `--target` also accepts another flag as its value, leading to incorrect argument parsing on malformed input.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

throw new Error(`Unknown install component: ${normalizedComponentId}`);
}

const moduleIds = dedupeStrings(component.modules);
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 24, 2026

Choose a reason for hiding this comment

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

P2: Validate component module IDs before mapping; the current logic silently drops unknown IDs and can return inconsistent component data.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/lib/install-manifests.js, line 226:

<comment>Validate component module IDs before mapping; the current logic silently drops unknown IDs and can return inconsistent component data.</comment>

<file context>
@@ -210,6 +210,45 @@ function listInstallComponents(options = {}) {
+    throw new Error(`Unknown install component: ${normalizedComponentId}`);
+  }
+
+  const moduleIds = dedupeStrings(component.modules);
+  const modules = moduleIds
+    .map(moduleId => manifests.modulesById.get(moduleId))
</file context>
Suggested change
const moduleIds = dedupeStrings(component.modules);
const moduleIds = dedupeStrings(component.modules);
assertKnownModuleIds(moduleIds, manifests);
Fix with Cubic

if (!args[index + 1]) {
throw new Error('Missing value for --target');
}
parsed.target = args[index + 1];
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 24, 2026

Choose a reason for hiding this comment

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

P2: --target also accepts another flag as its value, leading to incorrect argument parsing on malformed input.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/catalog.js, line 87:

<comment>`--target` also accepts another flag as its value, leading to incorrect argument parsing on malformed input.</comment>

<file context>
@@ -0,0 +1,186 @@
+      if (!args[index + 1]) {
+        throw new Error('Missing value for --target');
+      }
+      parsed.target = args[index + 1];
+      index += 1;
+    } else if (parsed.command === 'show' && !parsed.componentId) {
</file context>
Fix with Cubic

if (!args[index + 1]) {
throw new Error('Missing value for --family');
}
parsed.family = normalizeFamily(args[index + 1]);
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 24, 2026

Choose a reason for hiding this comment

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

P2: --family accepts another flag as its value, so malformed input is silently misparsed instead of raising a missing-value error.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/catalog.js, line 81:

<comment>`--family` accepts another flag as its value, so malformed input is silently misparsed instead of raising a missing-value error.</comment>

<file context>
@@ -0,0 +1,186 @@
+      if (!args[index + 1]) {
+        throw new Error('Missing value for --family');
+      }
+      parsed.family = normalizeFamily(args[index + 1]);
+      index += 1;
+    } else if (arg === '--target') {
</file context>
Fix with Cubic


if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
parsed.help = true;
return parsed;
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 24, 2026

Choose a reason for hiding this comment

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

P2: Reject --family and --target unless the components subcommand is used; right now other commands accept these flags and silently ignore them, which hides invalid CLI input.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/catalog.js, line 65:

<comment>Reject `--family` and `--target` unless the `components` subcommand is used; right now other commands accept these flags and silently ignore them, which hides invalid CLI input.</comment>

<file context>
@@ -0,0 +1,186 @@
+
+  if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
+    parsed.help = true;
+    return parsed;
+  }
+
</file context>
Fix with Cubic

@affaan-m affaan-m force-pushed the feat/install-catalog-project-config branch from 1166c6a to b4296c7 Compare March 27, 2026 09:57
@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 27, 2026

Analyzing 5000 commits...

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

affaan-m has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 27, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

@affaan-m affaan-m merged commit 7633386 into main Mar 27, 2026
38 checks passed
@affaan-m affaan-m deleted the feat/install-catalog-project-config branch March 27, 2026 10:00
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.

1 participant