Skip to content

Commit ef9fc27

Browse files
committed
docs: readme
1 parent 8b72856 commit ef9fc27

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Github Mobsuccess action
22

3-
mvp : ok
4-
53
[![NPM](https://github.com/mobsuccess-devops/github-actions-mobsuccess/actions/workflows/npm.yml/badge.svg)](https://github.com/mobsuccess-devops/github-actions-mobsuccess/actions/workflows/npm.yml)
64

75
This action validates that the various Mobsuccess policies are enforced when
@@ -38,18 +36,18 @@ The `validate-pr` action automatically detects GenAI-assisted PRs and adds the `
3836

3937
### How it works
4038

41-
The system uses a **unified approach** for all AI coding agents (Claude Code, Cursor, etc.):
39+
The system uses a **unified approach** for AI coding agents (Claude Code, Cursor, etc.):
4240

4341
```
4442
Agent (Claude Code or Cursor) stops
4543
46-
Hook "stop" creates .genai-assisted marker file
44+
Hook "stop" creates marker file (.claude-assisted or .cursor-assisted)
4745
4846
User commits (from any terminal, IDE, etc.)
4947
5048
Git hook "prepare-commit-msg" detects marker
5149
52-
Adds "Co-Authored-By: GenAI" + removes marker
50+
Adds "Co-Authored-By: Claude" or "Co-Authored-By: Cursor" + removes marker
5351
5452
GitHub Action detects Co-Authored-By → Adds label
5553
```
@@ -60,20 +58,27 @@ The git hooks are automatically configured via `npm install` (postinstall script
6058

6159
#### Files involved
6260

63-
| File | Purpose |
64-
| ------------------------------ | --------------------------------------------------------------- |
65-
| `.githooks/prepare-commit-msg` | Adds `Co-Authored-By: GenAI` if `.genai-assisted` marker exists |
66-
| `.cursor/hooks.json` | Cursor hook: creates `.genai-assisted` when agent stops |
67-
| `.claude/settings.json` | Claude Code hook: creates `.genai-assisted` when agent stops |
68-
| `.genai-assisted` | Temporary marker file (gitignored) |
61+
| File | Purpose |
62+
|------|---------|
63+
| `.githooks/prepare-commit-msg` | Adds `Co-Authored-By` based on marker file |
64+
| `.cursor/hooks.json` | Cursor hook: creates `.cursor-assisted` when agent stops |
65+
| `.claude/settings.json` | Claude Code hook: creates `.claude-assisted` when agent stops |
66+
| `.cursor-assisted` / `.claude-assisted` | Temporary marker files (gitignored) |
67+
68+
#### Co-Authored-By tags
69+
70+
| Agent | Marker file | Co-Authored-By |
71+
|-------|-------------|----------------|
72+
| **Cursor** | `.cursor-assisted` | `Co-Authored-By: Cursor` |
73+
| **Claude Code** | `.claude-assisted` | `Co-Authored-By: Claude` |
6974

7075
#### How to enable for your agent
7176

7277
**Claude Code**: Already configured in `.claude/settings.json`
7378

7479
**Cursor**: Already configured in `.cursor/hooks.json`
7580

76-
**Other agents**: Create a hook that runs `touch .genai-assisted` when the agent stops working.
81+
**Other agents**: Create a hook that runs `touch .<agent>-assisted` when the agent stops, and add detection in `.githooks/prepare-commit-msg`.
7782

7883
### Detection Triggers (GitHub Action)
7984

@@ -83,7 +88,7 @@ The action checks for AI assistance in:
8388
- **Branch Name**: AI-prefixed branches (`cursor/`, `claude/`, `ai/`, `copilot/`, etc.)
8489
- **PR Body**: Mentions of AI tools (Claude, Copilot, ChatGPT, Cursor, etc.)
8590
- **Existing Labels**: AI-related labels (ai-assisted, copilot, claude, etc.)
86-
- **Commits**: Messages containing AI signatures or `Co-Authored-By: GenAI`
91+
- **Commits**: Messages containing AI signatures or `Co-Authored-By: Claude/Cursor`
8792
- **Commit Timing**: Rapid commits (3+ commits within 30 seconds = AI agent behavior)
8893
- **Comments**: Bot comments or user mentions of AI usage
8994

@@ -95,7 +100,8 @@ Claude, Claude Code, ChatGPT, GPT-4, Copilot, GitHub Copilot, Gemini, Cursor, Wi
95100

96101
```
97102
# Commit signatures (added automatically by hooks)
98-
- Co-Authored-By: GenAI
103+
- Co-Authored-By: Claude
104+
- Co-Authored-By: Cursor
99105
- Co-Authored-By: Claude <[email protected]>
100106
- Generated with [Claude Code](https://claude.ai/code)
101107
- [Copilot] / [Claude] / [ChatGPT] in commit messages

0 commit comments

Comments
 (0)