@greeana/jira-dev-workflow
v0.1.1
Published
CLI for Jira-backed development workflows: issue search/create, commit preparation, implementation comments, and imports.
Maintainers
Readme
@greeana/jira-dev-workflow
Publishable npm CLI plus Codex skill template for Jira-backed development workflows.
What it does
- find matching Jira issues for a diff or free text
- reuse open issues and avoid reusing closed ones
- create a new issue when no suitable open issue exists
- prepare commit plans from staged or working-tree changes
- save the selected Jira issue locally for later commands
- post implementation comments, reports, and screenshots
- create git commits with Jira key prefixes
- import Jira issues from CSV
Package model
This package is designed to be published as:
@greeana/jira-dev-workflowThe included Codex skill calls the published CLI through npx, so consumers do not need to vendor the source code into each repo.
Consumer repo layout
Each consumer repo keeps its own local workflow state and secrets under:
.jira-dev-workflow/config.json
.jira-dev-workflow/.env.local
.jira-dev-workflow/state/current-issue.jsonThe CLI searches upward from the current working directory until it finds .jira-dev-workflow/.
See the examples under examples/.jira-dev-workflow/.
Minimal config:
{
"projectKey": "JDW",
"defaultIssueType": "Task",
"issueLinkType": "Relates",
"commitMessageFormat": "{issueKey} {message}",
"searchLimit": 5,
"reuseClosedAsRelatedLink": true,
"stateFile": "state/current-issue.json"
}Minimal env:
JIRA_BASE_URL=https://your-company.atlassian.net
[email protected]
JIRA_API_TOKEN=your_jira_api_tokenLocal development
npm install
npm test
npm run test-install
node ./bin/jira-dev-workflow.mjs helpBootstrap the current repo with the local skill and required workflow files:
npx -y @greeana/jira-dev-workflow installTest the skill locally before any npm publish by generating a skill that calls this checkout directly:
node ./bin/jira-dev-workflow.mjs install --localGenerate a repo-local skill that keeps using the npm preview dist-tag:
npx -y @greeana/jira-dev-workflow@preview install --previewGenerate a repo-local skill pinned to an exact published version:
npx -y @greeana/[email protected] install --version 0.1.1-preview.0Smoke-test the current checkout as if it were published by packing it locally and
running the packaged install command against the current repo:
npm run test-installPass extra install flags through the smoke test:
npm run test-install -- --force --project-key JDWTo run the same dev-only smoke test against a different repo, change into that repo and invoke this checkout's script directly:
node --import tsx /absolute/path/to/jira-dev-workflow/scripts/test-install.tsThis creates:
.codex/skills/jira-dev-workflow/SKILL.md
.jira-dev-workflow/config.json
.jira-dev-workflow/.env.localIt also ensures .gitignore contains:
.codex/skills/jira-dev-workflow/
.jira-dev-workflow/config.json
.jira-dev-workflow/.env.local
.jira-dev-workflow/state/Published CLI examples
Show all commands:
npx -y @greeana/jira-dev-workflow helpInstall into the current repo:
npx -y @greeana/jira-dev-workflow installInstall into the current repo and write the Jira project key up front:
npx -y @greeana/jira-dev-workflow install --project-key JDWInstall into the current repo and make the generated skill keep using the npm preview tag:
npx -y @greeana/jira-dev-workflow@preview install --previewInstall into the current repo and pin the generated skill to an exact published version:
npx -y @greeana/[email protected] install --version 0.1.1-preview.0Install into the current repo and make the generated skill call a local checkout directly:
node /absolute/path/to/jira-dev-workflow/bin/jira-dev-workflow.mjs install --localTest Jira access:
npx -y @greeana/jira-dev-workflow testPrepare a commit plan from staged changes:
npx -y @greeana/jira-dev-workflow prepare-commit --jsonExpected interactive flow for agents:
- User stages changes and asks to prepare a Jira commit.
- Agent runs
prepare-commit --json. - Agent shows matching open issues, or a drafted new issue if no open issue fits, and asks the user which path to take.
- Agent does not create an issue, commit, or post back to Jira yet.
- After the user selects an issue or approves a new one, the agent previews the final commit message with
commit --dry-runand asks for confirmation. - Only after explicit confirmation does the agent create the commit.
- Posting an implementation comment or attachments back to Jira is a separate confirmation step unless the user explicitly asked for that as part of the workflow.
Prepare a commit plan from working-tree changes:
npx -y @greeana/jira-dev-workflow prepare-commit --working-tree --jsonSearch Jira directly:
npx -y @greeana/jira-dev-workflow find --text "qa agent isolation" --jsonCreate a new Jira issue:
npx -y @greeana/jira-dev-workflow create \
--summary "Improve QA agent isolation" \
--description-file /tmp/issue.mdCreate a new Jira issue related to a closed one:
npx -y @greeana/jira-dev-workflow create \
--summary "Improve QA agent isolation" \
--description-file /tmp/issue.md \
--related-issue JDW-19Save the selected issue for later commands:
npx -y @greeana/jira-dev-workflow use --issue JDW-23Show the current saved issue:
npx -y @greeana/jira-dev-workflow currentAttach a screenshot or artifact:
npx -y @greeana/jira-dev-workflow attach --issue JDW-23 --file /absolute/path/to/screenshot.pngAdd an implementation report comment:
npx -y @greeana/jira-dev-workflow comment \
--issue JDW-23 \
--text $'Implemented in:\nhttps://git.example.com/commit/abcdef'Add a comment with inline screenshots:
npx -y @greeana/jira-dev-workflow comment \
--issue JDW-23 \
--text $'Implementation report:\n\nPrepared commit result:\n\n[[inline-file]]\n\nJira issue after preparation:\n\n[[inline-file]]' \
--inline-file /absolute/path/to/screenshot-1.png \
--inline-file /absolute/path/to/screenshot-2.pngInline screenshot placement rules:
[[inline-file]]inserts the next inline screenshot in order.[[inline-file:2]]inserts a specific inline screenshot by 1-based index.- Place placeholders as their own paragraphs to position screenshots between report sections.
- If you pass inline screenshots without placeholders, they are appended after the text for backward compatibility.
Preview the final commit message:
npx -y @greeana/jira-dev-workflow commit --issue JDW-23 -m "Improve QA agent isolation" --dry-runCreate the git commit:
npx -y @greeana/jira-dev-workflow commit --issue JDW-23 -m "Improve QA agent isolation"Import issues from CSV:
npx -y @greeana/jira-dev-workflow import --file .jira-dev-workflow/import.csvCodex skill
The portable skill template lives in:
skill/jira-dev-workflow/SKILL.mdInstall it into either:
~/.codex/skills/jira-dev-workflow/or:
.codex/skills/jira-dev-workflow/The skill assumes the published package name is @greeana/jira-dev-workflow. If you publish under a different scope or package name, update the npx commands in the skill file.
Release checklist
- Update
versioninpackage.json. - Run
npm test. - Run
npm run test-installfrom this repo, or invokescripts/test-install.tsfrom a scratch repo. - Run
npm pack --dry-runand confirm only the intended files are included. - Confirm
skill/jira-dev-workflow/SKILL.mdstill points tonpx -y @greeana/jira-dev-workflow. - Publish with
npm publish --access public. - Smoke-test the published package:
npx -y @greeana/jira-dev-workflow help
npx -y @greeana/jira-dev-workflow test