ShtukbaseStandard
package page→ /base/contours.md

pages/base/contours.md

62 lines, 2.9 KB. As a page.

  1. ---
  2. type: Collection
  3. title: Contours
  4. icon: "🔁"
  5. description: "The states of records of all layers: each contour has its own phases, moves and conditions."
  6. itemType: Contour
  7. items: {mode: type}
  8. writeTo: /base/contours
  9. properties:
  10. collection: {kind: text, label: "Which collection it drives"}
  11. views:
  12. - id: contours--table
  13. name: All contours
  14. layout: table
  15. fields: {}
  16. sorting:
  17. - {propertyId: title, direction: ascending}
  18. properties:
  19. - {name: title, visible: true, width: 360}
  20. - {name: collection, visible: true}
  21. ---
  22. A contour is the life cycle of one type of record: states, the moves between them and the conditions of the moves. Each layer keeps its contours with itself, in the folder `<layer>/contours/`; this collection gathers them all by the type `Contour`, so here they are in one place. A contour drives a collection through a field of the "phase" type in the collection file itself.
  23. A state that is computed from data (overdue, done, a verdict) is never a contour. A program computes such values itself; they are not set by hand.
  24. ## How a contour is written
  25. A contour is a page `<layer>/contours/<name>.md`; its phases are pages in the folder of the same name `<layer>/contours/<name>/<phase>.md`. The phase name is the file name without `.md`; this name is what stands in the state field of a record.
  26. ```yaml
  27. # /research/contours/hypotheses.md
  28. type: Contour
  29. title: Hypotheses
  30. collection: /research/hypotheses # which collection it drives
  31. stageField: status # the state field in the records
  32. entry: /research/contours/hypotheses/proposed
  33. phases:
  34. - /research/contours/hypotheses/proposed
  35. - /research/contours/hypotheses/checking
  36. - /research/contours/hypotheses/paused
  37. ```
  38. ```yaml
  39. # /research/contours/hypotheses/paused.md
  40. type: Phase
  41. title: Paused
  42. category: dropped # arriving · working · done · dropped
  43. doneWhen: "decided whether to return to the hypothesis or not"
  44. next:
  45. - {to: /research/contours/hypotheses/proposed, gate: person}
  46. ```
  47. In the collection the state field is of the "phase" kind and names the contour: `status: {kind: phase, contour: /research/contours/hypotheses}`. The exits of a phase (`next`) are the allowed moves; the last phase has `next: []`. A phase with `fromAnywhere: true` accepts a record from any phase. The conditions of the moves and who makes them are written in the text of the contour as a "From, To, Condition" table.
  48. ## Enforcers of the norms
  49. | Norm | What it means | Enforcer (check) |
  50. |---|---|---|
  51. | [CNT-R01](/norms/rules/contours/CNT-R01.md) | The state of a record is a phase of its contour | `states` |
  52. | [CNT-R02](/norms/rules/contours/CNT-R02.md) | A contour is connected as a whole: the collection exists, the phases exist, the entry and exits are phases of this contour | `contour` |
  53. | [CNT-R03](/norms/rules/contours/CNT-R03.md) | A record changes its state only by an allowed move | `moves` |