@mangeshraut712/merge-guide 0.0.0-stage → 0.1.1

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.
Files changed (29) hide show
  1. package/CONTRIBUTING.md +33 -0
  2. package/LICENSE +21 -0
  3. package/README.md +152 -2
  4. package/bin/merge-guide.js +118 -0
  5. package/docs/README.md +12 -0
  6. package/docs/adoption.json +17 -0
  7. package/docs/analytics.md +12 -0
  8. package/docs/case-studies.md +37 -0
  9. package/docs/compatibility.md +13 -0
  10. package/docs/examples.md +36 -0
  11. package/docs/installer.md +74 -0
  12. package/docs/maintenance.md +13 -0
  13. package/docs/results.md +60 -0
  14. package/docs/troubleshooting.md +20 -0
  15. package/package.json +42 -4
  16. package/skills/oss-contribution-insights/LICENSE +21 -0
  17. package/skills/oss-contribution-insights/SKILL.md +67 -0
  18. package/skills/oss-contribution-insights/agents/openai.yaml +7 -0
  19. package/skills/oss-contribution-insights/assets/example-ledger.json +36 -0
  20. package/skills/oss-contribution-insights/references/c-cpp-contributions.md +27 -0
  21. package/skills/oss-contribution-insights/references/contributor-playbook.md +47 -0
  22. package/skills/oss-contribution-insights/references/evidence-and-ledger.md +96 -0
  23. package/skills/oss-contribution-insights/references/maintenance.md +35 -0
  24. package/skills/oss-contribution-insights/references/validation.md +10 -0
  25. package/skills/oss-contribution-insights/scripts/collect_pr_evidence.py +145 -0
  26. package/skills/oss-contribution-insights/scripts/ledger.py +138 -0
  27. package/skills/oss-contribution-insights/scripts/test_collect_pr_evidence.py +141 -0
  28. package/skills/oss-contribution-insights/scripts/test_ledger.py +117 -0
  29. package/skills/oss-contribution-insights/scripts/test_packaging.py +33 -0
