Import requirements
You can add requirements manually in the web UI, one at a time with the CLI, or in bulk from draft files.
Create one requirement
tiden requirement create \
--product-id <product-id> \
--title "User can resend an invitation" \
--content "Admins can resend a pending invite without changing its role."
Use a Markdown file for longer content:
tiden requirement create \
--product-id <product-id> \
--title "Checkout tax calculation" \
--content-file ./requirements/checkout-tax.md
Use - to read the body from stdin:
cat ./requirements/checkout-tax.md | tiden requirement create \
--product-id <product-id> \
--title "Checkout tax calculation" \
--content-file -
Include source provenance
Create sources.json:
{
"sources": [
{
"sourceType": "repo_file",
"title": "Checkout handler",
"repoPath": "app/checkout/handler.ts",
"lineStart": 20,
"lineEnd": 84
}
]
}
Pass it during create or update:
tiden requirement create \
--product-id <product-id> \
--title "Checkout validates inventory" \
--content-file ./requirements/inventory.md \
--sources-file ./sources.json
Push a draft tree
For larger imports, create a draft JSON file and run a dry run:
tiden draft dry-run ./requirements-draft.json
Push the draft:
tiden requirement push ./requirements-draft.json
If the push is interrupted:
tiden requirement resume ./requirements-draft.json
Rollback using the push log:
tiden requirement rollback ./push-log.json
Import to a branch
Create a branch first:
tiden branch create --product-id <product-id> --name import/initial-requirements
Then create or update requirements with:
--branch import/initial-requirements
Review and merge the branch when the import looks correct.