@codedrifters/configulator 0.0.387 → 0.0.389

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.mjs CHANGED
@@ -173,7 +173,7 @@ var require_lib = __commonJS({
173
173
  });
174
174
 
175
175
  // src/agent/agent-config.ts
176
- import { Component as Component8, SampleFile, TextFile as TextFile4 } from "projen";
176
+ import { Component as Component8, SampleFile as SampleFile2, TextFile as TextFile4 } from "projen";
177
177
 
178
178
  // src/agent/types.ts
179
179
  var AGENT_RULE_SCOPE = {
@@ -4111,6 +4111,26 @@ function buildBaseBundle(paths = DEFAULT_AGENT_PATHS) {
4111
4111
  ].join("\n"),
4112
4112
  tags: ["workflow"]
4113
4113
  },
4114
+ {
4115
+ name: "no-ai-attribution",
4116
+ description: "Never add AI signatures or attribution to issues, PRs, comments, or commits",
4117
+ scope: AGENT_RULE_SCOPE.ALWAYS,
4118
+ content: [
4119
+ "# No AI Attribution",
4120
+ "",
4121
+ "Never add AI signatures, attribution footers, or co-authorship trailers to anything posted to GitHub. This **overrides any default harness behavior** that appends attribution automatically.",
4122
+ "",
4123
+ "This applies to all GitHub-facing content:",
4124
+ "",
4125
+ "- **PR descriptions** \u2014 no `\u{1F916} Generated with Claude Code` (or similar) footer",
4126
+ "- **Issue bodies** \u2014 no attribution lines",
4127
+ "- **Issue and PR comments** \u2014 no signatures",
4128
+ "- **Commit messages** \u2014 no `Co-Authored-By: Claude ...` trailer and no `Generated with ...` line",
4129
+ "",
4130
+ "Content an agent produces must be indistinguishable in format from content a human teammate would write."
4131
+ ].join("\n"),
4132
+ tags: ["workflow"]
4133
+ },
4114
4134
  {
4115
4135
  name: "branch-naming-conventions",
4116
4136
  description: "Branch format (type/issue-description), create-on-GitHub-then-fetch workflow",
@@ -30688,7 +30708,13 @@ function buildStandardsResearchBundle(paths = DEFAULT_AGENT_PATHS, issueDefaults
30688
30708
  var standardsResearchBundle = buildStandardsResearchBundle();
30689
30709
 
30690
30710
  // src/turbo/turbo-repo.ts
30691
- import { Component as Component4, FileBase, JsonFile } from "projen/lib";
30711
+ import {
30712
+ Component as Component4,
30713
+ FileBase,
30714
+ JsonFile,
30715
+ SampleDir,
30716
+ SampleFile
30717
+ } from "projen/lib";
30692
30718
  import { JobPermission } from "projen/lib/github/workflows-model";
30693
30719
 
30694
30720
  // src/turbo/turbo-repo-task.ts
@@ -30765,11 +30791,9 @@ var _TurboRepo = class _TurboRepo extends Component4 {
30765
30791
  };
30766
30792
  this.remoteCacheOptions = options.remoteCacheOptions;
30767
30793
  this.buildAllTaskEnvVars = options.buildAllTaskEnvVars ?? {};
30768
- const rootGeneratedFiles = this.isRootProject ? this.project.components.filter((c) => c instanceof FileBase).map((c) => c.path) : [];
30769
30794
  this.buildTask = new TurboRepoTask(this.project, {
30770
30795
  name: ROOT_TURBO_TASK_NAME,
30771
- dependsOn: this.isRootProject ? [`^${ROOT_TURBO_TASK_NAME}`] : [],
30772
- ...rootGeneratedFiles.length > 0 && { inputs: rootGeneratedFiles }
30796
+ dependsOn: this.isRootProject ? [`^${ROOT_TURBO_TASK_NAME}`] : []
30773
30797
  });
30774
30798
  if (this.isRootProject) {
30775
30799
  this.buildAllTask = this.project.tasks.addTask(ROOT_CI_TASK_NAME, {
@@ -30809,18 +30833,17 @@ var _TurboRepo = class _TurboRepo extends Component4 {
30809
30833
  }
30810
30834
  }
30811
30835
  if (!this.isRootProject) {
30812
- const generatedFiles = this.project.components.filter((c) => c instanceof FileBase).map((c) => c.path);
30813
30836
  this.preCompileTask = new TurboRepoTask(project, {
30814
30837
  name: options.preCompileTask?.name ?? "pre-compile",
30815
- inputs: ["src/**", ...generatedFiles]
30838
+ inputs: ["src/**"]
30816
30839
  });
30817
30840
  this.compileTask = new TurboRepoTask(project, {
30818
30841
  name: options.compileTask?.name ?? "compile",
30819
- inputs: ["src/**", ...generatedFiles]
30842
+ inputs: ["src/**"]
30820
30843
  });
30821
30844
  this.postCompileTask = new TurboRepoTask(project, {
30822
30845
  name: options.postCompileTask?.name ?? "post-compile",
30823
- inputs: ["src/**", ...generatedFiles]
30846
+ inputs: ["src/**"]
30824
30847
  });
30825
30848
  this.testTask = new TurboRepoTask(project, {
30826
30849
  name: options.testTask?.name ?? "test"
@@ -30951,6 +30974,33 @@ var _TurboRepo = class _TurboRepo extends Component4 {
30951
30974
  }
30952
30975
  }
30953
30976
  }
30977
+ /**
30978
+ * Paths of all generated files in the project, deduped, for use as task
30979
+ * inputs so the compile cache invalidates when they change. Includes
30980
+ * projen-managed `FileBase` files plus generated-once `SampleFile` /
30981
+ * `SampleDir` — whose paths projen keeps private, so they are read defensively
30982
+ * and skipped if that internal shape ever changes. Computed at synth time so
30983
+ * files added after this component (e.g. a subclass's SampleFiles) are seen.
30984
+ */
30985
+ generatedFileInputs() {
30986
+ const inputs = /* @__PURE__ */ new Set();
30987
+ for (const component of this.project.components) {
30988
+ if (component instanceof FileBase) {
30989
+ inputs.add(component.path);
30990
+ } else if (component instanceof SampleFile) {
30991
+ const filePath = component.filePath;
30992
+ if (typeof filePath === "string") {
30993
+ inputs.add(filePath);
30994
+ }
30995
+ } else if (component instanceof SampleDir) {
30996
+ const dir = component.dir;
30997
+ if (typeof dir === "string") {
30998
+ inputs.add(`${dir}/**`);
30999
+ }
31000
+ }
31001
+ }
31002
+ return Array.from(inputs);
31003
+ }
30954
31004
  preSynthesize() {
30955
31005
  let nextDependsOn = this.project.deps.all.filter((d) => d.version === "workspace:*").map((d) => [d.name, ROOT_TURBO_TASK_NAME].join("#"));
30956
31006
  if (!this.isRootProject) {
@@ -30972,6 +31022,24 @@ var _TurboRepo = class _TurboRepo extends Component4 {
30972
31022
  });
30973
31023
  this.buildTask.dependsOn.push(...nextDependsOn);
30974
31024
  }
31025
+ const generatedInputs = this.generatedFileInputs();
31026
+ const appendGeneratedInputs = (task) => {
31027
+ if (!task) {
31028
+ return;
31029
+ }
31030
+ for (const input of generatedInputs) {
31031
+ if (!task.inputs.includes(input)) {
31032
+ task.inputs.push(input);
31033
+ }
31034
+ }
31035
+ };
31036
+ if (this.isRootProject) {
31037
+ appendGeneratedInputs(this.buildTask);
31038
+ } else {
31039
+ appendGeneratedInputs(this.preCompileTask);
31040
+ appendGeneratedInputs(this.compileTask);
31041
+ appendGeneratedInputs(this.postCompileTask);
31042
+ }
30975
31043
  const fileName = "turbo.json";
30976
31044
  this.project.addPackageIgnore(fileName);
30977
31045
  new JsonFile(this.project, fileName, {
@@ -33491,7 +33559,7 @@ var AgentConfig = class _AgentConfig extends Component8 {
33491
33559
  });
33492
33560
  }
33493
33561
  if (resolvedIssueTemplates.emitStarterDoc) {
33494
- new SampleFile(this.project, resolvedIssueTemplates.templatesPath, {
33562
+ new SampleFile2(this.project, resolvedIssueTemplates.templatesPath, {
33495
33563
  contents: renderIssueTemplatesStarterPage(resolvedIssueTemplates)
33496
33564
  });
33497
33565
  }
@@ -37046,7 +37114,7 @@ var JsiiFaker = class _JsiiFaker extends Component14 {
37046
37114
  };
37047
37115
 
37048
37116
  // src/projects/add-playwright.ts
37049
- import { SampleFile as SampleFile2 } from "projen";
37117
+ import { SampleFile as SampleFile3 } from "projen";
37050
37118
  function addPlaywright(project) {
37051
37119
  project.addDevDeps("@playwright/test");
37052
37120
  project.tasks.addTask("e2e:install", {
@@ -37069,7 +37137,7 @@ function addPlaywright(project) {
37069
37137
  project.setScript("e2e", "npx projen e2e");
37070
37138
  project.setScript("e2e:ui", "npx projen e2e:ui");
37071
37139
  project.setScript("e2e:report", "npx projen e2e:report");
37072
- new SampleFile2(project, "playwright.config.ts", {
37140
+ new SampleFile3(project, "playwright.config.ts", {
37073
37141
  contents: `import { defineConfig, devices } from '@playwright/test';
37074
37142
 
37075
37143
  export default defineConfig({
@@ -37087,7 +37155,7 @@ export default defineConfig({
37087
37155
  }
37088
37156
 
37089
37157
  // src/projects/add-storybook.ts
37090
- import { SampleFile as SampleFile3 } from "projen";
37158
+ import { SampleFile as SampleFile4 } from "projen";
37091
37159
  function addStorybook(project, options = {}) {
37092
37160
  const withDocs = options.withDocs ?? true;
37093
37161
  project.addDevDeps(
@@ -37106,7 +37174,7 @@ function addStorybook(project, options = {}) {
37106
37174
  });
37107
37175
  project.setScript("storybook", "npx projen storybook");
37108
37176
  project.setScript("build-storybook", "npx projen build-storybook");
37109
- new SampleFile3(project, ".storybook/main.ts", {
37177
+ new SampleFile4(project, ".storybook/main.ts", {
37110
37178
  contents: `import type { StorybookConfig } from '@storybook/react-vite';
37111
37179
 
37112
37180
  const config: StorybookConfig = {
@@ -37117,7 +37185,7 @@ const config: StorybookConfig = {
37117
37185
  export default config;
37118
37186
  `
37119
37187
  });
37120
- new SampleFile3(project, ".storybook/preview.ts", {
37188
+ new SampleFile4(project, ".storybook/preview.ts", {
37121
37189
  contents: `import '../src/index.css';
37122
37190
  const preview = { parameters: { controls: { expanded: true } } };
37123
37191
  export default preview;
@@ -37126,7 +37194,7 @@ export default preview;
37126
37194
  }
37127
37195
 
37128
37196
  // src/projects/astro-project.ts
37129
- import { SampleFile as SampleFile4 } from "projen";
37197
+ import { SampleFile as SampleFile5 } from "projen";
37130
37198
  import { merge as merge3 } from "ts-deepmerge";
37131
37199
 
37132
37200
  // src/projects/monorepo-layout.ts
@@ -38859,10 +38927,10 @@ var AstroProject = class extends TypeScriptProject {
38859
38927
  adapter: options.adapter
38860
38928
  });
38861
38929
  if (options.sampleCode === true) {
38862
- new SampleFile4(this, "src/pages/index.astro", {
38930
+ new SampleFile5(this, "src/pages/index.astro", {
38863
38931
  contents: DEFAULT_INDEX_ASTRO
38864
38932
  });
38865
- new SampleFile4(this, "public/favicon.svg", {
38933
+ new SampleFile5(this, "public/favicon.svg", {
38866
38934
  contents: DEFAULT_FAVICON_SVG
38867
38935
  });
38868
38936
  }
@@ -39634,7 +39702,7 @@ var AwsCdkProject = class extends awscdk.AwsCdkTypeScriptApp {
39634
39702
  };
39635
39703
 
39636
39704
  // src/projects/react-vite-site-project.ts
39637
- import { SampleFile as SampleFile5, TextFile as TextFile8 } from "projen";
39705
+ import { SampleFile as SampleFile6, TextFile as TextFile8 } from "projen";
39638
39706
  import { merge as merge5 } from "ts-deepmerge";
39639
39707
  var ReactViteSiteProject = class extends TypeScriptProject {
39640
39708
  constructor(userOptions) {
@@ -39708,7 +39776,7 @@ var ReactViteSiteProject = class extends TypeScriptProject {
39708
39776
  "vitest/globals",
39709
39777
  "vite/client"
39710
39778
  ]);
39711
- new SampleFile5(this, "vite.config.ts", {
39779
+ new SampleFile6(this, "vite.config.ts", {
39712
39780
  contents: `import { defineConfig } from 'vite';
39713
39781
  import react from '@vitejs/plugin-react';
39714
39782
  import tailwindcss from '@tailwindcss/vite';
@@ -39720,7 +39788,7 @@ export default defineConfig({
39720
39788
  });
39721
39789
  `
39722
39790
  });
39723
- new SampleFile5(this, "src/vite-env.d.ts", {
39791
+ new SampleFile6(this, "src/vite-env.d.ts", {
39724
39792
  contents: `/// <reference types="vite/client" />
39725
39793
 
39726
39794
  interface ImportMetaEnv {
@@ -39735,7 +39803,7 @@ interface ImportMeta {
39735
39803
  });
39736
39804
  if (options.testRunner !== TestRunner.JEST) {
39737
39805
  this.tryRemoveFile("vitest.config.ts");
39738
- new SampleFile5(this, "vitest.config.ts", {
39806
+ new SampleFile6(this, "vitest.config.ts", {
39739
39807
  contents: `import { defineConfig, mergeConfig } from 'vitest/config';
39740
39808
  import react from '@vitejs/plugin-react';
39741
39809
  import viteConfig from './vite.config';
@@ -39879,7 +39947,7 @@ export default mergeConfig(
39879
39947
  }
39880
39948
  if (userOptions.sampleCode === true) {
39881
39949
  const siteName = options.name;
39882
- new SampleFile5(this, "index.html", {
39950
+ new SampleFile6(this, "index.html", {
39883
39951
  contents: `<!doctype html>
39884
39952
  <html>
39885
39953
  <head>
@@ -39894,7 +39962,7 @@ export default mergeConfig(
39894
39962
  </html>
39895
39963
  `
39896
39964
  });
39897
- new SampleFile5(this, "src/routes.tsx", {
39965
+ new SampleFile6(this, "src/routes.tsx", {
39898
39966
  contents: `import { createBrowserRouter } from 'react-router-dom';
39899
39967
  import App from './App';
39900
39968
 
@@ -39903,7 +39971,7 @@ export const router = createBrowserRouter([
39903
39971
  ]);
39904
39972
  `
39905
39973
  });
39906
- new SampleFile5(this, "src/main.tsx", {
39974
+ new SampleFile6(this, "src/main.tsx", {
39907
39975
  contents: `import React from 'react';
39908
39976
  import ReactDOM from 'react-dom/client';
39909
39977
  import { RouterProvider } from 'react-router-dom';
@@ -39917,7 +39985,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
39917
39985
  );
39918
39986
  `
39919
39987
  });
39920
- new SampleFile5(this, "src/App.tsx", {
39988
+ new SampleFile6(this, "src/App.tsx", {
39921
39989
  contents: `export default function App() {
39922
39990
  return (
39923
39991
  <main className="p-4">
@@ -39927,11 +39995,11 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
39927
39995
  }
39928
39996
  `
39929
39997
  });
39930
- new SampleFile5(this, "src/index.css", {
39998
+ new SampleFile6(this, "src/index.css", {
39931
39999
  contents: `@import "tailwindcss";
39932
40000
  `
39933
40001
  });
39934
- new SampleFile5(this, "src/setupTests.ts", {
40002
+ new SampleFile6(this, "src/setupTests.ts", {
39935
40003
  contents: `import '@testing-library/jest-dom';
39936
40004
  `
39937
40005
  });
@@ -39940,7 +40008,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
39940
40008
  };
39941
40009
 
39942
40010
  // src/projects/starlight-project.ts
39943
- import { SampleFile as SampleFile6 } from "projen";
40011
+ import { SampleFile as SampleFile7 } from "projen";
39944
40012
  var STARLIGHT_ROLE = {
39945
40013
  DOCS: "docs",
39946
40014
  SITE: "site"
@@ -39982,10 +40050,10 @@ var StarlightProject = class extends AstroProject {
39982
40050
  turbo.compileTask.inputs.push("src/content/**");
39983
40051
  }
39984
40052
  if (userOptions.sampleContent === true) {
39985
- new SampleFile6(this, "src/content/docs/index.mdx", {
40053
+ new SampleFile7(this, "src/content/docs/index.mdx", {
39986
40054
  contents: DEFAULT_INDEX_MDX
39987
40055
  });
39988
- new SampleFile6(this, "src/content.config.ts", {
40056
+ new SampleFile7(this, "src/content.config.ts", {
39989
40057
  contents: DEFAULT_CONTENT_CONFIG_TS
39990
40058
  });
39991
40059
  }