@@ -0,0 +1,33 @@
1
+ # Contributing to Mangesh’s Merge Guide
2
+
3
+ Beginners and experienced contributors are welcome. Useful contributions include clearer examples, reproducible helper bugs, accessibility improvements, repository-policy edge cases and tested workflow improvements. This project is MIT licensed; preserve provenance and do not copy material you cannot contribute under compatible terms.
4
+
5
+ ## Start small
6
+
7
+ Search existing issues and PRs before starting. For substantial behavior changes, open an issue explaining the problem and proposed scope first. A label or comment is not a promise of acceptance. Do not open duplicate proposals or repeatedly ping reviewers.
8
+
9
+ Fork this repository, create a focused branch, and preserve any existing work. The installable skill lives in `skills/oss-contribution-insights`; the invocation is retained for compatibility after the repository rename. README and these contributor files serve people and are outside the installable skill.
10
+
11
+ ## Validate your change
12
+
13
+ Run from the repository root with Python 3.10+:
14
+
15
+ ```bash
16
+ python3 -m unittest discover -s skills/oss-contribution-insights/scripts -p 'test_*.py' -v
17
+ ```
18
+
19
+ For helper behavior changes, add synthetic regression tests that fail before the fix and pass afterward. Do not use real private ledgers, session histories or credentials as fixtures. Tests mock GitHub responses; report live-access tests separately. Check Markdown links and examples. For guidance changes, include a realistic scenario showing what decision changes and why, including a counterexample when appropriate. Do not claim a merge proves causation or correctness.
20
+
21
+ ## Open a reviewable PR
22
+
23
+ Explain the problem, bounded change, exact validation and remaining limitations. Disclose material AI assistance and personally review what you submit. Never invent human testing or authorship. Keep commits free of secrets, private paths, raw contribution histories and unrelated generated files. Do not change permissions, credentials, workflows or automatic publication behavior as incidental cleanup.
24
+
25
+ Respond to feedback with evidence rather than repeated nudges. Only a maintainer can decide acceptance. A green test suite is necessary evidence where applicable, not guaranteed approval or a promise of response timing.
26
+
27
+ ## Improving the guide
28
+
29
+ Prefer demonstrated problems and repeatable validation over new rules based on one anecdote. Scope repository-specific advice to that repository. Keep the contribution workflow first and analytics optional. New languages or tools should solve a concrete problem rather than add prestige or complexity. Avoid collecting personal data or adding telemetry by default.
30
+
31
+ ## Security and privacy
32
+
33
+ Do not post secrets, private logs or exploitable vulnerability details in public issues. Use a private reporting method explicitly published by the maintainer if one is available; this repository does not currently document a verified private reporting channel or response SLA. If none is available, withhold sensitive details and ask how to share them privately without including the exploit or data. A public issue template is not a private channel.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mangesh Raut
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,153 @@
1
- # Temporary Holding Version
1
+ # Mangesh’s Merge Guide
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A practical skill for tackling useful open-source issues and taking a fix through reproduction, implementation, testing, PR review and maintainer follow-through. It is for doing contribution work, not generating an analytics report.
4
+
5
+ The repository is `mangeshs-merge-guide`. The installed skill folder and invocation retain `oss-contribution-insights` for compatibility; the npm package is separately named `@mangeshraut712/merge-guide`. The workflow learns from accepted work, setbacks and corrections, but does not claim to guarantee acceptance.
6
+
7
+ ## Start here
8
+
9
+ - **First contribution:** follow [installation below](#terminal-installer), then the [beginner worked example](docs/examples.md).
10
+ - **Existing PR or expert workflow:** use the [review and native-library examples](docs/examples.md) and the [contributor playbook](skills/oss-contribution-insights/references/contributor-playbook.md).
11
+ - **What is proven:** read [validation results and limits](docs/results.md) and [three evidence-backed accepted contributions](docs/case-studies.md).
12
+ - **Need help or want to improve it:** [troubleshooting](docs/troubleshooting.md), [contributing](CONTRIBUTING.md), and [maintenance](docs/maintenance.md).
13
+
14
+ ## The working loop
15
+
16
+ 1. **Choose useful work:** verify maintainer need, policy, ownership, duplicates and a feasible test.
17
+ 2. **Reproduce:** establish the supported base, actual failure, expected contract and execution path.
18
+ 3. **Fix and validate:** implement within authorized scope; demonstrate failing-before/passing-after behavior where applicable and run final-head checks.
19
+ 4. **Prepare the PR:** independently inspect the diff; explain the problem, change, evidence and remaining risks. Publish only with authorization.
20
+ 5. **Handle review:** map each comment to a change or reasoned response and supporting evidence. Respect authorship rules and maintainer attention.
21
+ 6. **Follow through:** distinguish author-fixable issues from maintainer gates; verify acceptance or closure and learn from later corrections.
22
+
23
+ The output of a work session is a concrete patch or next step, exact validation results, unresolved feedback and the next action's owner. Historical ledgers and counts support a decision only when relevant; they are not the primary deliverable.
24
+
25
+ ## Beginner to experienced contributor
26
+
27
+ The [contributor playbook](skills/oss-contribution-insights/references/contributor-playbook.md) covers first-issue setup, triage, fixes, PR preparation, review comments, respectful disagreement, blocked checks, complex changes and post-merge follow-through. Communication examples are private draft structures, never automatic messages. Expertise changes the depth of explanation, not the verification standard.
28
+
29
+ ## Terminal installer
30
+
31
+ **Release 0.1.0:** install from npm using the commands below. The installer has passed native Linux, macOS and Windows checks. The [source installer](#quick-start-from-source) remains available.
32
+
33
+ Install with Node.js 22, 24 or 26 LTS and npm:
34
+
35
+ ```sh
36
+ npx @mangeshraut712/merge-guide install --target codex --dry-run
37
+ npx @mangeshraut712/merge-guide install --target codex
38
+ ```
39
+
40
+ Replace `codex` with `claude` or `cursor`. The dry run shows the destination without writing; an existing installation is refused. To keep the installation in a project, run from that project's root and add `--scope project`. For reproducibility, use `@mangeshraut712/merge-guide@0.1.0` instead of the unversioned package name. See [installer options and safe upgrades](docs/installer.md).
41
+
42
+ These are the registry commands for release **0.1.0**. [npm package](https://www.npmjs.com/package/@mangeshraut712/merge-guide) · [release validation](docs/results.md). The installer provides the skill files; your chosen agent must already be installed and configured.
43
+
44
+ ### Quick start from source
45
+
46
+ **Requirements:** Node.js 20+ for the installer and a working, configured agent runtime. Git is optional (GitHub’s Download ZIP works too). Python is needed only for the optional evidence helpers. Review downloaded source first.
47
+
48
+ After obtaining this repository, run from its root in your terminal (PowerShell or a POSIX shell):
49
+
50
+ ```text
51
+ node bin/merge-guide.js install --target codex --dry-run
52
+ node bin/merge-guide.js install --target codex
53
+ ```
54
+
55
+ Replace `codex` with `claude` or `cursor` for that runtime. Add `--scope project` to install only in your current project. Start with the dry run: it shows the exact destination without writing. Existing files are not overwritten. See [safe upgrades and local npx](docs/installer.md).
56
+
57
+ | Runtime | User-level destination | How to use it | Verified here |
58
+ | --- | --- | --- | --- |
59
+ | Codex | `~/.agents/skills/oss-contribution-insights` | `$oss-contribution-insights` | Linux discovery and display metadata; task execution host-blocked |
60
+ | Claude Code | `~/.claude/skills/oss-contribution-insights` (or `CLAUDE_CONFIG_DIR`) | `/oss-contribution-insights` | Destination handling only; runtime discovery not tested |
61
+ | Cursor | `~/.cursor/skills/oss-contribution-insights` | `/oss-contribution-insights` in Agent chat | Destination handling only; runtime discovery not tested |
62
+
63
+ Release checks passed on native Linux, macOS and Windows runners with Node 20 and 24, including packed CLI installation, file integrity, dry runs and no-overwrite behavior. This is not a promise of support in every IDE or AI platform.
64
+
65
+ ## Use the skill
66
+
67
+ First obtain this public repository using GitHub’s **Code → Download ZIP**, extract it, and open a terminal in the extracted repository root. If you prefer Git and have it installed:
68
+
69
+ ```sh
70
+ git clone https://github.com/mangeshraut712/mangeshs-merge-guide.git
71
+ cd mangeshs-merge-guide
72
+ ```
73
+
74
+ The release checks include a fresh clone of the renamed repository. Review the files before installing.
75
+
76
+ The skill folder is [`skills/oss-contribution-insights`](skills/oss-contribution-insights). Copy that complete directory to a skills location supported by your agent. For Codex, review the files, then copy it into `~/.agents/skills/oss-contribution-insights` without overwriting an existing installation. A working, configured Codex runtime is required to execute the skill; copying files alone does not provide one.
77
+
78
+ From the repository root, this POSIX-shell example copies the complete folder and refuses an existing target, including a dangling symlink. Stop other installers before running it; it is not a concurrent installer or updater. Windows users should copy the folder using their supported installation method without overwriting an existing copy.
79
+
80
+ ```sh
81
+ (
82
+ set -eu
83
+ source_dir="skills/oss-contribution-insights"
84
+ target="$HOME/.agents/skills/oss-contribution-insights"
85
+ test -f "$source_dir/SKILL.md"
86
+ if [ -e "$target" ] || [ -L "$target" ]; then
87
+ printf '%s\n' "Target already exists; inspect it before updating: $target" >&2
88
+ exit 1
89
+ fi
90
+ mkdir -p "$HOME/.agents/skills"
91
+ cp -R "$source_dir" "$target"
92
+ test -f "$target/SKILL.md"
93
+ test -f "$target/LICENSE"
94
+ )
95
+ ```
96
+
97
+ Check installation, discovery and invocation separately: files present means installed; the configured runtime listing the enabled skill means discovered; a completed task using it establishes invocation. Use your Codex version's supported skill-listing interface and verify the unchanged name `oss-contribution-insights`. Optional display metadata may vary by runtime. A runtime, sandbox or sign-in error before task execution does not prove the package failed. Use supported setup/help flows; do not copy credentials or bypass security controls to make a check pass.
98
+
99
+ Invoke `$oss-contribution-insights`, for example:
100
+
101
+ > Help me tackle this issue: check its scope and existing fixes, reproduce the bug, implement and test the smallest useful change locally, then prepare a PR draft. Do not publish yet.
102
+
103
+ For an existing PR:
104
+
105
+ > Read the current review feedback, inspect the actual diff, and address the authorized changes. Report final-head test evidence and any maintainer-only gates; draft replies without sending them.
106
+
107
+ This GitHub copy is separate from any personal skill installed in ChatGPT. Updating one does not automatically update the other. This repository does not install schedules or enable access to accounts.
108
+
109
+ ## C and C++ work
110
+
111
+ The [C/C++ track](skills/oss-contribution-insights/references/c-cpp-contributions.md) covers real build configurations, regression tests, ownership and undefined behavior, sanitizers, concurrency, portability and ABI compatibility. The skill is Markdown and the optional evidence helpers remain Python: no demonstrated performance or integration need justifies a native rewrite of those small JSON/network tools. No C/C++ binary or compiler validation is claimed.
112
+
113
+ ## Optional evidence helpers
114
+
115
+ Python 3.10+; the optional live collector also requires an already authenticated GitHub CLI (`gh`). No third-party Python packages are required by the helpers.
116
+
117
+ ```bash
118
+ python3 skills/oss-contribution-insights/scripts/ledger.py summary skills/oss-contribution-insights/assets/example-ledger.json
119
+ python3 skills/oss-contribution-insights/scripts/collect_pr_evidence.py OWNER/REPO NUMBER --output /path/to/private/new-snapshot.json
120
+ python3 -m unittest discover -s skills/oss-contribution-insights/scripts -p 'test_*.py' -v
121
+ ```
122
+
123
+ The collector performs GET requests only. It records partial failures and head changes; it does not fetch repository policy, diffs or logs, verify tests, or publish anything. Offline tests use mocked responses; a green test suite is not proof of live GitHub access.
124
+
125
+ ## Privacy and scope
126
+
127
+ This public package contains generic guidance, code and synthetic examples only. No personal contribution ledger, private retrospective, session history, credentials or watcher checkpoints are included. Keep collected evidence outside this checkout and review it before sharing. A PR inventory is not an inventory of every kind of GitHub contribution.
128
+
129
+ Permissions remain separate: using the skill does not authorize external messages, pushes, PRs, merges, account changes or scheduling. Respect repository AI/human-authorship policies and access denials. Do not use another identity or route to bypass restrictions.
130
+
131
+ ## Open-source contributions welcome
132
+
133
+ [Open an issue](https://github.com/mangeshraut712/mangeshs-merge-guide/issues/new/choose) for a reproducible problem or scoped improvement, or [submit a pull request](https://github.com/mangeshraut712/mangeshs-merge-guide/pulls). Read [CONTRIBUTING.md](CONTRIBUTING.md) for setup, tests, review expectations and privacy guidance. Acceptance depends on usefulness, correctness and maintainer review, not activity volume.
134
+
135
+ [WhoBurnedMore](https://github.com/arhxam/whoburnedmore) is a reference for inspectable open-source tooling and clear privacy documentation, not a dependency or a token-usage goal. No code is copied from it, and this guide does not upload usage data or start background sync.
136
+
137
+ ## Provenance and development
138
+
139
+ Adapted from the author's personal OSS Contribution Insights skill, with private research removed. This is an independent community project, not an official GitHub or OpenAI product. Codex Insights was a packaging example only, not the purpose or data source of this workflow.
140
+
141
+ Changes should include relevant offline tests and sourced, scoped reasoning. Do not turn a single merge into a universal success rule. Never commit real account-wide evidence as a test fixture.
142
+
143
+ ## License
144
+
145
+ [MIT](LICENSE). The installable skill includes the same license notice. Contributions are welcome under the project’s existing terms.
146
+
147
+ ## Project status and adoption
148
+
149
+ [Codex Insights](https://github.com/mangeshraut712/codex-insights) creates private Codex workflow reports and optional shareable aggregate profiles. These are separate skills with different installation routes.
150
+
151
+ As of **November 12, 2026**, this repository has **0 stars and 0 forks**. The pre-release snapshot predates npm publication, so its npm download count is **unavailable**, not a measured zero. Run `npm run metrics` to refresh the dated snapshot. GitHub release assets have **0 recorded downloads**. See [dated adoption data and methodology](docs/analytics.md), [current compatibility and validation](docs/compatibility.md), and the [documentation index](docs/README.md). Adoption counts do not measure skill effectiveness.
152
+
153
+ The 0.1.1 candidate fixes managed upgrades after Python helpers generate bytecode. The npm commands above remain pinned to the published release until the new version is available.
@@ -0,0 +1,118 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import os from 'node:os';
5
+ import crypto from 'node:crypto';
6
+ import {fileURLToPath} from 'node:url';
7
+
8
+ const NAME = 'oss-contribution-insights';
9
+ const MARKER = '.merge-guide-install.json';
10
+ const packageRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
11
+ const digest = data => crypto.createHash('sha256').update(data).digest('hex');
12
+ const exists = async p => { try {return await fs.lstat(p);} catch(e) {if(e.code==='ENOENT') return null; throw e;} };
13
+
14
+ export function destination({target, scope='user', home=os.homedir(), cwd=process.cwd(), dest, claudeConfig=process.env.CLAUDE_CONFIG_DIR, platformPath=path}) {
15
+ if(dest) {
16
+ if(target || scope !== 'user') throw new Error('--dest cannot be combined with --target or --scope');
17
+ return platformPath.resolve(cwd, dest);
18
+ }
19
+ if(!['codex','claude','cursor'].includes(target)) throw new Error('Choose --target codex|claude|cursor or an explicit --dest directory.');
20
+ if(!['user','project'].includes(scope)) throw new Error('--scope must be user or project');
21
+ if(target==='claude' && scope==='user' && claudeConfig) return platformPath.resolve(cwd,claudeConfig,'skills',NAME);
22
+ const root = scope==='user' ? home : cwd;
23
+ const folder = {codex:'.agents',claude:'.claude',cursor:'.cursor'}[target];
24
+ return platformPath.join(root,folder,'skills',NAME);
25
+ }
26
+
27
+ async function rejectSymlinkAncestors(p) {
28
+ let current=path.resolve(p);
29
+ while(true) {
30
+ const stat=await exists(current);
31
+ if(stat?.isSymbolicLink()) throw new Error(`Refusing symlink path: ${current}`);
32
+ if(stat && !stat.isDirectory()) throw new Error(`Not a directory: ${current}`);
33
+ const parent=path.dirname(current); if(parent===current) break; current=parent;
34
+ }
35
+ }
36
+
37
+ async function inventory(root, skipMarker=false, skipGenerated=false) {
38
+ const files={};
39
+ async function walk(dir,rel='') {
40
+ for(const entry of await fs.readdir(dir,{withFileTypes:true})) {
41
+ if(skipMarker && rel==='' && entry.name===MARKER) continue;
42
+ if(skipGenerated && (entry.name==='__pycache__' || /\.py[co]$/.test(entry.name))) continue;
43
+ const r=rel ? `${rel}/${entry.name}` : entry.name;
44
+ if(entry.isSymbolicLink()) throw new Error(`Refusing symlink in skill: ${r}`);
45
+ if(entry.isDirectory()) await walk(path.join(dir,entry.name),r);
46
+ else if(entry.isFile()) files[r]=await fs.readFile(path.join(dir,entry.name));
47
+ else throw new Error(`Unsupported file: ${r}`);
48
+ }
49
+ }
50
+ await walk(root);return files;
51
+ }
52
+ const hashes = files => Object.fromEntries(Object.keys(files).sort().map(k=>[k,digest(files[k])]));
53
+
54
+ export async function install({dest,source=path.join(packageRoot,'skills',NAME),dryRun=false,upgrade=false,version='0.1.1'}) {
55
+ dest=path.resolve(dest);
56
+ await rejectSymlinkAncestors(dest);
57
+ const files=await inventory(source,false,true);
58
+ if(!files['SKILL.md'] || !files.LICENSE || files[MARKER]) throw new Error('Invalid packaged skill');
59
+ const prior=await exists(dest);
60
+ if(prior) {
61
+ if(!upgrade) throw new Error('Destination already exists. Use --upgrade only for an unchanged managed installation.');
62
+ const markerStat=await exists(path.join(dest,MARKER));
63
+ if(!markerStat?.isFile() || markerStat.isSymbolicLink()) throw new Error('Existing installation is not managed; no files changed.');
64
+ const marker=JSON.parse(await fs.readFile(path.join(dest,MARKER),'utf8'));
65
+ if(marker.name!==NAME || marker.schema!==1 || JSON.stringify(hashes(await inventory(dest,true,true)))!==JSON.stringify(marker.files)) throw new Error('Existing files were modified or added; preserve them manually before upgrading.');
66
+ } else if(upgrade) throw new Error('No existing managed installation to upgrade.');
67
+ if(dryRun) return {destination:dest,action:prior?'upgrade':'install',dryRun:true,files:Object.keys(files).length};
68
+ const parent=path.dirname(dest);
69
+ await fs.mkdir(parent,{recursive:true});
70
+ await rejectSymlinkAncestors(parent);
71
+ const lock=dest+'.install-lock';
72
+ const lockHandle=await fs.open(lock,'wx',0o600);
73
+ let stage,backup;
74
+ try {
75
+ // Cooperating installers share this lock. Recheck state after acquiring it.
76
+ const now=await exists(dest);
77
+ if(Boolean(now)!==Boolean(prior)) throw new Error('Destination changed during installation; retry after inspection.');
78
+ await rejectSymlinkAncestors(dest);
79
+ if(prior) {
80
+ const marker=JSON.parse(await fs.readFile(path.join(dest,MARKER),'utf8'));
81
+ if(marker.name!==NAME || marker.schema!==1 || JSON.stringify(hashes(await inventory(dest,true,true)))!==JSON.stringify(marker.files)) throw new Error('Existing installation changed; upgrade cancelled.');
82
+ }
83
+ stage=await fs.mkdtemp(path.join(parent,'.merge-guide-stage-'));
84
+ for(const [rel,data] of Object.entries(files)) {
85
+ const out=path.join(stage,...rel.split('/'));await fs.mkdir(path.dirname(out),{recursive:true});await fs.writeFile(out,data,{flag:'wx'});
86
+ }
87
+ await fs.writeFile(path.join(stage,MARKER),JSON.stringify({schema:1,name:NAME,version,files:hashes(files)},null,2)+'\n',{flag:'wx',mode:0o600});
88
+ if(prior) {backup=dest+'.backup-'+crypto.randomUUID();await fs.rename(dest,backup);}
89
+ try {await fs.rename(stage,dest);stage=null;} catch(e) {if(backup) {await fs.rename(backup,dest);backup=null;}throw e;}
90
+ return {destination:dest,action:prior?'upgraded':'installed',backup:backup??null,files:Object.keys(files).length};
91
+ } finally {
92
+ if(stage) await fs.rm(stage,{recursive:true,force:true});
93
+ await lockHandle.close();await fs.unlink(lock);
94
+ }
95
+ }
96
+
97
+ const HELP=`Mangesh’s Merge Guide installer
98
+ Usage: merge-guide install --target codex|claude|cursor [--scope user|project] [--dry-run] [--upgrade]
99
+ merge-guide install --dest PATH [--dry-run] [--upgrade]
100
+ Installs the complete skill, not the agent runtime. --dest is the exact skill folder.
101
+ No credentials, telemetry, background jobs or automatic updates. Existing files are preserved.
102
+ `;
103
+ export async function main(args=process.argv.slice(2)) {
104
+ if(!args.length || args.includes('--help') || args.includes('-h')) {console.log(HELP);return;}
105
+ if(args[0]!=='install') throw new Error('Expected install; use --help.');
106
+ const options={};
107
+ for(let i=1;i<args.length;i++) {
108
+ const a=args[i];
109
+ if(['--dry-run','--upgrade'].includes(a)) options[a==='--dry-run'?'dryRun':'upgrade']=true;
110
+ else if(['--target','--scope','--dest'].includes(a)) {const v=args[++i];if(!v || v.startsWith('--')) throw new Error(`Missing value for ${a}`);if(options[a.slice(2)])throw new Error(`Duplicate ${a}`);options[a.slice(2)]=v;}
111
+ else throw new Error(`Unknown argument: ${a}`);
112
+ }
113
+ const pkg=JSON.parse(await fs.readFile(path.join(packageRoot,'package.json'),'utf8'));
114
+ const result=await install({...options,dest:destination(options),version:pkg.version});
115
+ console.log(JSON.stringify(result,null,2));
116
+ if(!options.dryRun)console.log('Files installed. Verify discovery in your configured agent, then invoke oss-contribution-insights. Task execution and upstream acceptance are separate checks.');
117
+ }
118
+ if(process.argv[1] && await fs.realpath(process.argv[1]).catch(()=>null)===fileURLToPath(import.meta.url)) main().catch(e=>{console.error(`merge-guide: ${e.message}`);process.exitCode=1;});
package/docs/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # Documentation
2
+
3
+ Start with the [project README](../README.md) for installation and first use.
4
+
5
+ - [Analytics](analytics.md)
6
+ - [Case studies](case-studies.md)
7
+ - [Examples](examples.md)
8
+ - [Installer](installer.md)
9
+ - [Maintenance](maintenance.md)
10
+ - [Results](results.md)
11
+ - [Troubleshooting](troubleshooting.md)
12
+ - [Compatibility and validation](compatibility.md)
@@ -0,0 +1,17 @@
1
+ {
2
+ "checked_at": "2026-11-12T08:39:58.889859+00:00",
3
+ "repository": "mangeshraut712/mangeshs-merge-guide",
4
+ "github": {
5
+ "source": "https://api.github.com/repos/mangeshraut712/mangeshs-merge-guide",
6
+ "stars": 0,
7
+ "forks": 0,
8
+ "release_asset_downloads_lifetime": 0
9
+ },
10
+ "npm": {
11
+ "package": "@mangeshraut712/merge-guide",
12
+ "source": "https://registry.npmjs.org/%40mangeshraut712%2Fmerge-guide",
13
+ "status": "not_published",
14
+ "downloads_source": "https://api.npmjs.org/downloads/point/last-month/%40mangeshraut712%2Fmerge-guide",
15
+ "last_month": null
16
+ }
17
+ }
@@ -0,0 +1,12 @@
1
+ # Adoption analytics
2
+
3
+ The machine-readable [snapshot](adoption.json) records its UTC retrieval time and source URLs. It contains public aggregate counts only; the installer sends no tracking events.
4
+
5
+ - **Stars and forks:** current GitHub repository counters, not people actively using the skill.
6
+ - **Release asset downloads:** sum across every page of GitHub releases. This excludes source archives, repository clones and npm downloads. Repeat downloads are included.
7
+ - **npm downloads:** the npm API’s last-month window, including its start/end dates when available. Downloads are not unique users or successful installs. A missing package is `not_published` and its download value is `null`, never an invented zero.
8
+ - API failures abort refresh and preserve the previous snapshot. Its date stays unchanged. Registry existence does not establish package quality or successful invocation.
9
+
10
+ Refresh from the repository root with `npm run metrics` (Python 3.9+, authenticated GitHub CLI and network access required). Review and commit `docs/adoption.json`; update any dated README summary from the same snapshot. No recurring job is installed.
11
+
12
+ The metrics do not establish better contribution acceptance rates, model accuracy or time savings. Those require a defined comparison dataset and reproducible evaluation. Fixture tests demonstrate supported behavior only.
@@ -0,0 +1,37 @@
1
+ # Three accepted contributions: facts and transferable decisions
2
+
3
+ Public GitHub PR metadata and changed-file patches checked on 12 November 2026. Each PR below is authored by `mangeshraut712`, has `merged: true` and a non-null merge timestamp. These are selected examples, not a complete contribution inventory or controlled experiment. No private ledger is published. Test code was inspected; upstream tests were **not rerun** for this documentation. Acceptance does not prove the guide caused a merge or that code cannot have later defects.
4
+
5
+ ## 1. Fix the real CLI entry point
6
+
7
+ **Accepted contribution:** [Walmart Labs JSON-to-GraphQL #50](https://github.com/walmartlabs/json-to-simple-graphql-schema/pull/50), merged 11 November 2026 at 21:05 UTC. [Acceptance commit](https://github.com/walmartlabs/json-to-simple-graphql-schema/commit/47b855cb101981812f4bebf3cbde44b5488bfe7e).
8
+
9
+ **Problem reported:** the CLI's yargs subpath import failed under Node 22+. **Observed change:** `app.js` imports the package root instead. The [reviewed test](https://github.com/walmartlabs/json-to-simple-graphql-schema/blob/ab93dc5a8ab80c5ec32495da2f7dcb0ee5ce8585/test/integration.spec.js) spawns `node app.js` with `--baseType` and `--prefix`, supplies a fixture through stdin and asserts the generated schema.
10
+
11
+ **Evidence boundary:** the PR reports 12 tests passing plus lint/format checks. That is author-reported execution, not a new independent run here. The code demonstrates an entry-point integration assertion, not a certified all-Node-version compatibility matrix.
12
+
13
+ **Decision to reuse:** test the command users actually run, including options and input flow, rather than proving only a library helper works. This is a test-design lesson, not an established reason the maintainer accepted the PR.
14
+
15
+ ## 2. Assert the user-visible diagnostic contract
16
+
17
+ **Accepted contribution:** [AWS Labs Stickler #553](https://github.com/awslabs/stickler/pull/553), merged 11 November 2026 at 22:24 UTC. [Acceptance commit](https://github.com/awslabs/stickler/commit/f6a0493e13df0733d4678c965dc73ac6ef9ae06d).
18
+
19
+ **Problem reported:** warnings from the public `StructuredModel.compare_with` call pointed at an internal library line. **Observed change:** explicit stack levels account for the wrapper and `warn_once` frames, with a changelog entry. The [regression file](https://github.com/awslabs/stickler/blob/0be6e62aad79a2300362cc5c227fea1c73c15acd/tests/structured_object_evaluator/test_compare_with_warning_stacklevel.py) calls the public API and asserts warning category, filename and exact caller line. It resets warning memoization so the test can observe the warning.
20
+
21
+ **Evidence boundary:** the PR reports focused and broader verification. This documentation verifies the assertions in the public patch, not execution of the full suite or every diagnostic path.
22
+
23
+ **Decision to reuse:** define observable success precisely. “A warning happened” would not prove its location is useful to a caller. Test the contract the user depends on, including relevant wrappers.
24
+
25
+ ## 3. Test keyboard behavior, not merely handler configuration
26
+
27
+ **Accepted contribution:** [Adobe React Spectrum #10868](https://github.com/adobe/react-spectrum/pull/10868), merged 11 November 2026 at 21:46 UTC. [Acceptance commit](https://github.com/adobe/react-spectrum/commit/6fc06c8e39770dd5530809b85a6fbdef94d86afc).
28
+
29
+ **Problem reported:** select-all handling in an open multi-select ComboBox interfered with selecting input text. **Observed change:** `disallowSelectAll: true` is passed to the collection behavior. The [final-head test](https://github.com/adobe/react-spectrum/blob/c613318748179d3c7377ea9319ad01ea1c0fdf75/packages/react-aria-components/test/ComboBox.test.js) opens the popover, focuses input, sends Ctrl+A, checks selection bounds, types replacement text, checks filtered options and asserts that option-selection callbacks were not triggered.
30
+
31
+ **Evidence boundary:** this inspected test uses Ctrl+A and a test environment. It does not independently establish every browser, OS modifier or assistive-technology interaction. The original PR summary is less detailed than the final patch, so the final patch is the source for the test description.
32
+
33
+ **Decision to reuse:** exercise the promised interaction and relevant side effects. Verify final accepted code, not only the original PR description or a configuration flag.
34
+
35
+ ## Apply without overgeneralizing
36
+
37
+ All three show bounded changes with explicit behavioral assertions in accepted patches. That common observation does not isolate the cause of acceptance. Project need, policy, competing work, reviewer judgment and timing differ. Use these examples to improve a test plan, not to promise a merge rate or skip repository-specific review.
@@ -0,0 +1,13 @@
1
+ # Compatibility and validation — November 2026
2
+
3
+ Use maintained LTS runtimes. [Node’s release table](https://nodejs.org/en/about/previous-releases) lists Node 22, 24 and 26 as LTS in November 2026; Node 18 and 20 are end-of-life. Repository constraints take precedence over upgrading an upstream contributor’s toolchain just because a newer version exists.
4
+
5
+ ## Mangesh’s Merge Guide
6
+
7
+ The dependency-free installer retains its Node 20 minimum for compatibility, but new installations should use Node 22, 24 or 26. CI covers these maintained versions across Linux, macOS and Windows. No model SDK or runtime dependency is needed to copy the skill files.
8
+
9
+ Codex uses `~/.agents/skills`, Claude Code uses `~/.claude/skills`, and Cursor uses `~/.cursor/skills`; use the explicit installer target. Destination/file-integrity tests are distinct from running a contribution inside each host. Agent installation and authentication remain prerequisites.
10
+
11
+ Follow the [Codex skill format](https://learn.chatgpt.com/docs/build-skills), [Claude Code skills](https://code.claude.com/docs/en/skills/) and [Cursor skills](https://cursor.com/docs/skills). Keep the compatibility invocation `oss-contribution-insights` while the visible project name is Mangesh’s Merge Guide. Refresh discovery or start a new host session after installation.
12
+
13
+ Run `npm test`, `npm run test:package`, and `python3 -B -m unittest discover -s skills/oss-contribution-insights/scripts -p 'test_*.py'`. These verify installer and evidence-tool behavior. Historical accepted PRs illustrate techniques; they are not a controlled experiment showing the skill caused acceptance.
@@ -0,0 +1,36 @@
1
+ # Worked contribution examples
2
+
3
+ These three examples are **synthetic**, not claims of submitted or merged work. Use them as task patterns. Actual authorization and repository policies still apply.
4
+
5
+ ## Beginner: a reproducible bug
6
+
7
+ **Request:** “Help with this issue. Work locally and prepare a PR draft; do not publish.”
8
+
9
+ 1. Read issue context, current contribution instructions and competing PRs. If an active fix exists, inspect it rather than starting a duplicate.
10
+ 2. Record supported version and base revision. Reproduce the reported failure using the project's documented test harness.
11
+ 3. Add a behavioral test that fails for the same reason. Implement the bounded fix and rerun it; run applicable final checks.
12
+ 4. Prepare a handoff with the problem, fix, red/green evidence, exact commands and remaining limits. Do not invent successful execution.
13
+
14
+ **Example output structure:** Target/head → reproduced failure → changed files → failing-before/passing-after checks → unrun checks → draft PR → author or maintainer next step.
15
+
16
+ **Stop condition:** the supported branch is already fixed, the issue is claimed, reproduction fails, or project policy forbids the proposed assistance. Report the specific reason rather than manufacturing a patch.
17
+
18
+ ## Existing PR: respond to a review
19
+
20
+ **Request:** “Address this review on my current PR. Draft the response but do not send.”
21
+
22
+ Suppose a reviewer asks whether a new helper is called by the public API. Inspect actual wiring and current head, not only helper tests. Add or run a consumer-level regression where authorized. Map each comment to the change/evidence or a reasoned explanation.
23
+
24
+ **Draft pattern, only when facts are verified:** “The public entry point now exercises [path]. [Test command] covers [behavior] on [head]. [Remaining limitation].”
25
+
26
+ A reviewer request is evidence of wanted work, not permission for unrelated API changes. Do not resolve threads or publish replies automatically. A passing test does not replace required approvals.
27
+
28
+ ## Expert: native-library compatibility
29
+
30
+ **Request:** “Investigate this C++ crash and prepare a compatible fix.”
31
+
32
+ Confirm compiler, standard, build configuration and affected version. Reduce the crash; examine ownership and undefined behavior. Prefer a fix preserving public layout and ABI when required. Run regression tests and supported sanitizer configurations separately. Document platforms and configurations not tested.
33
+
34
+ **Decision example:** a private implementation correction may be preferable to changing a public structure if both solve the defect, but prove the choice against this project's contract. Do not assert universal ABI safety or a performance improvement without measurement.
35
+
36
+ See [C/C++ contribution guidance](../skills/oss-contribution-insights/references/c-cpp-contributions.md).
@@ -0,0 +1,74 @@
1
+ # Terminal installer
2
+
3
+ The installer copies the bundled skill to an explicit agent destination. It does not install or authenticate the agent, run a model, upload evidence, add telemetry, start background jobs or change account settings.
4
+
5
+ ## Current availability
6
+
7
+ **Registry release:** `@mangeshraut712/merge-guide@0.1.0`. Use the npm commands below, or the source and locally packed alternatives.
8
+
9
+ Release 0.1.0 is published for the public npm package [`@mangeshraut712/merge-guide`](https://www.npmjs.com/package/@mangeshraut712/merge-guide):
10
+
11
+ ```sh
12
+ npx @mangeshraut712/merge-guide install --target codex --dry-run
13
+ npx @mangeshraut712/merge-guide install --target codex
14
+ ```
15
+
16
+ Use `--target claude` or `--target cursor` for those tools. To pin the exact release, use `npx @mangeshraut712/merge-guide@0.1.1`. See [validation results](results.md) for the distinction between installer checks, runtime discovery, and native task execution.
17
+
18
+ After reviewing/downloading this repository, from its root:
19
+
20
+ ```sh
21
+ node bin/merge-guide.js install --target codex --dry-run
22
+ node bin/merge-guide.js install --target codex
23
+ ```
24
+
25
+ To test the real npm packaging locally (no registry publication):
26
+
27
+ ```sh
28
+ npm pack
29
+ npx --package ./mangeshraut712-merge-guide-0.1.1.tgz merge-guide install --target codex --dry-run
30
+ npx --package ./mangeshraut712-merge-guide-0.1.1.tgz merge-guide install --target codex
31
+ ```
32
+
33
+ These commands use Node/npm, not POSIX-specific copy syntax; npm may ask for execution consent. Node 20+ and npm are prerequisites. A package name alone is not ownership proof; verify the npm owner and linked source repository.
34
+
35
+ ## Destinations and compatibility
36
+
37
+ | Target | User scope (default) | Project scope |
38
+ | --- | --- | --- |
39
+ | `--target codex` | home `.agents/skills/oss-contribution-insights` | current directory `.agents/skills/oss-contribution-insights` |
40
+ | `--target claude` | home `.claude/skills/oss-contribution-insights`, or `CLAUDE_CONFIG_DIR/skills/...` | current directory `.claude/skills/oss-contribution-insights` |
41
+ | `--target cursor` | home `.cursor/skills/oss-contribution-insights` | current directory `.cursor/skills/oss-contribution-insights` |
42
+
43
+ Use `--scope project` only from the intended repository root. `--dest PATH` selects the **exact skill folder**, is mutually exclusive with `--target`, and does not certify that another agent supports this format.
44
+
45
+ Official documentation: [Codex](https://learn.chatgpt.com/docs/build-skills), [Claude Code](https://code.claude.com/docs/en/skills/), [Claude configuration roots](https://code.claude.com/docs/en/claude-directory), [Cursor](https://cursor.com/docs/skills). Codex uses `$oss-contribution-insights`; Claude Code uses `/oss-contribution-insights`; Cursor exposes `/oss-contribution-insights` in its Agent chat skill selector. Verify discovery in your installed version.
46
+
47
+ All 15 installer tests, packaged-install checks and 28 Python tests pass on native Linux, macOS and Windows CI runners with Node 20 and 24. [View the six-job release check](https://github.com/mangeshraut712/mangeshs-merge-guide/actions/runs/43182990902). Claude/Cursor discovery and native agent-task invocation remain **unverified**; installer success does not establish runtime execution or every filesystem/ACL configuration. This is not universal IDE support, cloud installation or synchronization. A working agent runtime remains required; the earlier Codex task invocation was host-blocked despite successful discovery.
48
+
49
+ ## Existing installations and upgrades
50
+
51
+ By default existing directories, files and symlinks are refused. The installer also refuses symlink ancestors, so symlinked home/config paths need deliberate inspection and an explicit real destination, not a blind workaround.
52
+
53
+ `--upgrade` accepts only a previous installer-managed directory whose recorded files are unchanged and which has no additional files. Manual installations and edited copies are refused. A successful upgrade retains a complete sibling backup and prints its path; it does not delete the backup automatically. Keep private ledgers outside the skill folder. Running Python inside an installed copy can add `__pycache__` files that deliberately block a later upgrade; use `python3 -B` when running its tests to avoid new bytecode. Inspect and preserve existing additions manually rather than expecting automatic deletion. Generated Python caches are excluded from the source copy and npm package. A stale `.install-lock` needs inspection before any manual cleanup; do not remove a lock while another installation is active.
54
+
55
+ The lock coordinates instances of this installer, not hostile filesystem mutations or every third-party installer. Stop other writers first. `--dry-run` checks the plan but cannot guarantee that state will remain unchanged afterward.
56
+
57
+ ## Maintainer validation and release
58
+
59
+ ```sh
60
+ npm test
61
+ npm run test:package
62
+ python3 -B -m unittest discover -s skills/oss-contribution-insights/scripts -p 'test_*.py' -v
63
+ npm pack --dry-run
64
+ ```
65
+
66
+ Review the allowlisted manifest: only installer, skill sources, synthetic example, public documentation/metadata and MIT notices belong in a package. No private data, bytecode, tokens or machine paths. There are no npm lifecycle scripts or dependencies.
67
+
68
+ Publishing is separate: verify the correct npm identity and scope ownership through supported authentication, comply with npm's required approval/2FA flow, and verify the resulting registry version and a fresh npx install before announcing release. Do not register accounts, create tokens or change credentials just to bypass an access failure. See [npm publishing requirements](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages).
69
+
70
+ ## npm authentication and updates
71
+
72
+ Installing this public package does not require `npm login`. Check registry access with `npm ping`, then use the documented `npx` command. Publisher authentication is separate: maintainers can verify their account with `npm whoami` and use `npm login --auth-type=web` when signed out. Complete email and two-factor verification in the browser; never paste credentials into a chat or issue.
73
+
74
+ Running the Python helpers may create `__pycache__` directories and `.pyc` files. Managed upgrades ignore generated bytecode when checking for local edits and retain it in the backup. Changes to source files or added notes still block an upgrade, so they can be preserved deliberately.
@@ -0,0 +1,13 @@
1
+ # Maintaining the project
2
+
3
+ Keep the execution workflow useful and reviewable; avoid adding rules simply because a count increased.
4
+
5
+ 1. Start from a reproducible helper problem, a scoped contributor difficulty, or an evidenced policy change. Link permissible public sources or use synthetic examples. Never commit private retrospective ledgers or session logs.
6
+ 2. Propose a bounded change and its counterexample. Single-project lessons remain scoped to that project. Distinguish observations from interpretations and avoid acceptance guarantees.
7
+ 3. For code, run the documented tests and add regression coverage. For instruction changes, use a fresh scenario without giving the evaluator the intended conclusion. Evaluate whether the output is actionable and respects evidence/authorization.
8
+ 4. Review the diff independently where practical. Check links, installable-folder integrity, license parity, interface compatibility, truthful result claims and supported runtimes.
9
+ 5. Verify published content after release. Record tested versions and limitations in the results documentation rather than silently broadening claims.
10
+
11
+ The repository and personal ChatGPT skill are separate copies. Neither updates the other automatically. This project does not itself schedule monitoring, install a daemon, send maintainer messages or grant GitHub access. Maintaining a real contribution ledger needs a separately authorized private location and complete checkpoints; see the skill's [incremental evidence guidance](../skills/oss-contribution-insights/references/maintenance.md).
12
+
13
+ Contributions are welcome through [CONTRIBUTING.md](../CONTRIBUTING.md). Do not change accounts, credentials, permissions or auto-publication behavior as incidental maintenance.