Skip to content

Conversation

@sgbett
Copy link
Contributor

@sgbett sgbett commented Jan 27, 2026

Summary

Adds configurable ADR numbering format to the create-adr skill, supporting both sequential and date-based naming.

Changes

  • Updated .claude/skills/create-adr/SKILL.md to document both numbering formats
  • Skill now reads adr.numbering_format from .architecture/config.yml

Configuration

adr:
  numbering_format: date-based  # or 'sequential' (default)

Formats

Format Example Filename
sequential ADR-001-use-react-for-frontend.md
date-based 20260125-ADR-use-react-for-frontend.md

Closes #6

🤖 Generated with Claude Code

Support both sequential (ADR-001) and date-based (20260125-ADR) formats
based on adr.numbering_format setting in .architecture/config.yml.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codenamev
Copy link
Owner

This is great, thanks! Could you please make sure to update the MCP as well?

@sgbett
Copy link
Contributor Author

sgbett commented Feb 10, 2026

Closing in favour of #8, which takes a fundamentally different approach.

This PR correctly added the numbering_format: date-based config option to create-adr/SKILL.md. However, in practice the LLM ignored or misapplied the config — using arbitrary date formats, not respecting the configured option, or applying it inconsistently. The problem is the same one identified in #4/#5: documenting deterministic operations as LLM instructions doesn't reliably produce deterministic behaviour.

#8 replaces this with a next-adr-number.sh shell script that reads the config and outputs the correct prefix every time. It also expands the config with explicit format strings:

numbering_format: date-based
# sequential_format: "000"     # zero-padding width (default: 000 = 3 digits)
# date_format: "%Y%m%d"        # strftime format for date-based (default: %Y%m%d)

This makes the format deterministic and user-configurable, rather than leaving it to LLM interpretation.

🤖 Generated with Claude Code

@sgbett sgbett closed this Feb 10, 2026
@sgbett sgbett deleted the feature/#6-date-based-adr-numbering branch February 11, 2026 00:28
sgbett added a commit to bettison-org/ai-software-architect that referenced this pull request Feb 12, 2026
* feat: add install-framework.sh for deterministic installation

Shell script handling all file operations for the setup-architect
skill: prerequisites check, framework file copy (using the exact
PR codenamev#5 path), clone removal, directory creation, config initialisation,
doc cleanup, and safe .git removal with all 5 safeguards.

Structured status tokens on stdout, errors on stderr, and specific
exit codes for each failure mode. This replaces LLM-interpreted
bash commands that caused repeated installation failures.

First implementation of ADR-009 (script-based deterministic operations).
Trigger condition met: bash command construction caused bugs (codenamev#4/codenamev#5).

Refs codenamev#8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add next-adr-number.sh for deterministic ADR prefix generation

Shell script that reads numbering config from .architecture/config.yml
and returns the correct ADR prefix. Supports sequential (zero-padded)
and date-based (strftime format) numbering.

Config options:
  numbering_format: sequential | date-based
  sequential_format: "000"   (zero-padding width, default: 3 digits)
  date_format: "%Y%m%d"      (strftime format, default: YYYYMMDD)

Includes collision detection: exits non-zero if an ADR with the same
prefix and topic already exists, alerting the user to a likely duplicate.

Supersedes PR codenamev#7 which documented date-based numbering as LLM-interpreted
instructions — this makes the config deterministic.

Refs codenamev#8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add sequential_format and date_format ADR config options

Expand ADR numbering configuration with explicit format strings:
- sequential_format: zero-padding pattern ("000" = 3 digits)
- date_format: strftime format string ("%Y%m%d" = YYYYMMDD)

Both are commented out with sensible defaults, making them
self-documenting. Backward compatible with existing
numbering_format: sequential | date-based.

Refs codenamev#8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: restructure setup-architect to use install script

Collapse 9-step workflow to 7 steps by replacing the three
deterministic steps (prerequisites, install, cleanup) with a single
invocation of install-framework.sh.

Project analysis now runs first (before installation) so the LLM
knows the tech stack before customisation begins.

All file operations are now handled by the script — the skill
only handles interpretive work (project analysis, team customisation,
principles, initial analysis, reporting).

Refs codenamev#8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: replace inline bash with script interface docs

Remove ~250 lines of bash code blocks from installation-procedures.md
that are now handled by install-framework.sh. Replace with script
interface documentation (arguments, exit codes, status tokens),
troubleshooting, and recovery procedures.

The reference file's role changes from "instructions for the LLM to
interpret" to "documentation for when things go wrong."

Refs codenamev#8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use American English spelling in upstream project files

British spellings (customise, analyse, initialise, prioritise) were
incorrectly introduced from personal CLAUDE.md preferences. This is an
upstream project that uses American English throughout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: replace inline ADR numbering with next-adr-number.sh

The create-adr skill now invokes the deterministic numbering script
instead of constructing bash commands inline. This ensures config
options (numbering_format, sequential_format, date_format) are always
respected, and adds collision detection for duplicate ADR topics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add script-based deterministic operations pattern

Documents the pattern for extracting deterministic operations into shell
scripts, first implementation of ADR-009. Includes when-to-script
criteria, interface conventions, script location conventions, and the
background that triggered implementation. Also updates create-adr
permission scope in the permissions table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add CI tests for install-framework.sh and next-adr-number.sh

Tests the actual scripts deterministically rather than simulating what
the LLM might do. Covers:

install-framework.sh:
- Success path (copy, cleanup, verify)
- Missing clone (exit 1)
- Relative path rejection (exit 1)

next-adr-number.sh:
- Sequential default (001, 002, 003)
- Sequential custom padding (0001)
- Date-based default (%Y%m%d)
- Date-based custom format (%Y-%m-%d)
- Collision detection (exit 2)
- Missing config falls back to defaults

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

feat: Add date-based ADR numbering format

2 participants