Skip to content

Comments

Default report + contribution guidelines#2

Merged
RemoteCTO merged 4 commits intomainfrom
default-report
Feb 13, 2026
Merged

Default report + contribution guidelines#2
RemoteCTO merged 4 commits intomainfrom
default-report

Conversation

@RemoteCTO
Copy link
Owner

@RemoteCTO RemoteCTO commented Feb 13, 2026

Summary

  • claudelog with no arguments runs a default
    report (--week) instead of printing usage
  • Default flags configurable via defaultReport
    in config.json
  • Added full open source community files:
    CONTRIBUTING.md, SECURITY.md, CHANGELOG.md,
    issue templates, PR template

Changes

Default report (bin/claudelog, lib/config.mjs)

  • No-arg invocation dispatches to report.mjs
    with ["--week"]
  • New defaultReport config option: array of
    CLI flags passed to report
  • Validation: must be array of strings, falls
    back to ["--week"] on invalid config

Community files

  • CONTRIBUTING.md — setup, code style, TDD,
    PR process, conventional commits
  • SECURITY.md — vulnerability reporting via
    GitHub Security Advisories or email
  • CHANGELOG.md — retroactive entries for
    0.1.0, 0.2.0, and unreleased changes
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • .github/PULL_REQUEST_TEMPLATE.md

Docs (README.md, config.example.json)

  • CLI usage section updated with default report
  • defaultReport documented in configuration

Version bump to 0.3.0

Test plan

  • npm test passes
  • npm run lint passes
  • claudelog with no args runs weekly report
  • Custom defaultReport in config respected
  • claudelog --help mentions default behaviour
  • CI green on Node 18, 20, 22

claudelog with no args now runs a report using configurable
defaults (defaultReport in config.json, fallback --week)
instead of printing usage. Bump to 0.3.0.
Copilot AI review requested due to automatic review settings February 13, 2026 09:09
Issue templates, PR template, security policy,
changelog, and updated contributing guide to
match project conventions.
@RemoteCTO RemoteCTO merged commit a363641 into main Feb 13, 2026
4 checks passed
@RemoteCTO RemoteCTO deleted the default-report branch February 13, 2026 09:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a default report feature that runs when claudelog is invoked without arguments, adds comprehensive contributing guidelines, and bumps the version to 0.3.0. The change improves user experience by providing a quick way to view recent time logs without remembering CLI flags.

Changes:

  • Default report behavior: claudelog now runs --week report by default instead of showing usage
  • Configuration: Added defaultReport option to customize default report flags
  • Documentation: Added CONTRIBUTING.md with setup, style, and testing guidelines

Reviewed changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
bin/claudelog Added default report dispatch logic and loadDefaultReport function
lib/config.mjs Added defaultReport validation with array and string filtering
test/bin/claudelog.test.mjs Restructured tests and added coverage for default report behavior
test/lib/config.test.mjs Added tests for defaultReport validation
README.md Updated CLI usage section with default report examples
CONTRIBUTING.md New file with comprehensive contribution guidelines
config.example.json Added defaultReport example configuration
package.json, package-lock.json, .claude-plugin/plugin.json Version bump to 0.3.0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

result.defaultReport =
result.defaultReport.filter(
(a) => typeof a === 'string'
);
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validateConfig function doesn't handle the case where defaultReport becomes an empty array after filtering non-string entries (e.g., defaultReport: [42, null]). This could result in report.mjs being called with no arguments. Consider adding validation to ensure the array has at least one element, or falling back to DEFAULT_ARGS if the filtered array is empty.

Suggested change
);
);
if (result.defaultReport.length === 0) {
console.error(
'timelog: defaultReport must contain ' +
'at least one string entry. Ignoring.'
);
delete result.defaultReport;
}

Copilot uses AI. Check for mistakes.
assert.deepEqual(
cfg.defaultReport, ['--week']
);
});
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing test case for empty defaultReport array (e.g., defaultReport: []). This edge case could result in report.mjs being called with no arguments, which might not behave as expected. Consider adding a test to verify the behavior when defaultReport is an empty array after filtering.

Suggested change
});
});
it('handles empty array after filtering',
() => {
const cfg = validateConfig({
...DEFAULT_CONFIG,
defaultReport: [
42, null, undefined,
],
});
assert.strictEqual(
cfg.defaultReport, undefined
);
});

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant