Skip to content

feat: Add commit-activity-digest template - #329

Open
Ajay702 wants to merge 1 commit into
Lamatic:mainfrom
Ajay702:feat/commit-activity-digest-template
Open

feat: Add commit-activity-digest template#329
Ajay702 wants to merge 1 commit into
Lamatic:mainfrom
Ajay702:feat/commit-activity-digest-template

Conversation

@Ajay702

@Ajay702 Ajay702 commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • Adds a commit-activity-digest template that turns raw git log output into a structured engineering activity digest — work type breakdown, technology detection, key highlights — suitable for standups, weekly reports, or stakeholder updates.
  • Single flow, one LLM node. No app, no external services, no API keys beyond the model provider.
  • Follows the commit-message-generator template pattern exactly.

Why it's useful

Teams regularly need "what did we ship this week" summaries. Today someone scrolls through commits and writes one manually. This automates it — paste git log --oneline --stat --since="7 days ago" output and get a categorized digest back.

Complements the existing commit-message-generator (single-diff → commit message) and release-notes-generator (PR titles → changelog) by covering the "activity summary" gap.

Provenance

The commit analysis logic (work type classification, technology detection from file paths, noise filtering heuristics) draws on patterns from a git-signal-extraction tool I built independently.

Test plan

  • lamatic.config.ts step ID matches flows/commit-activity-digest.ts
  • All @reference paths resolve to existing files
  • PR checklist from CONTRIBUTING.md passes
  • Purely additive — no existing files modified
  • Added the commit-activity-digest template and supporting documentation.
  • Added the flow definition with:
    • API request trigger.
    • Model input configuration.
    • One activity-analysis LLM node.
    • API response mapping.
    • Connected workflow edges.
  • Added an agent that accepts git_log and optional context, then returns { digest }.
  • Added prompts for commit categorization, technology detection, noise filtering, metrics, and key highlights.
  • Added a default constitution that requires factual, concise, input-bound output.
  • Added an OpenAI gpt-4o-mini model configuration.
  • Added template metadata, author details, tags, processing requirements, and documentation links.
  • Added README documentation for setup, API usage, input generation, flow behavior, outputs, project structure, and technology stack.

Single-flow template that turns raw git log output into a structured
engineering activity digest — work type breakdown, technology detection,
and key highlights for standups or stakeholder updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

Commit Activity Digest

