Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

fix(init): make RuFlo attribution trailer opt-in (#1670) (#1815)

rUv7bfd650eec3b
diff --git a/v3/@claude-flow/cli/__tests__/commands-deep.test.ts b/v3/@claude-flow/cli/__tests__/commands-deep.test.ts
index b50cf6b194..215e88f478 100644
--- a/v3/@claude-flow/cli/__tests__/commands-deep.test.ts
+++ b/v3/@claude-flow/cli/__tests__/commands-deep.test.ts
@@ -1487,9 +1487,19 @@ describe('Init System', () => {
expect(perms.deny).toBeDefined();
});
- it('should include attribution', () => {
+ it('should NOT include attribution by default (opt-in per #1670)', () => {
+ // #1670 β€” attribution (Co-Authored-By trailer) is now opt-in to avoid
+ // silently injecting a third-party co-author into user commits.
const settings = generateSettings(DEFAULT_INIT_OPTIONS) as Record<string, unknown>;
+ expect(settings.attribution).toBeUndefined();
+ });
+
+ it('should include attribution when opted in', () => {
+ const settings = generateSettings({ ...DEFAULT_INIT_OPTIONS, attribution: true }) as Record<string, unknown>;
expect(settings.attribution).toBeDefined();
+ const attribution = settings.attribution as Record<string, string>;
+ expect(attribution.commit).toContain('Co-Authored-By:');
+ expect(attribution.pr).toContain('Generated with');
});
it('should include env with agent teams enabled', () => {
diff --git a/v3/@claude-flow/cli/src/init/settings-generator.ts b/v3/@claude-flow/cli/src/init/settings-generator.ts
index 9fb7edc188..3babb7d093 100644
--- a/v3/@claude-flow/cli/src/init/settings-generator.ts
+++ b/v3/@claude-flow/cli/src/init/settings-generator.ts
@@ -41,11 +41,17 @@ export function generateSettings(options: InitOptions): object {
],
};
- // Add RuFlo attribution for git commits and PRs
- settings.attribution = {
- commit: 'Co-Authored-By: RuFlo <[email protected]>',
- pr: 'πŸ€– Generated with [RuFlo](https://github.com/ruvnet/ruflo)',
- };
+ // #1670 β€” RuFlo attribution (Co-Authored-By trailer + PR footer) is now
+ // OPT-IN. Default behavior no longer injects a third-party Co-Authored-By
+ // line into the user's commits β€” that pattern silently inflated GitHub
+ // contributor graphs and was hard to undo without rewriting history. Pass
+ // `--attribution` (or `attribution: true` in InitOptions) to enable.
+ if (options.attribution === true) {
+ settings.attribution = {
+ commit: 'Co-Authored-By: RuFlo <[email protected]>',
+ pr: 'πŸ€– Generated with [RuFlo](https://github.com/ruvnet/ruflo)',
+ };
+ }
// Note: Claude Code expects 'model' to be a string, not an object
// Model preferences are stored in claudeFlow settings instead
diff --git a/v3/@claude-flow/cli/src/init/types.ts b/v3/@claude-flow/cli/src/init/types.ts
index 32e4dbdb03..8da2a0c35f 100644
--- a/v3/@claude-flow/cli/src/init/types.ts
+++ b/v3/@claude-flow/cli/src/init/types.ts
@@ -316,6 +316,13 @@ export interface InitOptions {
* Set true via --no-global to keep the global Claude rules file pristine (#1744).
*/
skipGlobalClaudeMd?: boolean;
+ /**
+ * #1670 β€” opt in to writing the `attribution` block in `.claude/settings.json`
+ * (Co-Authored-By trailer + PR footer). Defaults to false: most users do not
+ * want a third-party Co-Authored-By line silently added to their commits and
+ * GitHub contributor graph. Pass `--attribution` to opt in.
+ */
+ attribution?: boolean;
}
/**