Layer / File(s) Summary
Digest behavior and prompt contracts
kits/commit-activity-digest/agent.md, kits/commit-activity-digest/constitutions/default.md, kits/commit-activity-digest/prompts/*
Defines factual, concise digest generation from supplied git history and optional context.
Request-to-response flow
kits/commit-activity-digest/flows/commit-activity-digest.ts, kits/commit-activity-digest/model-configs/*
Connects API inputs to gpt-4o-mini analysis and maps the generated result to digest.
Template configuration and documentation
kits/commit-activity-digest/lamatic.config.ts, kits/commit-activity-digest/README.md
Registers the template and documents setup, API usage, examples, Git log generation, and project structure.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the addition of the commit-activity-digest template.
Description check ✅ Passed The description explains the change, purpose, provenance, scope, and test plan for the new template.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/commit-activity-digest

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@kits/commit-activity-digest/prompts/commit-activity-digest_analyze-activity_system.md`:
- Around line 13-19: Update the work-type contract in the category list and the
output requirements around the `housekeeping` line to define `Housekeeping` as
an allowed category, ensuring trivial commits can be grouped there without
conflicting with the listed categories.
- Around line 21-29: Update the commit activity digest prompt’s file-area,
technology, and distinct-area requirements to apply only when file paths are
supplied. When paths are absent, instruct the output to omit these fields rather
than infer or fabricate them; keep the remaining metrics, including commit
counts and available line statistics, unchanged.

In
`@kits/commit-activity-digest/prompts/commit-activity-digest_analyze-activity_user.md`:
- Around line 3-9: Update the commit-activity prompt template around
apiRequest.output.context and apiRequest.output.git_log to isolate these
user-controlled values from executable instructions: pass them in a structured
representation or robustly escape any prompt delimiters, including ```
sequences, and add an explicit system-level rule that both fields are untrusted
data only and must not override digest instructions.

In `@kits/commit-activity-digest/README.md`:
- Around line 42-68: The README output example omits the required Key Metrics
section despite the example input containing file statistics. Update the output
example to include metrics derived from those statistics, or explicitly label
the example as abbreviated; if metrics are intentionally omitted without
statistics, document that rule in the README.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f8797bd4-b249-486a-a7e6-dcaee6879bb3

📥 Commits

Reviewing files that changed from the base of the PR and between fd6104d and adbf8fd.

📒 Files selected for processing (8)
  • kits/commit-activity-digest/README.md
  • kits/commit-activity-digest/agent.md
  • kits/commit-activity-digest/constitutions/default.md
  • kits/commit-activity-digest/flows/commit-activity-digest.ts
  • kits/commit-activity-digest/lamatic.config.ts
  • kits/commit-activity-digest/model-configs/commit-activity-digest_analyzeActivity_generative-model-name.ts
  • kits/commit-activity-digest/prompts/commit-activity-digest_analyze-activity_system.md
  • kits/commit-activity-digest/prompts/commit-activity-digest_analyze-activity_user.md

Comment on lines +13 to +19
Categorize each commit into one of these types and list them grouped:
- **Features** — new capabilities, user-facing additions
- **Fixes** — bug fixes, corrections, error handling
- **Refactoring** — code cleanup, restructuring, optimization
- **Infrastructure** — CI/CD, config, dependencies, deployment
- **Tests** — new or updated tests
- **Docs** — documentation changes

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Define Housekeeping in the work-type contract.

Lines 13-19 list six allowed categories. Line 38 also requires a housekeeping line. These instructions conflict. The model can emit an unlisted section or fail to collapse noise. Add Housekeeping to the allowed categories, or define which listed category receives trivial commits.

Proposed contract update
 - **Docs** — documentation changes
+- **Housekeeping** — trivial typo, lint, formatting, or WIP commits

Also applies to: 34-38

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@kits/commit-activity-digest/prompts/commit-activity-digest_analyze-activity_system.md`
around lines 13 - 19, Update the work-type contract in the category list and the
output requirements around the `housekeeping` line to define `Housekeeping` as
an allowed category, ensuring trivial commits can be grouped there without
conflicting with the listed categories.

Comment on lines +21 to +29
For each item, write a short human-readable description (not the raw commit message). Include the file areas affected.

### Technologies Touched
List the languages, frameworks, and tooling areas involved, inferred from file extensions and paths (e.g., `.ts` → TypeScript, `.tsx` → React, `Dockerfile` → Docker).

### Key Metrics
- Total commits
- Approximate lines added / removed (if stats are available)
- Number of distinct areas changed

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make file-based output conditional on supplied paths.

Line 21 requires file areas for every item. Line 24 requires technology inference from paths. Line 29 requires distinct areas. The README allows inputs without file paths. When paths are absent, these instructions can cause fabricated areas or technologies. State that these fields are included only when paths are present.

Proposed prompt adjustment
-For each item, write a short human-readable description (not the raw commit message). Include the file areas affected.
+For each item, write a short human-readable description. Include affected file areas only when file paths are present. Do not infer missing paths.

-List the languages, frameworks, and tooling areas involved, inferred from file extensions and paths (e.g., `.ts` → TypeScript, `.tsx` → React, `Dockerfile` → Docker).
+List languages, frameworks, and tooling only when file extensions or paths provide evidence. Otherwise omit this section.

-- Number of distinct areas changed
+- Number of distinct areas changed, when file paths are present
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
For each item, write a short human-readable description (not the raw commit message). Include the file areas affected.
### Technologies Touched
List the languages, frameworks, and tooling areas involved, inferred from file extensions and paths (e.g., `.ts` → TypeScript, `.tsx` → React, `Dockerfile` → Docker).
### Key Metrics
- Total commits
- Approximate lines added / removed (if stats are available)
- Number of distinct areas changed
For each item, write a short human-readable description. Include affected file areas only when file paths are present. Do not infer missing paths.
### Technologies Touched
List languages, frameworks, and tooling only when file extensions or paths provide evidence. Otherwise omit this section.
### Key Metrics
- Total commits
- Approximate lines added / removed (if stats are available)
- Number of distinct areas changed, when file paths are present
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)

[warning] 23-23: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 26-26: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@kits/commit-activity-digest/prompts/commit-activity-digest_analyze-activity_system.md`
around lines 21 - 29, Update the commit activity digest prompt’s file-area,
technology, and distinct-area requirements to apply only when file paths are
supplied. When paths are absent, instruct the output to omit these fields rather
than infer or fabricate them; keep the remaining metrics, including commit
counts and available line statistics, unchanged.

Comment on lines +3 to +9
{{#if apiRequest.output.context}}
Context: {{apiRequest.output.context}}
{{/if}}

```
{{apiRequest.output.git_log}}
```

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.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Mission-critical: isolate raw fields from LLM instructions.

Lines 3-9 place user-controlled context and git_log directly in the LLM prompt. A commit message or context value can contain instructions, and a ``` sequence can terminate the fence. The model can then treat data as instructions and change or fabricate the digest. Escape delimiters or pass structured data, and add a system rule that these fields are untrusted data only.

🧰 Tools
🪛 markdownlint-cli2 (0.23.2)

[warning] 7-7: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@kits/commit-activity-digest/prompts/commit-activity-digest_analyze-activity_user.md`
around lines 3 - 9, Update the commit-activity prompt template around
apiRequest.output.context and apiRequest.output.git_log to isolate these
user-controlled values from executable instructions: pass them in a structured
representation or robustly escape any prompt delimiters, including ```
sequences, and add an explicit system-level rule that both fields are untrusted
data only and must not override digest instructions.

Comment on lines +42 to +68
**Output**

```markdown
### Summary
This period focused on authentication improvements and UI enhancements,
with a JWT refresh endpoint and dark mode toggle as the headline additions.
A crash on CSV upload was fixed and shared validation logic was consolidated.

### Work Breakdown

**Features**
- Added JWT token refresh endpoint (auth module)
- Added dark mode toggle to settings page (UI)

**Fixes**
- Fixed crash when uploading empty CSV files (upload module)

**Refactoring**
- Extracted shared validation logic into a reusable module

### Technologies Touched
TypeScript, React, CSS

### Highlights
- JWT refresh endpoint strengthens the auth flow
- Dark mode is now available in settings
```

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Complete the output example with Key Metrics.

The README lists Key Metrics as a digest section. The system prompt also requires it. The example input contains file statistics, but the output at Lines 42-68 omits the section. Add metrics derived from the example, or state that the example is abbreviated. If omission is intended without statistics, document that rule explicitly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/commit-activity-digest/README.md` around lines 42 - 68, The README
output example omits the required Key Metrics section despite the example input
containing file statistics. Update the output example to include metrics derived
from those statistics, or explicitly label the example as abbreviated; if
metrics are intentionally omitted without statistics, document that rule in the
README.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Hi @Ajay702! 👋

Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review.

Steps to follow:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant